{"openapi":"3.1.0","info":{"title":"WMS API","version":"1.0.0","description":"Every method is `POST /api/rpc` with a JSON-RPC 2.0 request body. The path key `/api/rpc#<method>` only keeps the operations apart in this file.\n\n**Errors are not standard JSON-RPC.** A failed call returns `{ \"id\", \"error\": { \"message\", \"data\": { \"req_uuid\", \"detail\" } } }` with no `jsonrpc` key and no numeric code.\n\nGenerated from openrpc.json (932 methods). Example idempotency key: `7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f`."},"servers":[{"url":"https://your-wms.example.com","description":"Your WMS installation"}],"tags":[{"name":"enterprise"},{"name":"master_data"},{"name":"inbound"},{"name":"inventory"},{"name":"outbound"},{"name":"tasks"},{"name":"reporting"},{"name":"rf"},{"name":"integration"}],"paths":{"/api/rpc#create_project":{"post":{"operationId":"create_project","summary":"Create a project","description":"Create a project\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n- The result is returned as is. It is not wrapped in a `data` object.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"UNIQUE_VIOLATION or INVALID_DATA","when":"The code already exists, or a value breaks a rule."}],"x-quark-module":"project","x-quark-operation":"create","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"create_project"},"params":{"type":"object","properties":{}}}},"example":{"jsonrpc":"2.0","id":1,"method":"create_project"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object"}}},"example":{"jsonrpc":"2.0","id":1,"result":{}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_projects":{"post":{"operationId":"list_projects","summary":"List projects (filtered)","description":"List projects (filtered)\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- The result is returned as is. It is not wrapped in a `data` object.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"project","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_projects"},"params":{"type":"object","properties":{}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_projects"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object"}}},"example":{"jsonrpc":"2.0","id":1,"result":{}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#update_project":{"post":{"operationId":"update_project","summary":"Update a project","description":"Update a project\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n- The result is returned as is. It is not wrapped in a `data` object.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"INVALID_DATA","when":"A value breaks a rule."}],"x-quark-module":"project","x-quark-operation":"update","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"update_project"},"params":{"type":"object","properties":{}}}},"example":{"jsonrpc":"2.0","id":1,"method":"update_project"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object"}}},"example":{"jsonrpc":"2.0","id":1,"result":{}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_project":{"post":{"operationId":"delete_project","summary":"Delete a project","description":"Delete a project\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n- The result is returned as is. It is not wrapped in a `data` object.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"DEPENDENT_DATA_EXIST","when":"Other rows still use this row."}],"x-quark-module":"project","x-quark-operation":"delete","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_project"},"params":{"type":"object","properties":{}}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_project"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object"}}},"example":{"jsonrpc":"2.0","id":1,"result":{}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#me":{"post":{"operationId":"me","summary":"Get current user info","description":"Get current user info\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- You must log in. The method skips the permission check, so every logged-in user can call it.\n- This method only reads. It changes nothing and needs no idempotency key.\n- A tenant extension cannot replace this method.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"user","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"me"},"params":{"type":"object","properties":{}}}},"example":{"jsonrpc":"2.0","id":1,"method":"me"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"default":null,"description":"When the account was created — the AUDIT block's \"Created\" field.\n\n`add_when` is NOT NULL on both `enterprise.user` and tenant-manager's `user`, so this is `Option` to tolerate a projection that did not select it, not because a created account can lack a creation time.\n\nAdded late, and the reason is worth keeping: migration 317 put \"Created\" on the detail form reading `add_when`, but this struct — the only thing the `is_rpc` BIO's `get_user` path can return — never carried the column, so the field rendered permanently blank. The form was right; the projection was short.","type":["string","null"]},"api_access":{"type":"boolean"},"date_format":{"type":"string"},"email":{"type":"string"},"employee_id":{"type":["string","null"]},"failed_login_attempts":{"format":"int32","type":"integer"},"full_name":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"last_failed_login_at":{"default":null,"type":["string","null"]},"last_login_at":{"default":null,"type":["string","null"]},"locale":{"type":"string"},"mode":{"type":"string"},"password_age_days":{"description":"\"Password age\" for the AUDIT block — derived from `pwd_changed_at`, in whole days. **Not a database column**: `#[field(skip)]` keeps it out of the SELECT projection (`sea_column_refs`), and `#[sqlx(default)]` keeps `derive(FromRow)` from trying to read a `password_age_days` column that doesn't exist. Populated by `UserBy::finish_computed_fields`, which every `UserBmc` fetch path calls — see there. `None` whenever `pwd_changed_at` is `None`; never a misleading `0`.","format":"int64","type":["integer","null"]},"pwd_changed_at":{"default":null,"type":["string","null"]},"rf_login":{"type":"boolean"},"status":{"$ref":"#/components/schemas/UserStatus"},"timezone":{"type":"string"},"typ":{"$ref":"#/components/schemas/UserTyp"},"username":{"type":"string"}},"required":["api_access","date_format","email","failed_login_attempts","id","locale","mode","rf_login","status","timezone","typ","username"],"title":"UserInfo","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"api_access":false,"date_format":"<date_format>","email":"<email>","failed_login_attempts":1,"id":1,"locale":"<locale>","mode":"<mode>","rf_login":false,"status":"Active","timezone":"<timezone>","typ":"User","username":"<username>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#create_user":{"post":{"operationId":"create_user","summary":"Create a new user — CRUD.","description":"Create a new user — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"user","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"create_user"},"params":{"type":"object","properties":{"data":{"properties":{"date_format":{"type":"string"},"email":{"type":"string"},"employee_id":{"type":["string","null"]},"full_name":{"description":"What an admin can meaningfully set when creating an account through the Users screen. Deliberately does NOT include the AUDIT-block columns (`last_login_at`, `failed_login_attempts`, `last_failed_login_at`, `pwd_changed_at`) — those are server-owned facts nobody sets at creation time either; see `UserForUpdate`'s doc comment for the full reasoning.","type":["string","null"]},"locale":{"type":"string"},"mode":{"type":"string"},"pwd_clear":{"description":"`pwd` is what the Users screen's field is called (form 171), as on [`UserForUpdate::pwd_clear`].","type":"string"},"status":{"anyOf":[{"$ref":"#/components/schemas/UserStatus"},{"type":"null"}],"description":"`None` leaves the column's DB default (`Active`) in place. An admin can still pick `Invited` explicitly for an account that hasn't set a password yet."},"timezone":{"type":"string"},"typ":{"anyOf":[{"$ref":"#/components/schemas/UserTyp"},{"type":"null"}],"description":"The New form's Type dropdown. `None` leaves the column default (`User`). Anything else is decided by a superuser only — see [`UserBmc::ensure_may_set_typ`]."},"username":{"type":"string"}},"required":["date_format","email","locale","mode","pwd_clear","timezone","username"],"title":"UserForCreate","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"create_user","params":{"data":{"date_format":"<date_format>","email":"<email>","locale":"<locale>","mode":"<mode>","pwd_clear":"<pwd_clear>","timezone":"<timezone>","username":"<username>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"default":null,"description":"When the account was created — the AUDIT block's \"Created\" field.\n\n`add_when` is NOT NULL on both `enterprise.user` and tenant-manager's `user`, so this is `Option` to tolerate a projection that did not select it, not because a created account can lack a creation time.\n\nAdded late, and the reason is worth keeping: migration 317 put \"Created\" on the detail form reading `add_when`, but this struct — the only thing the `is_rpc` BIO's `get_user` path can return — never carried the column, so the field rendered permanently blank. The form was right; the projection was short.","type":["string","null"]},"api_access":{"type":"boolean"},"date_format":{"type":"string"},"email":{"type":"string"},"employee_id":{"type":["string","null"]},"failed_login_attempts":{"format":"int32","type":"integer"},"full_name":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"last_failed_login_at":{"default":null,"type":["string","null"]},"last_login_at":{"default":null,"type":["string","null"]},"locale":{"type":"string"},"mode":{"type":"string"},"password_age_days":{"description":"\"Password age\" for the AUDIT block — derived from `pwd_changed_at`, in whole days. **Not a database column**: `#[field(skip)]` keeps it out of the SELECT projection (`sea_column_refs`), and `#[sqlx(default)]` keeps `derive(FromRow)` from trying to read a `password_age_days` column that doesn't exist. Populated by `UserBy::finish_computed_fields`, which every `UserBmc` fetch path calls — see there. `None` whenever `pwd_changed_at` is `None`; never a misleading `0`.","format":"int64","type":["integer","null"]},"pwd_changed_at":{"default":null,"type":["string","null"]},"rf_login":{"type":"boolean"},"status":{"$ref":"#/components/schemas/UserStatus"},"timezone":{"type":"string"},"typ":{"$ref":"#/components/schemas/UserTyp"},"username":{"type":"string"}},"required":["api_access","date_format","email","failed_login_attempts","id","locale","mode","rf_login","status","timezone","typ","username"],"title":"UserInfo","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"api_access":false,"date_format":"<date_format>","email":"<email>","failed_login_attempts":1,"id":1,"locale":"<locale>","mode":"<mode>","rf_login":false,"status":"Active","timezone":"<timezone>","typ":"User","username":"<username>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_user":{"post":{"operationId":"get_user","summary":"Get a user by ID — CRUD.","description":"Get a user by ID — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"user","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_user"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_user","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"default":null,"description":"When the account was created — the AUDIT block's \"Created\" field.\n\n`add_when` is NOT NULL on both `enterprise.user` and tenant-manager's `user`, so this is `Option` to tolerate a projection that did not select it, not because a created account can lack a creation time.\n\nAdded late, and the reason is worth keeping: migration 317 put \"Created\" on the detail form reading `add_when`, but this struct — the only thing the `is_rpc` BIO's `get_user` path can return — never carried the column, so the field rendered permanently blank. The form was right; the projection was short.","type":["string","null"]},"api_access":{"type":"boolean"},"date_format":{"type":"string"},"email":{"type":"string"},"employee_id":{"type":["string","null"]},"failed_login_attempts":{"format":"int32","type":"integer"},"full_name":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"last_failed_login_at":{"default":null,"type":["string","null"]},"last_login_at":{"default":null,"type":["string","null"]},"locale":{"type":"string"},"mode":{"type":"string"},"password_age_days":{"description":"\"Password age\" for the AUDIT block — derived from `pwd_changed_at`, in whole days. **Not a database column**: `#[field(skip)]` keeps it out of the SELECT projection (`sea_column_refs`), and `#[sqlx(default)]` keeps `derive(FromRow)` from trying to read a `password_age_days` column that doesn't exist. Populated by `UserBy::finish_computed_fields`, which every `UserBmc` fetch path calls — see there. `None` whenever `pwd_changed_at` is `None`; never a misleading `0`.","format":"int64","type":["integer","null"]},"pwd_changed_at":{"default":null,"type":["string","null"]},"rf_login":{"type":"boolean"},"status":{"$ref":"#/components/schemas/UserStatus"},"timezone":{"type":"string"},"typ":{"$ref":"#/components/schemas/UserTyp"},"username":{"type":"string"}},"required":["api_access","date_format","email","failed_login_attempts","id","locale","mode","rf_login","status","timezone","typ","username"],"title":"UserInfo","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"api_access":false,"date_format":"<date_format>","email":"<email>","failed_login_attempts":1,"id":1,"locale":"<locale>","mode":"<mode>","rf_login":false,"status":"Active","timezone":"<timezone>","typ":"User","username":"<username>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_user":{"post":{"operationId":"list_user","summary":"List user — CRUD.","description":"List user — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"user","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_user"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_user"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/UserInfo"},"title":"Array_of_UserInfo","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"api_access":false,"date_format":"<date_format>","email":"<email>","failed_login_attempts":1,"id":1,"locale":"<locale>","mode":"<mode>","rf_login":false,"status":"Active","timezone":"<timezone>","typ":"User","username":"<username>"}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_user":{"post":{"operationId":"count_user","summary":"Count user — CRUD.","description":"Count user — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"user","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_user"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_user"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#update_user":{"post":{"operationId":"update_user","summary":"Update an account through the guarded security model; audit facts are read-only.","description":"Update an account through the guarded security model; audit facts are read-only.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"user","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"update_user"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"},"data":{"additionalProperties":false,"description":"Security-owned user patch. Login/audit facts are absent by construction; nullable profile fields retain explicit keep/clear/set semantics.","properties":{"api_access":{"type":"boolean"},"date_format":{"type":"string"},"email":{"type":"string"},"employee_id":{"type":["string","null"]},"full_name":{"type":["string","null"]},"locale":{"type":"string"},"mode":{"type":"string"},"pwd_clear":{"type":"string"},"rf_login":{"type":"boolean"},"status":{"description":"Mirror of the `user_status` PostgreSQL enum (`enterprise` migration 044, tenant-manager migration 005).","oneOf":[{"enum":["Active","Locked","Disabled"],"type":"string"},{"description":"The account exists but its owner has not set a password yet. Allowed through: without a password there is nothing to sign in with, and once one is set the account is in use.","enum":["Invited"],"type":"string"}]},"timezone":{"type":"string"},"typ":{"description":"Mirror of the `enterprise.user_typ` PostgreSQL enum (migration 021).\n\nLifting `user.typ` from a stringly-typed column to a real enum gets us: - DB-level whitelist (insert/update of an unknown variant fails). - Compile-time exhaustive matching at every read site (was previously ad-hoc `matches!(s.as_str(), \"Admin\" | \"Sys\")` in `role_resolver`/`tx_helper`/`admin_rbac`).","enum":["User","Admin","Sys","Agent"],"type":"string"},"username":{"type":"string"}},"title":"UserUpdateApi","type":"object"}},"required":["id","data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"update_user","params":{"id":1,"data":{"api_access":false,"date_format":"<date_format>","email":"<email>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"default":null,"description":"When the account was created — the AUDIT block's \"Created\" field.\n\n`add_when` is NOT NULL on both `enterprise.user` and tenant-manager's `user`, so this is `Option` to tolerate a projection that did not select it, not because a created account can lack a creation time.\n\nAdded late, and the reason is worth keeping: migration 317 put \"Created\" on the detail form reading `add_when`, but this struct — the only thing the `is_rpc` BIO's `get_user` path can return — never carried the column, so the field rendered permanently blank. The form was right; the projection was short.","type":["string","null"]},"api_access":{"type":"boolean"},"date_format":{"type":"string"},"email":{"type":"string"},"employee_id":{"type":["string","null"]},"failed_login_attempts":{"format":"int32","type":"integer"},"full_name":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"last_failed_login_at":{"default":null,"type":["string","null"]},"last_login_at":{"default":null,"type":["string","null"]},"locale":{"type":"string"},"mode":{"type":"string"},"password_age_days":{"description":"\"Password age\" for the AUDIT block — derived from `pwd_changed_at`, in whole days. **Not a database column**: `#[field(skip)]` keeps it out of the SELECT projection (`sea_column_refs`), and `#[sqlx(default)]` keeps `derive(FromRow)` from trying to read a `password_age_days` column that doesn't exist. Populated by `UserBy::finish_computed_fields`, which every `UserBmc` fetch path calls — see there. `None` whenever `pwd_changed_at` is `None`; never a misleading `0`.","format":"int64","type":["integer","null"]},"pwd_changed_at":{"default":null,"type":["string","null"]},"rf_login":{"type":"boolean"},"status":{"$ref":"#/components/schemas/UserStatus"},"timezone":{"type":"string"},"typ":{"$ref":"#/components/schemas/UserTyp"},"username":{"type":"string"}},"required":["api_access","date_format","email","failed_login_attempts","id","locale","mode","rf_login","status","timezone","typ","username"],"title":"UserInfo","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"api_access":false,"date_format":"<date_format>","email":"<email>","failed_login_attempts":1,"id":1,"locale":"<locale>","mode":"<mode>","rf_login":false,"status":"Active","timezone":"<timezone>","typ":"User","username":"<username>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_user":{"post":{"operationId":"delete_user","summary":"Delete a user by ID — CRUD.","description":"Delete a user by ID — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"user","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_user"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_user","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"default":null,"description":"When the account was created — the AUDIT block's \"Created\" field.\n\n`add_when` is NOT NULL on both `enterprise.user` and tenant-manager's `user`, so this is `Option` to tolerate a projection that did not select it, not because a created account can lack a creation time.\n\nAdded late, and the reason is worth keeping: migration 317 put \"Created\" on the detail form reading `add_when`, but this struct — the only thing the `is_rpc` BIO's `get_user` path can return — never carried the column, so the field rendered permanently blank. The form was right; the projection was short.","type":["string","null"]},"api_access":{"type":"boolean"},"date_format":{"type":"string"},"email":{"type":"string"},"employee_id":{"type":["string","null"]},"failed_login_attempts":{"format":"int32","type":"integer"},"full_name":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"last_failed_login_at":{"default":null,"type":["string","null"]},"last_login_at":{"default":null,"type":["string","null"]},"locale":{"type":"string"},"mode":{"type":"string"},"password_age_days":{"description":"\"Password age\" for the AUDIT block — derived from `pwd_changed_at`, in whole days. **Not a database column**: `#[field(skip)]` keeps it out of the SELECT projection (`sea_column_refs`), and `#[sqlx(default)]` keeps `derive(FromRow)` from trying to read a `password_age_days` column that doesn't exist. Populated by `UserBy::finish_computed_fields`, which every `UserBmc` fetch path calls — see there. `None` whenever `pwd_changed_at` is `None`; never a misleading `0`.","format":"int64","type":["integer","null"]},"pwd_changed_at":{"default":null,"type":["string","null"]},"rf_login":{"type":"boolean"},"status":{"$ref":"#/components/schemas/UserStatus"},"timezone":{"type":"string"},"typ":{"$ref":"#/components/schemas/UserTyp"},"username":{"type":"string"}},"required":["api_access","date_format","email","failed_login_attempts","id","locale","mode","rf_login","status","timezone","typ","username"],"title":"UserInfo","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"api_access":false,"date_format":"<date_format>","email":"<email>","failed_login_attempts":1,"id":1,"locale":"<locale>","mode":"<mode>","rf_login":false,"status":"Active","timezone":"<timezone>","typ":"User","username":"<username>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_many_user":{"post":{"operationId":"delete_many_user","summary":"Delete multiple user by IDs — CRUD.","description":"Delete multiple user by IDs — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"user","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_many_user"},"params":{"type":"object","properties":{"ids":{"items":{"format":"int64","type":"integer"},"type":"array","description":"Record IDs"}},"required":["ids"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_many_user","params":{"ids":[1]}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"uint64","minimum":0,"title":"uint64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#create_system_settings":{"post":{"operationId":"create_system_settings","summary":"Create a new system_settings — CRUD.","description":"Create a new system_settings — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"UNIQUE_VIOLATION or INVALID_DATA","when":"The code already exists, or a value breaks a rule."}],"x-quark-module":"sys_settings","x-quark-operation":"create","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"create_system_settings"},"params":{"type":"object","properties":{"data":{"properties":{"config_key":{"type":"string"},"config_value":{"type":"string"},"default_value":{"type":"string"},"description":{"type":["string","null"]},"editable":{"type":"boolean"}},"required":["config_key","config_value","default_value","editable"],"title":"SystemSettingsForCreate","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"create_system_settings","params":{"data":{"config_key":"<config_key>","config_value":"<config_value>","default_value":"<default_value>","editable":false}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"config_key":{"type":"string"},"config_value":{"type":"string"},"default_value":{"type":"string"},"description":{"type":["string","null"]},"editable":{"type":"boolean"},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"}},"required":["add_when","add_who","config_key","config_value","default_value","editable","id","mod_when","mod_who"],"title":"SystemSettings","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"config_key":"<config_key>","config_value":"<config_value>","default_value":"<default_value>","editable":false,"id":1,"mod_when":"<mod_when>","mod_who":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_system_settings":{"post":{"operationId":"get_system_settings","summary":"Get a system_settings by ID — CRUD.","description":"Get a system_settings by ID — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"sys_settings","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_system_settings"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_system_settings","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"config_key":{"type":"string"},"config_value":{"type":"string"},"default_value":{"type":"string"},"description":{"type":["string","null"]},"editable":{"type":"boolean"},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"}},"required":["add_when","add_who","config_key","config_value","default_value","editable","id","mod_when","mod_who"],"title":"SystemSettings","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"config_key":"<config_key>","config_value":"<config_value>","default_value":"<default_value>","editable":false,"id":1,"mod_when":"<mod_when>","mod_who":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_system_settings":{"post":{"operationId":"list_system_settings","summary":"List system_settings — CRUD.","description":"List system_settings — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"sys_settings","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_system_settings"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_system_settings"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/SystemSettings"},"title":"Array_of_SystemSettings","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"config_key":"<config_key>","config_value":"<config_value>","default_value":"<default_value>","editable":false,"id":1,"mod_when":"<mod_when>","mod_who":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#update_system_settings":{"post":{"operationId":"update_system_settings","summary":"Update the value of an editable system setting; metadata is immutable.","description":"Update the value of an editable system setting; metadata is immutable.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"INVALID_DATA","when":"A value breaks a rule."}],"x-quark-module":"sys_settings","x-quark-operation":"update","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"update_system_settings"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"},"data":{"additionalProperties":false,"description":"Only the current value is operator-owned. Key/default/description and the editable bit are deployment metadata.","properties":{"config_value":{"type":"string"}},"title":"SystemSettingsUpdateApi","type":"object"}},"required":["id","data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"update_system_settings","params":{"id":1,"data":{"config_value":"<config_value>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"config_key":{"type":"string"},"config_value":{"type":"string"},"default_value":{"type":"string"},"description":{"type":["string","null"]},"editable":{"type":"boolean"},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"}},"required":["add_when","add_who","config_key","config_value","default_value","editable","id","mod_when","mod_who"],"title":"SystemSettings","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"config_key":"<config_key>","config_value":"<config_value>","default_value":"<default_value>","editable":false,"id":1,"mod_when":"<mod_when>","mod_who":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_system_settings":{"post":{"operationId":"delete_system_settings","summary":"Delete a system_settings by ID — CRUD.","description":"Delete a system_settings by ID — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"DEPENDENT_DATA_EXIST","when":"Other rows still use this row."}],"x-quark-module":"sys_settings","x-quark-operation":"delete","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_system_settings"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_system_settings","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"config_key":{"type":"string"},"config_value":{"type":"string"},"default_value":{"type":"string"},"description":{"type":["string","null"]},"editable":{"type":"boolean"},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"}},"required":["add_when","add_who","config_key","config_value","default_value","editable","id","mod_when","mod_who"],"title":"SystemSettings","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"config_key":"<config_key>","config_value":"<config_value>","default_value":"<default_value>","editable":false,"id":1,"mod_when":"<mod_when>","mod_who":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#warehouse_admin_list":{"post":{"operationId":"warehouse_admin_list","summary":"List warehouse definitions and actual schema readiness in Enterprise administration.","description":"List warehouse definitions and actual schema readiness in Enterprise administration.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- A tenant extension cannot replace this method.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"warehouse","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"warehouse_admin_list"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"warehouse_admin_list"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/WarehouseAdminRow"},"title":"Array_of_WarehouseAdminRow","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"code":"<code>","id":1,"is_active":false,"length_uom":"<length_uom>","name":"<name>","readiness":"ready","readiness_label":"<readiness_label>","readiness_reason":"<readiness_reason>","schema_name":"<schema_name>","volume_uom":"<volume_uom>","weight_uom":"<weight_uom>"}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#warehouse_admin_get":{"post":{"operationId":"warehouse_admin_get","summary":"Read one warehouse definition and schema readiness in Enterprise administration.","description":"Read one warehouse definition and schema readiness in Enterprise administration.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- A tenant extension cannot replace this method.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"warehouse","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"warehouse_admin_get"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"warehouse_admin_get","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"code":{"type":"string"},"id":{"format":"int64","type":"integer"},"is_active":{"type":"boolean"},"length_uom":{"type":"string"},"name":{"type":"string"},"readiness":{"$ref":"#/components/schemas/WarehouseReadiness"},"readiness_label":{"type":"string"},"readiness_reason":{"type":"string"},"schema_name":{"type":"string"},"volume_uom":{"type":"string"},"weight_uom":{"type":"string"}},"required":["code","id","is_active","length_uom","name","readiness","readiness_label","readiness_reason","schema_name","volume_uom","weight_uom"],"title":"WarehouseAdminRow","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"code":"<code>","id":1,"is_active":false,"length_uom":"<length_uom>","name":"<name>","readiness":"ready","readiness_label":"<readiness_label>","readiness_reason":"<readiness_reason>","schema_name":"<schema_name>","volume_uom":"<volume_uom>","weight_uom":"<weight_uom>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#warehouse_admin_create":{"post":{"operationId":"warehouse_admin_create","summary":"Create an inactive warehouse and provision its complete application schema.","description":"Create an inactive warehouse and provision its complete application schema.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n- A tenant extension cannot replace this method.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"UNIQUE_VIOLATION or INVALID_DATA","when":"The code already exists, or a value breaks a rule."}],"x-quark-module":"warehouse","x-quark-operation":"create","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"warehouse_admin_create"},"params":{"type":"object","properties":{"data":{"additionalProperties":false,"properties":{"code":{"type":"string"},"is_active":{"description":"Accepted for compatibility with generic forms, but always forced false.","type":["boolean","null"]},"length_uom":{"type":"string"},"name":{"type":"string"},"schema_name":{"type":"string"},"volume_uom":{"type":"string"},"weight_uom":{"type":"string"}},"required":["code","length_uom","name","schema_name","volume_uom","weight_uom"],"title":"WarehouseAdminCreate","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"warehouse_admin_create","params":{"data":{"code":"<code>","length_uom":"<length_uom>","name":"<name>","schema_name":"<schema_name>","volume_uom":"<volume_uom>","weight_uom":"<weight_uom>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"code":{"type":"string"},"id":{"format":"int64","type":"integer"},"is_active":{"type":"boolean"},"length_uom":{"type":"string"},"name":{"type":"string"},"readiness":{"$ref":"#/components/schemas/WarehouseReadiness"},"readiness_label":{"type":"string"},"readiness_reason":{"type":"string"},"schema_name":{"type":"string"},"volume_uom":{"type":"string"},"weight_uom":{"type":"string"}},"required":["code","id","is_active","length_uom","name","readiness","readiness_label","readiness_reason","schema_name","volume_uom","weight_uom"],"title":"WarehouseAdminRow","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"code":"<code>","id":1,"is_active":false,"length_uom":"<length_uom>","name":"<name>","readiness":"ready","readiness_label":"<readiness_label>","readiness_reason":"<readiness_reason>","schema_name":"<schema_name>","volume_uom":"<volume_uom>","weight_uom":"<weight_uom>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#warehouse_admin_update":{"post":{"operationId":"warehouse_admin_update","summary":"Rename or change warehouse activity; activation requires current schema migrations.","description":"Rename or change warehouse activity; activation requires current schema migrations.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n- A tenant extension cannot replace this method.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"INVALID_DATA","when":"A value breaks a rule."}],"x-quark-module":"warehouse","x-quark-operation":"update","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"warehouse_admin_update"},"params":{"type":"object","properties":{"data":{"additionalProperties":false,"description":"Strict flat command input: generic UI commands carry every operand in data. Unknown identity/unit fields and explicit nulls cannot silently become no-ops.","properties":{"id":{"format":"int64","type":"integer"},"is_active":{"type":"boolean"},"name":{"type":"string"}},"required":["id"],"title":"WarehouseAdminUpdateApi","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"warehouse_admin_update","params":{"data":{"id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"code":{"type":"string"},"id":{"format":"int64","type":"integer"},"is_active":{"type":"boolean"},"length_uom":{"type":"string"},"name":{"type":"string"},"readiness":{"$ref":"#/components/schemas/WarehouseReadiness"},"readiness_label":{"type":"string"},"readiness_reason":{"type":"string"},"schema_name":{"type":"string"},"volume_uom":{"type":"string"},"weight_uom":{"type":"string"}},"required":["code","id","is_active","length_uom","name","readiness","readiness_label","readiness_reason","schema_name","volume_uom","weight_uom"],"title":"WarehouseAdminRow","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"code":"<code>","id":1,"is_active":false,"length_uom":"<length_uom>","name":"<name>","readiness":"ready","readiness_label":"<readiness_label>","readiness_reason":"<readiness_reason>","schema_name":"<schema_name>","volume_uom":"<volume_uom>","weight_uom":"<weight_uom>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_user_warehouses":{"post":{"operationId":"list_user_warehouses","summary":"List warehouses accessible by a user (user_id optional → caller's Ctx.user_id by default)","description":"List warehouses accessible by a user (user_id optional → caller's Ctx.user_id by default)\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- You must log in. The method skips the permission check, so every logged-in user can call it.\n- This method only reads. It changes nothing and needs no idempotency key.\n- A tenant extension cannot replace this method.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"warehouse","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_user_warehouses"},"params":{"type":"object","properties":{"data":{"properties":{"q":{"default":null,"description":"Reserved for future substring filter (rf-go's F2 picker convention sends `q`). Currently ignored — the per-user warehouse set is typically tiny so filtering doesn't earn its weight yet. Accepted so the F2 picker call deserializes cleanly.","type":["string","null"]},"user_id":{"description":"Target user_id. When omitted, falls back to the authenticated `Ctx.user_id()` — convenient for caller-self lookups (e.g. WHSEL's F2 picker, which can only send `{q: …}` per rf-go's lookupValues convention and has no way to thread an explicit user_id from screen state).","format":"int64","type":["integer","null"]}},"title":"ParamsListUserWarehouses","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_user_warehouses","params":{"data":{"q":"<q>","user_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/UserWarehouseWithDetails"},"title":"Array_of_UserWarehouseWithDetails","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"is_default":false,"role_code":"<role_code>","role_id":1,"schema_name":"<schema_name>","user_warehouse_id":1,"warehouse_code":"<warehouse_code>","warehouse_id":1,"warehouse_name":"<warehouse_name>"}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_warehouse_defaults":{"post":{"operationId":"get_warehouse_defaults","summary":"Get defaults for the active warehouse","description":"Get defaults for the active warehouse\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"warehouse","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_warehouse_defaults"},"params":{"type":"object","properties":{}}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_warehouse_defaults"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"anyOf":[{"$ref":"#/components/schemas/WarehouseDefaults"},{"type":"null"}],"title":"Nullable_WarehouseDefaults"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#warehouse_settings_list":{"post":{"operationId":"warehouse_settings_list","summary":"List the active warehouse with the rules its settings screen sets (one row; an id filter rereads it).","description":"List the active warehouse with the rules its settings screen sets (one row; an id filter rereads it).\n\n**Category:** `query`. Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"query","x-quark-category-declared":true,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"warehouse","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"warehouse_settings_list"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"warehouse_settings_list"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/WarehouseSettingsRow"},"title":"Array_of_WarehouseSettingsRow","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"code":"<code>","id":1,"name":"<name>","shared_tote_allows_mixed_owners":false,"station_route_abandoned_after_minutes":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#warehouse_set_shared_tote_mixed_owners":{"post":{"operationId":"warehouse_set_shared_tote_mixed_owners","summary":"Set whether goods of several owners may share one station route's tote in the active warehouse.","description":"Set whether goods of several owners may share one station route's tote in the active warehouse.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"warehouse","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"warehouse_set_shared_tote_mixed_owners"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"description":"Wire command: the value the person chose for the caller's warehouse.","properties":{"allows_mixed_owners":{"description":"`true` — owners may share a tote; `false` — one owner per tote.","type":"boolean"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"}},"required":["allows_mixed_owners"],"title":"SetSharedToteMixedOwners","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"warehouse_set_shared_tote_mixed_owners","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"allows_mixed_owners":false}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"The caller's warehouse as the warehouse settings screen shows it: who it is and the rules the screen sets. One row — the screen never lists or writes another warehouse (plan R2). `Deserialize` because a command's output is stored for its replay.","properties":{"code":{"type":"string"},"id":{"format":"int64","type":"integer"},"name":{"type":"string"},"shared_tote_allows_mixed_owners":{"description":"May goods of several owners lie in one station route's shared tote at once? Switching it off changes nothing already deposited: the next deposit of another owner is refused.","type":"boolean"},"station_route_abandoned_after_minutes":{"description":"Minutes with no activity on a station route — no stop under a live lease, no route or stop change — before the supervisor's board calls it abandoned and the supervisor's door finishes its totes.","format":"int32","type":"integer"}},"required":["code","id","name","shared_tote_allows_mixed_owners","station_route_abandoned_after_minutes"],"title":"WarehouseSettingsRow","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"code":"<code>","id":1,"name":"<name>","shared_tote_allows_mixed_owners":false,"station_route_abandoned_after_minutes":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#warehouse_set_station_route_abandoned_after":{"post":{"operationId":"warehouse_set_station_route_abandoned_after","summary":"Set after how many minutes with no activity a station route counts as abandoned in the active warehouse.","description":"Set after how many minutes with no activity a station route counts as abandoned in the active warehouse.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"warehouse","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"warehouse_set_station_route_abandoned_after"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"description":"Wire command: the number of minutes the person typed for the caller's warehouse.","properties":{"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"minutes":{"description":"Minutes with no activity on a station route before it counts as abandoned; at least 1.","format":"int64","type":"integer"}},"required":["minutes"],"title":"SetStationRouteAbandonedAfter","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"warehouse_set_station_route_abandoned_after","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"minutes":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"The caller's warehouse as the warehouse settings screen shows it: who it is and the rules the screen sets. One row — the screen never lists or writes another warehouse (plan R2). `Deserialize` because a command's output is stored for its replay.","properties":{"code":{"type":"string"},"id":{"format":"int64","type":"integer"},"name":{"type":"string"},"shared_tote_allows_mixed_owners":{"description":"May goods of several owners lie in one station route's shared tote at once? Switching it off changes nothing already deposited: the next deposit of another owner is refused.","type":"boolean"},"station_route_abandoned_after_minutes":{"description":"Minutes with no activity on a station route — no stop under a live lease, no route or stop change — before the supervisor's board calls it abandoned and the supervisor's door finishes its totes.","format":"int32","type":"integer"}},"required":["code","id","name","shared_tote_allows_mixed_owners","station_route_abandoned_after_minutes"],"title":"WarehouseSettingsRow","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"code":"<code>","id":1,"name":"<name>","shared_tote_allows_mixed_owners":false,"station_route_abandoned_after_minutes":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#create_role":{"post":{"operationId":"create_role","summary":"Create a new role — CRUD.","description":"Create a new role — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"UNIQUE_VIOLATION or INVALID_DATA","when":"The code already exists, or a value breaks a rule."}],"x-quark-module":"role","x-quark-operation":"create","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"create_role"},"params":{"type":"object","properties":{"data":{"properties":{"code":{"type":"string"},"description":{"type":["string","null"]},"is_active":{"type":["boolean","null"]},"name":{"type":"string"}},"required":["code","name"],"title":"RoleForCreate","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"create_role","params":{"data":{"code":"<code>","name":"<name>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"description":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"is_active":{"type":"boolean"},"is_system":{"type":"boolean"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"name":{"type":"string"}},"required":["add_when","add_who","code","id","is_active","is_system","mod_when","mod_who","name"],"title":"Role","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","id":1,"is_active":false,"is_system":false,"mod_when":"<mod_when>","mod_who":1,"name":"<name>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_role":{"post":{"operationId":"get_role","summary":"Get a role by ID — CRUD.","description":"Get a role by ID — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"role","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_role"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_role","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"description":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"is_active":{"type":"boolean"},"is_system":{"type":"boolean"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"name":{"type":"string"}},"required":["add_when","add_who","code","id","is_active","is_system","mod_when","mod_who","name"],"title":"Role","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","id":1,"is_active":false,"is_system":false,"mod_when":"<mod_when>","mod_who":1,"name":"<name>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_role":{"post":{"operationId":"list_role","summary":"List role — CRUD.","description":"List role — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"role","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_role"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_role"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/Role"},"title":"Array_of_Role","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"code":"<code>","id":1,"is_active":false,"is_system":false,"mod_when":"<mod_when>","mod_who":1,"name":"<name>"}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#update_role":{"post":{"operationId":"update_role","summary":"Update mutable role fields; code is immutable and null is explicit.","description":"Update mutable role fields; code is immutable and null is explicit.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"INVALID_DATA","when":"A value breaks a rule."}],"x-quark-module":"role","x-quark-operation":"update","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"update_role"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"},"data":{"additionalProperties":false,"description":"A role code is stable permission identity. Operators may rename, describe, disable or re-enable the role without moving that identity.","properties":{"description":{"type":["string","null"]},"is_active":{"type":"boolean"},"name":{"type":"string"}},"title":"RoleUpdateApi","type":"object"}},"required":["id","data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"update_role","params":{"id":1,"data":{"description":"<description>","is_active":false,"name":"<name>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"description":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"is_active":{"type":"boolean"},"is_system":{"type":"boolean"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"name":{"type":"string"}},"required":["add_when","add_who","code","id","is_active","is_system","mod_when","mod_who","name"],"title":"Role","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","id":1,"is_active":false,"is_system":false,"mod_when":"<mod_when>","mod_who":1,"name":"<name>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_role":{"post":{"operationId":"delete_role","summary":"Delete a role by ID — CRUD.","description":"Delete a role by ID — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"DEPENDENT_DATA_EXIST","when":"Other rows still use this row."}],"x-quark-module":"role","x-quark-operation":"delete","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_role"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_role","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"description":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"is_active":{"type":"boolean"},"is_system":{"type":"boolean"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"name":{"type":"string"}},"required":["add_when","add_who","code","id","is_active","is_system","mod_when","mod_who","name"],"title":"Role","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","id":1,"is_active":false,"is_system":false,"mod_when":"<mod_when>","mod_who":1,"name":"<name>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_many_role":{"post":{"operationId":"delete_many_role","summary":"Delete multiple role by IDs — CRUD.","description":"Delete multiple role by IDs — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"DEPENDENT_DATA_EXIST","when":"Other rows still use this row."}],"x-quark-module":"role","x-quark-operation":"delete","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_many_role"},"params":{"type":"object","properties":{"ids":{"items":{"format":"int64","type":"integer"},"type":"array","description":"Record IDs"}},"required":["ids"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_many_role","params":{"ids":[1]}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"uint64","minimum":0,"title":"uint64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_role":{"post":{"operationId":"count_role","summary":"Count role — CRUD.","description":"Count role — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"role","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_role"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_role"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#create_role_permission":{"post":{"operationId":"create_role_permission","summary":"Create a new role_permission — CRUD.","description":"Create a new role_permission — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"UNIQUE_VIOLATION or INVALID_DATA","when":"The code already exists, or a value breaks a rule."}],"x-quark-module":"role","x-quark-operation":"create","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"create_role_permission"},"params":{"type":"object","properties":{"data":{"properties":{"can_delete":{"type":["boolean","null"]},"can_execute":{"type":["boolean","null"]},"can_read":{"type":["boolean","null"]},"can_write":{"type":["boolean","null"]},"resource_code":{"type":"string"},"resource_type":{"type":"string"},"role_id":{"format":"int64","type":"integer"}},"required":["resource_code","resource_type","role_id"],"title":"RolePermissionForCreate","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"create_role_permission","params":{"data":{"resource_code":"<resource_code>","resource_type":"<resource_type>","role_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"can_delete":{"type":"boolean"},"can_execute":{"type":"boolean"},"can_read":{"type":"boolean"},"can_write":{"type":"boolean"},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"resource_code":{"type":"string"},"resource_type":{"type":"string"},"role_id":{"format":"int64","type":"integer"}},"required":["add_when","add_who","can_delete","can_execute","can_read","can_write","id","mod_when","mod_who","resource_code","resource_type","role_id"],"title":"RolePermission","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"can_delete":false,"can_execute":false,"can_read":false,"can_write":false,"id":1,"mod_when":"<mod_when>","mod_who":1,"resource_code":"<resource_code>","resource_type":"<resource_type>","role_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_role_permission":{"post":{"operationId":"get_role_permission","summary":"Get a role_permission by ID — CRUD.","description":"Get a role_permission by ID — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"role","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_role_permission"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_role_permission","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"can_delete":{"type":"boolean"},"can_execute":{"type":"boolean"},"can_read":{"type":"boolean"},"can_write":{"type":"boolean"},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"resource_code":{"type":"string"},"resource_type":{"type":"string"},"role_id":{"format":"int64","type":"integer"}},"required":["add_when","add_who","can_delete","can_execute","can_read","can_write","id","mod_when","mod_who","resource_code","resource_type","role_id"],"title":"RolePermission","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"can_delete":false,"can_execute":false,"can_read":false,"can_write":false,"id":1,"mod_when":"<mod_when>","mod_who":1,"resource_code":"<resource_code>","resource_type":"<resource_type>","role_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_role_permission":{"post":{"operationId":"list_role_permission","summary":"List role_permission — CRUD.","description":"List role_permission — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"role","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_role_permission"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_role_permission"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/RolePermission"},"title":"Array_of_RolePermission","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"can_delete":false,"can_execute":false,"can_read":false,"can_write":false,"id":1,"mod_when":"<mod_when>","mod_who":1,"resource_code":"<resource_code>","resource_type":"<resource_type>","role_id":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#update_role_permission":{"post":{"operationId":"update_role_permission","summary":"Update role-permission grants; null and identity changes are rejected.","description":"Update role-permission grants; null and identity changes are rejected.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"INVALID_DATA","when":"A value breaks a rule."}],"x-quark-module":"role","x-quark-operation":"update","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"update_role_permission"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"},"data":{"additionalProperties":false,"description":"Strict wire patch for the mutable cells of one permission row. The row's role/resource identity is immutable; moving a permission means delete + create, while the four grants may be independently changed.","properties":{"can_delete":{"type":"boolean"},"can_execute":{"type":"boolean"},"can_read":{"type":"boolean"},"can_write":{"type":"boolean"}},"title":"RolePermissionUpdateApi","type":"object"}},"required":["id","data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"update_role_permission","params":{"id":1,"data":{"can_delete":false,"can_execute":false,"can_read":false}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"can_delete":{"type":"boolean"},"can_execute":{"type":"boolean"},"can_read":{"type":"boolean"},"can_write":{"type":"boolean"},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"resource_code":{"type":"string"},"resource_type":{"type":"string"},"role_id":{"format":"int64","type":"integer"}},"required":["add_when","add_who","can_delete","can_execute","can_read","can_write","id","mod_when","mod_who","resource_code","resource_type","role_id"],"title":"RolePermission","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"can_delete":false,"can_execute":false,"can_read":false,"can_write":false,"id":1,"mod_when":"<mod_when>","mod_who":1,"resource_code":"<resource_code>","resource_type":"<resource_type>","role_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_role_permission":{"post":{"operationId":"delete_role_permission","summary":"Delete a role_permission by ID — CRUD.","description":"Delete a role_permission by ID — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"DEPENDENT_DATA_EXIST","when":"Other rows still use this row."}],"x-quark-module":"role","x-quark-operation":"delete","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_role_permission"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_role_permission","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"can_delete":{"type":"boolean"},"can_execute":{"type":"boolean"},"can_read":{"type":"boolean"},"can_write":{"type":"boolean"},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"resource_code":{"type":"string"},"resource_type":{"type":"string"},"role_id":{"format":"int64","type":"integer"}},"required":["add_when","add_who","can_delete","can_execute","can_read","can_write","id","mod_when","mod_who","resource_code","resource_type","role_id"],"title":"RolePermission","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"can_delete":false,"can_execute":false,"can_read":false,"can_write":false,"id":1,"mod_when":"<mod_when>","mod_who":1,"resource_code":"<resource_code>","resource_type":"<resource_type>","role_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_many_role_permission":{"post":{"operationId":"delete_many_role_permission","summary":"Delete multiple role_permission by IDs — CRUD.","description":"Delete multiple role_permission by IDs — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"DEPENDENT_DATA_EXIST","when":"Other rows still use this row."}],"x-quark-module":"role","x-quark-operation":"delete","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_many_role_permission"},"params":{"type":"object","properties":{"ids":{"items":{"format":"int64","type":"integer"},"type":"array","description":"Record IDs"}},"required":["ids"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_many_role_permission","params":{"ids":[1]}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"uint64","minimum":0,"title":"uint64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_role_permission":{"post":{"operationId":"count_role_permission","summary":"Count role_permission — CRUD.","description":"Count role_permission — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"role","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_role_permission"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_role_permission"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#supervisor_override_grant":{"post":{"operationId":"supervisor_override_grant","summary":"Mint a supervisor override grant for the pairs a refused command reported. The grant binds OPERATOR + PAIRS + the authenticated authorizer, is single-use and expires in minutes. A move passes its id as move_execute's ctx.override_grant_id; receipt_close, receipt_receive_against_asn and receipt_receive_case_level_line take it as override_grant_id (meta or data). Receipt pairs are bound to what they decide: a close (71) to one receipt, {code, subject: \"receipt:<receipt_id>\"}; a shortage or excess (28/27) to one line, {code, subject: \"receipt:<receipt_id>/line:<receipt_detail_id>\"} — a grant for one line is refused on any other. Authority is checked PER PAIR: a move pair needs an override role (SUPERVISOR/MANAGER/ADMIN); a receipt pair needs the capability its code names (71 receipt.override_close_discrepancy, 28 receipt.override_qty_shortage, 27 receipt.override_qty_excess — SUPERVISOR only), so an ADMIN or MANAGER cannot authorize a receipt override. A caller who holds every pair's authority mints seamlessly with no credentials; anyone else must supply username + password, verified through the same path as /api/login, and that person is held to the same per-pair rule. Supplying credentials always authenticates THEM, even if the caller could have minted seamlessly. The recorded authorizer is whoever the SERVER authenticated here; it is never taken from the command request. A count-freeze pair ({code: 87, subject: \"count:<inventory_count_id>\"}), which a Hard inventory count's freeze reports in context.pairs, needs an override role like a move pair AND a reason: the reason is recorded on the grant and written onto the count as the mark that stock moved underneath it, so the counter knows the number is in doubt. Such a grant is refused without one. move_execute, inventory_adjustment_post (override_grant_id) and pick_commit (count_freeze_grant_id) redeem it.","description":"Mint a supervisor override grant for the pairs a refused command reported. The grant binds OPERATOR + PAIRS + the authenticated authorizer, is single-use and expires in minutes. A move passes its id as move_execute's ctx.override_grant_id; receipt_close, receipt_receive_against_asn and receipt_receive_case_level_line take it as override_grant_id (meta or data). Receipt pairs are bound to what they decide: a close (71) to one receipt, {code, subject: \"receipt:<receipt_id>\"}; a shortage or excess (28/27) to one line, {code, subject: \"receipt:<receipt_id>/line:<receipt_detail_id>\"} — a grant for one line is refused on any other. Authority is checked PER PAIR: a move pair needs an override role (SUPERVISOR/MANAGER/ADMIN); a receipt pair needs the capability its code names (71 receipt.override_close_discrepancy, 28 receipt.override_qty_shortage, 27 receipt.override_qty_excess — SUPERVISOR only), so an ADMIN or MANAGER cannot authorize a receipt override. A caller who holds every pair's authority mints seamlessly with no credentials; anyone else must supply username + password, verified through the same path as /api/login, and that person is held to the same per-pair rule. Supplying credentials always authenticates THEM, even if the caller could have minted seamlessly. The recorded authorizer is whoever the SERVER authenticated here; it is never taken from the command request. A count-freeze pair ({code: 87, subject: \"count:<inventory_count_id>\"}), which a Hard inventory count's freeze reports in context.pairs, needs an override role like a move pair AND a reason: the reason is recorded on the grant and written onto the count as the mark that stock moved underneath it, so the counter knows the number is in doubt. Such a grant is refused without one. move_execute, inventory_adjustment_post (override_grant_id) and pick_commit (count_freeze_grant_id) redeem it.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n- This method can ask for a supervisor override. Send the codes the operator accepted in `acknowledged_overrides`. See 04-command-types-and-concurrency.md and 05-errors.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"override_grant","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"supervisor_override_grant"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"pairs":{"description":"The pairs this grant authorizes. For a move: exactly what the refused move reported in `error.data.detail.context.pairs`. For a receipt override, likewise what the refused receipt command reported there: `{\"code\": 71, \"subject\": \"receipt:<receipt_id>\"}` for a close — bound to that receipt — and `{\"code\": <28|27>, \"subject\": \"receipt:<receipt_id>/line:<receipt_detail_id>\"}` for a shortage or excess — bound to that one line.","items":{"$ref":"#/components/schemas/AckToken"},"type":"array"},"password":{"default":null,"type":["string","null"]},"reason":{"default":null,"description":"Why the authorizer is allowing it. REQUIRED for a count-freeze pair (`{\"code\": 87, \"subject\": \"count:<inventory_count_id>\"}`): the owner asked for that reason to be recorded, and it is written onto the count as the mark that stock moved underneath it. Optional for every other pair, which says what it overrode in its own subject.","type":["string","null"]},"username":{"default":null,"description":"Required only when the caller cannot authorize every pair themselves.","type":["string","null"]}},"required":["pairs"],"title":"GrantParams","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"supervisor_override_grant","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"pairs":[{"code":1,"subject":"<subject>"}]}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"expires_at":{"description":"RFC 3339 in UTC.","format":"date-time","type":"string"},"grant_id":{"format":"uuid","type":"string"}},"required":["expires_at","grant_id"],"title":"GrantResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"expires_at":"2026-01-01T00:00:00Z","grant_id":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#create_user_warehouse":{"post":{"operationId":"create_user_warehouse","summary":"Create a new user_warehouse — CRUD.","description":"Create a new user_warehouse — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"UNIQUE_VIOLATION or INVALID_DATA","when":"The code already exists, or a value breaks a rule."}],"x-quark-module":"user_warehouse","x-quark-operation":"create","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"create_user_warehouse"},"params":{"type":"object","properties":{"data":{"properties":{"is_default":{"type":["boolean","null"]},"role_id":{"format":"int64","type":"integer"},"user_id":{"format":"int64","type":"integer"},"warehouse_id":{"format":"int64","type":"integer"}},"required":["role_id","user_id","warehouse_id"],"title":"UserWarehouseForCreate","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"create_user_warehouse","params":{"data":{"role_id":1,"user_id":1,"warehouse_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"id":{"format":"int64","type":"integer"},"is_default":{"type":"boolean"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"role_id":{"format":"int64","type":"integer"},"user_id":{"format":"int64","type":"integer"},"warehouse_id":{"format":"int64","type":"integer"}},"required":["add_when","add_who","id","is_default","mod_when","mod_who","role_id","user_id","warehouse_id"],"title":"UserWarehouse","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"id":1,"is_default":false,"mod_when":"<mod_when>","mod_who":1,"role_id":1,"user_id":1,"warehouse_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_user_warehouse":{"post":{"operationId":"get_user_warehouse","summary":"Get a user_warehouse by ID — CRUD.","description":"Get a user_warehouse by ID — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"user_warehouse","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_user_warehouse"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_user_warehouse","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"id":{"format":"int64","type":"integer"},"is_default":{"type":"boolean"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"role_id":{"format":"int64","type":"integer"},"user_id":{"format":"int64","type":"integer"},"warehouse_id":{"format":"int64","type":"integer"}},"required":["add_when","add_who","id","is_default","mod_when","mod_who","role_id","user_id","warehouse_id"],"title":"UserWarehouse","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"id":1,"is_default":false,"mod_when":"<mod_when>","mod_who":1,"role_id":1,"user_id":1,"warehouse_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_user_warehouse":{"post":{"operationId":"list_user_warehouse","summary":"List user_warehouse — CRUD.","description":"List user_warehouse — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"user_warehouse","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_user_warehouse"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_user_warehouse"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/UserWarehouse"},"title":"Array_of_UserWarehouse","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"id":1,"is_default":false,"mod_when":"<mod_when>","mod_who":1,"role_id":1,"user_id":1,"warehouse_id":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#update_user_warehouse":{"post":{"operationId":"update_user_warehouse","summary":"Update an assignment's role/default marker; null and identity changes are rejected.","description":"Update an assignment's role/default marker; null and identity changes are rejected.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"INVALID_DATA","when":"A value breaks a rule."}],"x-quark-module":"user_warehouse","x-quark-operation":"update","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"update_user_warehouse"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"},"data":{"additionalProperties":false,"description":"A warehouse assignment keeps its `(user_id, warehouse_id)` identity. Only its role and default marker are editable; both columns are NOT NULL.","properties":{"is_default":{"type":"boolean"},"role_id":{"format":"int64","type":"integer"}},"title":"UserWarehouseUpdateApi","type":"object"}},"required":["id","data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"update_user_warehouse","params":{"id":1,"data":{"is_default":false,"role_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"id":{"format":"int64","type":"integer"},"is_default":{"type":"boolean"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"role_id":{"format":"int64","type":"integer"},"user_id":{"format":"int64","type":"integer"},"warehouse_id":{"format":"int64","type":"integer"}},"required":["add_when","add_who","id","is_default","mod_when","mod_who","role_id","user_id","warehouse_id"],"title":"UserWarehouse","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"id":1,"is_default":false,"mod_when":"<mod_when>","mod_who":1,"role_id":1,"user_id":1,"warehouse_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_user_warehouse":{"post":{"operationId":"delete_user_warehouse","summary":"Delete a user_warehouse by ID — CRUD.","description":"Delete a user_warehouse by ID — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"DEPENDENT_DATA_EXIST","when":"Other rows still use this row."}],"x-quark-module":"user_warehouse","x-quark-operation":"delete","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_user_warehouse"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_user_warehouse","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"id":{"format":"int64","type":"integer"},"is_default":{"type":"boolean"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"role_id":{"format":"int64","type":"integer"},"user_id":{"format":"int64","type":"integer"},"warehouse_id":{"format":"int64","type":"integer"}},"required":["add_when","add_who","id","is_default","mod_when","mod_who","role_id","user_id","warehouse_id"],"title":"UserWarehouse","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"id":1,"is_default":false,"mod_when":"<mod_when>","mod_who":1,"role_id":1,"user_id":1,"warehouse_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_many_user_warehouse":{"post":{"operationId":"delete_many_user_warehouse","summary":"Delete multiple user_warehouse by IDs — CRUD.","description":"Delete multiple user_warehouse by IDs — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"DEPENDENT_DATA_EXIST","when":"Other rows still use this row."}],"x-quark-module":"user_warehouse","x-quark-operation":"delete","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_many_user_warehouse"},"params":{"type":"object","properties":{"ids":{"items":{"format":"int64","type":"integer"},"type":"array","description":"Record IDs"}},"required":["ids"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_many_user_warehouse","params":{"ids":[1]}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"uint64","minimum":0,"title":"uint64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_user_warehouse":{"post":{"operationId":"count_user_warehouse","summary":"Count user_warehouse — CRUD.","description":"Count user_warehouse — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"user_warehouse","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_user_warehouse"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_user_warehouse"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#generate_user_api_key":{"post":{"operationId":"generate_user_api_key","summary":"Generate API key for user; returns plaintext exactly once","description":"Generate API key for user; returns plaintext exactly once\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"user_api_key","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"generate_user_api_key"},"params":{"type":"object","properties":{"data":{"properties":{"expires_at":{"type":["string","null"]},"name":{"type":"string"},"user_id":{"format":"int64","type":"integer"}},"required":["name","user_id"],"title":"GenerateApiKeyParams","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"generate_user_api_key","params":{"data":{"name":"<name>","user_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"expires_at":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"key_prefix":{"type":"string"},"plaintext_key":{"type":"string"}},"required":["id","key_prefix","plaintext_key"],"title":"GenerateApiKeyResult","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"id":1,"key_prefix":"<key_prefix>","plaintext_key":"<plaintext_key>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#revoke_user_api_key":{"post":{"operationId":"revoke_user_api_key","summary":"Revoke an API key for its parent user; retries preserve the first revoke time","description":"Revoke an API key for its parent user; retries preserve the first revoke time\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"user_api_key","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"revoke_user_api_key"},"params":{"type":"object","properties":{"data":{"properties":{"id":{"format":"int64","type":"integer"},"user_id":{"description":"The user card whose API-key list the caller is acting on. Requiring both identities prevents a stale/tampered row id from revoking a key that belongs to a different user.","format":"int64","type":"integer"}},"required":["id","user_id"],"title":"RevokeApiKeyParams","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"revoke_user_api_key","params":{"data":{"id":1,"user_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"title":"AnyValue"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":null}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_user_api_key":{"post":{"operationId":"get_user_api_key","summary":"Get a user_api_key by ID — CRUD.","description":"Get a user_api_key by ID — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"user_api_key","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_user_api_key"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_user_api_key","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"expires_at":{"default":null,"type":["string","null"]},"id":{"format":"int64","type":"integer"},"key_hash":{"description":"argon2id PHC hash of the full plaintext key. **Never leaves the process.** `#[serde(skip_serializing)]` keeps it out of every RPC response (`list_user_api_key` / `get_user_api_key`). The field is still populated by `FromRow` because `ApiKeyStore::validate` reads it directly from the table — just not via this DTO. See ADR-022 (mutation audit events).","type":"string","writeOnly":true},"key_prefix":{"type":"string"},"last_used_at":{"default":null,"type":["string","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"name":{"type":"string"},"revoked_at":{"default":null,"type":["string","null"]},"user_id":{"format":"int64","type":"integer"}},"required":["add_when","add_who","id","key_hash","key_prefix","mod_when","mod_who","name","user_id"],"title":"UserApiKey","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"id":1,"key_hash":"<key_hash>","key_prefix":"<key_prefix>","mod_when":"<mod_when>","mod_who":1,"name":"<name>","user_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_user_api_key":{"post":{"operationId":"list_user_api_key","summary":"List user_api_key — CRUD.","description":"List user_api_key — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"user_api_key","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_user_api_key"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_user_api_key"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/UserApiKey"},"title":"Array_of_UserApiKey","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"id":1,"key_hash":"<key_hash>","key_prefix":"<key_prefix>","mod_when":"<mod_when>","mod_who":1,"name":"<name>","user_id":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_user_api_key":{"post":{"operationId":"count_user_api_key","summary":"Count user_api_key — CRUD.","description":"Count user_api_key — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"user_api_key","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_user_api_key"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_user_api_key"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_audit_log":{"post":{"operationId":"get_audit_log","summary":"Get a audit_log by ID — CRUD.","description":"Get a audit_log by ID — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"audit_log","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_audit_log"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_audit_log","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"Read-only audit log entry — **selected from `enterprise.audit_log_view`** (see ADR-025), not the raw `audit_log` table. The view LEFT JOINs user / role / warehouse / target entities so the Audit Log grid can render human labels (`username`, `role_code`, `warehouse_code`, `target_label`) instead of opaque numeric ids.\n\nInserts still go via `wms_lib_auth::authorization::audit::log_event` which writes directly to `enterprise.audit_log` with raw SQL — BMC is read-only for audit.","properties":{"detail":true,"event_kind":{"type":"string"},"event_time":{"type":"string"},"id":{"format":"int64","type":"integer"},"required_bit":{"type":["string","null"]},"resource_code":{"type":["string","null"]},"resource_label":{"description":"Alias of `resource_code` until the resource_catalog lands (ADR-025 §D4).","type":["string","null"]},"resource_type":{"type":["string","null"]},"role_code":{"description":"Resolved via LEFT JOIN on `enterprise.role`.","type":["string","null"]},"role_id":{"format":"int64","type":["integer","null"]},"target_extra":{"type":["string","null"]},"target_id":{"description":"Extracted from `detail->'target_pk'` (JSON — scalar for single-PK tables, array for composite). Grid renders the raw JSON."},"target_label":{"description":"Human label for the target row (`r.code`, `u.username`, …) joined from the six RBAC entity types (ADR-025 §D2). NULL for unknown / composite-PK targets — the UI renders em-dash.","type":["string","null"]},"target_type":{"description":"Extracted from `detail->>'target_table'` — which entity was mutated.","type":["string","null"]},"user_id":{"format":"int64","type":["integer","null"]},"username":{"description":"Resolved via LEFT JOIN on `enterprise.\"user\"`. NULL if user deleted.","type":["string","null"]},"warehouse_code":{"description":"Resolved via LEFT JOIN on `enterprise.warehouse`.","type":["string","null"]},"warehouse_id":{"format":"int64","type":["integer","null"]},"warehouse_name":{"description":"Resolved via LEFT JOIN on `enterprise.warehouse`.","type":["string","null"]}},"required":["event_kind","event_time","id"],"title":"AuditLog","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"event_kind":"<event_kind>","event_time":"<event_time>","id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_audit_log":{"post":{"operationId":"list_audit_log","summary":"List audit_log — CRUD.","description":"List audit_log — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"audit_log","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_audit_log"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_audit_log"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/AuditLog"},"title":"Array_of_AuditLog","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"event_kind":"<event_kind>","event_time":"<event_time>","id":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_audit_log":{"post":{"operationId":"count_audit_log","summary":"Count audit_log — CRUD.","description":"Count audit_log — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"audit_log","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_audit_log"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_audit_log"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_audit_event_kinds":{"post":{"operationId":"list_audit_event_kinds","summary":"Distinct event_kind values from enterprise.audit_log_view (set-filter feed).","description":"Distinct event_kind values from enterprise.audit_log_view (set-filter feed).\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"audit_log","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_audit_event_kinds"},"params":{"type":"object","properties":{}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_audit_event_kinds"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"type":"string"},"title":"Array_of_String","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":["<result>"]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#batch_update_role_permissions":{"post":{"operationId":"batch_update_role_permissions","summary":"Batch-update role_permission cells (Permission Matrix save)","description":"Batch-update role_permission cells (Permission Matrix save)\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"role_permission","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"batch_update_role_permissions"},"params":{"type":"object","properties":{"data":{"properties":{"changes":{"items":{"$ref":"#/components/schemas/PermissionChange"},"type":"array"}},"required":["changes"],"title":"BatchUpdateParams","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"batch_update_role_permissions","params":{"data":{"changes":[{"can_delete":false,"can_execute":false,"can_read":false,"can_write":false,"resource_code":"<resource_code>","resource_type":"<resource_type>","role_id":1}]}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"duration_ms":{"format":"uint128","minimum":0,"type":"integer"},"updated_count":{"format":"uint","minimum":0,"type":"integer"}},"required":["duration_ms","updated_count"],"title":"BatchUpdateResult","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"duration_ms":1,"updated_count":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_role_permissions_tree":{"post":{"operationId":"list_role_permissions_tree","summary":"Tree view of role_permission rows grouped by resource_type (AG Grid SSRM).","description":"Tree view of role_permission rows grouped by resource_type (AG Grid SSRM).\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"role_permission","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_role_permissions_tree"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_role_permissions_tree"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"RPC response envelope. The framework's tree action expects a top-level `items` array.","properties":{"items":{"items":{"$ref":"#/components/schemas/RolePermissionTreeRow"},"type":"array"}},"required":["items"],"title":"RolePermissionTreeResponse","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"items":[{"can_delete":false,"can_execute":false,"can_read":false,"can_write":false,"hierarchyLevel":1,"hierarchyPath":["<hierarchyPath>"],"id":1,"is_admin_only":false,"label":"<label>","resource_code":"<resource_code>","resource_type":"<resource_type>","role_id":1}]}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_permission_matrix":{"post":{"operationId":"list_permission_matrix","summary":"List permission matrix slice (resources × roles × R/W/D/X bits)","description":"List permission matrix slice (resources × roles × R/W/D/X bits)\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"permission_matrix","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_permission_matrix"},"params":{"type":"object","properties":{"data":{"description":"Filter shape accepted by `list_permission_matrix`. All fields optional; missing fields mean \"no narrowing\".","properties":{"limit":{"default":null,"format":"int64","type":["integer","null"]},"offset":{"default":null,"format":"int64","type":["integer","null"]},"resource_type":{"default":null,"description":"One of \"form\" | \"menu_item\" | \"api\" | \"server_action\". `None` = all.","type":["string","null"]},"role_codes":{"default":null,"description":"Subset of role codes to render as columns. `None` = every active role.","items":{"type":"string"},"type":["array","null"]},"search":{"default":null,"description":"Substring on `resource_code` (case-insensitive).","type":["string","null"]}},"title":"MatrixFilter","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_permission_matrix","params":{"data":{"limit":1,"offset":1,"resource_type":"<resource_type>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"cells":{"items":{"$ref":"#/components/schemas/MatrixCell"},"type":"array"},"resources":{"items":{"$ref":"#/components/schemas/MatrixResource"},"type":"array"},"roles":{"items":{"$ref":"#/components/schemas/MatrixRole"},"type":"array"},"total_resources":{"format":"int64","type":"integer"}},"required":["cells","resources","roles","total_resources"],"title":"MatrixPage","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"cells":[{"d":false,"r":false,"resource_code":"<resource_code>","resource_type":"<resource_type>","role_id":1,"w":false,"x":false}],"resources":[{"resource_code":"<resource_code>","resource_type":"<resource_type>"}],"roles":[{"role_code":"<role_code>","role_id":1,"role_label":"<role_label>"}],"total_resources":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#batch_upsert_permission_matrix":{"post":{"operationId":"batch_upsert_permission_matrix","summary":"Insert-or-update role_permission cells from the Permission Matrix UI","description":"Insert-or-update role_permission cells from the Permission Matrix UI\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"permission_matrix","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"batch_upsert_permission_matrix"},"params":{"type":"object","properties":{"data":{"properties":{"changes":{"items":{"$ref":"#/components/schemas/MatrixCell"},"type":"array"}},"required":["changes"],"title":"MatrixBatchUpsertParams","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"batch_upsert_permission_matrix","params":{"data":{"changes":[{"d":false,"r":false,"resource_code":"<resource_code>","resource_type":"<resource_type>","role_id":1,"w":false,"x":false}]}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"touched_roles":{"format":"uint","minimum":0,"type":"integer"},"upserted":{"format":"uint","minimum":0,"type":"integer"}},"required":["touched_roles","upserted"],"title":"MatrixBatchUpsertResult","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"touched_roles":1,"upserted":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#dashboard_snapshot_rpc":{"post":{"operationId":"dashboard_snapshot_rpc","summary":"Dashboard: control-center snapshot","description":"Dashboard: control-center snapshot\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"dashboard","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"dashboard_snapshot_rpc"},"params":{"type":"object","properties":{"data":{"properties":{"rail":{"default":null,"description":"The reader's own six rail metrics (dashboard spec 2026-10-09 §6), from their board layout. Absent = the warehouse's rail. Read slot by slot against the warehouse's — never refused, never shrunk.","items":{"type":"string"},"type":["array","null"]},"scope":{"description":"`shift` | `today` | `7d`. An unknown value falls back to `shift` rather than erroring — this arrives from a URL, and a stale bookmark should show a board, not a 500.","type":["string","null"]}},"title":"DashboardSnapshotInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"dashboard_snapshot_rpc","params":{"data":{"rail":["<rail>"],"scope":"<scope>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"title":"AnyValue"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":null}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#update_dashboard_setting":{"post":{"operationId":"update_dashboard_setting","summary":"Dashboard: save the board settings card, on the version read.","description":"Dashboard: save the board settings card, on the version read.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n**Versioned entities:** dashboard_setting (id in data.id, version in data.expected_version).\n\n\n**Notes**\n\n- The catalog does not say whether this method needs an idempotency key.\n- Send the current version of the row in `expected_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[{"entity":"dashboard_setting","id_field":"id","version_field":"expected_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"dashboard_setting","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"update_dashboard_setting"},"params":{"type":"object","properties":{"meta":{"type":"object","description":"Control-plane envelope supplied by the platform."},"data":{"properties":{"data":{"description":"What a save of the settings card changed.","properties":{"expiring_within_days":{"default":null,"format":"int32","type":["integer","null"]},"rail_1":{"default":null,"type":["string","null"]},"rail_2":{"default":null,"type":["string","null"]},"rail_3":{"default":null,"type":["string","null"]},"rail_4":{"default":null,"type":["string","null"]},"rail_5":{"default":null,"type":["string","null"]},"rail_6":{"default":null,"type":["string","null"]},"show_demo":{"default":null,"type":["boolean","null"]},"throughput_plan_per_hour":{"default":null,"format":"double","type":["number","null"]}},"title":"SettingChange","type":"object"},"expected_version":{"format":"int32","type":"integer"},"id":{"format":"int64","type":"integer"}},"required":["id","expected_version","data"],"type":"object","description":"Versioned update payload."}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"update_dashboard_setting","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"id":1,"expected_version":1,"data":{"expiring_within_days":1,"rail_1":"<rail_1>","rail_2":"<rail_2>"}}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"The settings card: the effective rail one slot a field, so a picker sits on each.","properties":{"expiring_within_days":{"format":"int32","type":"integer"},"id":{"format":"int64","type":"integer"},"rail_1":{"type":"string"},"rail_2":{"type":"string"},"rail_3":{"type":"string"},"rail_4":{"type":"string"},"rail_5":{"type":"string"},"rail_6":{"type":"string"},"show_demo":{"type":"boolean"},"throughput_plan_per_hour":{"format":"double","type":["number","null"]},"version":{"format":"int32","type":"integer"}},"required":["expiring_within_days","id","rail_1","rail_2","rail_3","rail_4","rail_5","rail_6","show_demo","version"],"title":"SettingCard","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"expiring_within_days":1,"id":1,"rail_1":"<rail_1>","rail_2":"<rail_2>","rail_3":"<rail_3>","rail_4":"<rail_4>","rail_5":"<rail_5>","rail_6":"<rail_6>","show_demo":false,"version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#create_dashboard_metric_threshold":{"post":{"operationId":"create_dashboard_metric_threshold","summary":"Dashboard: a threshold for a metric that has none.","description":"Dashboard: a threshold for a metric that has none.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog does not say whether this method needs an idempotency key.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"dashboard_setting","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"create_dashboard_metric_threshold"},"params":{"type":"object","properties":{"data":{"description":"A new threshold, as its form sends it.","properties":{"alert_at":{"default":null,"format":"double","type":["number","null"]},"bad_when":{"default":null,"description":"`Above` (default) or `Below`.","type":["string","null"]},"critical_at":{"default":null,"format":"double","type":["number","null"]},"metric_key":{"default":"","type":"string"}},"title":"ThresholdForm","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"create_dashboard_metric_threshold","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"alert_at":1.5,"bad_when":"<bad_when>","critical_at":1.5}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"A metric's alert and critical levels in this warehouse.","properties":{"alert_at":{"format":"double","type":["number","null"]},"bad_when":{"description":"`Above` or `Below` — which side of the levels is bad.","type":"string"},"critical_at":{"format":"double","type":["number","null"]},"id":{"format":"int64","type":"integer"},"metric_key":{"type":"string"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"version":{"format":"int32","type":"integer"}},"required":["bad_when","id","metric_key","mod_when","mod_who","version"],"title":"DashboardMetricThreshold","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"bad_when":"<bad_when>","id":1,"metric_key":"<metric_key>","mod_when":"<mod_when>","mod_who":1,"version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#update_dashboard_metric_threshold":{"post":{"operationId":"update_dashboard_metric_threshold","summary":"Dashboard: save a threshold's levels, on the version read.","description":"Dashboard: save a threshold's levels, on the version read.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n**Versioned entities:** dashboard_metric_threshold (id in data.id, version in data.expected_version).\n\n\n**Notes**\n\n- The catalog does not say whether this method needs an idempotency key.\n- Send the current version of the row in `expected_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[{"entity":"dashboard_metric_threshold","id_field":"id","version_field":"expected_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"dashboard_setting","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"update_dashboard_metric_threshold"},"params":{"type":"object","properties":{"meta":{"type":"object","description":"Control-plane envelope supplied by the platform."},"data":{"properties":{"data":{"description":"What a save of a threshold changed. The metric is the row's identity: a threshold for another metric is another row.","properties":{"alert_at":{"default":null,"format":"double","type":["number","null"]},"bad_when":{"default":null,"type":["string","null"]},"critical_at":{"default":null,"format":"double","type":["number","null"]},"metric_key":{"default":null,"type":["string","null"]}},"title":"ThresholdChange","type":"object"},"expected_version":{"format":"int32","type":"integer"},"id":{"format":"int64","type":"integer"}},"required":["id","expected_version","data"],"type":"object","description":"Versioned update payload."}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"update_dashboard_metric_threshold","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"id":1,"expected_version":1,"data":{"alert_at":1.5,"bad_when":"<bad_when>","critical_at":1.5}}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"A metric's alert and critical levels in this warehouse.","properties":{"alert_at":{"format":"double","type":["number","null"]},"bad_when":{"description":"`Above` or `Below` — which side of the levels is bad.","type":"string"},"critical_at":{"format":"double","type":["number","null"]},"id":{"format":"int64","type":"integer"},"metric_key":{"type":"string"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"version":{"format":"int32","type":"integer"}},"required":["bad_when","id","metric_key","mod_when","mod_who","version"],"title":"DashboardMetricThreshold","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"bad_when":"<bad_when>","id":1,"metric_key":"<metric_key>","mod_when":"<mod_when>","mod_who":1,"version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#dashboard_metric_threshold_delete":{"post":{"operationId":"dashboard_metric_threshold_delete","summary":"Dashboard: delete a threshold, on the version read.","description":"Dashboard: delete a threshold, on the version read.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n**Versioned entities:** dashboard_metric_threshold (id in data.id, version in data.expected_version).\n\n\n**Notes**\n\n- The catalog does not say whether this method needs an idempotency key.\n- Send the current version of the row in `expected_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[{"entity":"dashboard_metric_threshold","id_field":"id","version_field":"expected_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"dashboard_setting","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"dashboard_metric_threshold_delete"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"expected_version":{"format":"int32","type":"integer"},"id":{"format":"int64","type":"integer"}},"required":["expected_version","id"],"title":"DeleteThresholdInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"dashboard_metric_threshold_delete","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"expected_version":1,"id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"title":"AnyValue"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":null}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#dashboard_setting_get":{"post":{"operationId":"dashboard_setting_get","summary":"Dashboard: the warehouse's board settings card.","description":"Dashboard: the warehouse's board settings card.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"dashboard_setting","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"dashboard_setting_get"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"dashboard_setting_get","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"The settings card: the effective rail one slot a field, so a picker sits on each.","properties":{"expiring_within_days":{"format":"int32","type":"integer"},"id":{"format":"int64","type":"integer"},"rail_1":{"type":"string"},"rail_2":{"type":"string"},"rail_3":{"type":"string"},"rail_4":{"type":"string"},"rail_5":{"type":"string"},"rail_6":{"type":"string"},"show_demo":{"type":"boolean"},"throughput_plan_per_hour":{"format":"double","type":["number","null"]},"version":{"format":"int32","type":"integer"}},"required":["expiring_within_days","id","rail_1","rail_2","rail_3","rail_4","rail_5","rail_6","show_demo","version"],"title":"SettingCard","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"expiring_within_days":1,"id":1,"rail_1":"<rail_1>","rail_2":"<rail_2>","rail_3":"<rail_3>","rail_4":"<rail_4>","rail_5":"<rail_5>","rail_6":"<rail_6>","show_demo":false,"version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#dashboard_setting_list":{"post":{"operationId":"dashboard_setting_list","summary":"Dashboard: the board settings, as a one-row list.","description":"Dashboard: the board settings, as a one-row list.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"dashboard_setting","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"dashboard_setting_list"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"dashboard_setting_list"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/SettingCard"},"title":"Array_of_SettingCard","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"expiring_within_days":1,"id":1,"rail_1":"<rail_1>","rail_2":"<rail_2>","rail_3":"<rail_3>","rail_4":"<rail_4>","rail_5":"<rail_5>","rail_6":"<rail_6>","show_demo":false,"version":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#dashboard_metric_threshold_get":{"post":{"operationId":"dashboard_metric_threshold_get","summary":"Dashboard: one metric threshold, as its card loads it.","description":"Dashboard: one metric threshold, as its card loads it.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"dashboard_setting","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"dashboard_metric_threshold_get"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"dashboard_metric_threshold_get","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"A metric's alert and critical levels in this warehouse.","properties":{"alert_at":{"format":"double","type":["number","null"]},"bad_when":{"description":"`Above` or `Below` — which side of the levels is bad.","type":"string"},"critical_at":{"format":"double","type":["number","null"]},"id":{"format":"int64","type":"integer"},"metric_key":{"type":"string"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"version":{"format":"int32","type":"integer"}},"required":["bad_when","id","metric_key","mod_when","mod_who","version"],"title":"DashboardMetricThreshold","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"bad_when":"<bad_when>","id":1,"metric_key":"<metric_key>","mod_when":"<mod_when>","mod_who":1,"version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#dashboard_metric_threshold_list":{"post":{"operationId":"dashboard_metric_threshold_list","summary":"Dashboard: the warehouse's metric thresholds.","description":"Dashboard: the warehouse's metric thresholds.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"dashboard_setting","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"dashboard_metric_threshold_list"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"dashboard_metric_threshold_list"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/DashboardMetricThreshold"},"title":"Array_of_DashboardMetricThreshold","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"bad_when":"<bad_when>","id":1,"metric_key":"<metric_key>","mod_when":"<mod_when>","mod_who":1,"version":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#dashboard_metric_catalogue":{"post":{"operationId":"dashboard_metric_catalogue","summary":"Dashboard: every metric the rail can hold — key, name, live or demo.","description":"Dashboard: every metric the rail can hold — key, name, live or demo.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"dashboard_setting","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"dashboard_metric_catalogue"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"dashboard_metric_catalogue"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/CatalogueMetric"},"title":"Array_of_CatalogueMetric","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"key":"<key>","label":"<label>","live":false}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#set_log_level":{"post":{"operationId":"set_log_level","summary":"Set the live log filter directive","description":"Set the live log filter directive\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"log_level","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"set_log_level"},"params":{"type":"object","properties":{"filter":{"description":"Директива в синтаксисе `RUST_LOG`. Слово `default` возвращает стартовую.\n\nДиректива ЗАМЕНЯЕТ фильтр целиком, а не добавляется к нему, и SQL слоя 3 идёт с target `wms_lib_core::dbx` — то есть напрашивающееся `wms_inventory=trace` (пример, который здесь стоял раньше) не включает ни одной SQL-строки и вдобавок гасит слои 1 и 2. Готовая строка «все три слоя сразу» — в `docs-obsidian/architecture/logging.md`.","type":"string"}},"required":["filter"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"set_log_level","params":{"filter":"<filter>"}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"filter":{"type":"string"}},"required":["filter"],"title":"LogLevelResult","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"filter":"<filter>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_log_level":{"post":{"operationId":"get_log_level","summary":"Read the live log filter directive","description":"Read the live log filter directive\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"log_level","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_log_level"},"params":{"type":"object","properties":{}}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_log_level"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"filter":{"type":"string"}},"required":["filter"],"title":"LogLevelResult","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"filter":"<filter>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#create_handling_unit_type":{"post":{"operationId":"create_handling_unit_type","summary":"Create a new handling_unit_type — CRUD.","description":"Create a new handling_unit_type — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"UNIQUE_VIOLATION or INVALID_DATA","when":"The code already exists, or a value breaks a rule."}],"x-quark-module":"handling_unit_type","x-quark-operation":"create","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"create_handling_unit_type"},"params":{"type":"object","properties":{"data":{"description":"A field left `None` is left out of the INSERT, so the column takes its DEFAULT.","properties":{"active":{"type":["boolean","null"]},"code":{"type":"string"},"code_prefix":{"type":["string","null"]},"default_usage_policy":{"anyOf":[{"$ref":"#/components/schemas/HandlingUnitUsagePolicy"},{"type":"null"}]},"holds_containers":{"type":["boolean","null"]},"holds_inventory":{"type":["boolean","null"]},"inner_height":{"format":"double","type":["number","null"]},"inner_length":{"format":"double","type":["number","null"]},"inner_width":{"format":"double","type":["number","null"]},"max_gross_weight":{"format":"double","type":["number","null"]},"name":{"type":"string"},"positions":{"format":"int16","type":["integer","null"]},"return_inspection":{"type":["boolean","null"]},"returnable":{"type":["boolean","null"]},"shippable":{"type":["boolean","null"]},"tare_weight":{"format":"double","type":["number","null"]},"tracking":{"anyOf":[{"$ref":"#/components/schemas/HandlingUnitTracking"},{"type":"null"}]}},"required":["code","name"],"title":"HandlingUnitTypeForCreate","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"create_handling_unit_type","params":{"data":{"code":"<code>","name":"<name>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"active":{"type":"boolean"},"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"code_prefix":{"type":["string","null"]},"default_usage_policy":{"anyOf":[{"$ref":"#/components/schemas/HandlingUnitUsagePolicy"},{"type":"null"}]},"holds_containers":{"type":"boolean"},"holds_inventory":{"type":"boolean"},"id":{"format":"int64","type":"integer"},"inner_height":{"format":"double","type":"number"},"inner_length":{"format":"double","type":"number"},"inner_width":{"format":"double","type":"number"},"max_gross_weight":{"format":"double","type":"number"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"name":{"type":"string"},"positions":{"format":"int16","type":["integer","null"]},"return_inspection":{"type":"boolean"},"returnable":{"type":"boolean"},"shippable":{"type":"boolean"},"tare_weight":{"format":"double","type":"number"},"tracking":{"$ref":"#/components/schemas/HandlingUnitTracking"}},"required":["active","add_when","add_who","code","holds_containers","holds_inventory","id","inner_height","inner_length","inner_width","max_gross_weight","mod_when","mod_who","name","return_inspection","returnable","shippable","tare_weight","tracking"],"title":"HandlingUnitType","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"active":false,"add_when":"<add_when>","add_who":1,"code":"<code>","holds_containers":false,"holds_inventory":false,"id":1,"inner_height":1.5,"inner_length":1.5,"inner_width":1.5,"max_gross_weight":1.5,"mod_when":"<mod_when>","mod_who":1,"name":"<name>","return_inspection":false,"returnable":false,"shippable":false,"tare_weight":1.5,"tracking":"ByInstance"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_handling_unit_type":{"post":{"operationId":"get_handling_unit_type","summary":"Get a handling_unit_type by ID — CRUD.","description":"Get a handling_unit_type by ID — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"handling_unit_type","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_handling_unit_type"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_handling_unit_type","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"active":{"type":"boolean"},"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"code_prefix":{"type":["string","null"]},"default_usage_policy":{"anyOf":[{"$ref":"#/components/schemas/HandlingUnitUsagePolicy"},{"type":"null"}]},"holds_containers":{"type":"boolean"},"holds_inventory":{"type":"boolean"},"id":{"format":"int64","type":"integer"},"inner_height":{"format":"double","type":"number"},"inner_length":{"format":"double","type":"number"},"inner_width":{"format":"double","type":"number"},"max_gross_weight":{"format":"double","type":"number"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"name":{"type":"string"},"positions":{"format":"int16","type":["integer","null"]},"return_inspection":{"type":"boolean"},"returnable":{"type":"boolean"},"shippable":{"type":"boolean"},"tare_weight":{"format":"double","type":"number"},"tracking":{"$ref":"#/components/schemas/HandlingUnitTracking"}},"required":["active","add_when","add_who","code","holds_containers","holds_inventory","id","inner_height","inner_length","inner_width","max_gross_weight","mod_when","mod_who","name","return_inspection","returnable","shippable","tare_weight","tracking"],"title":"HandlingUnitType","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"active":false,"add_when":"<add_when>","add_who":1,"code":"<code>","holds_containers":false,"holds_inventory":false,"id":1,"inner_height":1.5,"inner_length":1.5,"inner_width":1.5,"max_gross_weight":1.5,"mod_when":"<mod_when>","mod_who":1,"name":"<name>","return_inspection":false,"returnable":false,"shippable":false,"tare_weight":1.5,"tracking":"ByInstance"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_handling_unit_type":{"post":{"operationId":"list_handling_unit_type","summary":"List handling_unit_type — CRUD.","description":"List handling_unit_type — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"handling_unit_type","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_handling_unit_type"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_handling_unit_type"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/HandlingUnitType"},"title":"Array_of_HandlingUnitType","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"active":false,"add_when":"<add_when>","add_who":1,"code":"<code>","holds_containers":false,"holds_inventory":false,"id":1,"inner_height":1.5,"inner_length":1.5,"inner_width":1.5,"max_gross_weight":1.5,"mod_when":"<mod_when>","mod_who":1,"name":"<name>","return_inspection":false,"returnable":false,"shippable":false,"tare_weight":1.5,"tracking":"ByInstance"}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_handling_unit_type":{"post":{"operationId":"count_handling_unit_type","summary":"Count handling_unit_type — CRUD.","description":"Count handling_unit_type — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"handling_unit_type","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_handling_unit_type"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_handling_unit_type"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#update_handling_unit_type":{"post":{"operationId":"update_handling_unit_type","summary":"Update a handling unit type; its code is the stable key and cannot change.","description":"Update a handling unit type; its code is the stable key and cannot change.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["enterprise"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"INVALID_DATA","when":"A value breaks a rule."}],"x-quark-module":"handling_unit_type","x-quark-operation":"update","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"update_handling_unit_type"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"},"data":{"additionalProperties":false,"properties":{"active":{"type":"boolean"},"code_prefix":{"type":"string"},"default_usage_policy":{"description":"To whom an instance may be handed out by default.","enum":["OwnOnly","WarehouseShared"],"type":"string"},"holds_containers":{"type":"boolean"},"holds_inventory":{"type":"boolean"},"inner_height":{"format":"double","type":"number"},"inner_length":{"format":"double","type":"number"},"inner_width":{"format":"double","type":"number"},"max_gross_weight":{"format":"double","type":"number"},"name":{"type":"string"},"positions":{"format":"int16","type":"integer"},"return_inspection":{"type":"boolean"},"returnable":{"type":"boolean"},"shippable":{"type":"boolean"},"tare_weight":{"format":"double","type":"number"}},"title":"HandlingUnitTypeUpdateApi","type":"object"}},"required":["id","data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"update_handling_unit_type","params":{"id":1,"data":{"active":false,"code_prefix":"<code_prefix>","default_usage_policy":"OwnOnly"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"active":{"type":"boolean"},"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"code_prefix":{"type":["string","null"]},"default_usage_policy":{"anyOf":[{"$ref":"#/components/schemas/HandlingUnitUsagePolicy"},{"type":"null"}]},"holds_containers":{"type":"boolean"},"holds_inventory":{"type":"boolean"},"id":{"format":"int64","type":"integer"},"inner_height":{"format":"double","type":"number"},"inner_length":{"format":"double","type":"number"},"inner_width":{"format":"double","type":"number"},"max_gross_weight":{"format":"double","type":"number"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"name":{"type":"string"},"positions":{"format":"int16","type":["integer","null"]},"return_inspection":{"type":"boolean"},"returnable":{"type":"boolean"},"shippable":{"type":"boolean"},"tare_weight":{"format":"double","type":"number"},"tracking":{"$ref":"#/components/schemas/HandlingUnitTracking"}},"required":["active","add_when","add_who","code","holds_containers","holds_inventory","id","inner_height","inner_length","inner_width","max_gross_weight","mod_when","mod_who","name","return_inspection","returnable","shippable","tare_weight","tracking"],"title":"HandlingUnitType","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"active":false,"add_when":"<add_when>","add_who":1,"code":"<code>","holds_containers":false,"holds_inventory":false,"id":1,"inner_height":1.5,"inner_length":1.5,"inner_width":1.5,"max_gross_weight":1.5,"mod_when":"<mod_when>","mod_who":1,"name":"<name>","return_inspection":false,"returnable":false,"shippable":false,"tare_weight":1.5,"tracking":"ByInstance"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#create_code_list":{"post":{"operationId":"create_code_list","summary":"Create a new code_list — CRUD.","description":"Create a new code_list — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"UNIQUE_VIOLATION or INVALID_DATA","when":"The code already exists, or a value breaks a rule."}],"x-quark-module":"code","x-quark-operation":"create","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"create_code_list"},"params":{"type":"object","properties":{"data":{"properties":{"code":{"type":"string"},"description":{"type":"string"},"editable":{"type":["boolean","null"]}},"required":["code","description"],"title":"CodeListForCreate","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"create_code_list","params":{"data":{"code":"<code>","description":"<description>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"description":{"type":"string"},"editable":{"type":"boolean"},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"}},"required":["add_when","add_who","code","description","editable","id","mod_when","mod_who"],"title":"CodeList","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","description":"<description>","editable":false,"id":1,"mod_when":"<mod_when>","mod_who":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_code_list":{"post":{"operationId":"get_code_list","summary":"Get a code_list by ID — CRUD.","description":"Get a code_list by ID — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"code","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_code_list"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_code_list","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"description":{"type":"string"},"editable":{"type":"boolean"},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"}},"required":["add_when","add_who","code","description","editable","id","mod_when","mod_who"],"title":"CodeList","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","description":"<description>","editable":false,"id":1,"mod_when":"<mod_when>","mod_who":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_code_list":{"post":{"operationId":"list_code_list","summary":"List code_list — CRUD.","description":"List code_list — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"code","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_code_list"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_code_list"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/CodeList"},"title":"Array_of_CodeList","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"code":"<code>","description":"<description>","editable":false,"id":1,"mod_when":"<mod_when>","mod_who":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#update_code_list":{"post":{"operationId":"update_code_list","summary":"Update code-list reference fields; null and identity changes are rejected.","description":"Update code-list reference fields; null and identity changes are rejected.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"INVALID_DATA","when":"A value breaks a rule."}],"x-quark-module":"code","x-quark-operation":"update","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"update_code_list"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"},"data":{"additionalProperties":false,"description":"Editable fields of a code-list header. Its stable `code` is deliberately absent: changing identity is not a partial edit.","properties":{"description":{"type":"string"},"editable":{"type":"boolean"}},"title":"CodeListUpdateApi","type":"object"}},"required":["id","data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"update_code_list","params":{"id":1,"data":{"description":"<description>","editable":false}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"description":{"type":"string"},"editable":{"type":"boolean"},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"}},"required":["add_when","add_who","code","description","editable","id","mod_when","mod_who"],"title":"CodeList","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","description":"<description>","editable":false,"id":1,"mod_when":"<mod_when>","mod_who":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_code_list":{"post":{"operationId":"delete_code_list","summary":"Delete a code_list by ID — CRUD.","description":"Delete a code_list by ID — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"DEPENDENT_DATA_EXIST","when":"Other rows still use this row."}],"x-quark-module":"code","x-quark-operation":"delete","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_code_list"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_code_list","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"description":{"type":"string"},"editable":{"type":"boolean"},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"}},"required":["add_when","add_who","code","description","editable","id","mod_when","mod_who"],"title":"CodeList","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","description":"<description>","editable":false,"id":1,"mod_when":"<mod_when>","mod_who":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_code_list":{"post":{"operationId":"count_code_list","summary":"Count code_list — CRUD.","description":"Count code_list — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"code","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_code_list"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_code_list"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_many_code_list":{"post":{"operationId":"delete_many_code_list","summary":"Delete multiple code_list by IDs — CRUD.","description":"Delete multiple code_list by IDs — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"DEPENDENT_DATA_EXIST","when":"Other rows still use this row."}],"x-quark-module":"code","x-quark-operation":"delete","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_many_code_list"},"params":{"type":"object","properties":{"ids":{"items":{"format":"int64","type":"integer"},"type":"array","description":"Record IDs"}},"required":["ids"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_many_code_list","params":{"ids":[1]}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"uint64","minimum":0,"title":"uint64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#create_code_list_value":{"post":{"operationId":"create_code_list_value","summary":"Create a new code_list_value — CRUD.","description":"Create a new code_list_value — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"UNIQUE_VIOLATION or INVALID_DATA","when":"The code already exists, or a value breaks a rule."}],"x-quark-module":"code_value","x-quark-operation":"create","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"create_code_list_value"},"params":{"type":"object","properties":{"data":{"properties":{"active":{"type":["boolean","null"]},"code":{"type":"string"},"code_list_id":{"format":"int64","type":"integer"},"color":{"type":["string","null"]},"description":{"type":"string"},"display_order":{"format":"int16","type":["integer","null"]},"editable":{"type":["boolean","null"]},"icon":{"type":["string","null"]},"short_description":{"type":["string","null"]}},"required":["code","code_list_id","description"],"title":"CodeListValueForCreate","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"create_code_list_value","params":{"data":{"code":"<code>","code_list_id":1,"description":"<description>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"active":{"type":"boolean"},"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"code_list_id":{"format":"int64","type":"integer"},"color":{"type":["string","null"]},"description":{"type":"string"},"display_order":{"format":"int16","type":"integer"},"editable":{"type":"boolean"},"icon":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"short_description":{"type":["string","null"]}},"required":["active","add_when","add_who","code","code_list_id","description","display_order","editable","id","mod_when","mod_who"],"title":"CodeListValue","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"active":false,"add_when":"<add_when>","add_who":1,"code":"<code>","code_list_id":1,"description":"<description>","display_order":1,"editable":false,"id":1,"mod_when":"<mod_when>","mod_who":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_code_list_value":{"post":{"operationId":"get_code_list_value","summary":"Get a code_list_value by ID — CRUD.","description":"Get a code_list_value by ID — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"code_value","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_code_list_value"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_code_list_value","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"active":{"type":"boolean"},"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"code_list_id":{"format":"int64","type":"integer"},"color":{"type":["string","null"]},"description":{"type":"string"},"display_order":{"format":"int16","type":"integer"},"editable":{"type":"boolean"},"icon":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"short_description":{"type":["string","null"]}},"required":["active","add_when","add_who","code","code_list_id","description","display_order","editable","id","mod_when","mod_who"],"title":"CodeListValue","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"active":false,"add_when":"<add_when>","add_who":1,"code":"<code>","code_list_id":1,"description":"<description>","display_order":1,"editable":false,"id":1,"mod_when":"<mod_when>","mod_who":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_code_list_value":{"post":{"operationId":"list_code_list_value","summary":"List code_list_value — CRUD.","description":"List code_list_value — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"code_value","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_code_list_value"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_code_list_value"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/CodeListValue"},"title":"Array_of_CodeListValue","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"active":false,"add_when":"<add_when>","add_who":1,"code":"<code>","code_list_id":1,"description":"<description>","display_order":1,"editable":false,"id":1,"mod_when":"<mod_when>","mod_who":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#update_code_list_value":{"post":{"operationId":"update_code_list_value","summary":"Update a code-list value with explicit keep, clear and set semantics.","description":"Update a code-list value with explicit keep, clear and set semantics.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"INVALID_DATA","when":"A value breaks a rule."}],"x-quark-module":"code_value","x-quark-operation":"update","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"update_code_list_value"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"},"data":{"additionalProperties":false,"description":"Editable fields of one value in a code list. `code_list_id` and `code` are identity and therefore cannot be changed through this endpoint.","properties":{"active":{"type":"boolean"},"color":{"type":["string","null"]},"description":{"type":"string"},"display_order":{"format":"int16","type":"integer"},"editable":{"type":"boolean"},"icon":{"type":["string","null"]},"short_description":{"type":["string","null"]}},"title":"CodeListValueUpdateApi","type":"object"}},"required":["id","data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"update_code_list_value","params":{"id":1,"data":{"active":false,"color":"<color>","description":"<description>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"active":{"type":"boolean"},"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"code_list_id":{"format":"int64","type":"integer"},"color":{"type":["string","null"]},"description":{"type":"string"},"display_order":{"format":"int16","type":"integer"},"editable":{"type":"boolean"},"icon":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"short_description":{"type":["string","null"]}},"required":["active","add_when","add_who","code","code_list_id","description","display_order","editable","id","mod_when","mod_who"],"title":"CodeListValue","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"active":false,"add_when":"<add_when>","add_who":1,"code":"<code>","code_list_id":1,"description":"<description>","display_order":1,"editable":false,"id":1,"mod_when":"<mod_when>","mod_who":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_code_list_value":{"post":{"operationId":"delete_code_list_value","summary":"Delete a code_list_value by ID — CRUD.","description":"Delete a code_list_value by ID — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"DEPENDENT_DATA_EXIST","when":"Other rows still use this row."}],"x-quark-module":"code_value","x-quark-operation":"delete","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_code_list_value"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_code_list_value","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"active":{"type":"boolean"},"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"code_list_id":{"format":"int64","type":"integer"},"color":{"type":["string","null"]},"description":{"type":"string"},"display_order":{"format":"int16","type":"integer"},"editable":{"type":"boolean"},"icon":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"short_description":{"type":["string","null"]}},"required":["active","add_when","add_who","code","code_list_id","description","display_order","editable","id","mod_when","mod_who"],"title":"CodeListValue","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"active":false,"add_when":"<add_when>","add_who":1,"code":"<code>","code_list_id":1,"description":"<description>","display_order":1,"editable":false,"id":1,"mod_when":"<mod_when>","mod_who":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_code_list_value":{"post":{"operationId":"count_code_list_value","summary":"Count code_list_value — CRUD.","description":"Count code_list_value — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"code_value","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_code_list_value"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_code_list_value"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#create_pack":{"post":{"operationId":"create_pack","summary":"Create a pack (header only)","description":"Create a pack (header only)\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"pack","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"create_pack"},"params":{"type":"object","properties":{"data":{"properties":{"code":{"type":"string"},"descr":{"type":"string"}},"required":["code","descr"],"title":"PackInnerForCreate","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"create_pack","params":{"data":{"code":"<code>","descr":"<descr>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"descr":{"type":"string"},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"}},"required":["add_when","add_who","code","descr","id","mod_when","mod_who"],"title":"PackInner","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","descr":"<descr>","id":1,"mod_when":"<mod_when>","mod_who":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#create_pack_with_items":{"post":{"operationId":"create_pack_with_items","summary":"Create a pack with child items","description":"Create a pack with child items\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"pack","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"create_pack_with_items"},"params":{"type":"object","properties":{"data":{"properties":{"code":{"type":"string"},"descr":{"type":"string"},"items":{"items":{"$ref":"#/components/schemas/PackItemForCreate"},"type":"array"}},"required":["code","descr","items"],"title":"PackForCreate","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"create_pack_with_items","params":{"data":{"code":"<code>","descr":"<descr>","items":[{"uom":"<uom>"}]}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"descr":{"type":"string"},"id":{"format":"int64","type":"integer"},"items":{"items":{"$ref":"#/components/schemas/PackItem"},"type":"array"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"}},"required":["add_when","add_who","code","descr","id","items","mod_when","mod_who"],"title":"Pack","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","descr":"<descr>","id":1,"items":[{"add_when":"<add_when>","add_who":1,"base_qty":1.5,"cartonize":false,"cube":1.5,"height":1.5,"hierarchy_level":1,"id":1,"is_active":false,"is_catch_weight":false,"is_dual_uom":false,"length":1.5,"mod_when":"<mod_when>","mod_who":1,"pack_id":1,"pack_revision_id":1,"pallet_hi":1.5,"pallet_ti":1.5,"pallet_wood_height":1.5,"pallet_wood_length":1.5,"pallet_wood_width":1.5,"replenish":false,"rotation_rule":{},"ship_as_is":false,"uom":"<uom>","weight":1.5,"width":1.5}],"mod_when":"<mod_when>","mod_who":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#create_pack_item":{"post":{"operationId":"create_pack_item","summary":"Create a single pack item","description":"Create a single pack item\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"pack","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"create_pack_item"},"params":{"type":"object","properties":{"data":{"properties":{"base_qty":{"format":"double","type":["number","null"]},"cartonize":{"type":["boolean","null"]},"catch_weight_uom":{"type":["string","null"]},"child_pack_item_id":{"format":"int64","type":["integer","null"]},"cube":{"format":"double","type":["number","null"]},"height":{"format":"double","type":["number","null"]},"hierarchy_level":{"format":"int32","type":["integer","null"]},"is_catch_weight":{"type":["boolean","null"]},"is_dual_uom":{"type":["boolean","null"]},"length":{"format":"double","type":["number","null"]},"max_weight":{"format":"double","type":["number","null"]},"min_weight":{"format":"double","type":["number","null"]},"nominal_weight":{"format":"double","type":["number","null"]},"pack_id":{"format":"int64","type":"integer"},"pack_revision_id":{"description":"Эпоха, в которую ложится строка. Вызывающему знать о ней не нужно: `PackItemInnerBmc::create` сам берёт ДЕЙСТВУЮЩУЮ ревизию упаковки. Поле есть только потому, что `Fields` строит список колонок INSERT-а из структуры, а колонка `NOT NULL` и без умолчания.","format":"int64","type":["integer","null"]},"pallet_hi":{"format":"double","type":["number","null"]},"pallet_ti":{"format":"double","type":["number","null"]},"pallet_wood_height":{"format":"double","type":["number","null"]},"pallet_wood_length":{"format":"double","type":["number","null"]},"pallet_wood_width":{"format":"double","type":["number","null"]},"qty_per_child":{"format":"double","type":["number","null"]},"replenish":{"type":["boolean","null"]},"rotation_rule":{"anyOf":[{"$ref":"#/components/schemas/RotationRule"},{"type":"null"}]},"secondary_uom":{"type":["string","null"]},"ship_as_is":{"type":["boolean","null"]},"uom":{"type":"string"},"weight":{"format":"double","type":["number","null"]},"width":{"format":"double","type":["number","null"]}},"required":["pack_id","uom"],"title":"PackItemForCreateInner","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"create_pack_item","params":{"data":{"pack_id":1,"uom":"<uom>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"base_qty":{"format":"double","type":"number"},"cartonize":{"type":"boolean"},"catch_weight_uom":{"type":["string","null"]},"child_pack_item_id":{"format":"int64","type":["integer","null"]},"cube":{"format":"double","type":"number"},"height":{"format":"double","type":"number"},"hierarchy_level":{"format":"int32","type":"integer"},"id":{"format":"int64","type":"integer"},"is_catch_weight":{"type":"boolean"},"is_dual_uom":{"type":"boolean"},"length":{"format":"double","type":"number"},"max_weight":{"format":"double","type":["number","null"]},"min_weight":{"format":"double","type":["number","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"nominal_weight":{"format":"double","type":["number","null"]},"pack_id":{"format":"int64","type":"integer"},"pack_revision_id":{"description":"Эпоха лестницы, которой принадлежит эта ступень (миграция 347).","format":"int64","type":"integer"},"pallet_hi":{"format":"double","type":"number"},"pallet_ti":{"format":"double","type":"number"},"pallet_wood_height":{"format":"double","type":"number"},"pallet_wood_length":{"format":"double","type":"number"},"pallet_wood_width":{"format":"double","type":"number"},"qty_per_child":{"format":"double","type":["number","null"]},"replenish":{"type":"boolean"},"rotation_rule":{"$ref":"#/components/schemas/RotationRule"},"secondary_uom":{"type":["string","null"]},"ship_as_is":{"type":"boolean"},"uom":{"type":"string"},"weight":{"format":"double","type":"number"},"width":{"format":"double","type":"number"}},"required":["add_when","add_who","base_qty","cartonize","cube","height","hierarchy_level","id","is_catch_weight","is_dual_uom","length","mod_when","mod_who","pack_id","pack_revision_id","pallet_hi","pallet_ti","pallet_wood_height","pallet_wood_length","pallet_wood_width","replenish","rotation_rule","ship_as_is","uom","weight","width"],"title":"PackItemInner","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"base_qty":1.5,"cartonize":false,"cube":1.5,"height":1.5,"hierarchy_level":1,"id":1,"is_catch_weight":false,"is_dual_uom":false,"length":1.5,"mod_when":"<mod_when>","mod_who":1,"pack_id":1,"pack_revision_id":1,"pallet_hi":1.5,"pallet_ti":1.5,"pallet_wood_height":1.5,"pallet_wood_length":1.5,"pallet_wood_width":1.5,"replenish":false,"rotation_rule":"All90","ship_as_is":false,"uom":"<uom>","weight":1.5,"width":1.5}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_pack":{"post":{"operationId":"get_pack","summary":"Get a pack by ID (header only)","description":"Get a pack by ID (header only)\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"pack","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_pack"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_pack","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"descr":{"type":"string"},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"}},"required":["add_when","add_who","code","descr","id","mod_when","mod_who"],"title":"PackInner","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","descr":"<descr>","id":1,"mod_when":"<mod_when>","mod_who":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_pack_with_items":{"post":{"operationId":"get_pack_with_items","summary":"Get a pack by ID with items","description":"Get a pack by ID with items\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"pack","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_pack_with_items"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_pack_with_items","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"descr":{"type":"string"},"id":{"format":"int64","type":"integer"},"items":{"items":{"$ref":"#/components/schemas/PackItem"},"type":"array"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"}},"required":["add_when","add_who","code","descr","id","items","mod_when","mod_who"],"title":"Pack","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","descr":"<descr>","id":1,"items":[{"add_when":"<add_when>","add_who":1,"base_qty":1.5,"cartonize":false,"cube":1.5,"height":1.5,"hierarchy_level":1,"id":1,"is_active":false,"is_catch_weight":false,"is_dual_uom":false,"length":1.5,"mod_when":"<mod_when>","mod_who":1,"pack_id":1,"pack_revision_id":1,"pallet_hi":1.5,"pallet_ti":1.5,"pallet_wood_height":1.5,"pallet_wood_length":1.5,"pallet_wood_width":1.5,"replenish":false,"rotation_rule":{},"ship_as_is":false,"uom":"<uom>","weight":1.5,"width":1.5}],"mod_when":"<mod_when>","mod_who":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_pack_item":{"post":{"operationId":"get_pack_item","summary":"Get a pack item by ID","description":"Get a pack item by ID\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"pack","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_pack_item"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_pack_item","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"base_qty":{"format":"double","type":"number"},"cartonize":{"type":"boolean"},"catch_weight_uom":{"type":["string","null"]},"child_pack_item_id":{"format":"int64","type":["integer","null"]},"cube":{"format":"double","type":"number"},"height":{"format":"double","type":"number"},"hierarchy_level":{"format":"int32","type":"integer"},"id":{"format":"int64","type":"integer"},"is_catch_weight":{"type":"boolean"},"is_dual_uom":{"type":"boolean"},"length":{"format":"double","type":"number"},"max_weight":{"format":"double","type":["number","null"]},"min_weight":{"format":"double","type":["number","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"nominal_weight":{"format":"double","type":["number","null"]},"pack_id":{"format":"int64","type":"integer"},"pack_revision_id":{"description":"Эпоха лестницы, которой принадлежит эта ступень (миграция 347).","format":"int64","type":"integer"},"pallet_hi":{"format":"double","type":"number"},"pallet_ti":{"format":"double","type":"number"},"pallet_wood_height":{"format":"double","type":"number"},"pallet_wood_length":{"format":"double","type":"number"},"pallet_wood_width":{"format":"double","type":"number"},"qty_per_child":{"format":"double","type":["number","null"]},"replenish":{"type":"boolean"},"rotation_rule":{"$ref":"#/components/schemas/RotationRule"},"secondary_uom":{"type":["string","null"]},"ship_as_is":{"type":"boolean"},"uom":{"type":"string"},"weight":{"format":"double","type":"number"},"width":{"format":"double","type":"number"}},"required":["add_when","add_who","base_qty","cartonize","cube","height","hierarchy_level","id","is_catch_weight","is_dual_uom","length","mod_when","mod_who","pack_id","pack_revision_id","pallet_hi","pallet_ti","pallet_wood_height","pallet_wood_length","pallet_wood_width","replenish","rotation_rule","ship_as_is","uom","weight","width"],"title":"PackItemInner","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"base_qty":1.5,"cartonize":false,"cube":1.5,"height":1.5,"hierarchy_level":1,"id":1,"is_catch_weight":false,"is_dual_uom":false,"length":1.5,"mod_when":"<mod_when>","mod_who":1,"pack_id":1,"pack_revision_id":1,"pallet_hi":1.5,"pallet_ti":1.5,"pallet_wood_height":1.5,"pallet_wood_length":1.5,"pallet_wood_width":1.5,"replenish":false,"rotation_rule":"All90","ship_as_is":false,"uom":"<uom>","weight":1.5,"width":1.5}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#update_pack":{"post":{"operationId":"update_pack","summary":"Update a pack (header only)","description":"Update a pack (header only)\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"pack","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"update_pack"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"},"data":{"properties":{"code":{"type":["string","null"]},"descr":{"type":["string","null"]}},"title":"PackInnerForUpdate","type":"object"}},"required":["id","data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"update_pack","params":{"id":1,"data":{"code":"<code>","descr":"<descr>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"descr":{"type":"string"},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"}},"required":["add_when","add_who","code","descr","id","mod_when","mod_who"],"title":"PackInner","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","descr":"<descr>","id":1,"mod_when":"<mod_when>","mod_who":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#update_pack_with_items":{"post":{"operationId":"update_pack_with_items","summary":"Update a pack with child items","description":"Update a pack with child items\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"pack","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"update_pack_with_items"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"},"data":{"properties":{"code":{"type":["string","null"]},"descr":{"type":["string","null"]},"items":{"items":{"$ref":"#/components/schemas/PackItemForUpdate"},"type":["array","null"]}},"title":"PackForUpdate","type":"object"}},"required":["id","data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"update_pack_with_items","params":{"id":1,"data":{"code":"<code>","descr":"<descr>","items":[{}]}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"descr":{"type":"string"},"id":{"format":"int64","type":"integer"},"items":{"items":{"$ref":"#/components/schemas/PackItem"},"type":"array"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"}},"required":["add_when","add_who","code","descr","id","items","mod_when","mod_who"],"title":"Pack","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","descr":"<descr>","id":1,"items":[{"add_when":"<add_when>","add_who":1,"base_qty":1.5,"cartonize":false,"cube":1.5,"height":1.5,"hierarchy_level":1,"id":1,"is_active":false,"is_catch_weight":false,"is_dual_uom":false,"length":1.5,"mod_when":"<mod_when>","mod_who":1,"pack_id":1,"pack_revision_id":1,"pallet_hi":1.5,"pallet_ti":1.5,"pallet_wood_height":1.5,"pallet_wood_length":1.5,"pallet_wood_width":1.5,"replenish":false,"rotation_rule":{},"ship_as_is":false,"uom":"<uom>","weight":1.5,"width":1.5}],"mod_when":"<mod_when>","mod_who":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#update_pack_item":{"post":{"operationId":"update_pack_item","summary":"Update a pack item","description":"Update a pack item\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"pack","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"update_pack_item"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"},"data":{"properties":{"base_qty":{"format":"double","type":["number","null"]},"cartonize":{"type":["boolean","null"]},"catch_weight_uom":{"type":["string","null"]},"child_pack_item_id":{"format":"int64","type":["integer","null"]},"cube":{"format":"double","type":["number","null"]},"height":{"format":"double","type":["number","null"]},"hierarchy_level":{"format":"int32","type":["integer","null"]},"is_catch_weight":{"type":["boolean","null"]},"is_dual_uom":{"type":["boolean","null"]},"length":{"format":"double","type":["number","null"]},"max_weight":{"format":"double","type":["number","null"]},"min_weight":{"format":"double","type":["number","null"]},"nominal_weight":{"format":"double","type":["number","null"]},"pallet_hi":{"format":"double","type":["number","null"]},"pallet_ti":{"format":"double","type":["number","null"]},"pallet_wood_height":{"format":"double","type":["number","null"]},"pallet_wood_length":{"format":"double","type":["number","null"]},"pallet_wood_width":{"format":"double","type":["number","null"]},"qty_per_child":{"format":"double","type":["number","null"]},"replenish":{"type":["boolean","null"]},"rotation_rule":{"anyOf":[{"$ref":"#/components/schemas/RotationRule"},{"type":"null"}]},"secondary_uom":{"type":["string","null"]},"ship_as_is":{"type":["boolean","null"]},"uom":{"type":["string","null"]},"weight":{"format":"double","type":["number","null"]},"width":{"format":"double","type":["number","null"]}},"title":"PackItemForUpdateInner","type":"object"}},"required":["id","data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"update_pack_item","params":{"id":1,"data":{"base_qty":1.5,"cartonize":false,"catch_weight_uom":"<catch_weight_uom>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"base_qty":{"format":"double","type":"number"},"cartonize":{"type":"boolean"},"catch_weight_uom":{"type":["string","null"]},"child_pack_item_id":{"format":"int64","type":["integer","null"]},"cube":{"format":"double","type":"number"},"height":{"format":"double","type":"number"},"hierarchy_level":{"format":"int32","type":"integer"},"id":{"format":"int64","type":"integer"},"is_catch_weight":{"type":"boolean"},"is_dual_uom":{"type":"boolean"},"length":{"format":"double","type":"number"},"max_weight":{"format":"double","type":["number","null"]},"min_weight":{"format":"double","type":["number","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"nominal_weight":{"format":"double","type":["number","null"]},"pack_id":{"format":"int64","type":"integer"},"pack_revision_id":{"description":"Эпоха лестницы, которой принадлежит эта ступень (миграция 347).","format":"int64","type":"integer"},"pallet_hi":{"format":"double","type":"number"},"pallet_ti":{"format":"double","type":"number"},"pallet_wood_height":{"format":"double","type":"number"},"pallet_wood_length":{"format":"double","type":"number"},"pallet_wood_width":{"format":"double","type":"number"},"qty_per_child":{"format":"double","type":["number","null"]},"replenish":{"type":"boolean"},"rotation_rule":{"$ref":"#/components/schemas/RotationRule"},"secondary_uom":{"type":["string","null"]},"ship_as_is":{"type":"boolean"},"uom":{"type":"string"},"weight":{"format":"double","type":"number"},"width":{"format":"double","type":"number"}},"required":["add_when","add_who","base_qty","cartonize","cube","height","hierarchy_level","id","is_catch_weight","is_dual_uom","length","mod_when","mod_who","pack_id","pack_revision_id","pallet_hi","pallet_ti","pallet_wood_height","pallet_wood_length","pallet_wood_width","replenish","rotation_rule","ship_as_is","uom","weight","width"],"title":"PackItemInner","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"base_qty":1.5,"cartonize":false,"cube":1.5,"height":1.5,"hierarchy_level":1,"id":1,"is_catch_weight":false,"is_dual_uom":false,"length":1.5,"mod_when":"<mod_when>","mod_who":1,"pack_id":1,"pack_revision_id":1,"pallet_hi":1.5,"pallet_ti":1.5,"pallet_wood_height":1.5,"pallet_wood_length":1.5,"pallet_wood_width":1.5,"replenish":false,"rotation_rule":"All90","ship_as_is":false,"uom":"<uom>","weight":1.5,"width":1.5}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_packs":{"post":{"operationId":"list_packs","summary":"List packs (filtered)","description":"List packs (filtered)\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"pack","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_packs"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_packs"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/PackInner"},"title":"Array_of_PackInner","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"code":"<code>","descr":"<descr>","id":1,"mod_when":"<mod_when>","mod_who":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_pack_items":{"post":{"operationId":"list_pack_items","summary":"List pack items (filtered)","description":"List pack items (filtered)\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"pack","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_pack_items"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_pack_items"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/PackItemInner"},"title":"Array_of_PackItemInner","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"base_qty":1.5,"cartonize":false,"cube":1.5,"height":1.5,"hierarchy_level":1,"id":1,"is_catch_weight":false,"is_dual_uom":false,"length":1.5,"mod_when":"<mod_when>","mod_who":1,"pack_id":1,"pack_revision_id":1,"pallet_hi":1.5,"pallet_ti":1.5,"pallet_wood_height":1.5,"pallet_wood_length":1.5,"pallet_wood_width":1.5,"replenish":false,"rotation_rule":"All90","ship_as_is":false,"uom":"<uom>","weight":1.5,"width":1.5}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_pack":{"post":{"operationId":"delete_pack","summary":"Delete a pack (header only)","description":"Delete a pack (header only)\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"pack","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_pack"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_pack","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"descr":{"type":"string"},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"}},"required":["add_when","add_who","code","descr","id","mod_when","mod_who"],"title":"PackInner","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","descr":"<descr>","id":1,"mod_when":"<mod_when>","mod_who":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_pack_item":{"post":{"operationId":"delete_pack_item","summary":"Delete a pack item","description":"Delete a pack item\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"pack","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_pack_item"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_pack_item","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"base_qty":{"format":"double","type":"number"},"cartonize":{"type":"boolean"},"catch_weight_uom":{"type":["string","null"]},"child_pack_item_id":{"format":"int64","type":["integer","null"]},"cube":{"format":"double","type":"number"},"height":{"format":"double","type":"number"},"hierarchy_level":{"format":"int32","type":"integer"},"id":{"format":"int64","type":"integer"},"is_catch_weight":{"type":"boolean"},"is_dual_uom":{"type":"boolean"},"length":{"format":"double","type":"number"},"max_weight":{"format":"double","type":["number","null"]},"min_weight":{"format":"double","type":["number","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"nominal_weight":{"format":"double","type":["number","null"]},"pack_id":{"format":"int64","type":"integer"},"pack_revision_id":{"description":"Эпоха лестницы, которой принадлежит эта ступень (миграция 347).","format":"int64","type":"integer"},"pallet_hi":{"format":"double","type":"number"},"pallet_ti":{"format":"double","type":"number"},"pallet_wood_height":{"format":"double","type":"number"},"pallet_wood_length":{"format":"double","type":"number"},"pallet_wood_width":{"format":"double","type":"number"},"qty_per_child":{"format":"double","type":["number","null"]},"replenish":{"type":"boolean"},"rotation_rule":{"$ref":"#/components/schemas/RotationRule"},"secondary_uom":{"type":["string","null"]},"ship_as_is":{"type":"boolean"},"uom":{"type":"string"},"weight":{"format":"double","type":"number"},"width":{"format":"double","type":"number"}},"required":["add_when","add_who","base_qty","cartonize","cube","height","hierarchy_level","id","is_catch_weight","is_dual_uom","length","mod_when","mod_who","pack_id","pack_revision_id","pallet_hi","pallet_ti","pallet_wood_height","pallet_wood_length","pallet_wood_width","replenish","rotation_rule","ship_as_is","uom","weight","width"],"title":"PackItemInner","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"base_qty":1.5,"cartonize":false,"cube":1.5,"height":1.5,"hierarchy_level":1,"id":1,"is_catch_weight":false,"is_dual_uom":false,"length":1.5,"mod_when":"<mod_when>","mod_who":1,"pack_id":1,"pack_revision_id":1,"pallet_hi":1.5,"pallet_ti":1.5,"pallet_wood_height":1.5,"pallet_wood_length":1.5,"pallet_wood_width":1.5,"replenish":false,"rotation_rule":"All90","ship_as_is":false,"uom":"<uom>","weight":1.5,"width":1.5}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_pack_with_items":{"post":{"operationId":"delete_pack_with_items","summary":"Delete a pack with its items","description":"Delete a pack with its items\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"pack","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_pack_with_items"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_pack_with_items","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"descr":{"type":"string"},"id":{"format":"int64","type":"integer"},"items":{"items":{"$ref":"#/components/schemas/PackItem"},"type":"array"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"}},"required":["add_when","add_who","code","descr","id","items","mod_when","mod_who"],"title":"Pack","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","descr":"<descr>","id":1,"items":[{"add_when":"<add_when>","add_who":1,"base_qty":1.5,"cartonize":false,"cube":1.5,"height":1.5,"hierarchy_level":1,"id":1,"is_active":false,"is_catch_weight":false,"is_dual_uom":false,"length":1.5,"mod_when":"<mod_when>","mod_who":1,"pack_id":1,"pack_revision_id":1,"pallet_hi":1.5,"pallet_ti":1.5,"pallet_wood_height":1.5,"pallet_wood_length":1.5,"pallet_wood_width":1.5,"replenish":false,"rotation_rule":{},"ship_as_is":false,"uom":"<uom>","weight":1.5,"width":1.5}],"mod_when":"<mod_when>","mod_who":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_pack":{"post":{"operationId":"count_pack","summary":"Count packs","description":"Count packs\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"pack","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_pack"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_pack"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_pack_hierarchy":{"post":{"operationId":"get_pack_hierarchy","summary":"Get pack items as tree/hierarchy view","description":"Get pack items as tree/hierarchy view\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"pack","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_pack_hierarchy"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_pack_hierarchy"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"Response for hierarchy endpoint","properties":{"items":{"items":{"$ref":"#/components/schemas/PackItemTreeView"},"type":"array"},"pack":{"anyOf":[{"$ref":"#/components/schemas/PackInner"},{"type":"null"}]}},"required":["items"],"title":"PackHierarchyResponse","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"items":[{"baseQty":1.5,"cartonize":false,"cube":1.5,"height":1.5,"hierarchyLevel":1,"hierarchyPath":["<hierarchyPath>"],"id":1,"isBaseUnit":false,"isCatchWeight":false,"isDualUom":false,"length":1.5,"maxWeight":1.5,"minWeight":1.5,"nominalWeight":1.5,"packId":1,"palletHi":1.5,"palletTi":1.5,"replenish":false,"shipAsIs":false,"uom":"<uom>","weight":1.5,"width":1.5}]}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#convert_pack_uom":{"post":{"operationId":"convert_pack_uom","summary":"Convert quantity between UOMs within a pack","description":"Convert quantity between UOMs within a pack\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"pack","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"convert_pack_uom"},"params":{"type":"object","properties":{"from_uom":{"type":"string"},"pack_id":{"format":"int64","type":"integer"},"qty":{"format":"double","type":"number"},"to_uom":{"type":"string"}},"required":["from_uom","pack_id","qty","to_uom"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"convert_pack_uom","params":{"from_uom":"<from_uom>","pack_id":1,"qty":1.5,"to_uom":"<to_uom>"}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"Response for UOM conversion","properties":{"fromQty":{"format":"double","type":"number"},"fromUom":{"type":"string"},"toQty":{"format":"double","type":"number"},"toUom":{"type":"string"}},"required":["fromQty","fromUom","toQty","toUom"],"title":"ConvertUomResponse","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"fromQty":1.5,"fromUom":"<fromUom>","toQty":1.5,"toUom":"<toUom>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#calc_pack_quantity_breakdown":{"post":{"operationId":"calc_pack_quantity_breakdown","summary":"Calculate quantity breakdown across pack hierarchy levels","description":"Calculate quantity breakdown across pack hierarchy levels\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"pack","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"calc_pack_quantity_breakdown"},"params":{"type":"object","properties":{"pack_id":{"format":"int64","type":"integer"},"qty":{"format":"double","type":"number"},"uom":{"type":"string"}},"required":["pack_id","qty","uom"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"calc_pack_quantity_breakdown","params":{"pack_id":1,"qty":1.5,"uom":"<uom>"}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"Result of quantity breakdown calculation. Works with any UOM hierarchy - not hardcoded to PL/CS/EA.","properties":{"display":{"description":"Human-readable breakdown string (e.g., \"1 PL + 35 CS + 4 EA\")","type":"string"},"levels":{"items":{"$ref":"#/components/schemas/BreakdownLevel"},"type":"array"},"totalBaseQty":{"format":"double","type":"number"}},"required":["display","levels","totalBaseQty"],"title":"QuantityBreakdown","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"display":"<display>","levels":[{"hierarchyLevel":1,"qty":1,"uom":"<uom>"}],"totalBaseQty":1.5}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#calc_pack_pallet_breakdown":{"post":{"operationId":"calc_pack_pallet_breakdown","summary":"Calculate pack pallet breakdown (alias of calc_pack_quantity_breakdown)","description":"Calculate pack pallet breakdown (alias of calc_pack_quantity_breakdown)\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"pack","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"calc_pack_pallet_breakdown"},"params":{"type":"object","properties":{"pack_id":{"format":"int64","type":"integer"},"qty":{"format":"double","type":"number"},"uom":{"type":"string"}},"required":["pack_id","qty","uom"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"calc_pack_pallet_breakdown","params":{"pack_id":1,"qty":1.5,"uom":"<uom>"}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"Result of quantity breakdown calculation. Works with any UOM hierarchy - not hardcoded to PL/CS/EA.","properties":{"display":{"description":"Human-readable breakdown string (e.g., \"1 PL + 35 CS + 4 EA\")","type":"string"},"levels":{"items":{"$ref":"#/components/schemas/BreakdownLevel"},"type":"array"},"totalBaseQty":{"format":"double","type":"number"}},"required":["display","levels","totalBaseQty"],"title":"QuantityBreakdown","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"display":"<display>","levels":[{"hierarchyLevel":1,"qty":1,"uom":"<uom>"}],"totalBaseQty":1.5}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#recalculate_pack_hierarchy":{"post":{"operationId":"recalculate_pack_hierarchy","summary":"Recalculate base_qty and hierarchy_level for all items in a pack","description":"Recalculate base_qty and hierarchy_level for all items in a pack\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"pack","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"recalculate_pack_hierarchy"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"recalculate_pack_hierarchy","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"descr":{"type":"string"},"id":{"format":"int64","type":"integer"},"items":{"items":{"$ref":"#/components/schemas/PackItem"},"type":"array"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"}},"required":["add_when","add_who","code","descr","id","items","mod_when","mod_who"],"title":"Pack","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","descr":"<descr>","id":1,"items":[{"add_when":"<add_when>","add_who":1,"base_qty":1.5,"cartonize":false,"cube":1.5,"height":1.5,"hierarchy_level":1,"id":1,"is_active":false,"is_catch_weight":false,"is_dual_uom":false,"length":1.5,"mod_when":"<mod_when>","mod_who":1,"pack_id":1,"pack_revision_id":1,"pallet_hi":1.5,"pallet_ti":1.5,"pallet_wood_height":1.5,"pallet_wood_length":1.5,"pallet_wood_width":1.5,"replenish":false,"rotation_rule":{},"ship_as_is":false,"uom":"<uom>","weight":1.5,"width":1.5}],"mod_when":"<mod_when>","mod_who":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#create_owner":{"post":{"operationId":"create_owner","summary":"Create an owner master-data root.","description":"Create an owner master-data root.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog does not say whether this method needs an idempotency key.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"owner","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"create_owner"},"params":{"type":"object","properties":{"data":{"additionalProperties":false,"properties":{"code":{"type":"string"},"company":{"type":"string"},"credit_limit":{"format":"double","type":["number","null"]},"currency_code":{"type":["string","null"]},"description":{"type":["string","null"]},"locale":{"type":["string","null"]},"owner_type":{"$ref":"#/components/schemas/OwnerType"},"parent_id":{"format":"int64","type":["integer","null"]},"picking_toloc":{"type":["string","null"]},"status":{"type":["string","null"]},"timezone":{"type":["string","null"]},"vat":{"type":["string","null"]}},"required":["code","company","owner_type"],"title":"OwnerForCreate","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"create_owner","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"code":"<code>","company":"<company>","owner_type":"Sup"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"company":{"type":"string"},"credit_limit":{"format":"double","type":["number","null"]},"currency_code":{"type":["string","null"]},"description":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"locale":{"type":["string","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"owner_type":{"$ref":"#/components/schemas/OwnerType"},"parent_id":{"format":"int64","type":["integer","null"]},"picking_toloc":{"description":"Delivery location of this owner's orders for a pick carrier (ADR-091).","type":["string","null"]},"status":{"type":["string","null"]},"timezone":{"type":["string","null"]},"vat":{"type":["string","null"]}},"required":["add_when","add_who","code","company","id","mod_when","mod_who","owner_type"],"title":"Owner","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","company":"<company>","id":1,"mod_when":"<mod_when>","mod_who":1,"owner_type":"Sup"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_owner":{"post":{"operationId":"get_owner","summary":"Get a owner by ID — CRUD.","description":"Get a owner by ID — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"owner","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_owner"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_owner","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"company":{"type":"string"},"credit_limit":{"format":"double","type":["number","null"]},"currency_code":{"type":["string","null"]},"description":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"locale":{"type":["string","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"owner_type":{"$ref":"#/components/schemas/OwnerType"},"parent_id":{"format":"int64","type":["integer","null"]},"picking_toloc":{"description":"Delivery location of this owner's orders for a pick carrier (ADR-091).","type":["string","null"]},"status":{"type":["string","null"]},"timezone":{"type":["string","null"]},"vat":{"type":["string","null"]}},"required":["add_when","add_who","code","company","id","mod_when","mod_who","owner_type"],"title":"Owner","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","company":"<company>","id":1,"mod_when":"<mod_when>","mod_who":1,"owner_type":"Sup"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_owner_full":{"post":{"operationId":"get_owner_full","summary":"Get owner with addresses and config aggregated","description":"Get owner with addresses and config aggregated\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"owner","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_owner_full"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_owner_full","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"addresses":{"items":{"$ref":"#/components/schemas/OwnerAddress"},"type":"array"},"code":{"type":"string"},"company":{"type":"string"},"config":{"anyOf":[{"$ref":"#/components/schemas/OwnerConfig"},{"type":"null"}]},"credit_limit":{"format":"double","type":["number","null"]},"currency_code":{"type":["string","null"]},"description":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"locale":{"type":["string","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"owner_type":{"$ref":"#/components/schemas/OwnerType"},"parent_id":{"format":"int64","type":["integer","null"]},"picking_toloc":{"description":"Delivery location of this owner's orders for a pick carrier (ADR-091).","type":["string","null"]},"status":{"type":["string","null"]},"timezone":{"type":["string","null"]},"vat":{"type":["string","null"]}},"required":["add_when","add_who","addresses","code","company","id","mod_when","mod_who","owner_type"],"title":"OwnerFull","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"addresses":[{"add_when":"<add_when>","add_who":1,"address_type":"<address_type>","id":1,"is_default":false,"mod_when":"<mod_when>","mod_who":1,"owner_id":1}],"code":"<code>","company":"<company>","id":1,"mod_when":"<mod_when>","mod_who":1,"owner_type":"Sup"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_owner_config_by_owner":{"post":{"operationId":"get_owner_config_by_owner","summary":"Get owner config by owner ID (1:1 relationship)","description":"Get owner config by owner ID (1:1 relationship)\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"owner","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_owner_config_by_owner"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_owner_config_by_owner","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"anyOf":[{"$ref":"#/components/schemas/OwnerConfig"},{"type":"null"}],"title":"Nullable_OwnerConfig"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"auto_print_lpn_on_receive":false,"confirm_empty_on_move":false,"damage_major_action":"None","damage_minor_action":"None","damage_total_action":"None","hide_expected_qty_from_operator":false,"id":1,"mod_when":"<mod_when>","mod_who":1,"owner_id":1,"shelf_life_warning_multiplier_pct":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#create_owner_full":{"post":{"operationId":"create_owner_full","summary":"Create owner with addresses and config in one call","description":"Create owner with addresses and config in one call\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"owner","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"create_owner_full"},"params":{"type":"object","properties":{"data":{"additionalProperties":false,"properties":{"addresses":{"items":{"$ref":"#/components/schemas/OwnerAddressForCreateInner"},"type":["array","null"]},"config":{"anyOf":[{"$ref":"#/components/schemas/OwnerConfigForCreateInner"},{"type":"null"}]},"owner":{"$ref":"#/components/schemas/OwnerForCreate"}},"required":["owner"],"title":"OwnerFullForCreate","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"create_owner_full","params":{"data":{"owner":{"code":"<code>","company":"<company>","owner_type":"Sup"}}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"addresses":{"items":{"$ref":"#/components/schemas/OwnerAddress"},"type":"array"},"code":{"type":"string"},"company":{"type":"string"},"config":{"anyOf":[{"$ref":"#/components/schemas/OwnerConfig"},{"type":"null"}]},"credit_limit":{"format":"double","type":["number","null"]},"currency_code":{"type":["string","null"]},"description":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"locale":{"type":["string","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"owner_type":{"$ref":"#/components/schemas/OwnerType"},"parent_id":{"format":"int64","type":["integer","null"]},"picking_toloc":{"description":"Delivery location of this owner's orders for a pick carrier (ADR-091).","type":["string","null"]},"status":{"type":["string","null"]},"timezone":{"type":["string","null"]},"vat":{"type":["string","null"]}},"required":["add_when","add_who","addresses","code","company","id","mod_when","mod_who","owner_type"],"title":"OwnerFull","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"addresses":[{"add_when":"<add_when>","add_who":1,"address_type":"<address_type>","id":1,"is_default":false,"mod_when":"<mod_when>","mod_who":1,"owner_id":1}],"code":"<code>","company":"<company>","id":1,"mod_when":"<mod_when>","mod_who":1,"owner_type":"Sup"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#update_owner_full":{"post":{"operationId":"update_owner_full","summary":"Update owner with addresses and config in one call","description":"Update owner with addresses and config in one call\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"owner","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"update_owner_full"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"},"data":{"additionalProperties":false,"properties":{"addresses":{"items":{"$ref":"#/components/schemas/OwnerAddressUpdate"},"type":["array","null"]},"config":{"anyOf":[{"$ref":"#/components/schemas/OwnerConfigMutation"},{"type":"null"}]},"owner":{"anyOf":[{"$ref":"#/components/schemas/OwnerUpdateApi"},{"type":"null"}]}},"title":"OwnerFullForUpdate","type":"object"}},"required":["id","data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"update_owner_full","params":{"id":1,"data":{"addresses":[{"data":{},"id":1}],"config":{},"owner":{}}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"addresses":{"items":{"$ref":"#/components/schemas/OwnerAddress"},"type":"array"},"code":{"type":"string"},"company":{"type":"string"},"config":{"anyOf":[{"$ref":"#/components/schemas/OwnerConfig"},{"type":"null"}]},"credit_limit":{"format":"double","type":["number","null"]},"currency_code":{"type":["string","null"]},"description":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"locale":{"type":["string","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"owner_type":{"$ref":"#/components/schemas/OwnerType"},"parent_id":{"format":"int64","type":["integer","null"]},"picking_toloc":{"description":"Delivery location of this owner's orders for a pick carrier (ADR-091).","type":["string","null"]},"status":{"type":["string","null"]},"timezone":{"type":["string","null"]},"vat":{"type":["string","null"]}},"required":["add_when","add_who","addresses","code","company","id","mod_when","mod_who","owner_type"],"title":"OwnerFull","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"addresses":[{"add_when":"<add_when>","add_who":1,"address_type":"<address_type>","id":1,"is_default":false,"mod_when":"<mod_when>","mod_who":1,"owner_id":1}],"code":"<code>","company":"<company>","id":1,"mod_when":"<mod_when>","mod_who":1,"owner_type":"Sup"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_owner":{"post":{"operationId":"list_owner","summary":"List owner — CRUD.","description":"List owner — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"owner","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_owner"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_owner"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/Owner"},"title":"Array_of_Owner","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"code":"<code>","company":"<company>","id":1,"mod_when":"<mod_when>","mod_who":1,"owner_type":"Sup"}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#update_owner":{"post":{"operationId":"update_owner","summary":"Update owner master data with explicit keep, clear and set semantics.","description":"Update owner master data with explicit keep, clear and set semantics.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"owner","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"update_owner"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"},"data":{"additionalProperties":false,"properties":{"company":{"type":"string"},"credit_limit":{"format":"double","type":["number","null"]},"currency_code":{"type":["string","null"]},"description":{"type":["string","null"]},"locale":{"type":["string","null"]},"owner_type":{"enum":["Sup","Cus","Trn","Rec","Con","Own","Man","Dst","Vnd","Brk"],"type":"string"},"parent_id":{"format":"int64","type":["integer","null"]},"picking_toloc":{"type":["string","null"]},"status":{"type":["string","null"]},"timezone":{"type":["string","null"]},"vat":{"type":["string","null"]}},"title":"OwnerUpdateApi","type":"object"}},"required":["id","data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"update_owner","params":{"id":1,"data":{"company":"<company>","credit_limit":1.5,"currency_code":"<currency_code>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"company":{"type":"string"},"credit_limit":{"format":"double","type":["number","null"]},"currency_code":{"type":["string","null"]},"description":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"locale":{"type":["string","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"owner_type":{"$ref":"#/components/schemas/OwnerType"},"parent_id":{"format":"int64","type":["integer","null"]},"picking_toloc":{"description":"Delivery location of this owner's orders for a pick carrier (ADR-091).","type":["string","null"]},"status":{"type":["string","null"]},"timezone":{"type":["string","null"]},"vat":{"type":["string","null"]}},"required":["add_when","add_who","code","company","id","mod_when","mod_who","owner_type"],"title":"Owner","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","company":"<company>","id":1,"mod_when":"<mod_when>","mod_who":1,"owner_type":"Sup"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_owner":{"post":{"operationId":"delete_owner","summary":"Delete an unreferenced owner and its owned master-data subresources.","description":"Delete an unreferenced owner and its owned master-data subresources.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog does not say whether this method needs an idempotency key.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"owner","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_owner"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_owner","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"company":{"type":"string"},"credit_limit":{"format":"double","type":["number","null"]},"currency_code":{"type":["string","null"]},"description":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"locale":{"type":["string","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"owner_type":{"$ref":"#/components/schemas/OwnerType"},"parent_id":{"format":"int64","type":["integer","null"]},"picking_toloc":{"description":"Delivery location of this owner's orders for a pick carrier (ADR-091).","type":["string","null"]},"status":{"type":["string","null"]},"timezone":{"type":["string","null"]},"vat":{"type":["string","null"]}},"required":["add_when","add_who","code","company","id","mod_when","mod_who","owner_type"],"title":"Owner","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","company":"<company>","id":1,"mod_when":"<mod_when>","mod_who":1,"owner_type":"Sup"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_owner":{"post":{"operationId":"count_owner","summary":"Count owner — CRUD.","description":"Count owner — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"owner","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_owner"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_owner"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#search_owners":{"post":{"operationId":"search_owners","summary":"Substring search of owners (owner_type='Own' only); used by the RCBLIND01 F2 picker","description":"Substring search of owners (owner_type='Own' only); used by the RCBLIND01 F2 picker\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"owner","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"search_owners"},"params":{"type":"object","properties":{"data":{"properties":{"page":{"description":"1-indexed page number. Default 1.","format":"int64","type":["integer","null"]},"page_size":{"description":"Page size. Default 50, capped at 200.","format":"int64","type":["integer","null"]},"q":{"description":"Optional substring matched against `code` and `company` with ILIKE. `None` (or empty) returns the recent-owners window (LIMIT page_size).","type":["string","null"]}},"title":"SearchOwnersInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"search_owners","params":{"data":{"page":1,"page_size":1,"q":"<q>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/OwnerSummary"},"title":"Array_of_OwnerSummary","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"code":"<code>","company":"<company>","id":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#create_owner_address":{"post":{"operationId":"create_owner_address","summary":"Create a new owner_address — CRUD.","description":"Create a new owner_address — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"UNIQUE_VIOLATION or INVALID_DATA","when":"The code already exists, or a value breaks a rule."}],"x-quark-module":"owner_address","x-quark-operation":"create","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"create_owner_address"},"params":{"type":"object","properties":{"data":{"properties":{"address1":{"type":["string","null"]},"address2":{"type":["string","null"]},"address3":{"type":["string","null"]},"address4":{"type":["string","null"]},"address_type":{"type":"string"},"city":{"type":["string","null"]},"company":{"type":["string","null"]},"contact1":{"type":["string","null"]},"contact2":{"type":["string","null"]},"country":{"type":["string","null"]},"email":{"type":["string","null"]},"is_default":{"type":["boolean","null"]},"iso_country_code":{"type":["string","null"]},"owner_id":{"format":"int64","type":"integer"},"phone1":{"type":["string","null"]},"phone2":{"type":["string","null"]},"state":{"type":["string","null"]},"zip":{"type":["string","null"]}},"required":["address_type","owner_id"],"title":"OwnerAddressForCreate","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"create_owner_address","params":{"data":{"address_type":"<address_type>","owner_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"address1":{"type":["string","null"]},"address2":{"type":["string","null"]},"address3":{"type":["string","null"]},"address4":{"type":["string","null"]},"address_type":{"type":"string"},"city":{"type":["string","null"]},"company":{"type":["string","null"]},"contact1":{"type":["string","null"]},"contact2":{"type":["string","null"]},"country":{"type":["string","null"]},"email":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"is_default":{"type":"boolean"},"iso_country_code":{"type":["string","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"owner_id":{"format":"int64","type":"integer"},"phone1":{"type":["string","null"]},"phone2":{"type":["string","null"]},"state":{"type":["string","null"]},"zip":{"type":["string","null"]}},"required":["add_when","add_who","address_type","id","is_default","mod_when","mod_who","owner_id"],"title":"OwnerAddress","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"address_type":"<address_type>","id":1,"is_default":false,"mod_when":"<mod_when>","mod_who":1,"owner_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_owner_address":{"post":{"operationId":"get_owner_address","summary":"Get a owner_address by ID — CRUD.","description":"Get a owner_address by ID — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"owner_address","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_owner_address"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_owner_address","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"address1":{"type":["string","null"]},"address2":{"type":["string","null"]},"address3":{"type":["string","null"]},"address4":{"type":["string","null"]},"address_type":{"type":"string"},"city":{"type":["string","null"]},"company":{"type":["string","null"]},"contact1":{"type":["string","null"]},"contact2":{"type":["string","null"]},"country":{"type":["string","null"]},"email":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"is_default":{"type":"boolean"},"iso_country_code":{"type":["string","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"owner_id":{"format":"int64","type":"integer"},"phone1":{"type":["string","null"]},"phone2":{"type":["string","null"]},"state":{"type":["string","null"]},"zip":{"type":["string","null"]}},"required":["add_when","add_who","address_type","id","is_default","mod_when","mod_who","owner_id"],"title":"OwnerAddress","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"address_type":"<address_type>","id":1,"is_default":false,"mod_when":"<mod_when>","mod_who":1,"owner_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_owner_address":{"post":{"operationId":"list_owner_address","summary":"List owner_address — CRUD.","description":"List owner_address — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"owner_address","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_owner_address"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_owner_address"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/OwnerAddress"},"title":"Array_of_OwnerAddress","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"address_type":"<address_type>","id":1,"is_default":false,"mod_when":"<mod_when>","mod_who":1,"owner_id":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#update_owner_address":{"post":{"operationId":"update_owner_address","summary":"Update an owner address without changing its owner identity.","description":"Update an owner address without changing its owner identity.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"INVALID_DATA","when":"A value breaks a rule."}],"x-quark-module":"owner_address","x-quark-operation":"update","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"update_owner_address"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"},"data":{"additionalProperties":false,"properties":{"address1":{"type":["string","null"]},"address2":{"type":["string","null"]},"address3":{"type":["string","null"]},"address4":{"type":["string","null"]},"address_type":{"type":"string"},"city":{"type":["string","null"]},"company":{"type":["string","null"]},"contact1":{"type":["string","null"]},"contact2":{"type":["string","null"]},"country":{"type":["string","null"]},"email":{"type":["string","null"]},"is_default":{"type":"boolean"},"iso_country_code":{"type":["string","null"]},"phone1":{"type":["string","null"]},"phone2":{"type":["string","null"]},"state":{"type":["string","null"]},"zip":{"type":["string","null"]}},"title":"OwnerAddressUpdateApi","type":"object"}},"required":["id","data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"update_owner_address","params":{"id":1,"data":{"address1":"<address1>","address2":"<address2>","address3":"<address3>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"address1":{"type":["string","null"]},"address2":{"type":["string","null"]},"address3":{"type":["string","null"]},"address4":{"type":["string","null"]},"address_type":{"type":"string"},"city":{"type":["string","null"]},"company":{"type":["string","null"]},"contact1":{"type":["string","null"]},"contact2":{"type":["string","null"]},"country":{"type":["string","null"]},"email":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"is_default":{"type":"boolean"},"iso_country_code":{"type":["string","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"owner_id":{"format":"int64","type":"integer"},"phone1":{"type":["string","null"]},"phone2":{"type":["string","null"]},"state":{"type":["string","null"]},"zip":{"type":["string","null"]}},"required":["add_when","add_who","address_type","id","is_default","mod_when","mod_who","owner_id"],"title":"OwnerAddress","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"address_type":"<address_type>","id":1,"is_default":false,"mod_when":"<mod_when>","mod_who":1,"owner_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_owner_address":{"post":{"operationId":"delete_owner_address","summary":"Delete a owner_address by ID — CRUD.","description":"Delete a owner_address by ID — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"DEPENDENT_DATA_EXIST","when":"Other rows still use this row."}],"x-quark-module":"owner_address","x-quark-operation":"delete","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_owner_address"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_owner_address","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"address1":{"type":["string","null"]},"address2":{"type":["string","null"]},"address3":{"type":["string","null"]},"address4":{"type":["string","null"]},"address_type":{"type":"string"},"city":{"type":["string","null"]},"company":{"type":["string","null"]},"contact1":{"type":["string","null"]},"contact2":{"type":["string","null"]},"country":{"type":["string","null"]},"email":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"is_default":{"type":"boolean"},"iso_country_code":{"type":["string","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"owner_id":{"format":"int64","type":"integer"},"phone1":{"type":["string","null"]},"phone2":{"type":["string","null"]},"state":{"type":["string","null"]},"zip":{"type":["string","null"]}},"required":["add_when","add_who","address_type","id","is_default","mod_when","mod_who","owner_id"],"title":"OwnerAddress","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"address_type":"<address_type>","id":1,"is_default":false,"mod_when":"<mod_when>","mod_who":1,"owner_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_owner_address":{"post":{"operationId":"count_owner_address","summary":"Count owner_address — CRUD.","description":"Count owner_address — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"owner_address","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_owner_address"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_owner_address"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#create_owner_bank_account":{"post":{"operationId":"create_owner_bank_account","summary":"Create a new owner_bank_account — CRUD.","description":"Create a new owner_bank_account — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"UNIQUE_VIOLATION or INVALID_DATA","when":"The code already exists, or a value breaks a rule."}],"x-quark-module":"owner_bank_account","x-quark-operation":"create","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"create_owner_bank_account"},"params":{"type":"object","properties":{"data":{"properties":{"account":{"type":"string"},"bank_name":{"type":"string"},"bic":{"type":"string"},"corr_account":{"type":["string","null"]},"currency":{"type":["string","null"]},"description":{"type":["string","null"]},"is_active":{"type":["boolean","null"]},"is_default":{"type":["boolean","null"]},"owner_id":{"format":"int64","type":"integer"}},"required":["account","bank_name","bic","owner_id"],"title":"OwnerBankAccountForCreate","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"create_owner_bank_account","params":{"data":{"account":"<account>","bank_name":"<bank_name>","bic":"<bic>","owner_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"account":{"type":"string"},"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"bank_name":{"type":"string"},"bic":{"type":"string"},"corr_account":{"type":["string","null"]},"currency":{"type":"string"},"description":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"is_active":{"type":"boolean"},"is_default":{"type":"boolean"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"owner_id":{"format":"int64","type":"integer"}},"required":["account","add_when","add_who","bank_name","bic","currency","id","is_active","is_default","mod_when","mod_who","owner_id"],"title":"OwnerBankAccount","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"account":"<account>","add_when":"<add_when>","add_who":1,"bank_name":"<bank_name>","bic":"<bic>","currency":"<currency>","id":1,"is_active":false,"is_default":false,"mod_when":"<mod_when>","mod_who":1,"owner_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_owner_bank_account":{"post":{"operationId":"get_owner_bank_account","summary":"Get a owner_bank_account by ID — CRUD.","description":"Get a owner_bank_account by ID — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"owner_bank_account","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_owner_bank_account"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_owner_bank_account","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"account":{"type":"string"},"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"bank_name":{"type":"string"},"bic":{"type":"string"},"corr_account":{"type":["string","null"]},"currency":{"type":"string"},"description":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"is_active":{"type":"boolean"},"is_default":{"type":"boolean"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"owner_id":{"format":"int64","type":"integer"}},"required":["account","add_when","add_who","bank_name","bic","currency","id","is_active","is_default","mod_when","mod_who","owner_id"],"title":"OwnerBankAccount","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"account":"<account>","add_when":"<add_when>","add_who":1,"bank_name":"<bank_name>","bic":"<bic>","currency":"<currency>","id":1,"is_active":false,"is_default":false,"mod_when":"<mod_when>","mod_who":1,"owner_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_owner_bank_account":{"post":{"operationId":"list_owner_bank_account","summary":"List owner_bank_account — CRUD.","description":"List owner_bank_account — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"owner_bank_account","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_owner_bank_account"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_owner_bank_account"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/OwnerBankAccount"},"title":"Array_of_OwnerBankAccount","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"account":"<account>","add_when":"<add_when>","add_who":1,"bank_name":"<bank_name>","bic":"<bic>","currency":"<currency>","id":1,"is_active":false,"is_default":false,"mod_when":"<mod_when>","mod_who":1,"owner_id":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#update_owner_bank_account":{"post":{"operationId":"update_owner_bank_account","summary":"Update an owner bank account without changing its owner identity.","description":"Update an owner bank account without changing its owner identity.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"INVALID_DATA","when":"A value breaks a rule."}],"x-quark-module":"owner_bank_account","x-quark-operation":"update","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"update_owner_bank_account"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"},"data":{"additionalProperties":false,"properties":{"account":{"type":"string"},"bank_name":{"type":"string"},"bic":{"type":"string"},"corr_account":{"type":["string","null"]},"currency":{"type":"string"},"description":{"type":["string","null"]},"is_active":{"type":"boolean"},"is_default":{"type":"boolean"}},"title":"OwnerBankAccountUpdateApi","type":"object"}},"required":["id","data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"update_owner_bank_account","params":{"id":1,"data":{"account":"<account>","bank_name":"<bank_name>","bic":"<bic>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"account":{"type":"string"},"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"bank_name":{"type":"string"},"bic":{"type":"string"},"corr_account":{"type":["string","null"]},"currency":{"type":"string"},"description":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"is_active":{"type":"boolean"},"is_default":{"type":"boolean"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"owner_id":{"format":"int64","type":"integer"}},"required":["account","add_when","add_who","bank_name","bic","currency","id","is_active","is_default","mod_when","mod_who","owner_id"],"title":"OwnerBankAccount","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"account":"<account>","add_when":"<add_when>","add_who":1,"bank_name":"<bank_name>","bic":"<bic>","currency":"<currency>","id":1,"is_active":false,"is_default":false,"mod_when":"<mod_when>","mod_who":1,"owner_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_owner_bank_account":{"post":{"operationId":"delete_owner_bank_account","summary":"Delete a owner_bank_account by ID — CRUD.","description":"Delete a owner_bank_account by ID — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"DEPENDENT_DATA_EXIST","when":"Other rows still use this row."}],"x-quark-module":"owner_bank_account","x-quark-operation":"delete","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_owner_bank_account"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_owner_bank_account","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"account":{"type":"string"},"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"bank_name":{"type":"string"},"bic":{"type":"string"},"corr_account":{"type":["string","null"]},"currency":{"type":"string"},"description":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"is_active":{"type":"boolean"},"is_default":{"type":"boolean"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"owner_id":{"format":"int64","type":"integer"}},"required":["account","add_when","add_who","bank_name","bic","currency","id","is_active","is_default","mod_when","mod_who","owner_id"],"title":"OwnerBankAccount","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"account":"<account>","add_when":"<add_when>","add_who":1,"bank_name":"<bank_name>","bic":"<bic>","currency":"<currency>","id":1,"is_active":false,"is_default":false,"mod_when":"<mod_when>","mod_who":1,"owner_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_many_owner_bank_account":{"post":{"operationId":"delete_many_owner_bank_account","summary":"Delete multiple owner_bank_account by IDs — CRUD.","description":"Delete multiple owner_bank_account by IDs — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"DEPENDENT_DATA_EXIST","when":"Other rows still use this row."}],"x-quark-module":"owner_bank_account","x-quark-operation":"delete","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_many_owner_bank_account"},"params":{"type":"object","properties":{"ids":{"items":{"format":"int64","type":"integer"},"type":"array","description":"Record IDs"}},"required":["ids"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_many_owner_bank_account","params":{"ids":[1]}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"uint64","minimum":0,"title":"uint64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_owner_bank_account":{"post":{"operationId":"count_owner_bank_account","summary":"Count owner_bank_account — CRUD.","description":"Count owner_bank_account — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"owner_bank_account","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_owner_bank_account"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_owner_bank_account"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#create_owner_config":{"post":{"operationId":"create_owner_config","summary":"Create the optional configuration owned by one owner.","description":"Create the optional configuration owned by one owner.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog does not say whether this method needs an idempotency key.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"owner_config","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"create_owner_config"},"params":{"type":"object","properties":{"data":{"properties":{"allow_commingled_lpn":{"type":["boolean","null"]},"allow_duplicate_lpn":{"type":["boolean","null"]},"allow_mixed_lpn":{"type":["boolean","null"]},"allow_system_generated_lpn":{"type":["boolean","null"]},"auto_close_asn":{"type":["boolean","null"]},"auto_close_po":{"type":["boolean","null"]},"auto_print_lpn_on_receive":{"type":["boolean","null"]},"carton_group":{"type":["string","null"]},"confirm_empty_on_move":{"type":["boolean","null"]},"cube_uom":{"type":["string","null"]},"damage_major_action":{"anyOf":[{"$ref":"#/components/schemas/DamageAction"},{"type":"null"}]},"damage_minor_action":{"anyOf":[{"$ref":"#/components/schemas/DamageAction"},{"type":"null"}]},"damage_total_action":{"anyOf":[{"$ref":"#/components/schemas/DamageAction"},{"type":"null"}]},"default_allocation_policy_id":{"format":"int64","type":["integer","null"]},"default_cartonization_policy_id":{"format":"int64","type":["integer","null"]},"default_discard_loc":{"type":["string","null"]},"default_lot_policy_id":{"format":"int64","type":["integer","null"]},"default_putaway_policy_id":{"format":"int64","type":["integer","null"]},"default_qc_loc":{"type":["string","null"]},"default_receipt_policy_id":{"format":"int64","type":["integer","null"]},"default_receiving_loc":{"type":["string","null"]},"default_replenishment_policy_id":{"format":"int64","type":["integer","null"]},"default_returns_loc":{"type":["string","null"]},"default_rtv_loc":{"type":["string","null"]},"default_sku_rotation":{"anyOf":[{"$ref":"#/components/schemas/SkuRotation"},{"type":"null"}]},"dimension_uom":{"type":["string","null"]},"hide_expected_qty_from_operator":{"type":["boolean","null"]},"lpn_length":{"format":"int32","type":["integer","null"]},"lpn_rollback_number":{"format":"int64","type":["integer","null"]},"lpn_start_number":{"format":"int64","type":["integer","null"]},"next_lpn_number":{"format":"int64","type":["integer","null"]},"owner_id":{"format":"int64","type":"integer"},"pick_code":{"type":["string","null"]},"putaway_reservation_ttl_min":{"description":"Blank on the form means NULL means inherit — see [`OwnerConfig`].","format":"int32","type":["integer","null"]},"roll_receipt":{"type":["boolean","null"]},"rtv_gl_account_hint":{"type":["string","null"]},"shelf_life_warning_multiplier_pct":{"format":"int32","type":["integer","null"]},"track_inventory_by":{"type":["string","null"]},"weight_uom":{"type":["string","null"]},"write_off_gl_account_hint":{"type":["string","null"]}},"required":["owner_id"],"title":"OwnerConfigForCreate","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"create_owner_config","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"owner_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"allow_commingled_lpn":{"type":["boolean","null"]},"allow_duplicate_lpn":{"type":["boolean","null"]},"allow_mixed_lpn":{"type":["boolean","null"]},"allow_system_generated_lpn":{"type":["boolean","null"]},"auto_close_asn":{"type":["boolean","null"]},"auto_close_po":{"type":["boolean","null"]},"auto_print_lpn_on_receive":{"type":"boolean"},"carton_group":{"type":["string","null"]},"confirm_empty_on_move":{"description":"Count spec Appendix L (wms-app 116): a manual move that takes the last stock of this owner out of its source location asks the operator whether the location is empty.","type":"boolean"},"cube_uom":{"type":["string","null"]},"damage_major_action":{"$ref":"#/components/schemas/DamageAction"},"damage_minor_action":{"$ref":"#/components/schemas/DamageAction"},"damage_total_action":{"$ref":"#/components/schemas/DamageAction"},"default_allocation_policy_id":{"format":"int64","type":["integer","null"]},"default_cartonization_policy_id":{"format":"int64","type":["integer","null"]},"default_discard_loc":{"description":"E.2 (migration 162). Discard-condition returns deposit destination. NULL → write-off without deposit (current behavior, no inventory row); set → deposit through DepositService into this loc.","type":["string","null"]},"default_inventory_tracking_granularity":{"anyOf":[{"$ref":"#/components/schemas/InventoryTrackingGranularity"},{"type":"null"}]},"default_lot_policy_id":{"format":"int64","type":["integer","null"]},"default_putaway_policy_id":{"format":"int64","type":["integer","null"]},"default_qc_loc":{"type":["string","null"]},"default_receipt_policy_id":{"format":"int64","type":["integer","null"]},"default_receiving_loc":{"description":"Миграция 350. Ячейка, которую окно приёмки подставляет по умолчанию. NULL = не задана: оператор выбирает сам, как выбирал до 350.","type":["string","null"]},"default_replenishment_policy_id":{"format":"int64","type":["integer","null"]},"default_returns_loc":{"type":["string","null"]},"default_rtv_loc":{"description":"T-062 (migration 148). Falls back to `default_returns_loc` when NULL; if both NULL, MoveDamageToRtv returns NoRtvLocConfigured error.","type":["string","null"]},"default_sku_rotation":{"anyOf":[{"$ref":"#/components/schemas/SkuRotation"},{"type":"null"}]},"default_unplanned_case_on_asn":{"anyOf":[{"$ref":"#/components/schemas/AllowError"},{"type":"null"}]},"dimension_uom":{"type":["string","null"]},"hide_expected_qty_from_operator":{"type":"boolean"},"id":{"format":"int64","type":"integer"},"lpn_length":{"format":"int32","type":["integer","null"]},"lpn_rollback_number":{"format":"int64","type":["integer","null"]},"lpn_start_number":{"format":"int64","type":["integer","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"next_lpn_number":{"format":"int64","type":["integer","null"]},"owner_id":{"format":"int64","type":"integer"},"pick_code":{"type":["string","null"]},"putaway_reservation_ttl_min":{"description":"Minutes a directed-putaway location reservation (`inventory_pending_move_in`) is held for this owner's stock before the TTL sweeper releases it.\n\n`None` is not \"no TTL\": it means INHERIT, and `PendingMoveInBmc::resolve_ttl_minutes` falls through to the `system_settings` key `PUTAWAY_RESERVATION_TTL_MIN`. Owner-level because the number is really a walking distance — a deep warehouse needs a longer hold than a two-aisle one.\n\n`chk_owner_config_putaway_ttl` forbids 0 and negatives: a reservation born already expired is not a short hold, it is an insert that always fails (`chk_inventory_pending_move_in_expiry_after_add`).","format":"int32","type":["integer","null"]},"roll_receipt":{"type":["boolean","null"]},"rtv_gl_account_hint":{"description":"T-062 (migration 148). ERP GL account hint passed in `damage.rtv_initiated` outbox event (e.g. SAP `1450-RTV-Receivable`).","type":["string","null"]},"shelf_life_warning_multiplier_pct":{"format":"int32","type":"integer"},"track_inventory_by":{"type":["string","null"]},"weight_uom":{"type":["string","null"]},"write_off_gl_account_hint":{"description":"T-062 (migration 148). ERP GL account hint passed in `damage.written_off` outbox event. ERP may use directly or map through its own table.","type":["string","null"]}},"required":["add_when","add_who","auto_print_lpn_on_receive","confirm_empty_on_move","damage_major_action","damage_minor_action","damage_total_action","hide_expected_qty_from_operator","id","mod_when","mod_who","owner_id","shelf_life_warning_multiplier_pct"],"title":"OwnerConfig","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"auto_print_lpn_on_receive":false,"confirm_empty_on_move":false,"damage_major_action":"None","damage_minor_action":"None","damage_total_action":"None","hide_expected_qty_from_operator":false,"id":1,"mod_when":"<mod_when>","mod_who":1,"owner_id":1,"shelf_life_warning_multiplier_pct":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_owner_config":{"post":{"operationId":"get_owner_config","summary":"Get a owner_config by ID — CRUD.","description":"Get a owner_config by ID — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"owner_config","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_owner_config"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_owner_config","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"allow_commingled_lpn":{"type":["boolean","null"]},"allow_duplicate_lpn":{"type":["boolean","null"]},"allow_mixed_lpn":{"type":["boolean","null"]},"allow_system_generated_lpn":{"type":["boolean","null"]},"auto_close_asn":{"type":["boolean","null"]},"auto_close_po":{"type":["boolean","null"]},"auto_print_lpn_on_receive":{"type":"boolean"},"carton_group":{"type":["string","null"]},"confirm_empty_on_move":{"description":"Count spec Appendix L (wms-app 116): a manual move that takes the last stock of this owner out of its source location asks the operator whether the location is empty.","type":"boolean"},"cube_uom":{"type":["string","null"]},"damage_major_action":{"$ref":"#/components/schemas/DamageAction"},"damage_minor_action":{"$ref":"#/components/schemas/DamageAction"},"damage_total_action":{"$ref":"#/components/schemas/DamageAction"},"default_allocation_policy_id":{"format":"int64","type":["integer","null"]},"default_cartonization_policy_id":{"format":"int64","type":["integer","null"]},"default_discard_loc":{"description":"E.2 (migration 162). Discard-condition returns deposit destination. NULL → write-off without deposit (current behavior, no inventory row); set → deposit through DepositService into this loc.","type":["string","null"]},"default_inventory_tracking_granularity":{"anyOf":[{"$ref":"#/components/schemas/InventoryTrackingGranularity"},{"type":"null"}]},"default_lot_policy_id":{"format":"int64","type":["integer","null"]},"default_putaway_policy_id":{"format":"int64","type":["integer","null"]},"default_qc_loc":{"type":["string","null"]},"default_receipt_policy_id":{"format":"int64","type":["integer","null"]},"default_receiving_loc":{"description":"Миграция 350. Ячейка, которую окно приёмки подставляет по умолчанию. NULL = не задана: оператор выбирает сам, как выбирал до 350.","type":["string","null"]},"default_replenishment_policy_id":{"format":"int64","type":["integer","null"]},"default_returns_loc":{"type":["string","null"]},"default_rtv_loc":{"description":"T-062 (migration 148). Falls back to `default_returns_loc` when NULL; if both NULL, MoveDamageToRtv returns NoRtvLocConfigured error.","type":["string","null"]},"default_sku_rotation":{"anyOf":[{"$ref":"#/components/schemas/SkuRotation"},{"type":"null"}]},"default_unplanned_case_on_asn":{"anyOf":[{"$ref":"#/components/schemas/AllowError"},{"type":"null"}]},"dimension_uom":{"type":["string","null"]},"hide_expected_qty_from_operator":{"type":"boolean"},"id":{"format":"int64","type":"integer"},"lpn_length":{"format":"int32","type":["integer","null"]},"lpn_rollback_number":{"format":"int64","type":["integer","null"]},"lpn_start_number":{"format":"int64","type":["integer","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"next_lpn_number":{"format":"int64","type":["integer","null"]},"owner_id":{"format":"int64","type":"integer"},"pick_code":{"type":["string","null"]},"putaway_reservation_ttl_min":{"description":"Minutes a directed-putaway location reservation (`inventory_pending_move_in`) is held for this owner's stock before the TTL sweeper releases it.\n\n`None` is not \"no TTL\": it means INHERIT, and `PendingMoveInBmc::resolve_ttl_minutes` falls through to the `system_settings` key `PUTAWAY_RESERVATION_TTL_MIN`. Owner-level because the number is really a walking distance — a deep warehouse needs a longer hold than a two-aisle one.\n\n`chk_owner_config_putaway_ttl` forbids 0 and negatives: a reservation born already expired is not a short hold, it is an insert that always fails (`chk_inventory_pending_move_in_expiry_after_add`).","format":"int32","type":["integer","null"]},"roll_receipt":{"type":["boolean","null"]},"rtv_gl_account_hint":{"description":"T-062 (migration 148). ERP GL account hint passed in `damage.rtv_initiated` outbox event (e.g. SAP `1450-RTV-Receivable`).","type":["string","null"]},"shelf_life_warning_multiplier_pct":{"format":"int32","type":"integer"},"track_inventory_by":{"type":["string","null"]},"weight_uom":{"type":["string","null"]},"write_off_gl_account_hint":{"description":"T-062 (migration 148). ERP GL account hint passed in `damage.written_off` outbox event. ERP may use directly or map through its own table.","type":["string","null"]}},"required":["add_when","add_who","auto_print_lpn_on_receive","confirm_empty_on_move","damage_major_action","damage_minor_action","damage_total_action","hide_expected_qty_from_operator","id","mod_when","mod_who","owner_id","shelf_life_warning_multiplier_pct"],"title":"OwnerConfig","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"auto_print_lpn_on_receive":false,"confirm_empty_on_move":false,"damage_major_action":"None","damage_minor_action":"None","damage_total_action":"None","hide_expected_qty_from_operator":false,"id":1,"mod_when":"<mod_when>","mod_who":1,"owner_id":1,"shelf_life_warning_multiplier_pct":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_owner_config":{"post":{"operationId":"list_owner_config","summary":"List owner_config — CRUD.","description":"List owner_config — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"owner_config","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_owner_config"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_owner_config"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/OwnerConfig"},"title":"Array_of_OwnerConfig","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"auto_print_lpn_on_receive":false,"confirm_empty_on_move":false,"damage_major_action":"None","damage_minor_action":"None","damage_total_action":"None","hide_expected_qty_from_operator":false,"id":1,"mod_when":"<mod_when>","mod_who":1,"owner_id":1,"shelf_life_warning_multiplier_pct":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#update_owner_config":{"post":{"operationId":"update_owner_config","summary":"Update owner configuration with explicit keep, clear and set semantics.","description":"Update owner configuration with explicit keep, clear and set semantics.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"INVALID_DATA","when":"A value breaks a rule."}],"x-quark-module":"owner_config","x-quark-operation":"update","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"update_owner_config"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"},"data":{"additionalProperties":false,"properties":{"allow_commingled_lpn":{"type":["boolean","null"]},"allow_duplicate_lpn":{"type":["boolean","null"]},"allow_mixed_lpn":{"type":["boolean","null"]},"allow_system_generated_lpn":{"type":["boolean","null"]},"auto_close_asn":{"type":["boolean","null"]},"auto_close_po":{"type":["boolean","null"]},"auto_print_lpn_on_receive":{"type":"boolean"},"carton_group":{"type":["string","null"]},"confirm_empty_on_move":{"type":"boolean"},"cube_uom":{"type":["string","null"]},"damage_major_action":{"description":"Per Decisions Log D-26 + T-062 (migration 148). Action triggered by ReportDamage based on severity + OwnerConfig. The first three are the original on-report actions (just-record / hold-LPN / bump-qty-damaged). The four added in T-062 represent owner policy for auto-routing damage to a final disposition without manual intervention: * WriteOff  — auto-call WriteOffDamage on report (decrement inventory). * RTV       — auto-call MoveDamageToRtv on report (move to RTV staging). * Repurpose — flag disposition='Repurpose' (Phase 2 wires SKU substitute). * Destroy   — flag disposition='Destroyed' (Phase 3 wires regulated paths).","enum":["None","Hold","Reject","WriteOff","RTV","Repurpose","Destroy"],"type":"string"},"damage_minor_action":{"description":"Per Decisions Log D-26 + T-062 (migration 148). Action triggered by ReportDamage based on severity + OwnerConfig. The first three are the original on-report actions (just-record / hold-LPN / bump-qty-damaged). The four added in T-062 represent owner policy for auto-routing damage to a final disposition without manual intervention: * WriteOff  — auto-call WriteOffDamage on report (decrement inventory). * RTV       — auto-call MoveDamageToRtv on report (move to RTV staging). * Repurpose — flag disposition='Repurpose' (Phase 2 wires SKU substitute). * Destroy   — flag disposition='Destroyed' (Phase 3 wires regulated paths).","enum":["None","Hold","Reject","WriteOff","RTV","Repurpose","Destroy"],"type":"string"},"damage_total_action":{"description":"Per Decisions Log D-26 + T-062 (migration 148). Action triggered by ReportDamage based on severity + OwnerConfig. The first three are the original on-report actions (just-record / hold-LPN / bump-qty-damaged). The four added in T-062 represent owner policy for auto-routing damage to a final disposition without manual intervention: * WriteOff  — auto-call WriteOffDamage on report (decrement inventory). * RTV       — auto-call MoveDamageToRtv on report (move to RTV staging). * Repurpose — flag disposition='Repurpose' (Phase 2 wires SKU substitute). * Destroy   — flag disposition='Destroyed' (Phase 3 wires regulated paths).","enum":["None","Hold","Reject","WriteOff","RTV","Repurpose","Destroy"],"type":"string"},"default_allocation_policy_id":{"format":"int64","type":["integer","null"]},"default_cartonization_policy_id":{"format":"int64","type":["integer","null"]},"default_discard_loc":{"type":["string","null"]},"default_inventory_tracking_granularity":{"anyOf":[{"$ref":"#/components/schemas/InventoryTrackingGranularity"},{"type":"null"}]},"default_lot_policy_id":{"format":"int64","type":["integer","null"]},"default_putaway_policy_id":{"format":"int64","type":["integer","null"]},"default_qc_loc":{"type":["string","null"]},"default_receipt_policy_id":{"format":"int64","type":["integer","null"]},"default_receiving_loc":{"type":["string","null"]},"default_replenishment_policy_id":{"format":"int64","type":["integer","null"]},"default_returns_loc":{"type":["string","null"]},"default_rtv_loc":{"type":["string","null"]},"default_sku_rotation":{"anyOf":[{"$ref":"#/components/schemas/SkuRotation"},{"type":"null"}]},"default_unplanned_case_on_asn":{"anyOf":[{"$ref":"#/components/schemas/AllowError"},{"type":"null"}]},"dimension_uom":{"type":["string","null"]},"hide_expected_qty_from_operator":{"type":"boolean"},"lpn_length":{"format":"int32","type":["integer","null"]},"lpn_rollback_number":{"format":"int64","type":["integer","null"]},"lpn_start_number":{"format":"int64","type":["integer","null"]},"next_lpn_number":{"format":"int64","type":["integer","null"]},"pick_code":{"type":["string","null"]},"putaway_reservation_ttl_min":{"format":"int32","type":["integer","null"]},"roll_receipt":{"type":["boolean","null"]},"rtv_gl_account_hint":{"type":["string","null"]},"shelf_life_warning_multiplier_pct":{"format":"int32","type":"integer"},"track_inventory_by":{"type":["string","null"]},"weight_uom":{"type":["string","null"]},"write_off_gl_account_hint":{"type":["string","null"]}},"title":"OwnerConfigUpdateApi","type":"object"}},"required":["id","data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"update_owner_config","params":{"id":1,"data":{"allow_commingled_lpn":false,"allow_duplicate_lpn":false,"allow_mixed_lpn":false}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"allow_commingled_lpn":{"type":["boolean","null"]},"allow_duplicate_lpn":{"type":["boolean","null"]},"allow_mixed_lpn":{"type":["boolean","null"]},"allow_system_generated_lpn":{"type":["boolean","null"]},"auto_close_asn":{"type":["boolean","null"]},"auto_close_po":{"type":["boolean","null"]},"auto_print_lpn_on_receive":{"type":"boolean"},"carton_group":{"type":["string","null"]},"confirm_empty_on_move":{"description":"Count spec Appendix L (wms-app 116): a manual move that takes the last stock of this owner out of its source location asks the operator whether the location is empty.","type":"boolean"},"cube_uom":{"type":["string","null"]},"damage_major_action":{"$ref":"#/components/schemas/DamageAction"},"damage_minor_action":{"$ref":"#/components/schemas/DamageAction"},"damage_total_action":{"$ref":"#/components/schemas/DamageAction"},"default_allocation_policy_id":{"format":"int64","type":["integer","null"]},"default_cartonization_policy_id":{"format":"int64","type":["integer","null"]},"default_discard_loc":{"description":"E.2 (migration 162). Discard-condition returns deposit destination. NULL → write-off without deposit (current behavior, no inventory row); set → deposit through DepositService into this loc.","type":["string","null"]},"default_inventory_tracking_granularity":{"anyOf":[{"$ref":"#/components/schemas/InventoryTrackingGranularity"},{"type":"null"}]},"default_lot_policy_id":{"format":"int64","type":["integer","null"]},"default_putaway_policy_id":{"format":"int64","type":["integer","null"]},"default_qc_loc":{"type":["string","null"]},"default_receipt_policy_id":{"format":"int64","type":["integer","null"]},"default_receiving_loc":{"description":"Миграция 350. Ячейка, которую окно приёмки подставляет по умолчанию. NULL = не задана: оператор выбирает сам, как выбирал до 350.","type":["string","null"]},"default_replenishment_policy_id":{"format":"int64","type":["integer","null"]},"default_returns_loc":{"type":["string","null"]},"default_rtv_loc":{"description":"T-062 (migration 148). Falls back to `default_returns_loc` when NULL; if both NULL, MoveDamageToRtv returns NoRtvLocConfigured error.","type":["string","null"]},"default_sku_rotation":{"anyOf":[{"$ref":"#/components/schemas/SkuRotation"},{"type":"null"}]},"default_unplanned_case_on_asn":{"anyOf":[{"$ref":"#/components/schemas/AllowError"},{"type":"null"}]},"dimension_uom":{"type":["string","null"]},"hide_expected_qty_from_operator":{"type":"boolean"},"id":{"format":"int64","type":"integer"},"lpn_length":{"format":"int32","type":["integer","null"]},"lpn_rollback_number":{"format":"int64","type":["integer","null"]},"lpn_start_number":{"format":"int64","type":["integer","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"next_lpn_number":{"format":"int64","type":["integer","null"]},"owner_id":{"format":"int64","type":"integer"},"pick_code":{"type":["string","null"]},"putaway_reservation_ttl_min":{"description":"Minutes a directed-putaway location reservation (`inventory_pending_move_in`) is held for this owner's stock before the TTL sweeper releases it.\n\n`None` is not \"no TTL\": it means INHERIT, and `PendingMoveInBmc::resolve_ttl_minutes` falls through to the `system_settings` key `PUTAWAY_RESERVATION_TTL_MIN`. Owner-level because the number is really a walking distance — a deep warehouse needs a longer hold than a two-aisle one.\n\n`chk_owner_config_putaway_ttl` forbids 0 and negatives: a reservation born already expired is not a short hold, it is an insert that always fails (`chk_inventory_pending_move_in_expiry_after_add`).","format":"int32","type":["integer","null"]},"roll_receipt":{"type":["boolean","null"]},"rtv_gl_account_hint":{"description":"T-062 (migration 148). ERP GL account hint passed in `damage.rtv_initiated` outbox event (e.g. SAP `1450-RTV-Receivable`).","type":["string","null"]},"shelf_life_warning_multiplier_pct":{"format":"int32","type":"integer"},"track_inventory_by":{"type":["string","null"]},"weight_uom":{"type":["string","null"]},"write_off_gl_account_hint":{"description":"T-062 (migration 148). ERP GL account hint passed in `damage.written_off` outbox event. ERP may use directly or map through its own table.","type":["string","null"]}},"required":["add_when","add_who","auto_print_lpn_on_receive","confirm_empty_on_move","damage_major_action","damage_minor_action","damage_total_action","hide_expected_qty_from_operator","id","mod_when","mod_who","owner_id","shelf_life_warning_multiplier_pct"],"title":"OwnerConfig","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"auto_print_lpn_on_receive":false,"confirm_empty_on_move":false,"damage_major_action":"None","damage_minor_action":"None","damage_total_action":"None","hide_expected_qty_from_operator":false,"id":1,"mod_when":"<mod_when>","mod_who":1,"owner_id":1,"shelf_life_warning_multiplier_pct":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_owner_config":{"post":{"operationId":"count_owner_config","summary":"Count owner_config — CRUD.","description":"Count owner_config — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"owner_config","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_owner_config"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_owner_config"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#create_putawayzone":{"post":{"operationId":"create_putawayzone","summary":"Create a new putawayzone — CRUD.","description":"Create a new putawayzone — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"UNIQUE_VIOLATION or INVALID_DATA","when":"The code already exists, or a value breaks a rule."}],"x-quark-module":"putawayzone","x-quark-operation":"create","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"create_putawayzone"},"params":{"type":"object","properties":{"data":{"properties":{"auto_print_addr_label":{"type":["boolean","null"]},"auto_print_carton_label":{"type":["boolean","null"]},"code":{"type":"string"},"color":{"type":["string","null"]},"default_label_printer":{"type":["string","null"]},"default_report_printer":{"type":["string","null"]},"description":{"type":["string","null"]},"inbound_loc":{"type":["string","null"]},"max_cases_count":{"format":"double","type":["number","null"]},"max_cube":{"format":"double","type":["number","null"]},"max_temperature":{"format":"double","type":["number","null"]},"max_weight":{"format":"double","type":["number","null"]},"min_temperature":{"format":"double","type":["number","null"]},"missing_toloc":{"type":["string","null"]},"outbound_loc":{"type":["string","null"]},"picking_toloc":{"type":["string","null"]},"replenishment_allowed":{"type":["boolean","null"]},"replenishment_threshold":{"format":"int32","type":["integer","null"]},"rf_pick_strategy":{"type":["string","null"]}},"required":["code"],"title":"PutawayZoneForCreate","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"create_putawayzone","params":{"data":{"code":"<code>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"auto_print_addr_label":{"type":["boolean","null"]},"auto_print_carton_label":{"type":["boolean","null"]},"code":{"type":"string"},"color":{"type":"string"},"default_label_printer":{"type":["string","null"]},"default_report_printer":{"type":["string","null"]},"description":{"type":"string"},"id":{"format":"int64","type":"integer"},"inbound_loc":{"type":"string"},"max_cases_count":{"format":"double","type":["number","null"]},"max_cube":{"format":"double","type":["number","null"]},"max_temperature":{"description":"Warmest temperature this zone holds. `None` = no constraint.","format":"double","type":["number","null"]},"max_weight":{"format":"double","type":["number","null"]},"min_temperature":{"description":"Coldest temperature this zone holds. `None` = no constraint — see migration 211: filled in for a handful of zones, never for thousands of locations, which is why the range lives here and not on `location`.","format":"double","type":["number","null"]},"missing_toloc":{"type":"string"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"outbound_loc":{"type":"string"},"picking_toloc":{"type":"string"},"replenishment_allowed":{"type":["boolean","null"]},"replenishment_threshold":{"format":"int32","type":["integer","null"]},"rf_pick_strategy":{"type":["string","null"]}},"required":["add_when","add_who","code","color","description","id","inbound_loc","missing_toloc","mod_when","mod_who","outbound_loc","picking_toloc"],"title":"PutawayZone","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","color":"<color>","description":"<description>","id":1,"inbound_loc":"<inbound_loc>","missing_toloc":"<missing_toloc>","mod_when":"<mod_when>","mod_who":1,"outbound_loc":"<outbound_loc>","picking_toloc":"<picking_toloc>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_putawayzone":{"post":{"operationId":"get_putawayzone","summary":"Get a putawayzone by ID — CRUD.","description":"Get a putawayzone by ID — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"putawayzone","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_putawayzone"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_putawayzone","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"auto_print_addr_label":{"type":["boolean","null"]},"auto_print_carton_label":{"type":["boolean","null"]},"code":{"type":"string"},"color":{"type":"string"},"default_label_printer":{"type":["string","null"]},"default_report_printer":{"type":["string","null"]},"description":{"type":"string"},"id":{"format":"int64","type":"integer"},"inbound_loc":{"type":"string"},"max_cases_count":{"format":"double","type":["number","null"]},"max_cube":{"format":"double","type":["number","null"]},"max_temperature":{"description":"Warmest temperature this zone holds. `None` = no constraint.","format":"double","type":["number","null"]},"max_weight":{"format":"double","type":["number","null"]},"min_temperature":{"description":"Coldest temperature this zone holds. `None` = no constraint — see migration 211: filled in for a handful of zones, never for thousands of locations, which is why the range lives here and not on `location`.","format":"double","type":["number","null"]},"missing_toloc":{"type":"string"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"outbound_loc":{"type":"string"},"picking_toloc":{"type":"string"},"replenishment_allowed":{"type":["boolean","null"]},"replenishment_threshold":{"format":"int32","type":["integer","null"]},"rf_pick_strategy":{"type":["string","null"]}},"required":["add_when","add_who","code","color","description","id","inbound_loc","missing_toloc","mod_when","mod_who","outbound_loc","picking_toloc"],"title":"PutawayZone","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","color":"<color>","description":"<description>","id":1,"inbound_loc":"<inbound_loc>","missing_toloc":"<missing_toloc>","mod_when":"<mod_when>","mod_who":1,"outbound_loc":"<outbound_loc>","picking_toloc":"<picking_toloc>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_putawayzone_by_code":{"post":{"operationId":"get_putawayzone_by_code","summary":"Get putaway zone by code (varchar PK)","description":"Get putaway zone by code (varchar PK)\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"putawayzone","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_putawayzone_by_code"},"params":{"type":"object","properties":{"code":{"type":"string"}},"required":["code"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_putawayzone_by_code","params":{"code":"<code>"}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"auto_print_addr_label":{"type":["boolean","null"]},"auto_print_carton_label":{"type":["boolean","null"]},"code":{"type":"string"},"color":{"type":"string"},"default_label_printer":{"type":["string","null"]},"default_report_printer":{"type":["string","null"]},"description":{"type":"string"},"id":{"format":"int64","type":"integer"},"inbound_loc":{"type":"string"},"max_cases_count":{"format":"double","type":["number","null"]},"max_cube":{"format":"double","type":["number","null"]},"max_temperature":{"description":"Warmest temperature this zone holds. `None` = no constraint.","format":"double","type":["number","null"]},"max_weight":{"format":"double","type":["number","null"]},"min_temperature":{"description":"Coldest temperature this zone holds. `None` = no constraint — see migration 211: filled in for a handful of zones, never for thousands of locations, which is why the range lives here and not on `location`.","format":"double","type":["number","null"]},"missing_toloc":{"type":"string"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"outbound_loc":{"type":"string"},"picking_toloc":{"type":"string"},"replenishment_allowed":{"type":["boolean","null"]},"replenishment_threshold":{"format":"int32","type":["integer","null"]},"rf_pick_strategy":{"type":["string","null"]}},"required":["add_when","add_who","code","color","description","id","inbound_loc","missing_toloc","mod_when","mod_who","outbound_loc","picking_toloc"],"title":"PutawayZone","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","color":"<color>","description":"<description>","id":1,"inbound_loc":"<inbound_loc>","missing_toloc":"<missing_toloc>","mod_when":"<mod_when>","mod_who":1,"outbound_loc":"<outbound_loc>","picking_toloc":"<picking_toloc>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_putawayzone":{"post":{"operationId":"list_putawayzone","summary":"List putawayzone — CRUD.","description":"List putawayzone — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"putawayzone","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_putawayzone"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_putawayzone"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/PutawayZone"},"title":"Array_of_PutawayZone","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"code":"<code>","color":"<color>","description":"<description>","id":1,"inbound_loc":"<inbound_loc>","missing_toloc":"<missing_toloc>","mod_when":"<mod_when>","mod_who":1,"outbound_loc":"<outbound_loc>","picking_toloc":"<picking_toloc>"}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_putawayzone":{"post":{"operationId":"count_putawayzone","summary":"Count putawayzone — CRUD.","description":"Count putawayzone — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"putawayzone","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_putawayzone"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_putawayzone"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#update_putawayzone":{"post":{"operationId":"update_putawayzone","summary":"Update putaway-zone settings without changing its stable code.","description":"Update putaway-zone settings without changing its stable code.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"INVALID_DATA","when":"A value breaks a rule."}],"x-quark-module":"putawayzone","x-quark-operation":"update","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"update_putawayzone"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"},"data":{"additionalProperties":false,"properties":{"auto_print_addr_label":{"type":"boolean"},"auto_print_carton_label":{"type":"boolean"},"color":{"type":"string"},"default_label_printer":{"type":["string","null"]},"default_report_printer":{"type":["string","null"]},"description":{"type":"string"},"inbound_loc":{"type":"string"},"max_cases_count":{"format":"double","type":"number"},"max_cube":{"format":"double","type":"number"},"max_temperature":{"format":"double","type":["number","null"]},"max_weight":{"format":"double","type":"number"},"min_temperature":{"format":"double","type":["number","null"]},"missing_toloc":{"type":"string"},"outbound_loc":{"type":"string"},"picking_toloc":{"type":"string"},"replenishment_allowed":{"type":"boolean"},"replenishment_threshold":{"format":"int32","type":"integer"},"rf_pick_strategy":{"type":["string","null"]}},"title":"PutawayZoneUpdateApi","type":"object"}},"required":["id","data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"update_putawayzone","params":{"id":1,"data":{"auto_print_addr_label":false,"auto_print_carton_label":false,"color":"<color>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"auto_print_addr_label":{"type":["boolean","null"]},"auto_print_carton_label":{"type":["boolean","null"]},"code":{"type":"string"},"color":{"type":"string"},"default_label_printer":{"type":["string","null"]},"default_report_printer":{"type":["string","null"]},"description":{"type":"string"},"id":{"format":"int64","type":"integer"},"inbound_loc":{"type":"string"},"max_cases_count":{"format":"double","type":["number","null"]},"max_cube":{"format":"double","type":["number","null"]},"max_temperature":{"description":"Warmest temperature this zone holds. `None` = no constraint.","format":"double","type":["number","null"]},"max_weight":{"format":"double","type":["number","null"]},"min_temperature":{"description":"Coldest temperature this zone holds. `None` = no constraint — see migration 211: filled in for a handful of zones, never for thousands of locations, which is why the range lives here and not on `location`.","format":"double","type":["number","null"]},"missing_toloc":{"type":"string"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"outbound_loc":{"type":"string"},"picking_toloc":{"type":"string"},"replenishment_allowed":{"type":["boolean","null"]},"replenishment_threshold":{"format":"int32","type":["integer","null"]},"rf_pick_strategy":{"type":["string","null"]}},"required":["add_when","add_who","code","color","description","id","inbound_loc","missing_toloc","mod_when","mod_who","outbound_loc","picking_toloc"],"title":"PutawayZone","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","color":"<color>","description":"<description>","id":1,"inbound_loc":"<inbound_loc>","missing_toloc":"<missing_toloc>","mod_when":"<mod_when>","mod_who":1,"outbound_loc":"<outbound_loc>","picking_toloc":"<picking_toloc>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_putawayzone":{"post":{"operationId":"delete_putawayzone","summary":"Delete a putawayzone by ID — CRUD.","description":"Delete a putawayzone by ID — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"DEPENDENT_DATA_EXIST","when":"Other rows still use this row."}],"x-quark-module":"putawayzone","x-quark-operation":"delete","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_putawayzone"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_putawayzone","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"auto_print_addr_label":{"type":["boolean","null"]},"auto_print_carton_label":{"type":["boolean","null"]},"code":{"type":"string"},"color":{"type":"string"},"default_label_printer":{"type":["string","null"]},"default_report_printer":{"type":["string","null"]},"description":{"type":"string"},"id":{"format":"int64","type":"integer"},"inbound_loc":{"type":"string"},"max_cases_count":{"format":"double","type":["number","null"]},"max_cube":{"format":"double","type":["number","null"]},"max_temperature":{"description":"Warmest temperature this zone holds. `None` = no constraint.","format":"double","type":["number","null"]},"max_weight":{"format":"double","type":["number","null"]},"min_temperature":{"description":"Coldest temperature this zone holds. `None` = no constraint — see migration 211: filled in for a handful of zones, never for thousands of locations, which is why the range lives here and not on `location`.","format":"double","type":["number","null"]},"missing_toloc":{"type":"string"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"outbound_loc":{"type":"string"},"picking_toloc":{"type":"string"},"replenishment_allowed":{"type":["boolean","null"]},"replenishment_threshold":{"format":"int32","type":["integer","null"]},"rf_pick_strategy":{"type":["string","null"]}},"required":["add_when","add_who","code","color","description","id","inbound_loc","missing_toloc","mod_when","mod_who","outbound_loc","picking_toloc"],"title":"PutawayZone","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","color":"<color>","description":"<description>","id":1,"inbound_loc":"<inbound_loc>","missing_toloc":"<missing_toloc>","mod_when":"<mod_when>","mod_who":1,"outbound_loc":"<outbound_loc>","picking_toloc":"<picking_toloc>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#create_loc":{"post":{"operationId":"create_loc","summary":"Create a location (auto check-digit)","description":"Create a location (auto check-digit)\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"UNIQUE_VIOLATION or INVALID_DATA","when":"The code already exists, or a value breaks a rule."}],"x-quark-module":"location","x-quark-operation":"create","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"create_loc"},"params":{"type":"object","properties":{"data":{"properties":{"abc":{"anyOf":[{"$ref":"#/components/schemas/AbcRotationSpeed"},{"type":"null"}]},"aisle":{"type":["string","null"]},"bay":{"format":"int32","type":["integer","null"]},"check_digit":{"type":["string","null"]},"code":{"type":"string"},"cube":{"format":"double","type":["number","null"]},"discard_lpn":{"type":["boolean","null"]},"footprint":{"format":"int16","type":["integer","null"]},"height":{"format":"double","type":["number","null"]},"length":{"format":"double","type":["number","null"]},"level":{"format":"int32","type":["integer","null"]},"loc_category":{"anyOf":[{"$ref":"#/components/schemas/LocCategory"},{"type":"null"}]},"loc_flag":{"anyOf":[{"$ref":"#/components/schemas/LocFlag"},{"type":"null"}]},"loc_processing_type":{"anyOf":[{"$ref":"#/components/schemas/LocProcessingType"},{"type":"null"}]},"loc_type":{"anyOf":[{"$ref":"#/components/schemas/LocType"},{"type":"null"}]},"max_cube_capacity":{"format":"double","type":["number","null"]},"max_qty_capacity":{"format":"double","type":["number","null"]},"max_weight_capacity":{"format":"double","type":["number","null"]},"mix_lot":{"type":["boolean","null"]},"mix_sku":{"type":["boolean","null"]},"putawayzone":{"type":["string","null"]},"route_sequence":{"type":["string","null"]},"section":{"type":["string","null"]},"stack_limit":{"format":"int16","type":["integer","null"]},"status":{"anyOf":[{"$ref":"#/components/schemas/LocStatus"},{"type":"null"}]},"width":{"format":"double","type":["number","null"]},"x_coord":{"format":"double","type":["number","null"]},"y_coord":{"format":"double","type":["number","null"]},"z_coord":{"format":"double","type":["number","null"]}},"required":["code"],"title":"LocForCreate","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"create_loc","params":{"data":{"code":"<code>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"Basic location model description CRUDs","properties":{"abc":{"anyOf":[{"$ref":"#/components/schemas/AbcRotationSpeed"},{"type":"null"}]},"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"aisle":{"type":"string"},"bay":{"format":"int32","type":"integer"},"check_digit":{"type":["string","null"]},"code":{"type":"string"},"cube":{"format":"double","type":["number","null"]},"discard_lpn":{"type":["boolean","null"]},"footprint":{"description":"How many pallets stand on the floor here, and how high they stack. Their product is the location's capacity in PALLET POSITIONS — the only capacity a bulk bay really has. `0` on either means \"not configured\", the same reading the two capacities above get, and it is reported rather than treated as unlimited.","format":"int16","type":"integer"},"height":{"format":"double","type":["number","null"]},"id":{"format":"int64","type":"integer"},"length":{"format":"double","type":["number","null"]},"level":{"format":"int32","type":["integer","null"]},"loc_category":{"$ref":"#/components/schemas/LocCategory"},"loc_flag":{"$ref":"#/components/schemas/LocFlag"},"loc_processing_type":{"$ref":"#/components/schemas/LocProcessingType"},"loc_type":{"$ref":"#/components/schemas/LocType"},"max_cube_capacity":{"format":"double","type":["number","null"]},"max_qty_capacity":{"description":"How much stock this location holds before it is full, in its own UOM. `0` = not configured, read the same way as the two capacities above.","format":"double","type":"number"},"max_weight_capacity":{"format":"double","type":["number","null"]},"mix_lot":{"type":["boolean","null"]},"mix_sku":{"type":["boolean","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"putawayzone":{"type":"string"},"route_sequence":{"type":["string","null"]},"section":{"description":"The run of positions this location belongs to — locations with no beam between them. `None` means it is its own section.","type":["string","null"]},"stack_limit":{"format":"int16","type":"integer"},"status":{"$ref":"#/components/schemas/LocStatus"},"width":{"format":"double","type":["number","null"]},"x_coord":{"format":"double","type":"number"},"y_coord":{"format":"double","type":"number"},"z_coord":{"format":"double","type":"number"}},"required":["add_when","add_who","aisle","bay","code","footprint","id","loc_category","loc_flag","loc_processing_type","loc_type","max_qty_capacity","mod_when","mod_who","putawayzone","stack_limit","status","x_coord","y_coord","z_coord"],"title":"Loc","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"aisle":"<aisle>","bay":1,"code":"<code>","footprint":1,"id":1,"loc_category":"None","loc_flag":"None","loc_processing_type":"None","loc_type":"None","max_qty_capacity":1.5,"mod_when":"<mod_when>","mod_who":1,"putawayzone":"<putawayzone>","stack_limit":1,"status":"Ok","x_coord":1.5,"y_coord":1.5,"z_coord":1.5}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_loc":{"post":{"operationId":"get_loc","summary":"Get a location by ID","description":"Get a location by ID\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"location","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_loc"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_loc","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"Basic location model description CRUDs","properties":{"abc":{"anyOf":[{"$ref":"#/components/schemas/AbcRotationSpeed"},{"type":"null"}]},"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"aisle":{"type":"string"},"bay":{"format":"int32","type":"integer"},"check_digit":{"type":["string","null"]},"code":{"type":"string"},"cube":{"format":"double","type":["number","null"]},"discard_lpn":{"type":["boolean","null"]},"footprint":{"description":"How many pallets stand on the floor here, and how high they stack. Their product is the location's capacity in PALLET POSITIONS — the only capacity a bulk bay really has. `0` on either means \"not configured\", the same reading the two capacities above get, and it is reported rather than treated as unlimited.","format":"int16","type":"integer"},"height":{"format":"double","type":["number","null"]},"id":{"format":"int64","type":"integer"},"length":{"format":"double","type":["number","null"]},"level":{"format":"int32","type":["integer","null"]},"loc_category":{"$ref":"#/components/schemas/LocCategory"},"loc_flag":{"$ref":"#/components/schemas/LocFlag"},"loc_processing_type":{"$ref":"#/components/schemas/LocProcessingType"},"loc_type":{"$ref":"#/components/schemas/LocType"},"max_cube_capacity":{"format":"double","type":["number","null"]},"max_qty_capacity":{"description":"How much stock this location holds before it is full, in its own UOM. `0` = not configured, read the same way as the two capacities above.","format":"double","type":"number"},"max_weight_capacity":{"format":"double","type":["number","null"]},"mix_lot":{"type":["boolean","null"]},"mix_sku":{"type":["boolean","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"putawayzone":{"type":"string"},"route_sequence":{"type":["string","null"]},"section":{"description":"The run of positions this location belongs to — locations with no beam between them. `None` means it is its own section.","type":["string","null"]},"stack_limit":{"format":"int16","type":"integer"},"status":{"$ref":"#/components/schemas/LocStatus"},"width":{"format":"double","type":["number","null"]},"x_coord":{"format":"double","type":"number"},"y_coord":{"format":"double","type":"number"},"z_coord":{"format":"double","type":"number"}},"required":["add_when","add_who","aisle","bay","code","footprint","id","loc_category","loc_flag","loc_processing_type","loc_type","max_qty_capacity","mod_when","mod_who","putawayzone","stack_limit","status","x_coord","y_coord","z_coord"],"title":"Loc","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"aisle":"<aisle>","bay":1,"code":"<code>","footprint":1,"id":1,"loc_category":"None","loc_flag":"None","loc_processing_type":"None","loc_type":"None","max_qty_capacity":1.5,"mod_when":"<mod_when>","mod_who":1,"putawayzone":"<putawayzone>","stack_limit":1,"status":"Ok","x_coord":1.5,"y_coord":1.5,"z_coord":1.5}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_loc_by_code":{"post":{"operationId":"get_loc_by_code","summary":"Get location by code (varchar PK)","description":"Get location by code (varchar PK)\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"location","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_loc_by_code"},"params":{"type":"object","properties":{"code":{"type":"string"}},"required":["code"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_loc_by_code","params":{"code":"<code>"}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"Basic location model description CRUDs","properties":{"abc":{"anyOf":[{"$ref":"#/components/schemas/AbcRotationSpeed"},{"type":"null"}]},"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"aisle":{"type":"string"},"bay":{"format":"int32","type":"integer"},"check_digit":{"type":["string","null"]},"code":{"type":"string"},"cube":{"format":"double","type":["number","null"]},"discard_lpn":{"type":["boolean","null"]},"footprint":{"description":"How many pallets stand on the floor here, and how high they stack. Their product is the location's capacity in PALLET POSITIONS — the only capacity a bulk bay really has. `0` on either means \"not configured\", the same reading the two capacities above get, and it is reported rather than treated as unlimited.","format":"int16","type":"integer"},"height":{"format":"double","type":["number","null"]},"id":{"format":"int64","type":"integer"},"length":{"format":"double","type":["number","null"]},"level":{"format":"int32","type":["integer","null"]},"loc_category":{"$ref":"#/components/schemas/LocCategory"},"loc_flag":{"$ref":"#/components/schemas/LocFlag"},"loc_processing_type":{"$ref":"#/components/schemas/LocProcessingType"},"loc_type":{"$ref":"#/components/schemas/LocType"},"max_cube_capacity":{"format":"double","type":["number","null"]},"max_qty_capacity":{"description":"How much stock this location holds before it is full, in its own UOM. `0` = not configured, read the same way as the two capacities above.","format":"double","type":"number"},"max_weight_capacity":{"format":"double","type":["number","null"]},"mix_lot":{"type":["boolean","null"]},"mix_sku":{"type":["boolean","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"putawayzone":{"type":"string"},"route_sequence":{"type":["string","null"]},"section":{"description":"The run of positions this location belongs to — locations with no beam between them. `None` means it is its own section.","type":["string","null"]},"stack_limit":{"format":"int16","type":"integer"},"status":{"$ref":"#/components/schemas/LocStatus"},"width":{"format":"double","type":["number","null"]},"x_coord":{"format":"double","type":"number"},"y_coord":{"format":"double","type":"number"},"z_coord":{"format":"double","type":"number"}},"required":["add_when","add_who","aisle","bay","code","footprint","id","loc_category","loc_flag","loc_processing_type","loc_type","max_qty_capacity","mod_when","mod_who","putawayzone","stack_limit","status","x_coord","y_coord","z_coord"],"title":"Loc","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"aisle":"<aisle>","bay":1,"code":"<code>","footprint":1,"id":1,"loc_category":"None","loc_flag":"None","loc_processing_type":"None","loc_type":"None","max_qty_capacity":1.5,"mod_when":"<mod_when>","mod_who":1,"putawayzone":"<putawayzone>","stack_limit":1,"status":"Ok","x_coord":1.5,"y_coord":1.5,"z_coord":1.5}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_loc":{"post":{"operationId":"list_loc","summary":"List locations (filtered)","description":"List locations (filtered)\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"location","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_loc"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_loc"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/Loc"},"title":"Array_of_Loc","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"aisle":"<aisle>","bay":1,"code":"<code>","footprint":1,"id":1,"loc_category":"None","loc_flag":"None","loc_processing_type":"None","loc_type":"None","max_qty_capacity":1.5,"mod_when":"<mod_when>","mod_who":1,"putawayzone":"<putawayzone>","stack_limit":1,"status":"Ok","x_coord":1.5,"y_coord":1.5,"z_coord":1.5}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#update_loc":{"post":{"operationId":"update_loc","summary":"Update a location; an explicit JSON null or a blank on section clears it back to NULL (its own section).","description":"Update a location; an explicit JSON null or a blank on section clears it back to NULL (its own section).\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"INVALID_DATA","when":"A value breaks a rule."}],"x-quark-module":"location","x-quark-operation":"update","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"update_loc"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"},"data":{"properties":{"abc":{"anyOf":[{"$ref":"#/components/schemas/AbcRotationSpeed"},{"type":"null"}]},"aisle":{"type":["string","null"]},"bay":{"format":"int32","type":["integer","null"]},"check_digit":{"type":["string","null"]},"cube":{"format":"double","type":["number","null"]},"discard_lpn":{"type":["boolean","null"]},"footprint":{"format":"int16","type":["integer","null"]},"height":{"format":"double","type":["number","null"]},"length":{"format":"double","type":["number","null"]},"level":{"format":"int32","type":["integer","null"]},"loc_category":{"anyOf":[{"$ref":"#/components/schemas/LocCategory"},{"type":"null"}]},"loc_flag":{"anyOf":[{"$ref":"#/components/schemas/LocFlag"},{"type":"null"}]},"loc_processing_type":{"anyOf":[{"$ref":"#/components/schemas/LocProcessingType"},{"type":"null"}]},"loc_type":{"anyOf":[{"$ref":"#/components/schemas/LocType"},{"type":"null"}]},"max_cube_capacity":{"format":"double","type":["number","null"]},"max_qty_capacity":{"format":"double","type":["number","null"]},"max_weight_capacity":{"format":"double","type":["number","null"]},"mix_lot":{"type":["boolean","null"]},"mix_sku":{"type":["boolean","null"]},"putawayzone":{"type":["string","null"]},"route_sequence":{"type":["string","null"]},"section":{"type":["string","null"]},"stack_limit":{"format":"int16","type":["integer","null"]},"status":{"anyOf":[{"$ref":"#/components/schemas/LocStatus"},{"type":"null"}]},"width":{"format":"double","type":["number","null"]},"x_coord":{"format":"double","type":["number","null"]},"y_coord":{"format":"double","type":["number","null"]},"z_coord":{"format":"double","type":["number","null"]}},"title":"LocForUpdate","type":"object"}},"required":["id","data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"update_loc","params":{"id":1,"data":{"abc":"A","aisle":"<aisle>","bay":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"Basic location model description CRUDs","properties":{"abc":{"anyOf":[{"$ref":"#/components/schemas/AbcRotationSpeed"},{"type":"null"}]},"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"aisle":{"type":"string"},"bay":{"format":"int32","type":"integer"},"check_digit":{"type":["string","null"]},"code":{"type":"string"},"cube":{"format":"double","type":["number","null"]},"discard_lpn":{"type":["boolean","null"]},"footprint":{"description":"How many pallets stand on the floor here, and how high they stack. Their product is the location's capacity in PALLET POSITIONS — the only capacity a bulk bay really has. `0` on either means \"not configured\", the same reading the two capacities above get, and it is reported rather than treated as unlimited.","format":"int16","type":"integer"},"height":{"format":"double","type":["number","null"]},"id":{"format":"int64","type":"integer"},"length":{"format":"double","type":["number","null"]},"level":{"format":"int32","type":["integer","null"]},"loc_category":{"$ref":"#/components/schemas/LocCategory"},"loc_flag":{"$ref":"#/components/schemas/LocFlag"},"loc_processing_type":{"$ref":"#/components/schemas/LocProcessingType"},"loc_type":{"$ref":"#/components/schemas/LocType"},"max_cube_capacity":{"format":"double","type":["number","null"]},"max_qty_capacity":{"description":"How much stock this location holds before it is full, in its own UOM. `0` = not configured, read the same way as the two capacities above.","format":"double","type":"number"},"max_weight_capacity":{"format":"double","type":["number","null"]},"mix_lot":{"type":["boolean","null"]},"mix_sku":{"type":["boolean","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"putawayzone":{"type":"string"},"route_sequence":{"type":["string","null"]},"section":{"description":"The run of positions this location belongs to — locations with no beam between them. `None` means it is its own section.","type":["string","null"]},"stack_limit":{"format":"int16","type":"integer"},"status":{"$ref":"#/components/schemas/LocStatus"},"width":{"format":"double","type":["number","null"]},"x_coord":{"format":"double","type":"number"},"y_coord":{"format":"double","type":"number"},"z_coord":{"format":"double","type":"number"}},"required":["add_when","add_who","aisle","bay","code","footprint","id","loc_category","loc_flag","loc_processing_type","loc_type","max_qty_capacity","mod_when","mod_who","putawayzone","stack_limit","status","x_coord","y_coord","z_coord"],"title":"Loc","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"aisle":"<aisle>","bay":1,"code":"<code>","footprint":1,"id":1,"loc_category":"None","loc_flag":"None","loc_processing_type":"None","loc_type":"None","max_qty_capacity":1.5,"mod_when":"<mod_when>","mod_who":1,"putawayzone":"<putawayzone>","stack_limit":1,"status":"Ok","x_coord":1.5,"y_coord":1.5,"z_coord":1.5}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_loc":{"post":{"operationId":"delete_loc","summary":"Delete a location","description":"Delete a location\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"DEPENDENT_DATA_EXIST","when":"Other rows still use this row."}],"x-quark-module":"location","x-quark-operation":"delete","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_loc"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_loc","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"Basic location model description CRUDs","properties":{"abc":{"anyOf":[{"$ref":"#/components/schemas/AbcRotationSpeed"},{"type":"null"}]},"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"aisle":{"type":"string"},"bay":{"format":"int32","type":"integer"},"check_digit":{"type":["string","null"]},"code":{"type":"string"},"cube":{"format":"double","type":["number","null"]},"discard_lpn":{"type":["boolean","null"]},"footprint":{"description":"How many pallets stand on the floor here, and how high they stack. Their product is the location's capacity in PALLET POSITIONS — the only capacity a bulk bay really has. `0` on either means \"not configured\", the same reading the two capacities above get, and it is reported rather than treated as unlimited.","format":"int16","type":"integer"},"height":{"format":"double","type":["number","null"]},"id":{"format":"int64","type":"integer"},"length":{"format":"double","type":["number","null"]},"level":{"format":"int32","type":["integer","null"]},"loc_category":{"$ref":"#/components/schemas/LocCategory"},"loc_flag":{"$ref":"#/components/schemas/LocFlag"},"loc_processing_type":{"$ref":"#/components/schemas/LocProcessingType"},"loc_type":{"$ref":"#/components/schemas/LocType"},"max_cube_capacity":{"format":"double","type":["number","null"]},"max_qty_capacity":{"description":"How much stock this location holds before it is full, in its own UOM. `0` = not configured, read the same way as the two capacities above.","format":"double","type":"number"},"max_weight_capacity":{"format":"double","type":["number","null"]},"mix_lot":{"type":["boolean","null"]},"mix_sku":{"type":["boolean","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"putawayzone":{"type":"string"},"route_sequence":{"type":["string","null"]},"section":{"description":"The run of positions this location belongs to — locations with no beam between them. `None` means it is its own section.","type":["string","null"]},"stack_limit":{"format":"int16","type":"integer"},"status":{"$ref":"#/components/schemas/LocStatus"},"width":{"format":"double","type":["number","null"]},"x_coord":{"format":"double","type":"number"},"y_coord":{"format":"double","type":"number"},"z_coord":{"format":"double","type":"number"}},"required":["add_when","add_who","aisle","bay","code","footprint","id","loc_category","loc_flag","loc_processing_type","loc_type","max_qty_capacity","mod_when","mod_who","putawayzone","stack_limit","status","x_coord","y_coord","z_coord"],"title":"Loc","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"aisle":"<aisle>","bay":1,"code":"<code>","footprint":1,"id":1,"loc_category":"None","loc_flag":"None","loc_processing_type":"None","loc_type":"None","max_qty_capacity":1.5,"mod_when":"<mod_when>","mod_who":1,"putawayzone":"<putawayzone>","stack_limit":1,"status":"Ok","x_coord":1.5,"y_coord":1.5,"z_coord":1.5}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_many_locs":{"post":{"operationId":"delete_many_locs","summary":"Delete multiple locations by IDs","description":"Delete multiple locations by IDs\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"DEPENDENT_DATA_EXIST","when":"Other rows still use this row."}],"x-quark-module":"location","x-quark-operation":"delete","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_many_locs"},"params":{"type":"object","properties":{"ids":{"items":{"format":"int64","type":"integer"},"type":"array","description":"Record IDs"}},"required":["ids"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_many_locs","params":{"ids":[1]}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"uint64","minimum":0,"title":"uint64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#gen_locs":{"post":{"operationId":"gen_locs","summary":"Generate locations from a pattern (bulk create)","description":"Generate locations from a pattern (bulk create)\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"location","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"gen_locs"},"params":{"type":"object","properties":{"data":{"description":"Backward-compatible generator wire data. Existing clients send only the flattened location fields; review clients also identify exclusions by CODE and the pattern they actually reviewed.","properties":{"abc":{"anyOf":[{"$ref":"#/components/schemas/AbcRotationSpeed"},{"type":"null"}]},"aisle":{"type":["string","null"]},"bay":{"format":"int32","type":["integer","null"]},"check_digit":{"type":["string","null"]},"cube":{"format":"double","type":["number","null"]},"discard_lpn":{"type":["boolean","null"]},"exclude_codes":{"default":[],"items":{"type":"string"},"type":"array"},"expected_pattern":{"default":null,"type":["string","null"]},"footprint":{"format":"int16","type":["integer","null"]},"generator_attributes":{"$ref":"#/components/schemas/LocationGeneratorAttributes"},"height":{"format":"double","type":["number","null"]},"length":{"format":"double","type":["number","null"]},"loc_category":{"anyOf":[{"$ref":"#/components/schemas/LocCategory"},{"type":"null"}]},"loc_flag":{"anyOf":[{"$ref":"#/components/schemas/LocFlag"},{"type":"null"}]},"loc_processing_type":{"anyOf":[{"$ref":"#/components/schemas/LocProcessingType"},{"type":"null"}]},"loc_type":{"anyOf":[{"$ref":"#/components/schemas/LocType"},{"type":"null"}]},"max_cube_capacity":{"format":"double","type":["number","null"]},"max_qty_capacity":{"format":"double","type":["number","null"]},"max_weight_capacity":{"format":"double","type":["number","null"]},"mix_lot":{"type":["boolean","null"]},"mix_sku":{"type":["boolean","null"]},"putawayzone":{"type":["string","null"]},"route_sequence":{"type":["string","null"]},"section":{"type":["string","null"]},"stack_limit":{"format":"int16","type":["integer","null"]},"status":{"anyOf":[{"$ref":"#/components/schemas/LocStatus"},{"type":"null"}]},"width":{"format":"double","type":["number","null"]},"x_coord":{"format":"double","type":["number","null"]},"y_coord":{"format":"double","type":["number","null"]},"z_coord":{"format":"double","type":["number","null"]}},"required":["generator_attributes"],"title":"LocGenerationRequest","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"gen_locs","params":{"data":{"generator_attributes":{"aisles":{"end":1,"start":1},"levels":{"end":1,"start":1},"locs":{"end":1,"start":1}}}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/Loc"},"title":"Array_of_Loc","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"aisle":"<aisle>","bay":1,"code":"<code>","footprint":1,"id":1,"loc_category":"None","loc_flag":"None","loc_processing_type":"None","loc_type":"None","max_qty_capacity":1.5,"mod_when":"<mod_when>","mod_who":1,"putawayzone":"<putawayzone>","stack_limit":1,"status":"Ok","x_coord":1.5,"y_coord":1.5,"z_coord":1.5}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#preview_gen_locs":{"post":{"operationId":"preview_gen_locs","summary":"Preview generated locations and per-location attributes without creating them","description":"Preview generated locations and per-location attributes without creating them\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"location","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"preview_gen_locs"},"params":{"type":"object","properties":{"data":{"description":"Backward-compatible generator wire data. Existing clients send only the flattened location fields; review clients also identify exclusions by CODE and the pattern they actually reviewed.","properties":{"abc":{"anyOf":[{"$ref":"#/components/schemas/AbcRotationSpeed"},{"type":"null"}]},"aisle":{"type":["string","null"]},"bay":{"format":"int32","type":["integer","null"]},"check_digit":{"type":["string","null"]},"cube":{"format":"double","type":["number","null"]},"discard_lpn":{"type":["boolean","null"]},"exclude_codes":{"default":[],"items":{"type":"string"},"type":"array"},"expected_pattern":{"default":null,"type":["string","null"]},"footprint":{"format":"int16","type":["integer","null"]},"generator_attributes":{"$ref":"#/components/schemas/LocationGeneratorAttributes"},"height":{"format":"double","type":["number","null"]},"length":{"format":"double","type":["number","null"]},"loc_category":{"anyOf":[{"$ref":"#/components/schemas/LocCategory"},{"type":"null"}]},"loc_flag":{"anyOf":[{"$ref":"#/components/schemas/LocFlag"},{"type":"null"}]},"loc_processing_type":{"anyOf":[{"$ref":"#/components/schemas/LocProcessingType"},{"type":"null"}]},"loc_type":{"anyOf":[{"$ref":"#/components/schemas/LocType"},{"type":"null"}]},"max_cube_capacity":{"format":"double","type":["number","null"]},"max_qty_capacity":{"format":"double","type":["number","null"]},"max_weight_capacity":{"format":"double","type":["number","null"]},"mix_lot":{"type":["boolean","null"]},"mix_sku":{"type":["boolean","null"]},"putawayzone":{"type":["string","null"]},"route_sequence":{"type":["string","null"]},"section":{"type":["string","null"]},"stack_limit":{"format":"int16","type":["integer","null"]},"status":{"anyOf":[{"$ref":"#/components/schemas/LocStatus"},{"type":"null"}]},"width":{"format":"double","type":["number","null"]},"x_coord":{"format":"double","type":["number","null"]},"y_coord":{"format":"double","type":["number","null"]},"z_coord":{"format":"double","type":["number","null"]}},"required":["generator_attributes"],"title":"LocGenerationRequest","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"preview_gen_locs","params":{"data":{"generator_attributes":{"aisles":{"end":1,"start":1},"levels":{"end":1,"start":1},"locs":{"end":1,"start":1}}}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"excluded_count":{"format":"uint","minimum":0,"type":"integer"},"pattern":{"type":"string"},"rows":{"items":{"$ref":"#/components/schemas/LocForCreate"},"type":"array"},"total_count":{"format":"uint","minimum":0,"type":"integer"}},"required":["excluded_count","pattern","rows","total_count"],"title":"LocationGenerationPreview","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"excluded_count":1,"pattern":"<pattern>","rows":[{"code":"<code>"}],"total_count":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_loc":{"post":{"operationId":"count_loc","summary":"Count locations","description":"Count locations\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"location","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_loc"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_loc"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#create_loc_lot_commingle":{"post":{"operationId":"create_loc_lot_commingle","summary":"Create a location lot commingle rule","description":"Create a location lot commingle rule\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"UNIQUE_VIOLATION or INVALID_DATA","when":"The code already exists, or a value breaks a rule."}],"x-quark-module":"loc_lot_commingle","x-quark-operation":"create","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"create_loc_lot_commingle"},"params":{"type":"object","properties":{"data":{"properties":{"allow_mix":{"type":["boolean","null"]},"attrib_code":{"type":"string"},"location_code":{"type":"string"}},"required":["attrib_code","location_code"],"title":"LocLotCommingleForCreate","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"create_loc_lot_commingle","params":{"data":{"attrib_code":"<attrib_code>","location_code":"<location_code>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"allow_mix":{"type":"boolean"},"attrib_code":{"type":"string"},"id":{"format":"int64","type":"integer"},"location_code":{"type":"string"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"}},"required":["add_when","add_who","allow_mix","attrib_code","id","location_code","mod_when","mod_who"],"title":"LocLotCommingle","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"allow_mix":false,"attrib_code":"<attrib_code>","id":1,"location_code":"<location_code>","mod_when":"<mod_when>","mod_who":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_loc_lot_commingle":{"post":{"operationId":"get_loc_lot_commingle","summary":"Get a location lot commingle rule by ID","description":"Get a location lot commingle rule by ID\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"loc_lot_commingle","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_loc_lot_commingle"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_loc_lot_commingle","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"allow_mix":{"type":"boolean"},"attrib_code":{"type":"string"},"id":{"format":"int64","type":"integer"},"location_code":{"type":"string"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"}},"required":["add_when","add_who","allow_mix","attrib_code","id","location_code","mod_when","mod_who"],"title":"LocLotCommingle","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"allow_mix":false,"attrib_code":"<attrib_code>","id":1,"location_code":"<location_code>","mod_when":"<mod_when>","mod_who":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_loc_lot_commingle":{"post":{"operationId":"list_loc_lot_commingle","summary":"List location lot commingle rules (filtered)","description":"List location lot commingle rules (filtered)\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"loc_lot_commingle","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_loc_lot_commingle"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_loc_lot_commingle"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/LocLotCommingle"},"title":"Array_of_LocLotCommingle","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"allow_mix":false,"attrib_code":"<attrib_code>","id":1,"location_code":"<location_code>","mod_when":"<mod_when>","mod_who":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#update_loc_lot_commingle":{"post":{"operationId":"update_loc_lot_commingle","summary":"Update a location lot commingle rule","description":"Update a location lot commingle rule\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"INVALID_DATA","when":"A value breaks a rule."}],"x-quark-module":"loc_lot_commingle","x-quark-operation":"update","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"update_loc_lot_commingle"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"},"data":{"properties":{"allow_mix":{"type":["boolean","null"]},"attrib_code":{"type":["string","null"]}},"title":"LocLotCommingleForUpdate","type":"object"}},"required":["id","data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"update_loc_lot_commingle","params":{"id":1,"data":{"allow_mix":false,"attrib_code":"<attrib_code>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"allow_mix":{"type":"boolean"},"attrib_code":{"type":"string"},"id":{"format":"int64","type":"integer"},"location_code":{"type":"string"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"}},"required":["add_when","add_who","allow_mix","attrib_code","id","location_code","mod_when","mod_who"],"title":"LocLotCommingle","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"allow_mix":false,"attrib_code":"<attrib_code>","id":1,"location_code":"<location_code>","mod_when":"<mod_when>","mod_who":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_loc_lot_commingle":{"post":{"operationId":"delete_loc_lot_commingle","summary":"Delete a location lot commingle rule","description":"Delete a location lot commingle rule\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"DEPENDENT_DATA_EXIST","when":"Other rows still use this row."}],"x-quark-module":"loc_lot_commingle","x-quark-operation":"delete","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_loc_lot_commingle"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_loc_lot_commingle","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"allow_mix":{"type":"boolean"},"attrib_code":{"type":"string"},"id":{"format":"int64","type":"integer"},"location_code":{"type":"string"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"}},"required":["add_when","add_who","allow_mix","attrib_code","id","location_code","mod_when","mod_who"],"title":"LocLotCommingle","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"allow_mix":false,"attrib_code":"<attrib_code>","id":1,"location_code":"<location_code>","mod_when":"<mod_when>","mod_who":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_loc_lot_commingle":{"post":{"operationId":"count_loc_lot_commingle","summary":"Count location lot commingle rules","description":"Count location lot commingle rules\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"loc_lot_commingle","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_loc_lot_commingle"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_loc_lot_commingle"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#create_putawayzone_lot_commingle":{"post":{"operationId":"create_putawayzone_lot_commingle","summary":"Create a putawayzone lot commingle rule","description":"Create a putawayzone lot commingle rule\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"UNIQUE_VIOLATION or INVALID_DATA","when":"The code already exists, or a value breaks a rule."}],"x-quark-module":"putawayzone_lot_commingle","x-quark-operation":"create","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"create_putawayzone_lot_commingle"},"params":{"type":"object","properties":{"data":{"properties":{"allow_mix":{"type":["boolean","null"]},"attrib_code":{"type":"string"},"putawayzone_code":{"type":"string"}},"required":["attrib_code","putawayzone_code"],"title":"PutawayzoneLotCommingleForCreate","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"create_putawayzone_lot_commingle","params":{"data":{"attrib_code":"<attrib_code>","putawayzone_code":"<putawayzone_code>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"allow_mix":{"type":"boolean"},"attrib_code":{"type":"string"},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"putawayzone_code":{"type":"string"}},"required":["add_when","add_who","allow_mix","attrib_code","id","mod_when","mod_who","putawayzone_code"],"title":"PutawayzoneLotCommingle","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"allow_mix":false,"attrib_code":"<attrib_code>","id":1,"mod_when":"<mod_when>","mod_who":1,"putawayzone_code":"<putawayzone_code>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_putawayzone_lot_commingle":{"post":{"operationId":"get_putawayzone_lot_commingle","summary":"Get a putawayzone lot commingle rule by ID","description":"Get a putawayzone lot commingle rule by ID\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"putawayzone_lot_commingle","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_putawayzone_lot_commingle"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_putawayzone_lot_commingle","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"allow_mix":{"type":"boolean"},"attrib_code":{"type":"string"},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"putawayzone_code":{"type":"string"}},"required":["add_when","add_who","allow_mix","attrib_code","id","mod_when","mod_who","putawayzone_code"],"title":"PutawayzoneLotCommingle","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"allow_mix":false,"attrib_code":"<attrib_code>","id":1,"mod_when":"<mod_when>","mod_who":1,"putawayzone_code":"<putawayzone_code>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_putawayzone_lot_commingle":{"post":{"operationId":"list_putawayzone_lot_commingle","summary":"List putawayzone lot commingle rules (filtered)","description":"List putawayzone lot commingle rules (filtered)\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"putawayzone_lot_commingle","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_putawayzone_lot_commingle"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_putawayzone_lot_commingle"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/PutawayzoneLotCommingle"},"title":"Array_of_PutawayzoneLotCommingle","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"allow_mix":false,"attrib_code":"<attrib_code>","id":1,"mod_when":"<mod_when>","mod_who":1,"putawayzone_code":"<putawayzone_code>"}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_putawayzone_lot_commingle":{"post":{"operationId":"count_putawayzone_lot_commingle","summary":"Count putawayzone lot commingle rules","description":"Count putawayzone lot commingle rules\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"putawayzone_lot_commingle","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_putawayzone_lot_commingle"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_putawayzone_lot_commingle"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#update_putawayzone_lot_commingle":{"post":{"operationId":"update_putawayzone_lot_commingle","summary":"Update a putawayzone lot commingle rule","description":"Update a putawayzone lot commingle rule\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"INVALID_DATA","when":"A value breaks a rule."}],"x-quark-module":"putawayzone_lot_commingle","x-quark-operation":"update","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"update_putawayzone_lot_commingle"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"},"data":{"properties":{"allow_mix":{"type":["boolean","null"]},"attrib_code":{"type":["string","null"]}},"title":"PutawayzoneLotCommingleForUpdate","type":"object"}},"required":["id","data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"update_putawayzone_lot_commingle","params":{"id":1,"data":{"allow_mix":false,"attrib_code":"<attrib_code>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"allow_mix":{"type":"boolean"},"attrib_code":{"type":"string"},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"putawayzone_code":{"type":"string"}},"required":["add_when","add_who","allow_mix","attrib_code","id","mod_when","mod_who","putawayzone_code"],"title":"PutawayzoneLotCommingle","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"allow_mix":false,"attrib_code":"<attrib_code>","id":1,"mod_when":"<mod_when>","mod_who":1,"putawayzone_code":"<putawayzone_code>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_putawayzone_lot_commingle":{"post":{"operationId":"delete_putawayzone_lot_commingle","summary":"Delete a putawayzone lot commingle rule","description":"Delete a putawayzone lot commingle rule\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"DEPENDENT_DATA_EXIST","when":"Other rows still use this row."}],"x-quark-module":"putawayzone_lot_commingle","x-quark-operation":"delete","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_putawayzone_lot_commingle"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_putawayzone_lot_commingle","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"allow_mix":{"type":"boolean"},"attrib_code":{"type":"string"},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"putawayzone_code":{"type":"string"}},"required":["add_when","add_who","allow_mix","attrib_code","id","mod_when","mod_who","putawayzone_code"],"title":"PutawayzoneLotCommingle","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"allow_mix":false,"attrib_code":"<attrib_code>","id":1,"mod_when":"<mod_when>","mod_who":1,"putawayzone_code":"<putawayzone_code>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#create_sku":{"post":{"operationId":"create_sku","summary":"Create a SKU master-data root after validating its packaging UOM.","description":"Create a SKU master-data root after validating its packaging UOM.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog does not say whether this method needs an idempotency key.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"sku","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"create_sku"},"params":{"type":"object","properties":{"data":{"additionalProperties":false,"description":"Used when creating a new SKU.\n\nContains all required and optional fields needed for SKU creation, excluding database-generated fields like `id`.\n\n# Examples\n\n``` use crate::model::sku::SkuForCreate; let sku_create = SkuForCreate::new(1, \"SKU001\", \"Example SKU\", 1); assert_eq!(sku_create.code, \"SKU001\"); ```","properties":{"abc":{"anyOf":[{"$ref":"#/components/schemas/AbcRotationSpeed"},{"type":"null"}]},"active":{"type":["boolean","null"]},"allocation_policy_id":{"format":"int64","type":["integer","null"]},"allow_multi_lot_on_lpn":{"type":["boolean","null"]},"barcode_format_id":{"format":"int64","type":["integer","null"]},"best_by_days":{"format":"int32","type":["integer","null"]},"cartonization_policy_id":{"format":"int64","type":["integer","null"]},"class":{"type":["string","null"]},"code":{"type":"string"},"cube":{"format":"double","type":["number","null"]},"default_uom":{"type":["string","null"]},"deliver_by_days":{"format":"int32","type":["integer","null"]},"descr":{"type":"string"},"expire_days":{"format":"int32","type":["integer","null"]},"external_id":{"type":["string","null"]},"gross_wgt":{"format":"double","type":["number","null"]},"lot_policy_id":{"format":"int64","type":["integer","null"]},"max_age_on_rec":{"format":"int32","type":["integer","null"]},"max_temperature":{"format":"double","type":["number","null"]},"min_shelf_life_on_pick":{"format":"int32","type":["integer","null"]},"min_shelf_life_on_rec":{"format":"int32","type":["integer","null"]},"min_temperature":{"format":"double","type":["number","null"]},"net_wgt":{"format":"double","type":["number","null"]},"on_rec_copy_receipt_number":{"type":["boolean","null"]},"owner_id":{"format":"int64","type":"integer"},"pack_id":{"format":"int64","type":"integer"},"pack_location":{"type":["string","null"]},"pick_instruction":{"description":"Standing pick instruction for this item (wms-app 044): shown on every pick of it and acknowledged before the pick commits (RF `PICKINS`).","type":["string","null"]},"positions_required":{"format":"int16","type":["integer","null"]},"putaway_class":{"anyOf":[{"$ref":"#/components/schemas/PutawayClass"},{"type":"null"}]},"putaway_loc":{"type":["string","null"]},"putaway_policy_id":{"format":"int64","type":["integer","null"]},"putawayzone":{"type":["string","null"]},"receipt_hold_code":{"type":["string","null"]},"receipt_policy_id":{"format":"int64","type":["integer","null"]},"receipt_qc_loc":{"type":["string","null"]},"replenishment_policy_id":{"format":"int64","type":["integer","null"]},"requires_temperature_capture":{"type":["boolean","null"]},"return_location":{"type":["string","null"]},"rotate_by":{"type":["string","null"]},"rotation":{"anyOf":[{"$ref":"#/components/schemas/SkuRotation"},{"type":"null"}]},"shelf_life":{"format":"int32","type":["integer","null"]},"sku_group":{"type":["string","null"]},"stack_limit":{"format":"int16","type":["integer","null"]},"tare_weight":{"format":"double","type":["number","null"]},"warning_temperature_max":{"format":"double","type":["number","null"]},"warning_temperature_min":{"format":"double","type":["number","null"]}},"required":["code","descr","owner_id","pack_id"],"title":"SkuForCreate","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"create_sku","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"code":"<code>","descr":"<descr>","owner_id":1,"pack_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"Represents a Stock Keeping Unit (SKU), the core entity for inventory items.\n\nEach SKU contains information about the item, its ownership, packaging, classification, fulfillment parameters, and policy references. Timestamps track creation and modification.\n\n# Fields - `id`: Unique SKU identifier. - `external_id`: Optional external reference. - `owner_id`: Owner's identifier. - `code`: SKU code, unique per owner. - `descr`: Description of the SKU. - `pack_id`: Reference to packaging. - `gross_wgt`, `net_wgt`, `cube`: Physical characteristics. - `abc`: ABC rotation speed classification. - `class`, `active`, `sku_group`: Classification and grouping. - `*_policy_id`: Various policy references (allocation, replenishment, etc.). - `on_rec_copy_receipt_number`: Copy receipt number on receipt. - `putaway_loc`, `putawayzone`, `receipt_qc_loc`: Putaway Location details. - `putaway_class`: Putaway class. - `rotation`: SKU rotation policy. - `shelf_life`, `min_shelf_life_on_pick`, `min_shelf_life_on_rec`: Shelf life parameters. - `receipt_hold_code`, `expire_days`, `deliver_by_days`, `best_by_days`: Expiry and delivery codes. - `allow_multi_lot_on_lpn`: Allow multiple lots on license plate number. - `force_separate_lpn_per_lot`: This SKU demands its own container per lot. - `add_who`, `add_when`, `mod_who`, `mod_when`: Audit fields for creation and modification.","properties":{"abc":{"anyOf":[{"$ref":"#/components/schemas/AbcRotationSpeed"},{"type":"null"}]},"active":{"type":["boolean","null"]},"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"allocation_policy_id":{"format":"int64","type":["integer","null"]},"allow_multi_lot_on_lpn":{"type":["boolean","null"]},"barcode_format_id":{"format":"int64","type":["integer","null"]},"best_by_days":{"format":"int32","type":["integer","null"]},"cartonization_policy_id":{"format":"int64","type":["integer","null"]},"class":{"type":["string","null"]},"code":{"type":"string"},"cube":{"format":"double","type":["number","null"]},"default_uom":{"type":["string","null"]},"deliver_by_days":{"format":"int32","type":["integer","null"]},"descr":{"type":"string"},"expire_days":{"format":"int32","type":["integer","null"]},"external_id":{"type":["string","null"]},"force_separate_lpn_per_lot":{"description":"The same prohibition as `allow_multi_lot_on_lpn = false`, asked of the ARRIVING SKU instead of the ones already on the pallet. See [`DEFAULT_FORCE_SEPARATE_LPN_PER_LOT`] for why both exist.","type":["boolean","null"]},"gross_wgt":{"format":"double","type":["number","null"]},"id":{"format":"int64","type":"integer"},"lot_policy_id":{"format":"int64","type":["integer","null"]},"max_age_on_rec":{"format":"int32","type":["integer","null"]},"max_temperature":{"format":"double","type":["number","null"]},"min_shelf_life_on_pick":{"format":"int32","type":["integer","null"]},"min_shelf_life_on_rec":{"format":"int32","type":["integer","null"]},"min_temperature":{"format":"double","type":["number","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"net_wgt":{"format":"double","type":["number","null"]},"on_rec_copy_receipt_number":{"type":["boolean","null"]},"owner_id":{"format":"int64","type":"integer"},"pack_id":{"format":"int64","type":"integer"},"pack_location":{"type":["string","null"]},"pick_instruction":{"description":"Standing pick instruction for this item (wms-app 044): shown on every pick of it and acknowledged before the pick commits (RF `PICKINS`).","type":["string","null"]},"positions_required":{"description":"How many adjacent positions of one section this item occupies. `1` is an ordinary item; more means the whole section must be free and its dimensions are measured together.","format":"int16","type":["integer","null"]},"putaway_class":{"anyOf":[{"$ref":"#/components/schemas/PutawayClass"},{"type":"null"}]},"putaway_loc":{"type":["string","null"]},"putaway_policy_id":{"format":"int64","type":["integer","null"]},"putawayzone":{"type":["string","null"]},"receipt_hold_code":{"type":["string","null"]},"receipt_policy_id":{"format":"int64","type":["integer","null"]},"receipt_qc_loc":{"type":["string","null"]},"replenishment_policy_id":{"format":"int64","type":["integer","null"]},"requires_temperature_capture":{"type":"boolean"},"return_location":{"type":["string","null"]},"rotate_by":{"type":["string","null"]},"rotation":{"anyOf":[{"$ref":"#/components/schemas/SkuRotation"},{"type":"null"}]},"shelf_life":{"format":"int32","type":["integer","null"]},"sku_group":{"type":["string","null"]},"stack_limit":{"description":"How high this item may be stacked, whatever the rack allows. `0` is no opinion; the engine takes the minimum of this and `location.stack_limit`, so an item may lower the rack's limit and never raise it.","format":"int16","type":["integer","null"]},"tare_weight":{"format":"double","type":["number","null"]},"warning_temperature_max":{"format":"double","type":["number","null"]},"warning_temperature_min":{"format":"double","type":["number","null"]}},"required":["add_when","add_who","code","descr","id","mod_when","mod_who","owner_id","pack_id","requires_temperature_capture"],"title":"Sku","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","descr":"<descr>","id":1,"mod_when":"<mod_when>","mod_who":1,"owner_id":1,"pack_id":1,"requires_temperature_capture":false}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#create_sku_full":{"post":{"operationId":"create_sku_full","summary":"Create a SKU and optional serial configuration atomically","description":"Create a SKU and optional serial configuration atomically\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog does not say whether this method needs an idempotency key.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"sku","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"create_sku_full"},"params":{"type":"object","properties":{"data":{"additionalProperties":false,"properties":{"serial_config":{"anyOf":[{"$ref":"#/components/schemas/SkuSerialConfigForCreateInner"},{"type":"null"}]},"sku":{"$ref":"#/components/schemas/SkuForCreate"}},"required":["sku"],"title":"SkuFullForCreate","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"create_sku_full","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"sku":{"code":"<code>","descr":"<descr>","owner_id":1,"pack_id":1}}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"Represents a Stock Keeping Unit (SKU), the core entity for inventory items.\n\nEach SKU contains information about the item, its ownership, packaging, classification, fulfillment parameters, and policy references. Timestamps track creation and modification.\n\n# Fields - `id`: Unique SKU identifier. - `external_id`: Optional external reference. - `owner_id`: Owner's identifier. - `code`: SKU code, unique per owner. - `descr`: Description of the SKU. - `pack_id`: Reference to packaging. - `gross_wgt`, `net_wgt`, `cube`: Physical characteristics. - `abc`: ABC rotation speed classification. - `class`, `active`, `sku_group`: Classification and grouping. - `*_policy_id`: Various policy references (allocation, replenishment, etc.). - `on_rec_copy_receipt_number`: Copy receipt number on receipt. - `putaway_loc`, `putawayzone`, `receipt_qc_loc`: Putaway Location details. - `putaway_class`: Putaway class. - `rotation`: SKU rotation policy. - `shelf_life`, `min_shelf_life_on_pick`, `min_shelf_life_on_rec`: Shelf life parameters. - `receipt_hold_code`, `expire_days`, `deliver_by_days`, `best_by_days`: Expiry and delivery codes. - `allow_multi_lot_on_lpn`: Allow multiple lots on license plate number. - `force_separate_lpn_per_lot`: This SKU demands its own container per lot. - `add_who`, `add_when`, `mod_who`, `mod_when`: Audit fields for creation and modification.","properties":{"abc":{"anyOf":[{"$ref":"#/components/schemas/AbcRotationSpeed"},{"type":"null"}]},"active":{"type":["boolean","null"]},"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"allocation_policy_id":{"format":"int64","type":["integer","null"]},"allow_multi_lot_on_lpn":{"type":["boolean","null"]},"barcode_format_id":{"format":"int64","type":["integer","null"]},"best_by_days":{"format":"int32","type":["integer","null"]},"cartonization_policy_id":{"format":"int64","type":["integer","null"]},"class":{"type":["string","null"]},"code":{"type":"string"},"cube":{"format":"double","type":["number","null"]},"default_uom":{"type":["string","null"]},"deliver_by_days":{"format":"int32","type":["integer","null"]},"descr":{"type":"string"},"expire_days":{"format":"int32","type":["integer","null"]},"external_id":{"type":["string","null"]},"force_separate_lpn_per_lot":{"description":"The same prohibition as `allow_multi_lot_on_lpn = false`, asked of the ARRIVING SKU instead of the ones already on the pallet. See [`DEFAULT_FORCE_SEPARATE_LPN_PER_LOT`] for why both exist.","type":["boolean","null"]},"gross_wgt":{"format":"double","type":["number","null"]},"id":{"format":"int64","type":"integer"},"lot_policy_id":{"format":"int64","type":["integer","null"]},"max_age_on_rec":{"format":"int32","type":["integer","null"]},"max_temperature":{"format":"double","type":["number","null"]},"min_shelf_life_on_pick":{"format":"int32","type":["integer","null"]},"min_shelf_life_on_rec":{"format":"int32","type":["integer","null"]},"min_temperature":{"format":"double","type":["number","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"net_wgt":{"format":"double","type":["number","null"]},"on_rec_copy_receipt_number":{"type":["boolean","null"]},"owner_id":{"format":"int64","type":"integer"},"pack_id":{"format":"int64","type":"integer"},"pack_location":{"type":["string","null"]},"pick_instruction":{"description":"Standing pick instruction for this item (wms-app 044): shown on every pick of it and acknowledged before the pick commits (RF `PICKINS`).","type":["string","null"]},"positions_required":{"description":"How many adjacent positions of one section this item occupies. `1` is an ordinary item; more means the whole section must be free and its dimensions are measured together.","format":"int16","type":["integer","null"]},"putaway_class":{"anyOf":[{"$ref":"#/components/schemas/PutawayClass"},{"type":"null"}]},"putaway_loc":{"type":["string","null"]},"putaway_policy_id":{"format":"int64","type":["integer","null"]},"putawayzone":{"type":["string","null"]},"receipt_hold_code":{"type":["string","null"]},"receipt_policy_id":{"format":"int64","type":["integer","null"]},"receipt_qc_loc":{"type":["string","null"]},"replenishment_policy_id":{"format":"int64","type":["integer","null"]},"requires_temperature_capture":{"type":"boolean"},"return_location":{"type":["string","null"]},"rotate_by":{"type":["string","null"]},"rotation":{"anyOf":[{"$ref":"#/components/schemas/SkuRotation"},{"type":"null"}]},"serial_config":{"anyOf":[{"$ref":"#/components/schemas/SkuSerialConfig"},{"type":"null"}]},"shelf_life":{"format":"int32","type":["integer","null"]},"sku_group":{"type":["string","null"]},"stack_limit":{"description":"How high this item may be stacked, whatever the rack allows. `0` is no opinion; the engine takes the minimum of this and `location.stack_limit`, so an item may lower the rack's limit and never raise it.","format":"int16","type":["integer","null"]},"tare_weight":{"format":"double","type":["number","null"]},"warning_temperature_max":{"format":"double","type":["number","null"]},"warning_temperature_min":{"format":"double","type":["number","null"]}},"required":["add_when","add_who","code","descr","id","mod_when","mod_who","owner_id","pack_id","requires_temperature_capture"],"title":"SkuFull","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","descr":"<descr>","id":1,"mod_when":"<mod_when>","mod_who":1,"owner_id":1,"pack_id":1,"requires_temperature_capture":false}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#update_sku_full":{"post":{"operationId":"update_sku_full","summary":"Update a SKU aggregate atomically","description":"Update a SKU aggregate atomically\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"sku","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"update_sku_full"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"},"data":{"additionalProperties":false,"properties":{"serial_config":{"anyOf":[{"$ref":"#/components/schemas/SkuSerialConfigMutation"},{"type":"null"}]},"sku":{"anyOf":[{"$ref":"#/components/schemas/SkuUpdateApi"},{"type":"null"}]}},"title":"SkuFullForUpdate","type":"object"}},"required":["id","data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"update_sku_full","params":{"id":1,"data":{"serial_config":{},"sku":{}}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"Represents a Stock Keeping Unit (SKU), the core entity for inventory items.\n\nEach SKU contains information about the item, its ownership, packaging, classification, fulfillment parameters, and policy references. Timestamps track creation and modification.\n\n# Fields - `id`: Unique SKU identifier. - `external_id`: Optional external reference. - `owner_id`: Owner's identifier. - `code`: SKU code, unique per owner. - `descr`: Description of the SKU. - `pack_id`: Reference to packaging. - `gross_wgt`, `net_wgt`, `cube`: Physical characteristics. - `abc`: ABC rotation speed classification. - `class`, `active`, `sku_group`: Classification and grouping. - `*_policy_id`: Various policy references (allocation, replenishment, etc.). - `on_rec_copy_receipt_number`: Copy receipt number on receipt. - `putaway_loc`, `putawayzone`, `receipt_qc_loc`: Putaway Location details. - `putaway_class`: Putaway class. - `rotation`: SKU rotation policy. - `shelf_life`, `min_shelf_life_on_pick`, `min_shelf_life_on_rec`: Shelf life parameters. - `receipt_hold_code`, `expire_days`, `deliver_by_days`, `best_by_days`: Expiry and delivery codes. - `allow_multi_lot_on_lpn`: Allow multiple lots on license plate number. - `force_separate_lpn_per_lot`: This SKU demands its own container per lot. - `add_who`, `add_when`, `mod_who`, `mod_when`: Audit fields for creation and modification.","properties":{"abc":{"anyOf":[{"$ref":"#/components/schemas/AbcRotationSpeed"},{"type":"null"}]},"active":{"type":["boolean","null"]},"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"allocation_policy_id":{"format":"int64","type":["integer","null"]},"allow_multi_lot_on_lpn":{"type":["boolean","null"]},"barcode_format_id":{"format":"int64","type":["integer","null"]},"best_by_days":{"format":"int32","type":["integer","null"]},"cartonization_policy_id":{"format":"int64","type":["integer","null"]},"class":{"type":["string","null"]},"code":{"type":"string"},"cube":{"format":"double","type":["number","null"]},"default_uom":{"type":["string","null"]},"deliver_by_days":{"format":"int32","type":["integer","null"]},"descr":{"type":"string"},"expire_days":{"format":"int32","type":["integer","null"]},"external_id":{"type":["string","null"]},"force_separate_lpn_per_lot":{"description":"The same prohibition as `allow_multi_lot_on_lpn = false`, asked of the ARRIVING SKU instead of the ones already on the pallet. See [`DEFAULT_FORCE_SEPARATE_LPN_PER_LOT`] for why both exist.","type":["boolean","null"]},"gross_wgt":{"format":"double","type":["number","null"]},"id":{"format":"int64","type":"integer"},"lot_policy_id":{"format":"int64","type":["integer","null"]},"max_age_on_rec":{"format":"int32","type":["integer","null"]},"max_temperature":{"format":"double","type":["number","null"]},"min_shelf_life_on_pick":{"format":"int32","type":["integer","null"]},"min_shelf_life_on_rec":{"format":"int32","type":["integer","null"]},"min_temperature":{"format":"double","type":["number","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"net_wgt":{"format":"double","type":["number","null"]},"on_rec_copy_receipt_number":{"type":["boolean","null"]},"owner_id":{"format":"int64","type":"integer"},"pack_id":{"format":"int64","type":"integer"},"pack_location":{"type":["string","null"]},"pick_instruction":{"description":"Standing pick instruction for this item (wms-app 044): shown on every pick of it and acknowledged before the pick commits (RF `PICKINS`).","type":["string","null"]},"positions_required":{"description":"How many adjacent positions of one section this item occupies. `1` is an ordinary item; more means the whole section must be free and its dimensions are measured together.","format":"int16","type":["integer","null"]},"putaway_class":{"anyOf":[{"$ref":"#/components/schemas/PutawayClass"},{"type":"null"}]},"putaway_loc":{"type":["string","null"]},"putaway_policy_id":{"format":"int64","type":["integer","null"]},"putawayzone":{"type":["string","null"]},"receipt_hold_code":{"type":["string","null"]},"receipt_policy_id":{"format":"int64","type":["integer","null"]},"receipt_qc_loc":{"type":["string","null"]},"replenishment_policy_id":{"format":"int64","type":["integer","null"]},"requires_temperature_capture":{"type":"boolean"},"return_location":{"type":["string","null"]},"rotate_by":{"type":["string","null"]},"rotation":{"anyOf":[{"$ref":"#/components/schemas/SkuRotation"},{"type":"null"}]},"serial_config":{"anyOf":[{"$ref":"#/components/schemas/SkuSerialConfig"},{"type":"null"}]},"shelf_life":{"format":"int32","type":["integer","null"]},"sku_group":{"type":["string","null"]},"stack_limit":{"description":"How high this item may be stacked, whatever the rack allows. `0` is no opinion; the engine takes the minimum of this and `location.stack_limit`, so an item may lower the rack's limit and never raise it.","format":"int16","type":["integer","null"]},"tare_weight":{"format":"double","type":["number","null"]},"warning_temperature_max":{"format":"double","type":["number","null"]},"warning_temperature_min":{"format":"double","type":["number","null"]}},"required":["add_when","add_who","code","descr","id","mod_when","mod_who","owner_id","pack_id","requires_temperature_capture"],"title":"SkuFull","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","descr":"<descr>","id":1,"mod_when":"<mod_when>","mod_who":1,"owner_id":1,"pack_id":1,"requires_temperature_capture":false}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_sku":{"post":{"operationId":"get_sku","summary":"Get a sku by ID — CRUD.","description":"Get a sku by ID — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"sku","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_sku"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_sku","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"Represents a Stock Keeping Unit (SKU), the core entity for inventory items.\n\nEach SKU contains information about the item, its ownership, packaging, classification, fulfillment parameters, and policy references. Timestamps track creation and modification.\n\n# Fields - `id`: Unique SKU identifier. - `external_id`: Optional external reference. - `owner_id`: Owner's identifier. - `code`: SKU code, unique per owner. - `descr`: Description of the SKU. - `pack_id`: Reference to packaging. - `gross_wgt`, `net_wgt`, `cube`: Physical characteristics. - `abc`: ABC rotation speed classification. - `class`, `active`, `sku_group`: Classification and grouping. - `*_policy_id`: Various policy references (allocation, replenishment, etc.). - `on_rec_copy_receipt_number`: Copy receipt number on receipt. - `putaway_loc`, `putawayzone`, `receipt_qc_loc`: Putaway Location details. - `putaway_class`: Putaway class. - `rotation`: SKU rotation policy. - `shelf_life`, `min_shelf_life_on_pick`, `min_shelf_life_on_rec`: Shelf life parameters. - `receipt_hold_code`, `expire_days`, `deliver_by_days`, `best_by_days`: Expiry and delivery codes. - `allow_multi_lot_on_lpn`: Allow multiple lots on license plate number. - `force_separate_lpn_per_lot`: This SKU demands its own container per lot. - `add_who`, `add_when`, `mod_who`, `mod_when`: Audit fields for creation and modification.","properties":{"abc":{"anyOf":[{"$ref":"#/components/schemas/AbcRotationSpeed"},{"type":"null"}]},"active":{"type":["boolean","null"]},"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"allocation_policy_id":{"format":"int64","type":["integer","null"]},"allow_multi_lot_on_lpn":{"type":["boolean","null"]},"barcode_format_id":{"format":"int64","type":["integer","null"]},"best_by_days":{"format":"int32","type":["integer","null"]},"cartonization_policy_id":{"format":"int64","type":["integer","null"]},"class":{"type":["string","null"]},"code":{"type":"string"},"cube":{"format":"double","type":["number","null"]},"default_uom":{"type":["string","null"]},"deliver_by_days":{"format":"int32","type":["integer","null"]},"descr":{"type":"string"},"expire_days":{"format":"int32","type":["integer","null"]},"external_id":{"type":["string","null"]},"force_separate_lpn_per_lot":{"description":"The same prohibition as `allow_multi_lot_on_lpn = false`, asked of the ARRIVING SKU instead of the ones already on the pallet. See [`DEFAULT_FORCE_SEPARATE_LPN_PER_LOT`] for why both exist.","type":["boolean","null"]},"gross_wgt":{"format":"double","type":["number","null"]},"id":{"format":"int64","type":"integer"},"lot_policy_id":{"format":"int64","type":["integer","null"]},"max_age_on_rec":{"format":"int32","type":["integer","null"]},"max_temperature":{"format":"double","type":["number","null"]},"min_shelf_life_on_pick":{"format":"int32","type":["integer","null"]},"min_shelf_life_on_rec":{"format":"int32","type":["integer","null"]},"min_temperature":{"format":"double","type":["number","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"net_wgt":{"format":"double","type":["number","null"]},"on_rec_copy_receipt_number":{"type":["boolean","null"]},"owner_id":{"format":"int64","type":"integer"},"pack_id":{"format":"int64","type":"integer"},"pack_location":{"type":["string","null"]},"pick_instruction":{"description":"Standing pick instruction for this item (wms-app 044): shown on every pick of it and acknowledged before the pick commits (RF `PICKINS`).","type":["string","null"]},"positions_required":{"description":"How many adjacent positions of one section this item occupies. `1` is an ordinary item; more means the whole section must be free and its dimensions are measured together.","format":"int16","type":["integer","null"]},"putaway_class":{"anyOf":[{"$ref":"#/components/schemas/PutawayClass"},{"type":"null"}]},"putaway_loc":{"type":["string","null"]},"putaway_policy_id":{"format":"int64","type":["integer","null"]},"putawayzone":{"type":["string","null"]},"receipt_hold_code":{"type":["string","null"]},"receipt_policy_id":{"format":"int64","type":["integer","null"]},"receipt_qc_loc":{"type":["string","null"]},"replenishment_policy_id":{"format":"int64","type":["integer","null"]},"requires_temperature_capture":{"type":"boolean"},"return_location":{"type":["string","null"]},"rotate_by":{"type":["string","null"]},"rotation":{"anyOf":[{"$ref":"#/components/schemas/SkuRotation"},{"type":"null"}]},"shelf_life":{"format":"int32","type":["integer","null"]},"sku_group":{"type":["string","null"]},"stack_limit":{"description":"How high this item may be stacked, whatever the rack allows. `0` is no opinion; the engine takes the minimum of this and `location.stack_limit`, so an item may lower the rack's limit and never raise it.","format":"int16","type":["integer","null"]},"tare_weight":{"format":"double","type":["number","null"]},"warning_temperature_max":{"format":"double","type":["number","null"]},"warning_temperature_min":{"format":"double","type":["number","null"]}},"required":["add_when","add_who","code","descr","id","mod_when","mod_who","owner_id","pack_id","requires_temperature_capture"],"title":"Sku","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","descr":"<descr>","id":1,"mod_when":"<mod_when>","mod_who":1,"owner_id":1,"pack_id":1,"requires_temperature_capture":false}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_sku_full":{"post":{"operationId":"get_sku_full","summary":"Get SKU with its optional serial configuration","description":"Get SKU with its optional serial configuration\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"sku","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_sku_full"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_sku_full","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"Represents a Stock Keeping Unit (SKU), the core entity for inventory items.\n\nEach SKU contains information about the item, its ownership, packaging, classification, fulfillment parameters, and policy references. Timestamps track creation and modification.\n\n# Fields - `id`: Unique SKU identifier. - `external_id`: Optional external reference. - `owner_id`: Owner's identifier. - `code`: SKU code, unique per owner. - `descr`: Description of the SKU. - `pack_id`: Reference to packaging. - `gross_wgt`, `net_wgt`, `cube`: Physical characteristics. - `abc`: ABC rotation speed classification. - `class`, `active`, `sku_group`: Classification and grouping. - `*_policy_id`: Various policy references (allocation, replenishment, etc.). - `on_rec_copy_receipt_number`: Copy receipt number on receipt. - `putaway_loc`, `putawayzone`, `receipt_qc_loc`: Putaway Location details. - `putaway_class`: Putaway class. - `rotation`: SKU rotation policy. - `shelf_life`, `min_shelf_life_on_pick`, `min_shelf_life_on_rec`: Shelf life parameters. - `receipt_hold_code`, `expire_days`, `deliver_by_days`, `best_by_days`: Expiry and delivery codes. - `allow_multi_lot_on_lpn`: Allow multiple lots on license plate number. - `force_separate_lpn_per_lot`: This SKU demands its own container per lot. - `add_who`, `add_when`, `mod_who`, `mod_when`: Audit fields for creation and modification.","properties":{"abc":{"anyOf":[{"$ref":"#/components/schemas/AbcRotationSpeed"},{"type":"null"}]},"active":{"type":["boolean","null"]},"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"allocation_policy_id":{"format":"int64","type":["integer","null"]},"allow_multi_lot_on_lpn":{"type":["boolean","null"]},"barcode_format_id":{"format":"int64","type":["integer","null"]},"best_by_days":{"format":"int32","type":["integer","null"]},"cartonization_policy_id":{"format":"int64","type":["integer","null"]},"class":{"type":["string","null"]},"code":{"type":"string"},"cube":{"format":"double","type":["number","null"]},"default_uom":{"type":["string","null"]},"deliver_by_days":{"format":"int32","type":["integer","null"]},"descr":{"type":"string"},"expire_days":{"format":"int32","type":["integer","null"]},"external_id":{"type":["string","null"]},"force_separate_lpn_per_lot":{"description":"The same prohibition as `allow_multi_lot_on_lpn = false`, asked of the ARRIVING SKU instead of the ones already on the pallet. See [`DEFAULT_FORCE_SEPARATE_LPN_PER_LOT`] for why both exist.","type":["boolean","null"]},"gross_wgt":{"format":"double","type":["number","null"]},"id":{"format":"int64","type":"integer"},"lot_policy_id":{"format":"int64","type":["integer","null"]},"max_age_on_rec":{"format":"int32","type":["integer","null"]},"max_temperature":{"format":"double","type":["number","null"]},"min_shelf_life_on_pick":{"format":"int32","type":["integer","null"]},"min_shelf_life_on_rec":{"format":"int32","type":["integer","null"]},"min_temperature":{"format":"double","type":["number","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"net_wgt":{"format":"double","type":["number","null"]},"on_rec_copy_receipt_number":{"type":["boolean","null"]},"owner_id":{"format":"int64","type":"integer"},"pack_id":{"format":"int64","type":"integer"},"pack_location":{"type":["string","null"]},"pick_instruction":{"description":"Standing pick instruction for this item (wms-app 044): shown on every pick of it and acknowledged before the pick commits (RF `PICKINS`).","type":["string","null"]},"positions_required":{"description":"How many adjacent positions of one section this item occupies. `1` is an ordinary item; more means the whole section must be free and its dimensions are measured together.","format":"int16","type":["integer","null"]},"putaway_class":{"anyOf":[{"$ref":"#/components/schemas/PutawayClass"},{"type":"null"}]},"putaway_loc":{"type":["string","null"]},"putaway_policy_id":{"format":"int64","type":["integer","null"]},"putawayzone":{"type":["string","null"]},"receipt_hold_code":{"type":["string","null"]},"receipt_policy_id":{"format":"int64","type":["integer","null"]},"receipt_qc_loc":{"type":["string","null"]},"replenishment_policy_id":{"format":"int64","type":["integer","null"]},"requires_temperature_capture":{"type":"boolean"},"return_location":{"type":["string","null"]},"rotate_by":{"type":["string","null"]},"rotation":{"anyOf":[{"$ref":"#/components/schemas/SkuRotation"},{"type":"null"}]},"serial_config":{"anyOf":[{"$ref":"#/components/schemas/SkuSerialConfig"},{"type":"null"}]},"shelf_life":{"format":"int32","type":["integer","null"]},"sku_group":{"type":["string","null"]},"stack_limit":{"description":"How high this item may be stacked, whatever the rack allows. `0` is no opinion; the engine takes the minimum of this and `location.stack_limit`, so an item may lower the rack's limit and never raise it.","format":"int16","type":["integer","null"]},"tare_weight":{"format":"double","type":["number","null"]},"warning_temperature_max":{"format":"double","type":["number","null"]},"warning_temperature_min":{"format":"double","type":["number","null"]}},"required":["add_when","add_who","code","descr","id","mod_when","mod_who","owner_id","pack_id","requires_temperature_capture"],"title":"SkuFull","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","descr":"<descr>","id":1,"mod_when":"<mod_when>","mod_who":1,"owner_id":1,"pack_id":1,"requires_temperature_capture":false}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_sku":{"post":{"operationId":"list_sku","summary":"List sku — CRUD.","description":"List sku — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"sku","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_sku"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_sku"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/Sku"},"title":"Array_of_Sku","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"code":"<code>","descr":"<descr>","id":1,"mod_when":"<mod_when>","mod_who":1,"owner_id":1,"pack_id":1,"requires_temperature_capture":false}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#update_sku":{"post":{"operationId":"update_sku","summary":"Update mutable SKU attributes without changing owner or SKU code.","description":"Update mutable SKU attributes without changing owner or SKU code.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"INVALID_DATA","when":"A value breaks a rule."}],"x-quark-module":"sku","x-quark-operation":"update","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"update_sku"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"},"data":{"additionalProperties":false,"properties":{"abc":{"anyOf":[{"$ref":"#/components/schemas/AbcRotationSpeed"},{"type":"null"}]},"active":{"type":"boolean"},"allocation_policy_id":{"format":"int64","type":["integer","null"]},"allow_multi_lot_on_lpn":{"type":["boolean","null"]},"barcode_format_id":{"format":"int64","type":["integer","null"]},"best_by_days":{"format":"int32","type":["integer","null"]},"cartonization_policy_id":{"format":"int64","type":"integer"},"class":{"type":["string","null"]},"cube":{"format":"double","type":"number"},"default_uom":{"type":["string","null"]},"deliver_by_days":{"format":"int32","type":["integer","null"]},"descr":{"type":"string"},"expire_days":{"format":"int32","type":["integer","null"]},"external_id":{"type":["string","null"]},"gross_wgt":{"format":"double","type":"number"},"lot_policy_id":{"format":"int64","type":"integer"},"max_age_on_rec":{"format":"int32","type":["integer","null"]},"max_temperature":{"format":"double","type":["number","null"]},"min_shelf_life_on_pick":{"format":"int32","type":["integer","null"]},"min_shelf_life_on_rec":{"format":"int32","type":["integer","null"]},"min_temperature":{"format":"double","type":["number","null"]},"net_wgt":{"format":"double","type":"number"},"on_rec_copy_receipt_number":{"type":"boolean"},"pack_id":{"format":"int64","type":"integer"},"pack_location":{"type":["string","null"]},"pick_instruction":{"type":["string","null"]},"positions_required":{"format":"int16","type":"integer"},"putaway_class":{"anyOf":[{"$ref":"#/components/schemas/PutawayClass"},{"type":"null"}]},"putaway_loc":{"type":["string","null"]},"putaway_policy_id":{"format":"int64","type":["integer","null"]},"putawayzone":{"type":["string","null"]},"receipt_hold_code":{"type":["string","null"]},"receipt_policy_id":{"format":"int64","type":"integer"},"receipt_qc_loc":{"type":["string","null"]},"replenishment_policy_id":{"format":"int64","type":"integer"},"requires_temperature_capture":{"type":"boolean"},"return_location":{"type":["string","null"]},"rotate_by":{"type":"string"},"rotation":{"description":"Represents SKU rotation policy, determining the order in which stock is picked.\n\n- `Fifo`: First-In-First-Out rotation. - `Lifo`: Last-In-First-Out rotation.\n\nUsed to specify how items are rotated in inventory management.\n\n# Examples\n\n``` use crate::model::sku::SkuRotation; let rotation = SkuRotation::Fifo; assert_eq!(rotation.to_string(), \"Fifo\"); ``` `PartialEq`/`Eq` are unconditional (not `cfg(test)`): a putaway step now compares `SkuRotation` values outside tests too, via `PropRule::matches` (phase 2b product criteria).","enum":["Fifo","Lifo","Fefo"],"type":"string"},"shelf_life":{"format":"int32","type":["integer","null"]},"sku_group":{"type":["string","null"]},"stack_limit":{"format":"int16","type":"integer"},"tare_weight":{"format":"double","type":"number"},"warning_temperature_max":{"format":"double","type":["number","null"]},"warning_temperature_min":{"format":"double","type":["number","null"]}},"title":"SkuUpdateApi","type":"object"}},"required":["id","data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"update_sku","params":{"id":1,"data":{"abc":"A","active":false,"allocation_policy_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"Represents a Stock Keeping Unit (SKU), the core entity for inventory items.\n\nEach SKU contains information about the item, its ownership, packaging, classification, fulfillment parameters, and policy references. Timestamps track creation and modification.\n\n# Fields - `id`: Unique SKU identifier. - `external_id`: Optional external reference. - `owner_id`: Owner's identifier. - `code`: SKU code, unique per owner. - `descr`: Description of the SKU. - `pack_id`: Reference to packaging. - `gross_wgt`, `net_wgt`, `cube`: Physical characteristics. - `abc`: ABC rotation speed classification. - `class`, `active`, `sku_group`: Classification and grouping. - `*_policy_id`: Various policy references (allocation, replenishment, etc.). - `on_rec_copy_receipt_number`: Copy receipt number on receipt. - `putaway_loc`, `putawayzone`, `receipt_qc_loc`: Putaway Location details. - `putaway_class`: Putaway class. - `rotation`: SKU rotation policy. - `shelf_life`, `min_shelf_life_on_pick`, `min_shelf_life_on_rec`: Shelf life parameters. - `receipt_hold_code`, `expire_days`, `deliver_by_days`, `best_by_days`: Expiry and delivery codes. - `allow_multi_lot_on_lpn`: Allow multiple lots on license plate number. - `force_separate_lpn_per_lot`: This SKU demands its own container per lot. - `add_who`, `add_when`, `mod_who`, `mod_when`: Audit fields for creation and modification.","properties":{"abc":{"anyOf":[{"$ref":"#/components/schemas/AbcRotationSpeed"},{"type":"null"}]},"active":{"type":["boolean","null"]},"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"allocation_policy_id":{"format":"int64","type":["integer","null"]},"allow_multi_lot_on_lpn":{"type":["boolean","null"]},"barcode_format_id":{"format":"int64","type":["integer","null"]},"best_by_days":{"format":"int32","type":["integer","null"]},"cartonization_policy_id":{"format":"int64","type":["integer","null"]},"class":{"type":["string","null"]},"code":{"type":"string"},"cube":{"format":"double","type":["number","null"]},"default_uom":{"type":["string","null"]},"deliver_by_days":{"format":"int32","type":["integer","null"]},"descr":{"type":"string"},"expire_days":{"format":"int32","type":["integer","null"]},"external_id":{"type":["string","null"]},"force_separate_lpn_per_lot":{"description":"The same prohibition as `allow_multi_lot_on_lpn = false`, asked of the ARRIVING SKU instead of the ones already on the pallet. See [`DEFAULT_FORCE_SEPARATE_LPN_PER_LOT`] for why both exist.","type":["boolean","null"]},"gross_wgt":{"format":"double","type":["number","null"]},"id":{"format":"int64","type":"integer"},"lot_policy_id":{"format":"int64","type":["integer","null"]},"max_age_on_rec":{"format":"int32","type":["integer","null"]},"max_temperature":{"format":"double","type":["number","null"]},"min_shelf_life_on_pick":{"format":"int32","type":["integer","null"]},"min_shelf_life_on_rec":{"format":"int32","type":["integer","null"]},"min_temperature":{"format":"double","type":["number","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"net_wgt":{"format":"double","type":["number","null"]},"on_rec_copy_receipt_number":{"type":["boolean","null"]},"owner_id":{"format":"int64","type":"integer"},"pack_id":{"format":"int64","type":"integer"},"pack_location":{"type":["string","null"]},"pick_instruction":{"description":"Standing pick instruction for this item (wms-app 044): shown on every pick of it and acknowledged before the pick commits (RF `PICKINS`).","type":["string","null"]},"positions_required":{"description":"How many adjacent positions of one section this item occupies. `1` is an ordinary item; more means the whole section must be free and its dimensions are measured together.","format":"int16","type":["integer","null"]},"putaway_class":{"anyOf":[{"$ref":"#/components/schemas/PutawayClass"},{"type":"null"}]},"putaway_loc":{"type":["string","null"]},"putaway_policy_id":{"format":"int64","type":["integer","null"]},"putawayzone":{"type":["string","null"]},"receipt_hold_code":{"type":["string","null"]},"receipt_policy_id":{"format":"int64","type":["integer","null"]},"receipt_qc_loc":{"type":["string","null"]},"replenishment_policy_id":{"format":"int64","type":["integer","null"]},"requires_temperature_capture":{"type":"boolean"},"return_location":{"type":["string","null"]},"rotate_by":{"type":["string","null"]},"rotation":{"anyOf":[{"$ref":"#/components/schemas/SkuRotation"},{"type":"null"}]},"shelf_life":{"format":"int32","type":["integer","null"]},"sku_group":{"type":["string","null"]},"stack_limit":{"description":"How high this item may be stacked, whatever the rack allows. `0` is no opinion; the engine takes the minimum of this and `location.stack_limit`, so an item may lower the rack's limit and never raise it.","format":"int16","type":["integer","null"]},"tare_weight":{"format":"double","type":["number","null"]},"warning_temperature_max":{"format":"double","type":["number","null"]},"warning_temperature_min":{"format":"double","type":["number","null"]}},"required":["add_when","add_who","code","descr","id","mod_when","mod_who","owner_id","pack_id","requires_temperature_capture"],"title":"Sku","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","descr":"<descr>","id":1,"mod_when":"<mod_when>","mod_who":1,"owner_id":1,"pack_id":1,"requires_temperature_capture":false}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_sku":{"post":{"operationId":"delete_sku","summary":"Delete an unreferenced SKU and its owned serial configuration.","description":"Delete an unreferenced SKU and its owned serial configuration.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog does not say whether this method needs an idempotency key.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"sku","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_sku"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_sku","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"Represents a Stock Keeping Unit (SKU), the core entity for inventory items.\n\nEach SKU contains information about the item, its ownership, packaging, classification, fulfillment parameters, and policy references. Timestamps track creation and modification.\n\n# Fields - `id`: Unique SKU identifier. - `external_id`: Optional external reference. - `owner_id`: Owner's identifier. - `code`: SKU code, unique per owner. - `descr`: Description of the SKU. - `pack_id`: Reference to packaging. - `gross_wgt`, `net_wgt`, `cube`: Physical characteristics. - `abc`: ABC rotation speed classification. - `class`, `active`, `sku_group`: Classification and grouping. - `*_policy_id`: Various policy references (allocation, replenishment, etc.). - `on_rec_copy_receipt_number`: Copy receipt number on receipt. - `putaway_loc`, `putawayzone`, `receipt_qc_loc`: Putaway Location details. - `putaway_class`: Putaway class. - `rotation`: SKU rotation policy. - `shelf_life`, `min_shelf_life_on_pick`, `min_shelf_life_on_rec`: Shelf life parameters. - `receipt_hold_code`, `expire_days`, `deliver_by_days`, `best_by_days`: Expiry and delivery codes. - `allow_multi_lot_on_lpn`: Allow multiple lots on license plate number. - `force_separate_lpn_per_lot`: This SKU demands its own container per lot. - `add_who`, `add_when`, `mod_who`, `mod_when`: Audit fields for creation and modification.","properties":{"abc":{"anyOf":[{"$ref":"#/components/schemas/AbcRotationSpeed"},{"type":"null"}]},"active":{"type":["boolean","null"]},"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"allocation_policy_id":{"format":"int64","type":["integer","null"]},"allow_multi_lot_on_lpn":{"type":["boolean","null"]},"barcode_format_id":{"format":"int64","type":["integer","null"]},"best_by_days":{"format":"int32","type":["integer","null"]},"cartonization_policy_id":{"format":"int64","type":["integer","null"]},"class":{"type":["string","null"]},"code":{"type":"string"},"cube":{"format":"double","type":["number","null"]},"default_uom":{"type":["string","null"]},"deliver_by_days":{"format":"int32","type":["integer","null"]},"descr":{"type":"string"},"expire_days":{"format":"int32","type":["integer","null"]},"external_id":{"type":["string","null"]},"force_separate_lpn_per_lot":{"description":"The same prohibition as `allow_multi_lot_on_lpn = false`, asked of the ARRIVING SKU instead of the ones already on the pallet. See [`DEFAULT_FORCE_SEPARATE_LPN_PER_LOT`] for why both exist.","type":["boolean","null"]},"gross_wgt":{"format":"double","type":["number","null"]},"id":{"format":"int64","type":"integer"},"lot_policy_id":{"format":"int64","type":["integer","null"]},"max_age_on_rec":{"format":"int32","type":["integer","null"]},"max_temperature":{"format":"double","type":["number","null"]},"min_shelf_life_on_pick":{"format":"int32","type":["integer","null"]},"min_shelf_life_on_rec":{"format":"int32","type":["integer","null"]},"min_temperature":{"format":"double","type":["number","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"net_wgt":{"format":"double","type":["number","null"]},"on_rec_copy_receipt_number":{"type":["boolean","null"]},"owner_id":{"format":"int64","type":"integer"},"pack_id":{"format":"int64","type":"integer"},"pack_location":{"type":["string","null"]},"pick_instruction":{"description":"Standing pick instruction for this item (wms-app 044): shown on every pick of it and acknowledged before the pick commits (RF `PICKINS`).","type":["string","null"]},"positions_required":{"description":"How many adjacent positions of one section this item occupies. `1` is an ordinary item; more means the whole section must be free and its dimensions are measured together.","format":"int16","type":["integer","null"]},"putaway_class":{"anyOf":[{"$ref":"#/components/schemas/PutawayClass"},{"type":"null"}]},"putaway_loc":{"type":["string","null"]},"putaway_policy_id":{"format":"int64","type":["integer","null"]},"putawayzone":{"type":["string","null"]},"receipt_hold_code":{"type":["string","null"]},"receipt_policy_id":{"format":"int64","type":["integer","null"]},"receipt_qc_loc":{"type":["string","null"]},"replenishment_policy_id":{"format":"int64","type":["integer","null"]},"requires_temperature_capture":{"type":"boolean"},"return_location":{"type":["string","null"]},"rotate_by":{"type":["string","null"]},"rotation":{"anyOf":[{"$ref":"#/components/schemas/SkuRotation"},{"type":"null"}]},"shelf_life":{"format":"int32","type":["integer","null"]},"sku_group":{"type":["string","null"]},"stack_limit":{"description":"How high this item may be stacked, whatever the rack allows. `0` is no opinion; the engine takes the minimum of this and `location.stack_limit`, so an item may lower the rack's limit and never raise it.","format":"int16","type":["integer","null"]},"tare_weight":{"format":"double","type":["number","null"]},"warning_temperature_max":{"format":"double","type":["number","null"]},"warning_temperature_min":{"format":"double","type":["number","null"]}},"required":["add_when","add_who","code","descr","id","mod_when","mod_who","owner_id","pack_id","requires_temperature_capture"],"title":"Sku","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","descr":"<descr>","id":1,"mod_when":"<mod_when>","mod_who":1,"owner_id":1,"pack_id":1,"requires_temperature_capture":false}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_sku_info":{"post":{"operationId":"get_sku_info","summary":"Get SKU by sku_code + owner_id","description":"Get SKU by sku_code + owner_id\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"sku","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_sku_info"},"params":{"type":"object","properties":{"owner_id":{"format":"int64","type":["integer","null"]},"sku_code":{"type":"string"}},"required":["sku_code"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_sku_info","params":{"sku_code":"<sku_code>"}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"Represents a Stock Keeping Unit (SKU), the core entity for inventory items.\n\nEach SKU contains information about the item, its ownership, packaging, classification, fulfillment parameters, and policy references. Timestamps track creation and modification.\n\n# Fields - `id`: Unique SKU identifier. - `external_id`: Optional external reference. - `owner_id`: Owner's identifier. - `code`: SKU code, unique per owner. - `descr`: Description of the SKU. - `pack_id`: Reference to packaging. - `gross_wgt`, `net_wgt`, `cube`: Physical characteristics. - `abc`: ABC rotation speed classification. - `class`, `active`, `sku_group`: Classification and grouping. - `*_policy_id`: Various policy references (allocation, replenishment, etc.). - `on_rec_copy_receipt_number`: Copy receipt number on receipt. - `putaway_loc`, `putawayzone`, `receipt_qc_loc`: Putaway Location details. - `putaway_class`: Putaway class. - `rotation`: SKU rotation policy. - `shelf_life`, `min_shelf_life_on_pick`, `min_shelf_life_on_rec`: Shelf life parameters. - `receipt_hold_code`, `expire_days`, `deliver_by_days`, `best_by_days`: Expiry and delivery codes. - `allow_multi_lot_on_lpn`: Allow multiple lots on license plate number. - `force_separate_lpn_per_lot`: This SKU demands its own container per lot. - `add_who`, `add_when`, `mod_who`, `mod_when`: Audit fields for creation and modification.","properties":{"abc":{"anyOf":[{"$ref":"#/components/schemas/AbcRotationSpeed"},{"type":"null"}]},"active":{"type":["boolean","null"]},"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"allocation_policy_id":{"format":"int64","type":["integer","null"]},"allow_multi_lot_on_lpn":{"type":["boolean","null"]},"barcode_format_id":{"format":"int64","type":["integer","null"]},"best_by_days":{"format":"int32","type":["integer","null"]},"cartonization_policy_id":{"format":"int64","type":["integer","null"]},"class":{"type":["string","null"]},"code":{"type":"string"},"cube":{"format":"double","type":["number","null"]},"default_uom":{"type":["string","null"]},"deliver_by_days":{"format":"int32","type":["integer","null"]},"descr":{"type":"string"},"expire_days":{"format":"int32","type":["integer","null"]},"external_id":{"type":["string","null"]},"force_separate_lpn_per_lot":{"description":"The same prohibition as `allow_multi_lot_on_lpn = false`, asked of the ARRIVING SKU instead of the ones already on the pallet. See [`DEFAULT_FORCE_SEPARATE_LPN_PER_LOT`] for why both exist.","type":["boolean","null"]},"gross_wgt":{"format":"double","type":["number","null"]},"id":{"format":"int64","type":"integer"},"lot_policy_id":{"format":"int64","type":["integer","null"]},"max_age_on_rec":{"format":"int32","type":["integer","null"]},"max_temperature":{"format":"double","type":["number","null"]},"min_shelf_life_on_pick":{"format":"int32","type":["integer","null"]},"min_shelf_life_on_rec":{"format":"int32","type":["integer","null"]},"min_temperature":{"format":"double","type":["number","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"net_wgt":{"format":"double","type":["number","null"]},"on_rec_copy_receipt_number":{"type":["boolean","null"]},"owner_id":{"format":"int64","type":"integer"},"pack_id":{"format":"int64","type":"integer"},"pack_location":{"type":["string","null"]},"pick_instruction":{"description":"Standing pick instruction for this item (wms-app 044): shown on every pick of it and acknowledged before the pick commits (RF `PICKINS`).","type":["string","null"]},"positions_required":{"description":"How many adjacent positions of one section this item occupies. `1` is an ordinary item; more means the whole section must be free and its dimensions are measured together.","format":"int16","type":["integer","null"]},"putaway_class":{"anyOf":[{"$ref":"#/components/schemas/PutawayClass"},{"type":"null"}]},"putaway_loc":{"type":["string","null"]},"putaway_policy_id":{"format":"int64","type":["integer","null"]},"putawayzone":{"type":["string","null"]},"receipt_hold_code":{"type":["string","null"]},"receipt_policy_id":{"format":"int64","type":["integer","null"]},"receipt_qc_loc":{"type":["string","null"]},"replenishment_policy_id":{"format":"int64","type":["integer","null"]},"requires_temperature_capture":{"type":"boolean"},"return_location":{"type":["string","null"]},"rotate_by":{"type":["string","null"]},"rotation":{"anyOf":[{"$ref":"#/components/schemas/SkuRotation"},{"type":"null"}]},"shelf_life":{"format":"int32","type":["integer","null"]},"sku_group":{"type":["string","null"]},"stack_limit":{"description":"How high this item may be stacked, whatever the rack allows. `0` is no opinion; the engine takes the minimum of this and `location.stack_limit`, so an item may lower the rack's limit and never raise it.","format":"int16","type":["integer","null"]},"tare_weight":{"format":"double","type":["number","null"]},"warning_temperature_max":{"format":"double","type":["number","null"]},"warning_temperature_min":{"format":"double","type":["number","null"]}},"required":["add_when","add_who","code","descr","id","mod_when","mod_who","owner_id","pack_id","requires_temperature_capture"],"title":"Sku","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","descr":"<descr>","id":1,"mod_when":"<mod_when>","mod_who":1,"owner_id":1,"pack_id":1,"requires_temperature_capture":false}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_sku_audit":{"post":{"operationId":"get_sku_audit","summary":"Get a sku_audit by ID — CRUD.","description":"Get a sku_audit by ID — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"sku_audit","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_sku_audit"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_sku_audit","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"changed_at":{"type":"string"},"changed_by":{"format":"int64","type":"integer"},"field_name":{"type":"string"},"id":{"format":"int64","type":"integer"},"new_value":{"type":["string","null"]},"old_value":{"type":["string","null"]},"sku_id":{"format":"int64","type":"integer"}},"required":["changed_at","changed_by","field_name","id","sku_id"],"title":"SkuAudit","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"changed_at":"<changed_at>","changed_by":1,"field_name":"<field_name>","id":1,"sku_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_sku_audit":{"post":{"operationId":"list_sku_audit","summary":"List sku_audit — CRUD.","description":"List sku_audit — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"sku_audit","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_sku_audit"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_sku_audit"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/SkuAudit"},"title":"Array_of_SkuAudit","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"changed_at":"<changed_at>","changed_by":1,"field_name":"<field_name>","id":1,"sku_id":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#create_sku_barcode":{"post":{"operationId":"create_sku_barcode","summary":"Attach a barcode to one SKU, deriving owner and SKU code from its id.","description":"Attach a barcode to one SKU, deriving owner and SKU code from its id.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog does not say whether this method needs an idempotency key.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"sku_barcode","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"create_sku_barcode"},"params":{"type":"object","properties":{"data":{"additionalProperties":false,"description":"Public create contract for a barcode. `sku_id` owns identity; the legacy owner/code pair is optional compatibility evidence and must match it.","properties":{"barcode":{"type":"string"},"barcode_type":{"anyOf":[{"$ref":"#/components/schemas/SkuBarcodeType"},{"type":"null"}],"default":null},"default_uom":{"type":"string"},"owner_id":{"default":null,"format":"int64","type":["integer","null"]},"pack_id":{"format":"int64","type":"integer"},"sku_code":{"default":null,"type":["string","null"]},"sku_id":{"format":"int64","type":"integer"},"user_notes1":{"default":null,"type":["string","null"]},"user_notes2":{"default":null,"type":["string","null"]},"vendor_id":{"default":null,"format":"int64","type":["integer","null"]}},"required":["barcode","default_uom","pack_id","sku_id"],"title":"SkuBarcodeCreateApi","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"create_sku_barcode","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"barcode":"<barcode>","default_uom":"<default_uom>","pack_id":1,"sku_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"barcode":{"type":"string"},"barcode_type":{"anyOf":[{"$ref":"#/components/schemas/SkuBarcodeType"},{"type":"null"}]},"default_uom":{"type":"string"},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"owner_id":{"format":"int64","type":"integer"},"pack_id":{"format":"int64","type":"integer"},"sku_code":{"type":"string"},"sku_id":{"format":"int64","type":"integer"},"user_notes1":{"type":["string","null"]},"user_notes2":{"type":["string","null"]},"vendor_id":{"format":"int64","type":["integer","null"]}},"required":["add_when","add_who","barcode","default_uom","id","mod_when","mod_who","owner_id","pack_id","sku_code","sku_id"],"title":"SkuBarcode","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"barcode":"<barcode>","default_uom":"<default_uom>","id":1,"mod_when":"<mod_when>","mod_who":1,"owner_id":1,"pack_id":1,"sku_code":"<sku_code>","sku_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_sku_barcode":{"post":{"operationId":"get_sku_barcode","summary":"Get a sku_barcode by ID — CRUD.","description":"Get a sku_barcode by ID — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"sku_barcode","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_sku_barcode"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_sku_barcode","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"barcode":{"type":"string"},"barcode_type":{"anyOf":[{"$ref":"#/components/schemas/SkuBarcodeType"},{"type":"null"}]},"default_uom":{"type":"string"},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"owner_id":{"format":"int64","type":"integer"},"pack_id":{"format":"int64","type":"integer"},"sku_code":{"type":"string"},"sku_id":{"format":"int64","type":"integer"},"user_notes1":{"type":["string","null"]},"user_notes2":{"type":["string","null"]},"vendor_id":{"format":"int64","type":["integer","null"]}},"required":["add_when","add_who","barcode","default_uom","id","mod_when","mod_who","owner_id","pack_id","sku_code","sku_id"],"title":"SkuBarcode","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"barcode":"<barcode>","default_uom":"<default_uom>","id":1,"mod_when":"<mod_when>","mod_who":1,"owner_id":1,"pack_id":1,"sku_code":"<sku_code>","sku_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_sku_barcode":{"post":{"operationId":"list_sku_barcode","summary":"List sku_barcode — CRUD.","description":"List sku_barcode — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"sku_barcode","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_sku_barcode"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_sku_barcode"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/SkuBarcode"},"title":"Array_of_SkuBarcode","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"barcode":"<barcode>","default_uom":"<default_uom>","id":1,"mod_when":"<mod_when>","mod_who":1,"owner_id":1,"pack_id":1,"sku_code":"<sku_code>","sku_id":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#update_sku_barcode":{"post":{"operationId":"update_sku_barcode","summary":"Update a SKU barcode without re-parenting it to another SKU or owner.","description":"Update a SKU barcode without re-parenting it to another SKU or owner.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"INVALID_DATA","when":"A value breaks a rule."}],"x-quark-module":"sku_barcode","x-quark-operation":"update","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"update_sku_barcode"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"},"data":{"additionalProperties":false,"properties":{"barcode":{"type":"string"},"barcode_type":{"description":"EAN, UPC, GTIN, etc..","enum":["None","Upc","Mni","Rtlin","Epcid","Crn","Gtin"],"title":"SKU Barcode types","type":"string"},"default_uom":{"type":"string"},"pack_id":{"format":"int64","type":"integer"},"user_notes1":{"type":["string","null"]},"user_notes2":{"type":["string","null"]},"vendor_id":{"format":"int64","type":["integer","null"]}},"title":"SkuBarcodeUpdateApi","type":"object"}},"required":["id","data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"update_sku_barcode","params":{"id":1,"data":{"barcode":"<barcode>","barcode_type":"None","default_uom":"<default_uom>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"barcode":{"type":"string"},"barcode_type":{"anyOf":[{"$ref":"#/components/schemas/SkuBarcodeType"},{"type":"null"}]},"default_uom":{"type":"string"},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"owner_id":{"format":"int64","type":"integer"},"pack_id":{"format":"int64","type":"integer"},"sku_code":{"type":"string"},"sku_id":{"format":"int64","type":"integer"},"user_notes1":{"type":["string","null"]},"user_notes2":{"type":["string","null"]},"vendor_id":{"format":"int64","type":["integer","null"]}},"required":["add_when","add_who","barcode","default_uom","id","mod_when","mod_who","owner_id","pack_id","sku_code","sku_id"],"title":"SkuBarcode","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"barcode":"<barcode>","default_uom":"<default_uom>","id":1,"mod_when":"<mod_when>","mod_who":1,"owner_id":1,"pack_id":1,"sku_code":"<sku_code>","sku_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_sku_barcode":{"post":{"operationId":"delete_sku_barcode","summary":"Delete a sku_barcode by ID — CRUD.","description":"Delete a sku_barcode by ID — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"DEPENDENT_DATA_EXIST","when":"Other rows still use this row."}],"x-quark-module":"sku_barcode","x-quark-operation":"delete","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_sku_barcode"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_sku_barcode","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"barcode":{"type":"string"},"barcode_type":{"anyOf":[{"$ref":"#/components/schemas/SkuBarcodeType"},{"type":"null"}]},"default_uom":{"type":"string"},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"owner_id":{"format":"int64","type":"integer"},"pack_id":{"format":"int64","type":"integer"},"sku_code":{"type":"string"},"sku_id":{"format":"int64","type":"integer"},"user_notes1":{"type":["string","null"]},"user_notes2":{"type":["string","null"]},"vendor_id":{"format":"int64","type":["integer","null"]}},"required":["add_when","add_who","barcode","default_uom","id","mod_when","mod_who","owner_id","pack_id","sku_code","sku_id"],"title":"SkuBarcode","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"barcode":"<barcode>","default_uom":"<default_uom>","id":1,"mod_when":"<mod_when>","mod_who":1,"owner_id":1,"pack_id":1,"sku_code":"<sku_code>","sku_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_many_sku_barcode":{"post":{"operationId":"delete_many_sku_barcode","summary":"Delete multiple sku_barcode by IDs — CRUD.","description":"Delete multiple sku_barcode by IDs — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"DEPENDENT_DATA_EXIST","when":"Other rows still use this row."}],"x-quark-module":"sku_barcode","x-quark-operation":"delete","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_many_sku_barcode"},"params":{"type":"object","properties":{"ids":{"items":{"format":"int64","type":"integer"},"type":"array","description":"Record IDs"}},"required":["ids"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_many_sku_barcode","params":{"ids":[1]}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"uint64","minimum":0,"title":"uint64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_sku_barcode":{"post":{"operationId":"count_sku_barcode","summary":"Count sku_barcode — CRUD.","description":"Count sku_barcode — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"sku_barcode","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_sku_barcode"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_sku_barcode"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#create_barcode_format":{"post":{"operationId":"create_barcode_format","summary":"Create a new barcode_format — CRUD.","description":"Create a new barcode_format — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"UNIQUE_VIOLATION or INVALID_DATA","when":"The code already exists, or a value breaks a rule."}],"x-quark-module":"barcode_format","x-quark-operation":"create","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"create_barcode_format"},"params":{"type":"object","properties":{"data":{"properties":{"auto_detect_identifier":{"type":["boolean","null"]},"barcode_identifier":{"type":["string","null"]},"chars_to_trim":{"format":"int32","type":["integer","null"]},"check_digit_algorithm":{"description":"Slice S5 — optional on create; DB default \"None\" when omitted.","type":["string","null"]},"default_ending_delimiter":{"type":["string","null"]},"descr":{"type":"string"},"format_group":{"type":"string"},"name":{"type":"string"},"notes":{"type":["string","null"]},"parsing_rules":{"type":"string"}},"required":["descr","format_group","name","parsing_rules"],"title":"BarcodeFormatForCreate","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"create_barcode_format","params":{"data":{"descr":"<descr>","format_group":"<format_group>","name":"<name>","parsing_rules":"<parsing_rules>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"auto_detect_identifier":{"type":"boolean"},"barcode_identifier":{"type":["string","null"]},"chars_to_trim":{"format":"int32","type":"integer"},"check_digit_algorithm":{"description":"Slice S5 — per-format check-digit algorithm. Stored as TEXT (\"None\" / \"Mod10\" / \"Mod43\") so adding new algorithms doesn't require a column enum migration. The business-logic `CheckDigitAlgorithm::from_str` parses it; unknown values surface as typed errors at validation time.","type":"string"},"default_ending_delimiter":{"type":["string","null"]},"descr":{"type":"string"},"format_group":{"type":"string"},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"name":{"type":"string"},"notes":{"type":["string","null"]},"parsing_rules":{"type":"string"}},"required":["add_when","add_who","auto_detect_identifier","chars_to_trim","check_digit_algorithm","descr","format_group","id","mod_when","mod_who","name","parsing_rules"],"title":"BarcodeFormat","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"auto_detect_identifier":false,"chars_to_trim":1,"check_digit_algorithm":"<check_digit_algorithm>","descr":"<descr>","format_group":"<format_group>","id":1,"mod_when":"<mod_when>","mod_who":1,"name":"<name>","parsing_rules":"<parsing_rules>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_barcode_format":{"post":{"operationId":"get_barcode_format","summary":"Get a barcode_format by ID — CRUD.","description":"Get a barcode_format by ID — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"barcode_format","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_barcode_format"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_barcode_format","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"auto_detect_identifier":{"type":"boolean"},"barcode_identifier":{"type":["string","null"]},"chars_to_trim":{"format":"int32","type":"integer"},"check_digit_algorithm":{"description":"Slice S5 — per-format check-digit algorithm. Stored as TEXT (\"None\" / \"Mod10\" / \"Mod43\") so adding new algorithms doesn't require a column enum migration. The business-logic `CheckDigitAlgorithm::from_str` parses it; unknown values surface as typed errors at validation time.","type":"string"},"default_ending_delimiter":{"type":["string","null"]},"descr":{"type":"string"},"format_group":{"type":"string"},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"name":{"type":"string"},"notes":{"type":["string","null"]},"parsing_rules":{"type":"string"}},"required":["add_when","add_who","auto_detect_identifier","chars_to_trim","check_digit_algorithm","descr","format_group","id","mod_when","mod_who","name","parsing_rules"],"title":"BarcodeFormat","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"auto_detect_identifier":false,"chars_to_trim":1,"check_digit_algorithm":"<check_digit_algorithm>","descr":"<descr>","format_group":"<format_group>","id":1,"mod_when":"<mod_when>","mod_who":1,"name":"<name>","parsing_rules":"<parsing_rules>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_barcode_format":{"post":{"operationId":"list_barcode_format","summary":"List barcode_format — CRUD.","description":"List barcode_format — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"barcode_format","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_barcode_format"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_barcode_format"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/BarcodeFormat"},"title":"Array_of_BarcodeFormat","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"auto_detect_identifier":false,"chars_to_trim":1,"check_digit_algorithm":"<check_digit_algorithm>","descr":"<descr>","format_group":"<format_group>","id":1,"mod_when":"<mod_when>","mod_who":1,"name":"<name>","parsing_rules":"<parsing_rules>"}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#update_barcode_format":{"post":{"operationId":"update_barcode_format","summary":"Update a barcode format with explicit keep, clear and set semantics.","description":"Update a barcode format with explicit keep, clear and set semantics.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"INVALID_DATA","when":"A value breaks a rule."}],"x-quark-module":"barcode_format","x-quark-operation":"update","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"update_barcode_format"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"},"data":{"additionalProperties":false,"properties":{"auto_detect_identifier":{"type":"boolean"},"barcode_identifier":{"type":["string","null"]},"chars_to_trim":{"format":"int32","type":"integer"},"check_digit_algorithm":{"type":"string"},"default_ending_delimiter":{"type":["string","null"]},"descr":{"type":"string"},"format_group":{"type":"string"},"name":{"type":"string"},"notes":{"type":["string","null"]},"parsing_rules":{"type":"string"}},"title":"BarcodeFormatUpdateApi","type":"object"}},"required":["id","data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"update_barcode_format","params":{"id":1,"data":{"auto_detect_identifier":false,"barcode_identifier":"<barcode_identifier>","chars_to_trim":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"auto_detect_identifier":{"type":"boolean"},"barcode_identifier":{"type":["string","null"]},"chars_to_trim":{"format":"int32","type":"integer"},"check_digit_algorithm":{"description":"Slice S5 — per-format check-digit algorithm. Stored as TEXT (\"None\" / \"Mod10\" / \"Mod43\") so adding new algorithms doesn't require a column enum migration. The business-logic `CheckDigitAlgorithm::from_str` parses it; unknown values surface as typed errors at validation time.","type":"string"},"default_ending_delimiter":{"type":["string","null"]},"descr":{"type":"string"},"format_group":{"type":"string"},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"name":{"type":"string"},"notes":{"type":["string","null"]},"parsing_rules":{"type":"string"}},"required":["add_when","add_who","auto_detect_identifier","chars_to_trim","check_digit_algorithm","descr","format_group","id","mod_when","mod_who","name","parsing_rules"],"title":"BarcodeFormat","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"auto_detect_identifier":false,"chars_to_trim":1,"check_digit_algorithm":"<check_digit_algorithm>","descr":"<descr>","format_group":"<format_group>","id":1,"mod_when":"<mod_when>","mod_who":1,"name":"<name>","parsing_rules":"<parsing_rules>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_barcode_format":{"post":{"operationId":"delete_barcode_format","summary":"Delete a barcode_format by ID — CRUD.","description":"Delete a barcode_format by ID — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"DEPENDENT_DATA_EXIST","when":"Other rows still use this row."}],"x-quark-module":"barcode_format","x-quark-operation":"delete","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_barcode_format"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_barcode_format","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"auto_detect_identifier":{"type":"boolean"},"barcode_identifier":{"type":["string","null"]},"chars_to_trim":{"format":"int32","type":"integer"},"check_digit_algorithm":{"description":"Slice S5 — per-format check-digit algorithm. Stored as TEXT (\"None\" / \"Mod10\" / \"Mod43\") so adding new algorithms doesn't require a column enum migration. The business-logic `CheckDigitAlgorithm::from_str` parses it; unknown values surface as typed errors at validation time.","type":"string"},"default_ending_delimiter":{"type":["string","null"]},"descr":{"type":"string"},"format_group":{"type":"string"},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"name":{"type":"string"},"notes":{"type":["string","null"]},"parsing_rules":{"type":"string"}},"required":["add_when","add_who","auto_detect_identifier","chars_to_trim","check_digit_algorithm","descr","format_group","id","mod_when","mod_who","name","parsing_rules"],"title":"BarcodeFormat","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"auto_detect_identifier":false,"chars_to_trim":1,"check_digit_algorithm":"<check_digit_algorithm>","descr":"<descr>","format_group":"<format_group>","id":1,"mod_when":"<mod_when>","mod_who":1,"name":"<name>","parsing_rules":"<parsing_rules>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_many_barcode_format":{"post":{"operationId":"delete_many_barcode_format","summary":"Delete multiple barcode_format by IDs — CRUD.","description":"Delete multiple barcode_format by IDs — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"DEPENDENT_DATA_EXIST","when":"Other rows still use this row."}],"x-quark-module":"barcode_format","x-quark-operation":"delete","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_many_barcode_format"},"params":{"type":"object","properties":{"ids":{"items":{"format":"int64","type":"integer"},"type":"array","description":"Record IDs"}},"required":["ids"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_many_barcode_format","params":{"ids":[1]}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"uint64","minimum":0,"title":"uint64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_barcode_format":{"post":{"operationId":"count_barcode_format","summary":"Count barcode_format — CRUD.","description":"Count barcode_format — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"barcode_format","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_barcode_format"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_barcode_format"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#parse_barcode":{"post":{"operationId":"parse_barcode","summary":"Parse a raw barcode string using a named or ID-referenced format","description":"Parse a raw barcode string using a named or ID-referenced format\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"barcode_format","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"parse_barcode"},"params":{"type":"object","properties":{"format_id":{"format":"int64","type":["integer","null"]},"format_name":{"type":["string","null"]},"raw_barcode":{"type":"string"}},"required":["raw_barcode"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"parse_barcode","params":{"raw_barcode":"<raw_barcode>"}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"fields":{"items":{"$ref":"#/components/schemas/ParsedField"},"type":"array"},"format_name":{"type":"string"}},"required":["fields","format_name"],"title":"ParseBarcodeResult","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"fields":[{"data_element_name":"<data_element_name>","sequence":1,"value":"<value>"}],"format_name":"<format_name>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#create_barcode_format_detail":{"post":{"operationId":"create_barcode_format_detail","summary":"Create a new barcode_format_detail — CRUD.","description":"Create a new barcode_format_detail — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"UNIQUE_VIOLATION or INVALID_DATA","when":"The code already exists, or a value breaks a rule."}],"x-quark-module":"barcode_format_detail","x-quark-operation":"create","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"create_barcode_format_detail"},"params":{"type":"object","properties":{"data":{"properties":{"add_decimal_at_place":{"format":"int32","type":["integer","null"]},"barcode_format_id":{"format":"int64","type":"integer"},"data_app_identifier":{"type":["string","null"]},"data_element_name":{"type":["string","null"]},"data_group_name":{"type":["string","null"]},"data_length":{"format":"int32","type":["integer","null"]},"data_length_type":{"type":["string","null"]},"date_field_format":{"type":["string","null"]},"delimiter_after":{"type":["string","null"]},"delimiter_before":{"type":["string","null"]},"lot_policy_id":{"format":"int64","type":["integer","null"]},"prefix_trim_number":{"format":"int32","type":["integer","null"]},"repeats_until_end":{"type":["boolean","null"]},"sequence":{"format":"int32","type":["integer","null"]},"start_position":{"format":"int32","type":["integer","null"]},"stop_position":{"format":"int32","type":["integer","null"]},"suffix_trim_number":{"format":"int32","type":["integer","null"]},"validation":{"type":["string","null"]}},"required":["barcode_format_id"],"title":"BarcodeFormatDetailForCreate","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"create_barcode_format_detail","params":{"data":{"barcode_format_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_decimal_at_place":{"format":"int32","type":"integer"},"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"barcode_format_id":{"format":"int64","type":"integer"},"data_app_identifier":{"type":["string","null"]},"data_element_name":{"type":["string","null"]},"data_group_name":{"type":["string","null"]},"data_length":{"format":"int32","type":["integer","null"]},"data_length_type":{"type":["string","null"]},"date_field_format":{"type":["string","null"]},"delimiter_after":{"type":["string","null"]},"delimiter_before":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"lot_policy_id":{"format":"int64","type":["integer","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"prefix_trim_number":{"format":"int32","type":"integer"},"repeats_until_end":{"type":"boolean"},"sequence":{"format":"int32","type":"integer"},"start_position":{"format":"int32","type":"integer"},"stop_position":{"format":"int32","type":"integer"},"suffix_trim_number":{"format":"int32","type":"integer"},"validation":{"type":["string","null"]}},"required":["add_decimal_at_place","add_when","add_who","barcode_format_id","id","mod_when","mod_who","prefix_trim_number","repeats_until_end","sequence","start_position","stop_position","suffix_trim_number"],"title":"BarcodeFormatDetail","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_decimal_at_place":1,"add_when":"<add_when>","add_who":1,"barcode_format_id":1,"id":1,"mod_when":"<mod_when>","mod_who":1,"prefix_trim_number":1,"repeats_until_end":false,"sequence":1,"start_position":1,"stop_position":1,"suffix_trim_number":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_barcode_format_detail":{"post":{"operationId":"get_barcode_format_detail","summary":"Get a barcode_format_detail by ID — CRUD.","description":"Get a barcode_format_detail by ID — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"barcode_format_detail","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_barcode_format_detail"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_barcode_format_detail","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_decimal_at_place":{"format":"int32","type":"integer"},"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"barcode_format_id":{"format":"int64","type":"integer"},"data_app_identifier":{"type":["string","null"]},"data_element_name":{"type":["string","null"]},"data_group_name":{"type":["string","null"]},"data_length":{"format":"int32","type":["integer","null"]},"data_length_type":{"type":["string","null"]},"date_field_format":{"type":["string","null"]},"delimiter_after":{"type":["string","null"]},"delimiter_before":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"lot_policy_id":{"format":"int64","type":["integer","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"prefix_trim_number":{"format":"int32","type":"integer"},"repeats_until_end":{"type":"boolean"},"sequence":{"format":"int32","type":"integer"},"start_position":{"format":"int32","type":"integer"},"stop_position":{"format":"int32","type":"integer"},"suffix_trim_number":{"format":"int32","type":"integer"},"validation":{"type":["string","null"]}},"required":["add_decimal_at_place","add_when","add_who","barcode_format_id","id","mod_when","mod_who","prefix_trim_number","repeats_until_end","sequence","start_position","stop_position","suffix_trim_number"],"title":"BarcodeFormatDetail","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_decimal_at_place":1,"add_when":"<add_when>","add_who":1,"barcode_format_id":1,"id":1,"mod_when":"<mod_when>","mod_who":1,"prefix_trim_number":1,"repeats_until_end":false,"sequence":1,"start_position":1,"stop_position":1,"suffix_trim_number":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_barcode_format_detail":{"post":{"operationId":"list_barcode_format_detail","summary":"List barcode_format_detail — CRUD.","description":"List barcode_format_detail — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"barcode_format_detail","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_barcode_format_detail"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_barcode_format_detail"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/BarcodeFormatDetail"},"title":"Array_of_BarcodeFormatDetail","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_decimal_at_place":1,"add_when":"<add_when>","add_who":1,"barcode_format_id":1,"id":1,"mod_when":"<mod_when>","mod_who":1,"prefix_trim_number":1,"repeats_until_end":false,"sequence":1,"start_position":1,"stop_position":1,"suffix_trim_number":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#update_barcode_format_detail":{"post":{"operationId":"update_barcode_format_detail","summary":"Update a barcode format detail with explicit keep, clear and set semantics.","description":"Update a barcode format detail with explicit keep, clear and set semantics.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"INVALID_DATA","when":"A value breaks a rule."}],"x-quark-module":"barcode_format_detail","x-quark-operation":"update","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"update_barcode_format_detail"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"},"data":{"additionalProperties":false,"properties":{"add_decimal_at_place":{"format":"int32","type":"integer"},"data_app_identifier":{"type":["string","null"]},"data_element_name":{"type":["string","null"]},"data_group_name":{"type":["string","null"]},"data_length":{"format":"int32","type":["integer","null"]},"data_length_type":{"type":["string","null"]},"date_field_format":{"type":["string","null"]},"delimiter_after":{"type":["string","null"]},"delimiter_before":{"type":["string","null"]},"lot_policy_id":{"format":"int64","type":["integer","null"]},"prefix_trim_number":{"format":"int32","type":"integer"},"repeats_until_end":{"type":"boolean"},"sequence":{"format":"int32","type":"integer"},"start_position":{"format":"int32","type":"integer"},"stop_position":{"format":"int32","type":"integer"},"suffix_trim_number":{"format":"int32","type":"integer"},"validation":{"type":["string","null"]}},"title":"BarcodeFormatDetailUpdateApi","type":"object"}},"required":["id","data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"update_barcode_format_detail","params":{"id":1,"data":{"add_decimal_at_place":1,"data_app_identifier":"<data_app_identifier>","data_element_name":"<data_element_name>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_decimal_at_place":{"format":"int32","type":"integer"},"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"barcode_format_id":{"format":"int64","type":"integer"},"data_app_identifier":{"type":["string","null"]},"data_element_name":{"type":["string","null"]},"data_group_name":{"type":["string","null"]},"data_length":{"format":"int32","type":["integer","null"]},"data_length_type":{"type":["string","null"]},"date_field_format":{"type":["string","null"]},"delimiter_after":{"type":["string","null"]},"delimiter_before":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"lot_policy_id":{"format":"int64","type":["integer","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"prefix_trim_number":{"format":"int32","type":"integer"},"repeats_until_end":{"type":"boolean"},"sequence":{"format":"int32","type":"integer"},"start_position":{"format":"int32","type":"integer"},"stop_position":{"format":"int32","type":"integer"},"suffix_trim_number":{"format":"int32","type":"integer"},"validation":{"type":["string","null"]}},"required":["add_decimal_at_place","add_when","add_who","barcode_format_id","id","mod_when","mod_who","prefix_trim_number","repeats_until_end","sequence","start_position","stop_position","suffix_trim_number"],"title":"BarcodeFormatDetail","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_decimal_at_place":1,"add_when":"<add_when>","add_who":1,"barcode_format_id":1,"id":1,"mod_when":"<mod_when>","mod_who":1,"prefix_trim_number":1,"repeats_until_end":false,"sequence":1,"start_position":1,"stop_position":1,"suffix_trim_number":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_barcode_format_detail":{"post":{"operationId":"delete_barcode_format_detail","summary":"Delete a barcode_format_detail by ID — CRUD.","description":"Delete a barcode_format_detail by ID — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"DEPENDENT_DATA_EXIST","when":"Other rows still use this row."}],"x-quark-module":"barcode_format_detail","x-quark-operation":"delete","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_barcode_format_detail"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_barcode_format_detail","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_decimal_at_place":{"format":"int32","type":"integer"},"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"barcode_format_id":{"format":"int64","type":"integer"},"data_app_identifier":{"type":["string","null"]},"data_element_name":{"type":["string","null"]},"data_group_name":{"type":["string","null"]},"data_length":{"format":"int32","type":["integer","null"]},"data_length_type":{"type":["string","null"]},"date_field_format":{"type":["string","null"]},"delimiter_after":{"type":["string","null"]},"delimiter_before":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"lot_policy_id":{"format":"int64","type":["integer","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"prefix_trim_number":{"format":"int32","type":"integer"},"repeats_until_end":{"type":"boolean"},"sequence":{"format":"int32","type":"integer"},"start_position":{"format":"int32","type":"integer"},"stop_position":{"format":"int32","type":"integer"},"suffix_trim_number":{"format":"int32","type":"integer"},"validation":{"type":["string","null"]}},"required":["add_decimal_at_place","add_when","add_who","barcode_format_id","id","mod_when","mod_who","prefix_trim_number","repeats_until_end","sequence","start_position","stop_position","suffix_trim_number"],"title":"BarcodeFormatDetail","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_decimal_at_place":1,"add_when":"<add_when>","add_who":1,"barcode_format_id":1,"id":1,"mod_when":"<mod_when>","mod_who":1,"prefix_trim_number":1,"repeats_until_end":false,"sequence":1,"start_position":1,"stop_position":1,"suffix_trim_number":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_many_barcode_format_detail":{"post":{"operationId":"delete_many_barcode_format_detail","summary":"Delete multiple barcode_format_detail by IDs — CRUD.","description":"Delete multiple barcode_format_detail by IDs — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"DEPENDENT_DATA_EXIST","when":"Other rows still use this row."}],"x-quark-module":"barcode_format_detail","x-quark-operation":"delete","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_many_barcode_format_detail"},"params":{"type":"object","properties":{"ids":{"items":{"format":"int64","type":"integer"},"type":"array","description":"Record IDs"}},"required":["ids"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_many_barcode_format_detail","params":{"ids":[1]}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"uint64","minimum":0,"title":"uint64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_barcode_format_detail":{"post":{"operationId":"count_barcode_format_detail","summary":"Count barcode_format_detail — CRUD.","description":"Count barcode_format_detail — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"barcode_format_detail","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_barcode_format_detail"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_barcode_format_detail"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#next_barcode_format_detail_sequence":{"post":{"operationId":"next_barcode_format_detail_sequence","summary":"Get next sequence value for a barcode format detail","description":"Get next sequence value for a barcode format detail\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"barcode_format_detail","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"next_barcode_format_detail_sequence"},"params":{"type":"object","properties":{"barcode_format_id":{"format":"int64","type":"integer"}},"required":["barcode_format_id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"next_barcode_format_detail_sequence","params":{"barcode_format_id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int32","title":"int32","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#generate_check_digit":{"post":{"operationId":"generate_check_digit","summary":"Compute check digit for a location code","description":"Compute check digit for a location code\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"check_digit","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"generate_check_digit"},"params":{"type":"object","properties":{"location_code":{"type":"string"}},"required":["location_code"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"generate_check_digit","params":{"location_code":"<location_code>"}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"check_digit":{"type":"string"}},"required":["check_digit"],"title":"CheckDigitResult","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"check_digit":"<check_digit>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_next_key":{"post":{"operationId":"get_next_key","summary":"Get next global or scoped counter value","description":"Get next global or scoped counter value\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["master_data"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"key","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_next_key"},"params":{"type":"object","properties":{"counter_name":{"type":"string"},"scope":{"default":null,"description":"Optional partition key. Global counters omit it; child sequences use the saved parent's stable identity (for example a receipt id).","type":["string","null"]},"size":{"default":null,"description":"Output width. Existing callers omit it and retain the ten-digit format.","format":"uint","minimum":0,"type":["integer","null"]}},"required":["counter_name"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_next_key","params":{"counter_name":"<counter_name>"}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"title":"String","type":"string"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":"<result>"}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_lot_policy":{"post":{"operationId":"get_lot_policy","summary":"Get a lot_policy by ID — CRUD.","description":"Get a lot_policy by ID — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"lot_policy","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_lot_policy"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_lot_policy","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"descr":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"label_best_by_date":{"type":["string","null"]},"label_delivery_by_date":{"type":["string","null"]},"label_expiration_date":{"type":["string","null"]},"label_manufactured_date":{"type":["string","null"]},"lot_creation":{"allOf":[{"$ref":"#/components/schemas/LotCreationPolicy"}],"description":"КОГДА рождается новая партия (миграция 351).\n\nЭто единственное место, где такое решение записано. До 351 его не принимал никто: партия бралась по совпадению атрибутов, и совпадение молча означало «это тот же товар из того же прихода»."},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"required_best_by_date":{"type":"boolean"},"required_delivery_by_date":{"type":"boolean"},"required_expiration_date":{"type":"boolean"},"required_manufactured_date":{"type":"boolean"},"show_best_by_date":{"type":"boolean"},"show_delivery_by_date":{"type":"boolean"},"show_expiration_date":{"type":"boolean"},"show_manufactured_date":{"type":"boolean"},"show_on_pick_best_by_date":{"type":"boolean"},"show_on_pick_delivery_by_date":{"type":"boolean"},"show_on_pick_expiration_date":{"type":"boolean"},"show_on_pick_manufactured_date":{"description":"Shown on the pick card (spec 2026-10-04 §8). Only a date captured on receipt can be shown: `chk_lot_policy_pick_dates_need_receipt`.","type":"boolean"},"verification_best_by_date":{"$ref":"#/components/schemas/LotPhysicalVerification"},"verification_delivery_by_date":{"$ref":"#/components/schemas/LotPhysicalVerification"},"verification_expiration_date":{"$ref":"#/components/schemas/LotPhysicalVerification"},"verification_manufactured_date":{"allOf":[{"$ref":"#/components/schemas/LotPhysicalVerification"}],"description":"How the operator can check the date on the goods. Anything but `NotVerifiable` needs the date shown on pick: `chk_lot_policy_verified_dates_are_shown`."},"version":{"format":"int32","type":"integer"}},"required":["add_when","add_who","code","id","lot_creation","mod_when","mod_who","required_best_by_date","required_delivery_by_date","required_expiration_date","required_manufactured_date","show_best_by_date","show_delivery_by_date","show_expiration_date","show_manufactured_date","show_on_pick_best_by_date","show_on_pick_delivery_by_date","show_on_pick_expiration_date","show_on_pick_manufactured_date","verification_best_by_date","verification_delivery_by_date","verification_expiration_date","verification_manufactured_date","version"],"title":"LotPolicy","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","id":1,"lot_creation":{},"mod_when":"<mod_when>","mod_who":1,"required_best_by_date":false,"required_delivery_by_date":false,"required_expiration_date":false,"required_manufactured_date":false,"show_best_by_date":false,"show_delivery_by_date":false,"show_expiration_date":false,"show_manufactured_date":false,"show_on_pick_best_by_date":false,"show_on_pick_delivery_by_date":false,"show_on_pick_expiration_date":false,"show_on_pick_manufactured_date":false,"verification_best_by_date":"NotVerifiable","verification_delivery_by_date":"NotVerifiable","verification_expiration_date":"NotVerifiable","verification_manufactured_date":{},"version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_lot_policy":{"post":{"operationId":"list_lot_policy","summary":"List lot_policy — CRUD.","description":"List lot_policy — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"lot_policy","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_lot_policy"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_lot_policy"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/LotPolicy"},"title":"Array_of_LotPolicy","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"code":"<code>","id":1,"lot_creation":{},"mod_when":"<mod_when>","mod_who":1,"required_best_by_date":false,"required_delivery_by_date":false,"required_expiration_date":false,"required_manufactured_date":false,"show_best_by_date":false,"show_delivery_by_date":false,"show_expiration_date":false,"show_manufactured_date":false,"show_on_pick_best_by_date":false,"show_on_pick_delivery_by_date":false,"show_on_pick_expiration_date":false,"show_on_pick_manufactured_date":false,"verification_best_by_date":"NotVerifiable","verification_delivery_by_date":"NotVerifiable","verification_expiration_date":"NotVerifiable","verification_manufactured_date":{},"version":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_lot_policy":{"post":{"operationId":"delete_lot_policy","summary":"Delete an unreferenced lot policy and all of its owned attributes.","description":"Delete an unreferenced lot policy and all of its owned attributes.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog does not say whether this method needs an idempotency key.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"lot_policy","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_lot_policy"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_lot_policy","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"descr":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"label_best_by_date":{"type":["string","null"]},"label_delivery_by_date":{"type":["string","null"]},"label_expiration_date":{"type":["string","null"]},"label_manufactured_date":{"type":["string","null"]},"lot_creation":{"allOf":[{"$ref":"#/components/schemas/LotCreationPolicy"}],"description":"КОГДА рождается новая партия (миграция 351).\n\nЭто единственное место, где такое решение записано. До 351 его не принимал никто: партия бралась по совпадению атрибутов, и совпадение молча означало «это тот же товар из того же прихода»."},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"required_best_by_date":{"type":"boolean"},"required_delivery_by_date":{"type":"boolean"},"required_expiration_date":{"type":"boolean"},"required_manufactured_date":{"type":"boolean"},"show_best_by_date":{"type":"boolean"},"show_delivery_by_date":{"type":"boolean"},"show_expiration_date":{"type":"boolean"},"show_manufactured_date":{"type":"boolean"},"show_on_pick_best_by_date":{"type":"boolean"},"show_on_pick_delivery_by_date":{"type":"boolean"},"show_on_pick_expiration_date":{"type":"boolean"},"show_on_pick_manufactured_date":{"description":"Shown on the pick card (spec 2026-10-04 §8). Only a date captured on receipt can be shown: `chk_lot_policy_pick_dates_need_receipt`.","type":"boolean"},"verification_best_by_date":{"$ref":"#/components/schemas/LotPhysicalVerification"},"verification_delivery_by_date":{"$ref":"#/components/schemas/LotPhysicalVerification"},"verification_expiration_date":{"$ref":"#/components/schemas/LotPhysicalVerification"},"verification_manufactured_date":{"allOf":[{"$ref":"#/components/schemas/LotPhysicalVerification"}],"description":"How the operator can check the date on the goods. Anything but `NotVerifiable` needs the date shown on pick: `chk_lot_policy_verified_dates_are_shown`."},"version":{"format":"int32","type":"integer"}},"required":["add_when","add_who","code","id","lot_creation","mod_when","mod_who","required_best_by_date","required_delivery_by_date","required_expiration_date","required_manufactured_date","show_best_by_date","show_delivery_by_date","show_expiration_date","show_manufactured_date","show_on_pick_best_by_date","show_on_pick_delivery_by_date","show_on_pick_expiration_date","show_on_pick_manufactured_date","verification_best_by_date","verification_delivery_by_date","verification_expiration_date","verification_manufactured_date","version"],"title":"LotPolicy","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","id":1,"lot_creation":{},"mod_when":"<mod_when>","mod_who":1,"required_best_by_date":false,"required_delivery_by_date":false,"required_expiration_date":false,"required_manufactured_date":false,"show_best_by_date":false,"show_delivery_by_date":false,"show_expiration_date":false,"show_manufactured_date":false,"show_on_pick_best_by_date":false,"show_on_pick_delivery_by_date":false,"show_on_pick_expiration_date":false,"show_on_pick_manufactured_date":false,"verification_best_by_date":"NotVerifiable","verification_delivery_by_date":"NotVerifiable","verification_expiration_date":"NotVerifiable","verification_manufactured_date":{},"version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_many_lot_policy":{"post":{"operationId":"delete_many_lot_policy","summary":"Delete unreferenced lot policies and all of their owned attributes.","description":"Delete unreferenced lot policies and all of their owned attributes.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog does not say whether this method needs an idempotency key.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"lot_policy","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_many_lot_policy"},"params":{"type":"object","properties":{"ids":{"items":{"format":"int64","type":"integer"},"type":"array","description":"Record IDs"}},"required":["ids"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_many_lot_policy","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"ids":[1]}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"uint64","minimum":0,"title":"uint64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_lot_policy":{"post":{"operationId":"count_lot_policy","summary":"Count lot_policy — CRUD.","description":"Count lot_policy — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"lot_policy","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_lot_policy"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_lot_policy"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_lot_policy_attribute":{"post":{"operationId":"get_lot_policy_attribute","summary":"Get a lot_policy_attribute by ID — CRUD.","description":"Get a lot_policy_attribute by ID — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"lot_policy","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_lot_policy_attribute"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_lot_policy_attribute","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"attrib_code":{"type":"string"},"descr":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"label":{"type":["string","null"]},"lot_policy_id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"override_allowed":{"description":"Phase 1 (migration 083). Per Decisions Log D-27.","type":"boolean"},"physical_verification":{"allOf":[{"$ref":"#/components/schemas/LotPhysicalVerification"}],"description":"How the operator can check the value on the goods. Anything but `NotVerifiable` needs `show_on_pick`: `chk_lot_policy_attribute_verified_is_shown`."},"required":{"type":"boolean"},"show":{"type":"boolean"},"show_on_pick":{"description":"Shown on the pick card (spec 2026-10-04 §8). Needs `show`: `chk_lot_policy_attribute_pick_needs_receipt`.","type":"boolean"}},"required":["add_when","add_who","attrib_code","id","lot_policy_id","mod_when","mod_who","override_allowed","physical_verification","required","show","show_on_pick"],"title":"LotPolicyAttribute","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"attrib_code":"<attrib_code>","id":1,"lot_policy_id":1,"mod_when":"<mod_when>","mod_who":1,"override_allowed":false,"physical_verification":{},"required":false,"show":false,"show_on_pick":false}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_lot_policy_attribute":{"post":{"operationId":"list_lot_policy_attribute","summary":"List lot_policy_attribute — CRUD.","description":"List lot_policy_attribute — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"lot_policy","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_lot_policy_attribute"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_lot_policy_attribute"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/LotPolicyAttribute"},"title":"Array_of_LotPolicyAttribute","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"attrib_code":"<attrib_code>","id":1,"lot_policy_id":1,"mod_when":"<mod_when>","mod_who":1,"override_allowed":false,"physical_verification":{},"required":false,"show":false,"show_on_pick":false}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_lot_policy_attribute":{"post":{"operationId":"count_lot_policy_attribute","summary":"Count lot_policy_attribute — CRUD.","description":"Count lot_policy_attribute — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"lot_policy","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_lot_policy_attribute"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_lot_policy_attribute"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#lot_policy_config_view":{"post":{"operationId":"lot_policy_config_view","summary":"Read a lot policy and all of its custom attributes as one configuration.","description":"Read a lot policy and all of its custom attributes as one configuration.\n\n**Category:** `query`. Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":true,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"lot_policy","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"lot_policy_config_view"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"lot_policy_config_view","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"attributes":{"items":{"$ref":"#/components/schemas/LotPolicyAttribute"},"type":"array"},"policy":{"$ref":"#/components/schemas/LotPolicy"}},"required":["attributes","policy"],"title":"LotPolicyAggregateView","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"attributes":[{"add_when":"<add_when>","add_who":1,"attrib_code":"<attrib_code>","id":1,"lot_policy_id":1,"mod_when":"<mod_when>","mod_who":1,"override_allowed":false,"physical_verification":{},"required":false,"show":false,"show_on_pick":false}],"policy":{"add_when":"<add_when>","add_who":1,"code":"<code>","id":1,"lot_creation":{},"mod_when":"<mod_when>","mod_who":1,"required_best_by_date":false,"required_delivery_by_date":false,"required_expiration_date":false,"required_manufactured_date":false,"show_best_by_date":false,"show_delivery_by_date":false,"show_expiration_date":false,"show_manufactured_date":false,"show_on_pick_best_by_date":false,"show_on_pick_delivery_by_date":false,"show_on_pick_expiration_date":false,"show_on_pick_manufactured_date":false,"verification_best_by_date":"NotVerifiable","verification_delivery_by_date":"NotVerifiable","verification_expiration_date":"NotVerifiable","verification_manufactured_date":{},"version":1}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#lot_policy_config_template":{"post":{"operationId":"lot_policy_config_template","summary":"The draft a new lot policy starts from.","description":"The draft a new lot policy starts from.\n\n**Category:** `query`. Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":true,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"lot_policy","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"lot_policy_config_template"},"params":{"type":"object","properties":{"data":{"additionalProperties":false,"description":"Nothing: a new-lot policy template depends on no argument.","title":"LotPolicyConfigTemplateInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"lot_policy_config_template","params":{"data":{}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"items":{"$ref":"#/components/schemas/LotPolicyAttributeDraft"},"type":"array"},"policy":{"$ref":"#/components/schemas/LotPolicyRootDraft"}},"required":["attributes","policy"],"title":"LotPolicyAggregateDraft","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"attributes":[{"attrib_code":"<attrib_code>","override_allowed":false,"required":false,"show":false}],"policy":{"lot_creation":"Existing","required_best_by_date":false,"required_delivery_by_date":false,"required_expiration_date":false,"required_manufactured_date":false,"show_best_by_date":false,"show_delivery_by_date":false,"show_expiration_date":false,"show_manufactured_date":false}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_lot_policy_attribute_form":{"post":{"operationId":"get_lot_policy_attribute_form","summary":"Get one lot-policy attribute with its aggregate version.","description":"Get one lot-policy attribute with its aggregate version.\n\n**Category:** `query`. Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":true,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"lot_policy","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_lot_policy_attribute_form"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_lot_policy_attribute_form","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"attrib_code":{"type":"string"},"descr":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"label":{"type":["string","null"]},"lot_policy_id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"override_allowed":{"description":"Phase 1 (migration 083). Per Decisions Log D-27.","type":"boolean"},"physical_verification":{"allOf":[{"$ref":"#/components/schemas/LotPhysicalVerification"}],"description":"How the operator can check the value on the goods. Anything but `NotVerifiable` needs `show_on_pick`: `chk_lot_policy_attribute_verified_is_shown`."},"required":{"type":"boolean"},"show":{"type":"boolean"},"show_on_pick":{"description":"Shown on the pick card (spec 2026-10-04 §8). Needs `show`: `chk_lot_policy_attribute_pick_needs_receipt`.","type":"boolean"},"version":{"description":"Version of the aggregate root read with this attribute.","format":"int32","type":"integer"}},"required":["add_when","add_who","attrib_code","id","lot_policy_id","mod_when","mod_who","override_allowed","physical_verification","required","show","show_on_pick","version"],"title":"LotPolicyAttributeFormView","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"attrib_code":"<attrib_code>","id":1,"lot_policy_id":1,"mod_when":"<mod_when>","mod_who":1,"override_allowed":false,"physical_verification":{},"required":false,"show":false,"show_on_pick":false,"version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#lot_policy_config_create":{"post":{"operationId":"lot_policy_config_create","summary":"Create a complete lot-policy configuration atomically.","description":"Create a complete lot-policy configuration atomically.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog does not say whether this method needs an idempotency key.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"lot_policy","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"lot_policy_config_create"},"params":{"type":"object","properties":{"data":{"additionalProperties":false,"properties":{"code":{"type":"string"},"data":{"$ref":"#/components/schemas/LotPolicyAggregateDraft"}},"required":["code","data"],"title":"LotPolicyAggregateForCreate","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"lot_policy_config_create","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"code":"<code>","data":{"attributes":[{"attrib_code":"<attrib_code>","override_allowed":false,"required":false,"show":false}],"policy":{"lot_creation":null,"required_best_by_date":false,"required_delivery_by_date":false,"required_expiration_date":false,"required_manufactured_date":false,"show_best_by_date":false,"show_delivery_by_date":false,"show_expiration_date":false,"show_manufactured_date":false}}}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"attributes":{"items":{"$ref":"#/components/schemas/LotPolicyAttribute"},"type":"array"},"policy":{"$ref":"#/components/schemas/LotPolicy"}},"required":["attributes","policy"],"title":"LotPolicyAggregateView","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"attributes":[{"add_when":"<add_when>","add_who":1,"attrib_code":"<attrib_code>","id":1,"lot_policy_id":1,"mod_when":"<mod_when>","mod_who":1,"override_allowed":false,"physical_verification":{},"required":false,"show":false,"show_on_pick":false}],"policy":{"add_when":"<add_when>","add_who":1,"code":"<code>","id":1,"lot_creation":{},"mod_when":"<mod_when>","mod_who":1,"required_best_by_date":false,"required_delivery_by_date":false,"required_expiration_date":false,"required_manufactured_date":false,"show_best_by_date":false,"show_delivery_by_date":false,"show_expiration_date":false,"show_manufactured_date":false,"show_on_pick_best_by_date":false,"show_on_pick_delivery_by_date":false,"show_on_pick_expiration_date":false,"show_on_pick_manufactured_date":false,"verification_best_by_date":"NotVerifiable","verification_delivery_by_date":"NotVerifiable","verification_expiration_date":"NotVerifiable","verification_manufactured_date":{},"version":1}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#lot_policy_config_save":{"post":{"operationId":"lot_policy_config_save","summary":"Save a complete lot-policy configuration without overwriting a newer edit.","description":"Save a complete lot-policy configuration without overwriting a newer edit.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n**Versioned entities:** lot_policy (id in data.id, version in data.expected_version).\n\n\n**Notes**\n\n- The catalog does not say whether this method needs an idempotency key.\n- Send the current version of the row in `expected_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[{"entity":"lot_policy","id_field":"id","version_field":"expected_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"lot_policy","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"lot_policy_config_save"},"params":{"type":"object","properties":{"meta":{"type":"object","description":"Control-plane envelope supplied by the platform."},"data":{"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"items":{"$ref":"#/components/schemas/LotPolicyAttributeDraft"},"type":"array"},"policy":{"$ref":"#/components/schemas/LotPolicyRootDraft"}},"required":["attributes","policy"],"title":"LotPolicyAggregateDraft","type":"object"},"expected_version":{"format":"int32","type":"integer"},"id":{"format":"int64","type":"integer"}},"required":["id","expected_version","data"],"type":"object","description":"Versioned update payload."}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"lot_policy_config_save","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"id":1,"expected_version":1,"data":{"attributes":[{"attrib_code":"<attrib_code>","override_allowed":false,"required":false,"show":false}],"policy":{"lot_creation":"Existing","required_best_by_date":false,"required_delivery_by_date":false,"required_expiration_date":false,"required_manufactured_date":false,"show_best_by_date":false,"show_delivery_by_date":false,"show_expiration_date":false,"show_manufactured_date":false}}}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"attributes":{"items":{"$ref":"#/components/schemas/LotPolicyAttribute"},"type":"array"},"policy":{"$ref":"#/components/schemas/LotPolicy"}},"required":["attributes","policy"],"title":"LotPolicyAggregateView","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"attributes":[{"add_when":"<add_when>","add_who":1,"attrib_code":"<attrib_code>","id":1,"lot_policy_id":1,"mod_when":"<mod_when>","mod_who":1,"override_allowed":false,"physical_verification":{},"required":false,"show":false,"show_on_pick":false}],"policy":{"add_when":"<add_when>","add_who":1,"code":"<code>","id":1,"lot_creation":{},"mod_when":"<mod_when>","mod_who":1,"required_best_by_date":false,"required_delivery_by_date":false,"required_expiration_date":false,"required_manufactured_date":false,"show_best_by_date":false,"show_delivery_by_date":false,"show_expiration_date":false,"show_manufactured_date":false,"show_on_pick_best_by_date":false,"show_on_pick_delivery_by_date":false,"show_on_pick_expiration_date":false,"show_on_pick_manufactured_date":false,"verification_best_by_date":"NotVerifiable","verification_delivery_by_date":"NotVerifiable","verification_expiration_date":"NotVerifiable","verification_manufactured_date":{},"version":1}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#create_lot_policy_form":{"post":{"operationId":"create_lot_policy_form","summary":"Create a lot policy from the metadata form.","description":"Create a lot policy from the metadata form.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog does not say whether this method needs an idempotency key.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"lot_policy","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"create_lot_policy_form"},"params":{"type":"object","properties":{"data":{"properties":{"code":{"type":"string"},"descr":{"type":["string","null"]},"label_best_by_date":{"type":["string","null"]},"label_delivery_by_date":{"type":["string","null"]},"label_expiration_date":{"type":["string","null"]},"label_manufactured_date":{"type":["string","null"]},"lot_creation":{"anyOf":[{"$ref":"#/components/schemas/LotCreationPolicy"},{"type":"null"}]},"required_best_by_date":{"type":["boolean","null"]},"required_delivery_by_date":{"type":["boolean","null"]},"required_expiration_date":{"type":["boolean","null"]},"required_manufactured_date":{"type":["boolean","null"]},"show_best_by_date":{"type":["boolean","null"]},"show_delivery_by_date":{"type":["boolean","null"]},"show_expiration_date":{"type":["boolean","null"]},"show_manufactured_date":{"type":["boolean","null"]},"show_on_pick_best_by_date":{"type":["boolean","null"]},"show_on_pick_delivery_by_date":{"type":["boolean","null"]},"show_on_pick_expiration_date":{"type":["boolean","null"]},"show_on_pick_manufactured_date":{"type":["boolean","null"]},"verification_best_by_date":{"anyOf":[{"$ref":"#/components/schemas/LotPhysicalVerification"},{"type":"null"}]},"verification_delivery_by_date":{"anyOf":[{"$ref":"#/components/schemas/LotPhysicalVerification"},{"type":"null"}]},"verification_expiration_date":{"anyOf":[{"$ref":"#/components/schemas/LotPhysicalVerification"},{"type":"null"}]},"verification_manufactured_date":{"anyOf":[{"$ref":"#/components/schemas/LotPhysicalVerification"},{"type":"null"}]}},"required":["code"],"title":"LotPolicyForCreate","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"create_lot_policy_form","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"code":"<code>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"descr":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"label_best_by_date":{"type":["string","null"]},"label_delivery_by_date":{"type":["string","null"]},"label_expiration_date":{"type":["string","null"]},"label_manufactured_date":{"type":["string","null"]},"lot_creation":{"allOf":[{"$ref":"#/components/schemas/LotCreationPolicy"}],"description":"КОГДА рождается новая партия (миграция 351).\n\nЭто единственное место, где такое решение записано. До 351 его не принимал никто: партия бралась по совпадению атрибутов, и совпадение молча означало «это тот же товар из того же прихода»."},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"required_best_by_date":{"type":"boolean"},"required_delivery_by_date":{"type":"boolean"},"required_expiration_date":{"type":"boolean"},"required_manufactured_date":{"type":"boolean"},"show_best_by_date":{"type":"boolean"},"show_delivery_by_date":{"type":"boolean"},"show_expiration_date":{"type":"boolean"},"show_manufactured_date":{"type":"boolean"},"show_on_pick_best_by_date":{"type":"boolean"},"show_on_pick_delivery_by_date":{"type":"boolean"},"show_on_pick_expiration_date":{"type":"boolean"},"show_on_pick_manufactured_date":{"description":"Shown on the pick card (spec 2026-10-04 §8). Only a date captured on receipt can be shown: `chk_lot_policy_pick_dates_need_receipt`.","type":"boolean"},"verification_best_by_date":{"$ref":"#/components/schemas/LotPhysicalVerification"},"verification_delivery_by_date":{"$ref":"#/components/schemas/LotPhysicalVerification"},"verification_expiration_date":{"$ref":"#/components/schemas/LotPhysicalVerification"},"verification_manufactured_date":{"allOf":[{"$ref":"#/components/schemas/LotPhysicalVerification"}],"description":"How the operator can check the date on the goods. Anything but `NotVerifiable` needs the date shown on pick: `chk_lot_policy_verified_dates_are_shown`."},"version":{"format":"int32","type":"integer"}},"required":["add_when","add_who","code","id","lot_creation","mod_when","mod_who","required_best_by_date","required_delivery_by_date","required_expiration_date","required_manufactured_date","show_best_by_date","show_delivery_by_date","show_expiration_date","show_manufactured_date","show_on_pick_best_by_date","show_on_pick_delivery_by_date","show_on_pick_expiration_date","show_on_pick_manufactured_date","verification_best_by_date","verification_delivery_by_date","verification_expiration_date","verification_manufactured_date","version"],"title":"LotPolicy","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","id":1,"lot_creation":{},"mod_when":"<mod_when>","mod_who":1,"required_best_by_date":false,"required_delivery_by_date":false,"required_expiration_date":false,"required_manufactured_date":false,"show_best_by_date":false,"show_delivery_by_date":false,"show_expiration_date":false,"show_manufactured_date":false,"show_on_pick_best_by_date":false,"show_on_pick_delivery_by_date":false,"show_on_pick_expiration_date":false,"show_on_pick_manufactured_date":false,"verification_best_by_date":"NotVerifiable","verification_delivery_by_date":"NotVerifiable","verification_expiration_date":"NotVerifiable","verification_manufactured_date":{},"version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#update_lot_policy_form":{"post":{"operationId":"update_lot_policy_form","summary":"Update lot-policy settings from the metadata form.","description":"Update lot-policy settings from the metadata form.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n**Versioned entities:** lot_policy (id in data.id, version in data.expected_version).\n\n\n**Notes**\n\n- The catalog does not say whether this method needs an idempotency key.\n- Send the current version of the row in `expected_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[{"entity":"lot_policy","id_field":"id","version_field":"expected_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"lot_policy","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"update_lot_policy_form"},"params":{"type":"object","properties":{"meta":{"type":"object","description":"Control-plane envelope supplied by the platform."},"data":{"properties":{"data":{"properties":{"descr":{"type":["string","null"]},"label_best_by_date":{"type":["string","null"]},"label_delivery_by_date":{"type":["string","null"]},"label_expiration_date":{"type":["string","null"]},"label_manufactured_date":{"type":["string","null"]},"lot_creation":{"anyOf":[{"$ref":"#/components/schemas/LotCreationPolicy"},{"type":"null"}]},"required_best_by_date":{"type":["boolean","null"]},"required_delivery_by_date":{"type":["boolean","null"]},"required_expiration_date":{"type":["boolean","null"]},"required_manufactured_date":{"type":["boolean","null"]},"show_best_by_date":{"type":["boolean","null"]},"show_delivery_by_date":{"type":["boolean","null"]},"show_expiration_date":{"type":["boolean","null"]},"show_manufactured_date":{"type":["boolean","null"]},"show_on_pick_best_by_date":{"type":["boolean","null"]},"show_on_pick_delivery_by_date":{"type":["boolean","null"]},"show_on_pick_expiration_date":{"type":["boolean","null"]},"show_on_pick_manufactured_date":{"type":["boolean","null"]},"verification_best_by_date":{"anyOf":[{"$ref":"#/components/schemas/LotPhysicalVerification"},{"type":"null"}]},"verification_delivery_by_date":{"anyOf":[{"$ref":"#/components/schemas/LotPhysicalVerification"},{"type":"null"}]},"verification_expiration_date":{"anyOf":[{"$ref":"#/components/schemas/LotPhysicalVerification"},{"type":"null"}]},"verification_manufactured_date":{"anyOf":[{"$ref":"#/components/schemas/LotPhysicalVerification"},{"type":"null"}]}},"title":"LotPolicyForUpdate","type":"object"},"expected_version":{"format":"int32","type":"integer"},"id":{"format":"int64","type":"integer"}},"required":["id","expected_version","data"],"type":"object","description":"Versioned update payload."}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"update_lot_policy_form","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"id":1,"expected_version":1,"data":{"descr":"<descr>","label_best_by_date":"<label_best_by_date>","label_delivery_by_date":"<label_delivery_by_date>"}}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"descr":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"label_best_by_date":{"type":["string","null"]},"label_delivery_by_date":{"type":["string","null"]},"label_expiration_date":{"type":["string","null"]},"label_manufactured_date":{"type":["string","null"]},"lot_creation":{"allOf":[{"$ref":"#/components/schemas/LotCreationPolicy"}],"description":"КОГДА рождается новая партия (миграция 351).\n\nЭто единственное место, где такое решение записано. До 351 его не принимал никто: партия бралась по совпадению атрибутов, и совпадение молча означало «это тот же товар из того же прихода»."},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"required_best_by_date":{"type":"boolean"},"required_delivery_by_date":{"type":"boolean"},"required_expiration_date":{"type":"boolean"},"required_manufactured_date":{"type":"boolean"},"show_best_by_date":{"type":"boolean"},"show_delivery_by_date":{"type":"boolean"},"show_expiration_date":{"type":"boolean"},"show_manufactured_date":{"type":"boolean"},"show_on_pick_best_by_date":{"type":"boolean"},"show_on_pick_delivery_by_date":{"type":"boolean"},"show_on_pick_expiration_date":{"type":"boolean"},"show_on_pick_manufactured_date":{"description":"Shown on the pick card (spec 2026-10-04 §8). Only a date captured on receipt can be shown: `chk_lot_policy_pick_dates_need_receipt`.","type":"boolean"},"verification_best_by_date":{"$ref":"#/components/schemas/LotPhysicalVerification"},"verification_delivery_by_date":{"$ref":"#/components/schemas/LotPhysicalVerification"},"verification_expiration_date":{"$ref":"#/components/schemas/LotPhysicalVerification"},"verification_manufactured_date":{"allOf":[{"$ref":"#/components/schemas/LotPhysicalVerification"}],"description":"How the operator can check the date on the goods. Anything but `NotVerifiable` needs the date shown on pick: `chk_lot_policy_verified_dates_are_shown`."},"version":{"format":"int32","type":"integer"}},"required":["add_when","add_who","code","id","lot_creation","mod_when","mod_who","required_best_by_date","required_delivery_by_date","required_expiration_date","required_manufactured_date","show_best_by_date","show_delivery_by_date","show_expiration_date","show_manufactured_date","show_on_pick_best_by_date","show_on_pick_delivery_by_date","show_on_pick_expiration_date","show_on_pick_manufactured_date","verification_best_by_date","verification_delivery_by_date","verification_expiration_date","verification_manufactured_date","version"],"title":"LotPolicy","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","id":1,"lot_creation":{},"mod_when":"<mod_when>","mod_who":1,"required_best_by_date":false,"required_delivery_by_date":false,"required_expiration_date":false,"required_manufactured_date":false,"show_best_by_date":false,"show_delivery_by_date":false,"show_expiration_date":false,"show_manufactured_date":false,"show_on_pick_best_by_date":false,"show_on_pick_delivery_by_date":false,"show_on_pick_expiration_date":false,"show_on_pick_manufactured_date":false,"verification_best_by_date":"NotVerifiable","verification_delivery_by_date":"NotVerifiable","verification_expiration_date":"NotVerifiable","verification_manufactured_date":{},"version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#create_lot_policy_attribute_form":{"post":{"operationId":"create_lot_policy_attribute_form","summary":"Add one custom attribute through the metadata form.","description":"Add one custom attribute through the metadata form.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog does not say whether this method needs an idempotency key.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"lot_policy","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"create_lot_policy_attribute_form"},"params":{"type":"object","properties":{"data":{"properties":{"attrib_code":{"type":"string"},"descr":{"type":["string","null"]},"label":{"type":["string","null"]},"lot_policy_id":{"format":"int64","type":"integer"},"override_allowed":{"type":"boolean"},"physical_verification":{"$ref":"#/components/schemas/LotPhysicalVerification"},"required":{"type":"boolean"},"show":{"type":"boolean"},"show_on_pick":{"type":"boolean"}},"required":["attrib_code","lot_policy_id","override_allowed","physical_verification","required","show","show_on_pick"],"title":"LotPolicyAttributesForCreate","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"create_lot_policy_attribute_form","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"attrib_code":"<attrib_code>","lot_policy_id":1,"override_allowed":false,"physical_verification":"NotVerifiable","required":false,"show":false,"show_on_pick":false}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"attrib_code":{"type":"string"},"descr":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"label":{"type":["string","null"]},"lot_policy_id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"override_allowed":{"description":"Phase 1 (migration 083). Per Decisions Log D-27.","type":"boolean"},"physical_verification":{"allOf":[{"$ref":"#/components/schemas/LotPhysicalVerification"}],"description":"How the operator can check the value on the goods. Anything but `NotVerifiable` needs `show_on_pick`: `chk_lot_policy_attribute_verified_is_shown`."},"required":{"type":"boolean"},"show":{"type":"boolean"},"show_on_pick":{"description":"Shown on the pick card (spec 2026-10-04 §8). Needs `show`: `chk_lot_policy_attribute_pick_needs_receipt`.","type":"boolean"},"version":{"description":"Version of the aggregate root read with this attribute.","format":"int32","type":"integer"}},"required":["add_when","add_who","attrib_code","id","lot_policy_id","mod_when","mod_who","override_allowed","physical_verification","required","show","show_on_pick","version"],"title":"LotPolicyAttributeFormView","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"attrib_code":"<attrib_code>","id":1,"lot_policy_id":1,"mod_when":"<mod_when>","mod_who":1,"override_allowed":false,"physical_verification":{},"required":false,"show":false,"show_on_pick":false,"version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#update_lot_policy_attribute_form":{"post":{"operationId":"update_lot_policy_attribute_form","summary":"Update one custom lot-policy attribute through the metadata form.","description":"Update one custom lot-policy attribute through the metadata form.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n**Versioned entities:** lot_policy (id in data.id, version in data.expected_version).\n\n\n**Notes**\n\n- The catalog does not say whether this method needs an idempotency key.\n- Send the current version of the row in `expected_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[{"entity":"lot_policy","id_field":"id","version_field":"expected_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"lot_policy","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"update_lot_policy_attribute_form"},"params":{"type":"object","properties":{"meta":{"type":"object","description":"Control-plane envelope supplied by the platform."},"data":{"properties":{"data":{"properties":{"attrib_code":{"type":["string","null"]},"descr":{"type":["string","null"]},"label":{"type":["string","null"]},"override_allowed":{"type":["boolean","null"]},"physical_verification":{"anyOf":[{"$ref":"#/components/schemas/LotPhysicalVerification"},{"type":"null"}]},"required":{"type":["boolean","null"]},"show":{"type":["boolean","null"]},"show_on_pick":{"type":["boolean","null"]}},"title":"LotPolicyAttributesForUpdate","type":"object"},"expected_version":{"format":"int32","type":"integer"},"id":{"format":"int64","type":"integer"}},"required":["id","expected_version","data"],"type":"object","description":"Versioned update payload."}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"update_lot_policy_attribute_form","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"id":1,"expected_version":1,"data":{"attrib_code":"<attrib_code>","descr":"<descr>","label":"<label>"}}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"attrib_code":{"type":"string"},"descr":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"label":{"type":["string","null"]},"lot_policy_id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"override_allowed":{"description":"Phase 1 (migration 083). Per Decisions Log D-27.","type":"boolean"},"physical_verification":{"allOf":[{"$ref":"#/components/schemas/LotPhysicalVerification"}],"description":"How the operator can check the value on the goods. Anything but `NotVerifiable` needs `show_on_pick`: `chk_lot_policy_attribute_verified_is_shown`."},"required":{"type":"boolean"},"show":{"type":"boolean"},"show_on_pick":{"description":"Shown on the pick card (spec 2026-10-04 §8). Needs `show`: `chk_lot_policy_attribute_pick_needs_receipt`.","type":"boolean"},"version":{"description":"Version of the aggregate root read with this attribute.","format":"int32","type":"integer"}},"required":["add_when","add_who","attrib_code","id","lot_policy_id","mod_when","mod_who","override_allowed","physical_verification","required","show","show_on_pick","version"],"title":"LotPolicyAttributeFormView","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"attrib_code":"<attrib_code>","id":1,"lot_policy_id":1,"mod_when":"<mod_when>","mod_who":1,"override_allowed":false,"physical_verification":{},"required":false,"show":false,"show_on_pick":false,"version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_lot_policy_attribute_form":{"post":{"operationId":"delete_lot_policy_attribute_form","summary":"Delete one custom attribute through the metadata form.","description":"Delete one custom attribute through the metadata form.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog does not say whether this method needs an idempotency key.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"lot_policy","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_lot_policy_attribute_form"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_lot_policy_attribute_form","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"attrib_code":{"type":"string"},"descr":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"label":{"type":["string","null"]},"lot_policy_id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"override_allowed":{"description":"Phase 1 (migration 083). Per Decisions Log D-27.","type":"boolean"},"physical_verification":{"allOf":[{"$ref":"#/components/schemas/LotPhysicalVerification"}],"description":"How the operator can check the value on the goods. Anything but `NotVerifiable` needs `show_on_pick`: `chk_lot_policy_attribute_verified_is_shown`."},"required":{"type":"boolean"},"show":{"type":"boolean"},"show_on_pick":{"description":"Shown on the pick card (spec 2026-10-04 §8). Needs `show`: `chk_lot_policy_attribute_pick_needs_receipt`.","type":"boolean"}},"required":["add_when","add_who","attrib_code","id","lot_policy_id","mod_when","mod_who","override_allowed","physical_verification","required","show","show_on_pick"],"title":"LotPolicyAttribute","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"attrib_code":"<attrib_code>","id":1,"lot_policy_id":1,"mod_when":"<mod_when>","mod_who":1,"override_allowed":false,"physical_verification":{},"required":false,"show":false,"show_on_pick":false}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_many_lot_policy_attribute_form":{"post":{"operationId":"delete_many_lot_policy_attribute_form","summary":"Delete selected custom attributes through the metadata list.","description":"Delete selected custom attributes through the metadata list.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog does not say whether this method needs an idempotency key.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"lot_policy","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_many_lot_policy_attribute_form"},"params":{"type":"object","properties":{"ids":{"items":{"format":"int64","type":"integer"},"type":"array","description":"Record IDs"}},"required":["ids"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_many_lot_policy_attribute_form","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"ids":[1]}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"uint64","minimum":0,"title":"uint64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#create_receipt_policy":{"post":{"operationId":"create_receipt_policy","summary":"Create a complete receipt-policy configuration.","description":"Create a complete receipt-policy configuration.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog does not say whether this method needs an idempotency key.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"receipt_policy","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"create_receipt_policy"},"params":{"type":"object","properties":{"data":{"additionalProperties":false,"properties":{"asn_po_qty_discrepancy":{"$ref":"#/components/schemas/AllowError"},"code":{"type":"string"},"date_deviation_check":{"anyOf":[{"$ref":"#/components/schemas/AllowError"},{"type":"null"}]},"descr":{"type":["string","null"]},"excess_error":{"type":["boolean","null"]},"excess_error_percent":{"format":"int32","type":["integer","null"]},"excess_message":{"type":["boolean","null"]},"excess_override":{"type":["boolean","null"]},"excess_override_percent":{"format":"int32","type":["integer","null"]},"no_sku_on_asn":{"$ref":"#/components/schemas/AllowError"},"no_sku_on_po":{"$ref":"#/components/schemas/AllowError"},"po_excess_error":{"type":["boolean","null"]},"po_excess_error_percent":{"format":"int32","type":["integer","null"]},"po_excess_message":{"type":["boolean","null"]},"po_excess_override":{"type":["boolean","null"]},"po_excess_override_percent":{"format":"int32","type":["integer","null"]},"po_qty_validation":{"type":["string","null"]},"po_shortage_message":{"type":["boolean","null"]},"po_shortage_override":{"type":["boolean","null"]},"po_shortage_override_percent":{"format":"int32","type":["integer","null"]},"qty_pack_multiple_check":{"anyOf":[{"$ref":"#/components/schemas/AllowError"},{"type":"null"}]},"qty_validation":{"type":["string","null"]},"receipt_without_asn":{"$ref":"#/components/schemas/AllowError"},"receipt_without_lpn":{"$ref":"#/components/schemas/AllowError"},"receipt_without_po":{"$ref":"#/components/schemas/AllowError"},"shortage_message":{"type":["boolean","null"]},"shortage_override":{"type":["boolean","null"]},"shortage_override_percent":{"format":"int32","type":["integer","null"]}},"required":["asn_po_qty_discrepancy","code","no_sku_on_asn","no_sku_on_po","receipt_without_asn","receipt_without_lpn","receipt_without_po"],"title":"ReceiptPolicyForCreate","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"create_receipt_policy","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"asn_po_qty_discrepancy":"Allow","code":"<code>","no_sku_on_asn":"Allow","no_sku_on_po":"Allow","receipt_without_asn":"Allow","receipt_without_lpn":"Allow","receipt_without_po":"Allow"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"asn_po_qty_discrepancy":{"$ref":"#/components/schemas/AllowError"},"code":{"type":"string"},"date_deviation_check":{"$ref":"#/components/schemas/AllowError"},"descr":{"type":["string","null"]},"excess_error":{"type":"boolean"},"excess_error_percent":{"format":"int32","type":["integer","null"]},"excess_message":{"type":"boolean"},"excess_override":{"type":"boolean"},"excess_override_percent":{"format":"int32","type":["integer","null"]},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"no_sku_on_asn":{"$ref":"#/components/schemas/AllowError"},"no_sku_on_po":{"$ref":"#/components/schemas/AllowError"},"po_excess_error":{"type":"boolean"},"po_excess_error_percent":{"format":"int32","type":["integer","null"]},"po_excess_message":{"type":"boolean"},"po_excess_override":{"type":"boolean"},"po_excess_override_percent":{"format":"int32","type":["integer","null"]},"po_qty_validation":{"type":"string"},"po_shortage_message":{"type":"boolean"},"po_shortage_override":{"type":"boolean"},"po_shortage_override_percent":{"format":"int32","type":["integer","null"]},"qty_pack_multiple_check":{"$ref":"#/components/schemas/AllowError"},"qty_validation":{"type":"string"},"receipt_without_asn":{"$ref":"#/components/schemas/AllowError"},"receipt_without_lpn":{"$ref":"#/components/schemas/AllowError"},"receipt_without_po":{"$ref":"#/components/schemas/AllowError"},"shortage_message":{"type":"boolean"},"shortage_override":{"type":"boolean"},"shortage_override_percent":{"format":"int32","type":["integer","null"]},"version":{"format":"int32","type":"integer"}},"required":["add_when","add_who","asn_po_qty_discrepancy","code","date_deviation_check","excess_error","excess_message","excess_override","id","mod_when","mod_who","no_sku_on_asn","no_sku_on_po","po_excess_error","po_excess_message","po_excess_override","po_qty_validation","po_shortage_message","po_shortage_override","qty_pack_multiple_check","qty_validation","receipt_without_asn","receipt_without_lpn","receipt_without_po","shortage_message","shortage_override","version"],"title":"ReceiptPolicy","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"asn_po_qty_discrepancy":"Allow","code":"<code>","date_deviation_check":"Allow","excess_error":false,"excess_message":false,"excess_override":false,"id":1,"mod_when":"<mod_when>","mod_who":1,"no_sku_on_asn":"Allow","no_sku_on_po":"Allow","po_excess_error":false,"po_excess_message":false,"po_excess_override":false,"po_qty_validation":"<po_qty_validation>","po_shortage_message":false,"po_shortage_override":false,"qty_pack_multiple_check":"Allow","qty_validation":"<qty_validation>","receipt_without_asn":"Allow","receipt_without_lpn":"Allow","receipt_without_po":"Allow","shortage_message":false,"shortage_override":false,"version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_receipt_policy":{"post":{"operationId":"get_receipt_policy","summary":"Get a receipt_policy by ID — CRUD.","description":"Get a receipt_policy by ID — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"receipt_policy","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_receipt_policy"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_receipt_policy","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"asn_po_qty_discrepancy":{"$ref":"#/components/schemas/AllowError"},"code":{"type":"string"},"date_deviation_check":{"$ref":"#/components/schemas/AllowError"},"descr":{"type":["string","null"]},"excess_error":{"type":"boolean"},"excess_error_percent":{"format":"int32","type":["integer","null"]},"excess_message":{"type":"boolean"},"excess_override":{"type":"boolean"},"excess_override_percent":{"format":"int32","type":["integer","null"]},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"no_sku_on_asn":{"$ref":"#/components/schemas/AllowError"},"no_sku_on_po":{"$ref":"#/components/schemas/AllowError"},"po_excess_error":{"type":"boolean"},"po_excess_error_percent":{"format":"int32","type":["integer","null"]},"po_excess_message":{"type":"boolean"},"po_excess_override":{"type":"boolean"},"po_excess_override_percent":{"format":"int32","type":["integer","null"]},"po_qty_validation":{"type":"string"},"po_shortage_message":{"type":"boolean"},"po_shortage_override":{"type":"boolean"},"po_shortage_override_percent":{"format":"int32","type":["integer","null"]},"qty_pack_multiple_check":{"$ref":"#/components/schemas/AllowError"},"qty_validation":{"type":"string"},"receipt_without_asn":{"$ref":"#/components/schemas/AllowError"},"receipt_without_lpn":{"$ref":"#/components/schemas/AllowError"},"receipt_without_po":{"$ref":"#/components/schemas/AllowError"},"shortage_message":{"type":"boolean"},"shortage_override":{"type":"boolean"},"shortage_override_percent":{"format":"int32","type":["integer","null"]},"version":{"format":"int32","type":"integer"}},"required":["add_when","add_who","asn_po_qty_discrepancy","code","date_deviation_check","excess_error","excess_message","excess_override","id","mod_when","mod_who","no_sku_on_asn","no_sku_on_po","po_excess_error","po_excess_message","po_excess_override","po_qty_validation","po_shortage_message","po_shortage_override","qty_pack_multiple_check","qty_validation","receipt_without_asn","receipt_without_lpn","receipt_without_po","shortage_message","shortage_override","version"],"title":"ReceiptPolicy","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"asn_po_qty_discrepancy":"Allow","code":"<code>","date_deviation_check":"Allow","excess_error":false,"excess_message":false,"excess_override":false,"id":1,"mod_when":"<mod_when>","mod_who":1,"no_sku_on_asn":"Allow","no_sku_on_po":"Allow","po_excess_error":false,"po_excess_message":false,"po_excess_override":false,"po_qty_validation":"<po_qty_validation>","po_shortage_message":false,"po_shortage_override":false,"qty_pack_multiple_check":"Allow","qty_validation":"<qty_validation>","receipt_without_asn":"Allow","receipt_without_lpn":"Allow","receipt_without_po":"Allow","shortage_message":false,"shortage_override":false,"version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_receipt_policy":{"post":{"operationId":"list_receipt_policy","summary":"List receipt_policy — CRUD.","description":"List receipt_policy — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"receipt_policy","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_receipt_policy"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_receipt_policy"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/ReceiptPolicy"},"title":"Array_of_ReceiptPolicy","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"asn_po_qty_discrepancy":"Allow","code":"<code>","date_deviation_check":"Allow","excess_error":false,"excess_message":false,"excess_override":false,"id":1,"mod_when":"<mod_when>","mod_who":1,"no_sku_on_asn":"Allow","no_sku_on_po":"Allow","po_excess_error":false,"po_excess_message":false,"po_excess_override":false,"po_qty_validation":"<po_qty_validation>","po_shortage_message":false,"po_shortage_override":false,"qty_pack_multiple_check":"Allow","qty_validation":"<qty_validation>","receipt_without_asn":"Allow","receipt_without_lpn":"Allow","receipt_without_po":"Allow","shortage_message":false,"shortage_override":false,"version":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#update_receipt_policy":{"post":{"operationId":"update_receipt_policy","summary":"Update a receipt policy without overwriting a newer configuration.","description":"Update a receipt policy without overwriting a newer configuration.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n**Versioned entities:** receipt_policy (id in data.id, version in data.expected_version).\n\n\n**Notes**\n\n- The catalog does not say whether this method needs an idempotency key.\n- Send the current version of the row in `expected_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[{"entity":"receipt_policy","id_field":"id","version_field":"expected_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"receipt_policy","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"update_receipt_policy"},"params":{"type":"object","properties":{"meta":{"type":"object","description":"Control-plane envelope supplied by the platform."},"data":{"properties":{"data":{"additionalProperties":false,"description":"Partial edit of the receipt-policy configuration.\n\n`code` is deliberately absent because it identifies the policy. Nullable text and percentages keep omitted/clear/set distinct; every other field rejects JSON null.","properties":{"asn_po_qty_discrepancy":{"enum":["Allow","HardError","Warning"],"type":"string"},"date_deviation_check":{"enum":["Allow","HardError","Warning"],"type":"string"},"descr":{"type":["string","null"]},"excess_error":{"type":"boolean"},"excess_error_percent":{"format":"int32","type":["integer","null"]},"excess_message":{"type":"boolean"},"excess_override":{"type":"boolean"},"excess_override_percent":{"format":"int32","type":["integer","null"]},"no_sku_on_asn":{"enum":["Allow","HardError","Warning"],"type":"string"},"no_sku_on_po":{"enum":["Allow","HardError","Warning"],"type":"string"},"po_excess_error":{"type":"boolean"},"po_excess_error_percent":{"format":"int32","type":["integer","null"]},"po_excess_message":{"type":"boolean"},"po_excess_override":{"type":"boolean"},"po_excess_override_percent":{"format":"int32","type":["integer","null"]},"po_qty_validation":{"type":"string"},"po_shortage_message":{"type":"boolean"},"po_shortage_override":{"type":"boolean"},"po_shortage_override_percent":{"format":"int32","type":["integer","null"]},"qty_pack_multiple_check":{"enum":["Allow","HardError","Warning"],"type":"string"},"qty_validation":{"type":"string"},"receipt_without_asn":{"enum":["Allow","HardError","Warning"],"type":"string"},"receipt_without_lpn":{"enum":["Allow","HardError","Warning"],"type":"string"},"receipt_without_po":{"enum":["Allow","HardError","Warning"],"type":"string"},"shortage_message":{"type":"boolean"},"shortage_override":{"type":"boolean"},"shortage_override_percent":{"format":"int32","type":["integer","null"]}},"title":"ReceiptPolicyConfigUpdate","type":"object"},"expected_version":{"format":"int32","type":"integer"},"id":{"format":"int64","type":"integer"}},"required":["id","expected_version","data"],"type":"object","description":"Versioned update payload."}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"update_receipt_policy","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"id":1,"expected_version":1,"data":{"asn_po_qty_discrepancy":"Allow","date_deviation_check":"Allow","descr":"<descr>"}}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"asn_po_qty_discrepancy":{"$ref":"#/components/schemas/AllowError"},"code":{"type":"string"},"date_deviation_check":{"$ref":"#/components/schemas/AllowError"},"descr":{"type":["string","null"]},"excess_error":{"type":"boolean"},"excess_error_percent":{"format":"int32","type":["integer","null"]},"excess_message":{"type":"boolean"},"excess_override":{"type":"boolean"},"excess_override_percent":{"format":"int32","type":["integer","null"]},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"no_sku_on_asn":{"$ref":"#/components/schemas/AllowError"},"no_sku_on_po":{"$ref":"#/components/schemas/AllowError"},"po_excess_error":{"type":"boolean"},"po_excess_error_percent":{"format":"int32","type":["integer","null"]},"po_excess_message":{"type":"boolean"},"po_excess_override":{"type":"boolean"},"po_excess_override_percent":{"format":"int32","type":["integer","null"]},"po_qty_validation":{"type":"string"},"po_shortage_message":{"type":"boolean"},"po_shortage_override":{"type":"boolean"},"po_shortage_override_percent":{"format":"int32","type":["integer","null"]},"qty_pack_multiple_check":{"$ref":"#/components/schemas/AllowError"},"qty_validation":{"type":"string"},"receipt_without_asn":{"$ref":"#/components/schemas/AllowError"},"receipt_without_lpn":{"$ref":"#/components/schemas/AllowError"},"receipt_without_po":{"$ref":"#/components/schemas/AllowError"},"shortage_message":{"type":"boolean"},"shortage_override":{"type":"boolean"},"shortage_override_percent":{"format":"int32","type":["integer","null"]},"version":{"format":"int32","type":"integer"}},"required":["add_when","add_who","asn_po_qty_discrepancy","code","date_deviation_check","excess_error","excess_message","excess_override","id","mod_when","mod_who","no_sku_on_asn","no_sku_on_po","po_excess_error","po_excess_message","po_excess_override","po_qty_validation","po_shortage_message","po_shortage_override","qty_pack_multiple_check","qty_validation","receipt_without_asn","receipt_without_lpn","receipt_without_po","shortage_message","shortage_override","version"],"title":"ReceiptPolicy","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"asn_po_qty_discrepancy":"Allow","code":"<code>","date_deviation_check":"Allow","excess_error":false,"excess_message":false,"excess_override":false,"id":1,"mod_when":"<mod_when>","mod_who":1,"no_sku_on_asn":"Allow","no_sku_on_po":"Allow","po_excess_error":false,"po_excess_message":false,"po_excess_override":false,"po_qty_validation":"<po_qty_validation>","po_shortage_message":false,"po_shortage_override":false,"qty_pack_multiple_check":"Allow","qty_validation":"<qty_validation>","receipt_without_asn":"Allow","receipt_without_lpn":"Allow","receipt_without_po":"Allow","shortage_message":false,"shortage_override":false,"version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_receipt_policy":{"post":{"operationId":"delete_receipt_policy","summary":"Delete an unreferenced receipt-policy configuration.","description":"Delete an unreferenced receipt-policy configuration.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog does not say whether this method needs an idempotency key.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"receipt_policy","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_receipt_policy"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_receipt_policy","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"asn_po_qty_discrepancy":{"$ref":"#/components/schemas/AllowError"},"code":{"type":"string"},"date_deviation_check":{"$ref":"#/components/schemas/AllowError"},"descr":{"type":["string","null"]},"excess_error":{"type":"boolean"},"excess_error_percent":{"format":"int32","type":["integer","null"]},"excess_message":{"type":"boolean"},"excess_override":{"type":"boolean"},"excess_override_percent":{"format":"int32","type":["integer","null"]},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"no_sku_on_asn":{"$ref":"#/components/schemas/AllowError"},"no_sku_on_po":{"$ref":"#/components/schemas/AllowError"},"po_excess_error":{"type":"boolean"},"po_excess_error_percent":{"format":"int32","type":["integer","null"]},"po_excess_message":{"type":"boolean"},"po_excess_override":{"type":"boolean"},"po_excess_override_percent":{"format":"int32","type":["integer","null"]},"po_qty_validation":{"type":"string"},"po_shortage_message":{"type":"boolean"},"po_shortage_override":{"type":"boolean"},"po_shortage_override_percent":{"format":"int32","type":["integer","null"]},"qty_pack_multiple_check":{"$ref":"#/components/schemas/AllowError"},"qty_validation":{"type":"string"},"receipt_without_asn":{"$ref":"#/components/schemas/AllowError"},"receipt_without_lpn":{"$ref":"#/components/schemas/AllowError"},"receipt_without_po":{"$ref":"#/components/schemas/AllowError"},"shortage_message":{"type":"boolean"},"shortage_override":{"type":"boolean"},"shortage_override_percent":{"format":"int32","type":["integer","null"]},"version":{"format":"int32","type":"integer"}},"required":["add_when","add_who","asn_po_qty_discrepancy","code","date_deviation_check","excess_error","excess_message","excess_override","id","mod_when","mod_who","no_sku_on_asn","no_sku_on_po","po_excess_error","po_excess_message","po_excess_override","po_qty_validation","po_shortage_message","po_shortage_override","qty_pack_multiple_check","qty_validation","receipt_without_asn","receipt_without_lpn","receipt_without_po","shortage_message","shortage_override","version"],"title":"ReceiptPolicy","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"asn_po_qty_discrepancy":"Allow","code":"<code>","date_deviation_check":"Allow","excess_error":false,"excess_message":false,"excess_override":false,"id":1,"mod_when":"<mod_when>","mod_who":1,"no_sku_on_asn":"Allow","no_sku_on_po":"Allow","po_excess_error":false,"po_excess_message":false,"po_excess_override":false,"po_qty_validation":"<po_qty_validation>","po_shortage_message":false,"po_shortage_override":false,"qty_pack_multiple_check":"Allow","qty_validation":"<qty_validation>","receipt_without_asn":"Allow","receipt_without_lpn":"Allow","receipt_without_po":"Allow","shortage_message":false,"shortage_override":false,"version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_many_receipt_policy":{"post":{"operationId":"delete_many_receipt_policy","summary":"Delete unreferenced receipt-policy configurations.","description":"Delete unreferenced receipt-policy configurations.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog does not say whether this method needs an idempotency key.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"receipt_policy","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_many_receipt_policy"},"params":{"type":"object","properties":{"ids":{"items":{"format":"int64","type":"integer"},"type":"array","description":"Record IDs"}},"required":["ids"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_many_receipt_policy","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"ids":[1]}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"uint64","minimum":0,"title":"uint64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_receipt_policy":{"post":{"operationId":"count_receipt_policy","summary":"Count receipt_policy — CRUD.","description":"Count receipt_policy — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"receipt_policy","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_receipt_policy"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_receipt_policy"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#create_receipt":{"post":{"operationId":"create_receipt","summary":"Create a new receipt — CRUD.","description":"Create a new receipt — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"receipt","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"create_receipt"},"params":{"type":"object","properties":{"data":{"properties":{"actual_ship_date":{"default":null,"type":["string","null"]},"arrival_date":{"default":null,"type":["string","null"]},"carrier_id":{"format":"int64","type":["integer","null"]},"close_date":{"default":null,"type":["string","null"]},"door":{"type":["string","null"]},"driver_name":{"type":["string","null"]},"effective_date":{"default":null,"type":["string","null"]},"expected_receipt_date":{"default":null,"type":["string","null"]},"external_receipt_number":{"type":["string","null"]},"inventory_tracking_granularity":{"anyOf":[{"$ref":"#/components/schemas/InventoryTrackingGranularity"},{"type":"null"}],"description":"ADR-046 D-69b — set by `CreateCaseLevelAsn` from the cascade (ASN payload || operator UI || owner_config default || `Aggregate`). NULL here means \"let the SQL DEFAULT 'Aggregate' apply\"."},"owner_id":{"format":"int64","type":"integer"},"planned_ship_date":{"default":null,"type":["string","null"]},"po_id":{"format":"int64","type":["integer","null"]},"promised_ship_date":{"default":null,"type":["string","null"]},"receipt_date":{"default":null,"type":["string","null"]},"receipt_number":{"type":"string"},"receipt_type":{"anyOf":[{"$ref":"#/components/schemas/ReceiptType"},{"type":"null"}]},"rma":{"type":["string","null"]},"scheduled_ship_date":{"default":null,"type":["string","null"]},"status":{"anyOf":[{"$ref":"#/components/schemas/ReceiptStatus"},{"type":"null"}]},"supplier_id":{"format":"int64","type":["integer","null"]},"temperature":{"format":"double","type":["number","null"]},"total_volume":{"format":"double","type":["number","null"]},"total_weight":{"format":"double","type":["number","null"]},"trailer_plate":{"type":["string","null"]},"trailer_type":{"type":["string","null"]},"unplanned_case_on_asn":{"anyOf":[{"$ref":"#/components/schemas/AllowError"},{"type":"null"}],"description":"ADR-046 OQ-03 — set by `CreateCaseLevelAsn` from the cascade when granularity != Aggregate. Hard-error at the command layer when granularity != Aggregate AND value remains None."},"vehicle_date":{"default":null,"type":["string","null"]},"vehicle_plate":{"type":["string","null"]}},"required":["owner_id","receipt_number"],"title":"ReceiptForCreate","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"create_receipt","params":{"data":{"owner_id":1,"receipt_number":"<receipt_number>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"## 'RMA' Field: Return Merchandise Authorization, <p>In WMS terms, an RMA receipt refers to the process of receiving returned goods into the warehouse that were previously shipped to a customer. It is a structured way to handle customer returns.</p> # Key Aspects of RMA in WMS | Aspect            | Description                                                              | | ----------------- | ------------------------------------------------------------------------ | | **Purpose**       | To manage and track the return of products from customers or stores.     | | **Authorization** | Usually issued by a customer service or sales system before the return.  | | **Receipt Type**  | RMA receipts are often a **distinct type of inbound receipt**.           | | **Validation**    | WMS verifies returned items against the authorized RMA before receiving. | | **Disposition**   | Returned items may be **restocked**, **scrapped**, or **quarantined**.   |","properties":{"actual_ship_date":{"default":null,"type":["string","null"]},"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"arrival_date":{"default":null,"type":["string","null"]},"cancel_summary":{"description":"Per Decisions Log D-19. JSON snapshot at CancelReceipt time."},"carrier_id":{"format":"int64","type":["integer","null"]},"close_date":{"default":null,"type":["string","null"]},"close_summary":{"description":"Per Decisions Log D-18. JSON snapshot at CloseReceipt time. Immutable after close."},"completion":{"allOf":[{"$ref":"#/components/schemas/ReceiptCompletion"}],"description":"Per Decisions Log D-05. Live-updated from details on every receive command."},"door":{"type":["string","null"]},"driver_name":{"type":["string","null"]},"effective_date":{"default":null,"type":["string","null"]},"expected_receipt_date":{"default":null,"type":["string","null"]},"external_receipt_number":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"inventory_tracking_granularity":{"allOf":[{"$ref":"#/components/schemas/InventoryTrackingGranularity"}],"description":"ADR-046 D-69b — frozen at creation. Aggregate (default) preserves pre-case-level behaviour; Pallet/Case enable case-scanning flow."},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"owner_id":{"format":"int64","type":"integer"},"planned_ship_date":{"default":null,"type":["string","null"]},"po_id":{"format":"int64","type":["integer","null"]},"promised_ship_date":{"default":null,"type":["string","null"]},"receipt_date":{"default":null,"type":["string","null"]},"receipt_number":{"type":"string"},"receipt_type":{"$ref":"#/components/schemas/ReceiptType"},"rma":{"type":["string","null"]},"scheduled_ship_date":{"default":null,"type":["string","null"]},"status":{"$ref":"#/components/schemas/ReceiptStatus"},"supplier_id":{"format":"int64","type":["integer","null"]},"temperature":{"format":"double","type":["number","null"]},"total_volume":{"format":"double","type":["number","null"]},"total_weight":{"format":"double","type":["number","null"]},"trailer_plate":{"type":["string","null"]},"trailer_type":{"type":["string","null"]},"unplanned_case_on_asn":{"anyOf":[{"$ref":"#/components/schemas/AllowError"},{"type":"null"}],"description":"ADR-046 OQ-03 — what to do when scan hits a case not on ASN. NULL when granularity = Aggregate (cases not scanned)."},"vehicle_date":{"default":null,"type":["string","null"]},"vehicle_plate":{"type":["string","null"]},"version":{"description":"Per Decisions Log D-07. Optimistic-lock. Incremented via `ReceiptRepository::update_with_version`.","format":"int32","type":"integer"}},"required":["add_when","add_who","completion","id","inventory_tracking_granularity","mod_when","mod_who","owner_id","receipt_number","receipt_type","status","version"],"title":"General Receipt model","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"completion":{},"id":1,"inventory_tracking_granularity":{},"mod_when":"<mod_when>","mod_who":1,"owner_id":1,"receipt_number":"<receipt_number>","receipt_type":"Normal","status":"Open","version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_receipt":{"post":{"operationId":"get_receipt","summary":"Get a receipt by ID — CRUD.","description":"Get a receipt by ID — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"receipt","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_receipt"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_receipt","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"## 'RMA' Field: Return Merchandise Authorization, <p>In WMS terms, an RMA receipt refers to the process of receiving returned goods into the warehouse that were previously shipped to a customer. It is a structured way to handle customer returns.</p> # Key Aspects of RMA in WMS | Aspect            | Description                                                              | | ----------------- | ------------------------------------------------------------------------ | | **Purpose**       | To manage and track the return of products from customers or stores.     | | **Authorization** | Usually issued by a customer service or sales system before the return.  | | **Receipt Type**  | RMA receipts are often a **distinct type of inbound receipt**.           | | **Validation**    | WMS verifies returned items against the authorized RMA before receiving. | | **Disposition**   | Returned items may be **restocked**, **scrapped**, or **quarantined**.   |","properties":{"actual_ship_date":{"default":null,"type":["string","null"]},"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"arrival_date":{"default":null,"type":["string","null"]},"cancel_summary":{"description":"Per Decisions Log D-19. JSON snapshot at CancelReceipt time."},"carrier_id":{"format":"int64","type":["integer","null"]},"close_date":{"default":null,"type":["string","null"]},"close_summary":{"description":"Per Decisions Log D-18. JSON snapshot at CloseReceipt time. Immutable after close."},"completion":{"allOf":[{"$ref":"#/components/schemas/ReceiptCompletion"}],"description":"Per Decisions Log D-05. Live-updated from details on every receive command."},"door":{"type":["string","null"]},"driver_name":{"type":["string","null"]},"effective_date":{"default":null,"type":["string","null"]},"expected_receipt_date":{"default":null,"type":["string","null"]},"external_receipt_number":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"inventory_tracking_granularity":{"allOf":[{"$ref":"#/components/schemas/InventoryTrackingGranularity"}],"description":"ADR-046 D-69b — frozen at creation. Aggregate (default) preserves pre-case-level behaviour; Pallet/Case enable case-scanning flow."},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"owner_id":{"format":"int64","type":"integer"},"planned_ship_date":{"default":null,"type":["string","null"]},"po_id":{"format":"int64","type":["integer","null"]},"promised_ship_date":{"default":null,"type":["string","null"]},"receipt_date":{"default":null,"type":["string","null"]},"receipt_number":{"type":"string"},"receipt_type":{"$ref":"#/components/schemas/ReceiptType"},"rma":{"type":["string","null"]},"scheduled_ship_date":{"default":null,"type":["string","null"]},"status":{"$ref":"#/components/schemas/ReceiptStatus"},"supplier_id":{"format":"int64","type":["integer","null"]},"temperature":{"format":"double","type":["number","null"]},"total_volume":{"format":"double","type":["number","null"]},"total_weight":{"format":"double","type":["number","null"]},"trailer_plate":{"type":["string","null"]},"trailer_type":{"type":["string","null"]},"unplanned_case_on_asn":{"anyOf":[{"$ref":"#/components/schemas/AllowError"},{"type":"null"}],"description":"ADR-046 OQ-03 — what to do when scan hits a case not on ASN. NULL when granularity = Aggregate (cases not scanned)."},"vehicle_date":{"default":null,"type":["string","null"]},"vehicle_plate":{"type":["string","null"]},"version":{"description":"Per Decisions Log D-07. Optimistic-lock. Incremented via `ReceiptRepository::update_with_version`.","format":"int32","type":"integer"}},"required":["add_when","add_who","completion","id","inventory_tracking_granularity","mod_when","mod_who","owner_id","receipt_number","receipt_type","status","version"],"title":"General Receipt model","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"completion":{},"id":1,"inventory_tracking_granularity":{},"mod_when":"<mod_when>","mod_who":1,"owner_id":1,"receipt_number":"<receipt_number>","receipt_type":"Normal","status":"Open","version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_receipt":{"post":{"operationId":"list_receipt","summary":"List receipt — CRUD.","description":"List receipt — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"receipt","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_receipt"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_receipt"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/Receipt"},"title":"Array_of_Receipt","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"completion":{},"id":1,"inventory_tracking_granularity":{},"mod_when":"<mod_when>","mod_who":1,"owner_id":1,"receipt_number":"<receipt_number>","receipt_type":"Normal","status":"Open","version":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#update_receipt":{"post":{"operationId":"update_receipt","summary":"Update the reference data on a receipt — refused once it is Closed or Cancelled.","description":"Update the reference data on a receipt — refused once it is Closed or Cancelled.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"receipt","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"update_receipt"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"},"data":{"additionalProperties":false,"description":"What a client may change on a receipt header: reference, party and planning data, and nothing the receipt is judged by.\n\nDeliberately NOT [`ReceiptForUpdate`]. That struct carries `status`, `completion`, `close_summary` and `cancel_summary` — correctly, because Close, Cancel, PutOnHold and ReleaseFromHold write them — and handing it to the wire turned the generic CRUD update into a second, unguarded way to move a receipt:\n\n```text update_receipt{ status: \"Closed\", completion: \"Full\" } → 200 OK ```\n\nNo state machine, no version, and no summary of what happened: a receipt could be closed with no `close_summary`, cancelled with no `cancel_summary`, or pulled back out of a terminal state into `Open`. `update_receipt` is granted to OPERATOR by the seeder's operational-entity rule, so it was not even an admin-only hole. Same shape as the line-level hole PR #436 closed — this is the half it left open.\n\nThe fields are absent by CONSTRUCTION rather than filtered at runtime: one that cannot be deserialized cannot be reintroduced by someone extending a mapping function. They move only through their own commands.\n\nAlso absent, each for its own reason: - `owner_id`, `receipt_number` — identity, fixed when the receipt is created. - `close_date` — stamped by Close, alongside the summary it belongs to.\n\n`deny_unknown_fields` is the point, not a detail: serde's default is to IGNORE what it does not know, so a client sending `status: \"Closed\"` would get `200 OK` and a response showing the old status — the write silently dropped, the caller convinced it landed. For the field the whole lifecycle turns on, refusing loudly is the only honest answer.","properties":{"actual_ship_date":{"format":"date-time","type":["string","null"]},"arrival_date":{"format":"date-time","type":["string","null"]},"carrier_id":{"format":"int64","type":["integer","null"]},"door":{"type":["string","null"]},"driver_name":{"type":["string","null"]},"expected_receipt_date":{"format":"date-time","type":["string","null"]},"external_receipt_number":{"type":["string","null"]},"planned_ship_date":{"format":"date-time","type":["string","null"]},"po_id":{"format":"int64","type":["integer","null"]},"promised_ship_date":{"format":"date-time","type":["string","null"]},"receipt_date":{"format":"date-time","type":["string","null"]},"receipt_type":{"oneOf":[{"enum":["Normal","CustomerReturn","Sscc","CaseLevel"],"type":"string"},{"description":"Receiving Without ASN, assigned by the server.","enum":["NoAsn"],"type":"string"},{"description":"Goods arriving from another facility of the same company.","enum":["InterFacilityTransfer"],"type":"string"}]},"rma":{"type":["string","null"]},"scheduled_ship_date":{"format":"date-time","type":["string","null"]},"supplier_id":{"format":"int64","type":["integer","null"]},"temperature":{"format":"double","type":["number","null"]},"total_volume":{"format":"double","type":["number","null"]},"total_weight":{"format":"double","type":["number","null"]},"trailer_plate":{"type":["string","null"]},"trailer_type":{"type":["string","null"]},"vehicle_date":{"format":"date-time","type":["string","null"]},"vehicle_plate":{"type":["string","null"]}},"title":"ReceiptUpdateApi","type":"object"}},"required":["id","data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"update_receipt","params":{"id":1,"data":{"actual_ship_date":"2026-01-01T00:00:00Z","arrival_date":"2026-01-01T00:00:00Z","carrier_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"## 'RMA' Field: Return Merchandise Authorization, <p>In WMS terms, an RMA receipt refers to the process of receiving returned goods into the warehouse that were previously shipped to a customer. It is a structured way to handle customer returns.</p> # Key Aspects of RMA in WMS | Aspect            | Description                                                              | | ----------------- | ------------------------------------------------------------------------ | | **Purpose**       | To manage and track the return of products from customers or stores.     | | **Authorization** | Usually issued by a customer service or sales system before the return.  | | **Receipt Type**  | RMA receipts are often a **distinct type of inbound receipt**.           | | **Validation**    | WMS verifies returned items against the authorized RMA before receiving. | | **Disposition**   | Returned items may be **restocked**, **scrapped**, or **quarantined**.   |","properties":{"actual_ship_date":{"default":null,"type":["string","null"]},"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"arrival_date":{"default":null,"type":["string","null"]},"cancel_summary":{"description":"Per Decisions Log D-19. JSON snapshot at CancelReceipt time."},"carrier_id":{"format":"int64","type":["integer","null"]},"close_date":{"default":null,"type":["string","null"]},"close_summary":{"description":"Per Decisions Log D-18. JSON snapshot at CloseReceipt time. Immutable after close."},"completion":{"allOf":[{"$ref":"#/components/schemas/ReceiptCompletion"}],"description":"Per Decisions Log D-05. Live-updated from details on every receive command."},"door":{"type":["string","null"]},"driver_name":{"type":["string","null"]},"effective_date":{"default":null,"type":["string","null"]},"expected_receipt_date":{"default":null,"type":["string","null"]},"external_receipt_number":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"inventory_tracking_granularity":{"allOf":[{"$ref":"#/components/schemas/InventoryTrackingGranularity"}],"description":"ADR-046 D-69b — frozen at creation. Aggregate (default) preserves pre-case-level behaviour; Pallet/Case enable case-scanning flow."},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"owner_id":{"format":"int64","type":"integer"},"planned_ship_date":{"default":null,"type":["string","null"]},"po_id":{"format":"int64","type":["integer","null"]},"promised_ship_date":{"default":null,"type":["string","null"]},"receipt_date":{"default":null,"type":["string","null"]},"receipt_number":{"type":"string"},"receipt_type":{"$ref":"#/components/schemas/ReceiptType"},"rma":{"type":["string","null"]},"scheduled_ship_date":{"default":null,"type":["string","null"]},"status":{"$ref":"#/components/schemas/ReceiptStatus"},"supplier_id":{"format":"int64","type":["integer","null"]},"temperature":{"format":"double","type":["number","null"]},"total_volume":{"format":"double","type":["number","null"]},"total_weight":{"format":"double","type":["number","null"]},"trailer_plate":{"type":["string","null"]},"trailer_type":{"type":["string","null"]},"unplanned_case_on_asn":{"anyOf":[{"$ref":"#/components/schemas/AllowError"},{"type":"null"}],"description":"ADR-046 OQ-03 — what to do when scan hits a case not on ASN. NULL when granularity = Aggregate (cases not scanned)."},"vehicle_date":{"default":null,"type":["string","null"]},"vehicle_plate":{"type":["string","null"]},"version":{"description":"Per Decisions Log D-07. Optimistic-lock. Incremented via `ReceiptRepository::update_with_version`.","format":"int32","type":"integer"}},"required":["add_when","add_who","completion","id","inventory_tracking_granularity","mod_when","mod_who","owner_id","receipt_number","receipt_type","status","version"],"title":"General Receipt model","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"completion":{},"id":1,"inventory_tracking_granularity":{},"mod_when":"<mod_when>","mod_who":1,"owner_id":1,"receipt_number":"<receipt_number>","receipt_type":"Normal","status":"Open","version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_receipt":{"post":{"operationId":"delete_receipt","summary":"Delete a receipt atomically; refuses when any line has received quantity.","description":"Delete a receipt atomically; refuses when any line has received quantity.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"receipt","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_receipt"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_receipt","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"## 'RMA' Field: Return Merchandise Authorization, <p>In WMS terms, an RMA receipt refers to the process of receiving returned goods into the warehouse that were previously shipped to a customer. It is a structured way to handle customer returns.</p> # Key Aspects of RMA in WMS | Aspect            | Description                                                              | | ----------------- | ------------------------------------------------------------------------ | | **Purpose**       | To manage and track the return of products from customers or stores.     | | **Authorization** | Usually issued by a customer service or sales system before the return.  | | **Receipt Type**  | RMA receipts are often a **distinct type of inbound receipt**.           | | **Validation**    | WMS verifies returned items against the authorized RMA before receiving. | | **Disposition**   | Returned items may be **restocked**, **scrapped**, or **quarantined**.   |","properties":{"actual_ship_date":{"default":null,"type":["string","null"]},"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"arrival_date":{"default":null,"type":["string","null"]},"cancel_summary":{"description":"Per Decisions Log D-19. JSON snapshot at CancelReceipt time."},"carrier_id":{"format":"int64","type":["integer","null"]},"close_date":{"default":null,"type":["string","null"]},"close_summary":{"description":"Per Decisions Log D-18. JSON snapshot at CloseReceipt time. Immutable after close."},"completion":{"allOf":[{"$ref":"#/components/schemas/ReceiptCompletion"}],"description":"Per Decisions Log D-05. Live-updated from details on every receive command."},"door":{"type":["string","null"]},"driver_name":{"type":["string","null"]},"effective_date":{"default":null,"type":["string","null"]},"expected_receipt_date":{"default":null,"type":["string","null"]},"external_receipt_number":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"inventory_tracking_granularity":{"allOf":[{"$ref":"#/components/schemas/InventoryTrackingGranularity"}],"description":"ADR-046 D-69b — frozen at creation. Aggregate (default) preserves pre-case-level behaviour; Pallet/Case enable case-scanning flow."},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"owner_id":{"format":"int64","type":"integer"},"planned_ship_date":{"default":null,"type":["string","null"]},"po_id":{"format":"int64","type":["integer","null"]},"promised_ship_date":{"default":null,"type":["string","null"]},"receipt_date":{"default":null,"type":["string","null"]},"receipt_number":{"type":"string"},"receipt_type":{"$ref":"#/components/schemas/ReceiptType"},"rma":{"type":["string","null"]},"scheduled_ship_date":{"default":null,"type":["string","null"]},"status":{"$ref":"#/components/schemas/ReceiptStatus"},"supplier_id":{"format":"int64","type":["integer","null"]},"temperature":{"format":"double","type":["number","null"]},"total_volume":{"format":"double","type":["number","null"]},"total_weight":{"format":"double","type":["number","null"]},"trailer_plate":{"type":["string","null"]},"trailer_type":{"type":["string","null"]},"unplanned_case_on_asn":{"anyOf":[{"$ref":"#/components/schemas/AllowError"},{"type":"null"}],"description":"ADR-046 OQ-03 — what to do when scan hits a case not on ASN. NULL when granularity = Aggregate (cases not scanned)."},"vehicle_date":{"default":null,"type":["string","null"]},"vehicle_plate":{"type":["string","null"]},"version":{"description":"Per Decisions Log D-07. Optimistic-lock. Incremented via `ReceiptRepository::update_with_version`.","format":"int32","type":"integer"}},"required":["add_when","add_who","completion","id","inventory_tracking_granularity","mod_when","mod_who","owner_id","receipt_number","receipt_type","status","version"],"title":"General Receipt model","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"completion":{},"id":1,"inventory_tracking_granularity":{},"mod_when":"<mod_when>","mod_who":1,"owner_id":1,"receipt_number":"<receipt_number>","receipt_type":"Normal","status":"Open","version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_many_receipt":{"post":{"operationId":"delete_many_receipt","summary":"Delete receipts atomically; refuses the batch when any line has received quantity.","description":"Delete receipts atomically; refuses the batch when any line has received quantity.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"receipt","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_many_receipt"},"params":{"type":"object","properties":{"ids":{"items":{"format":"int64","type":"integer"},"type":"array","description":"Record IDs"}},"required":["ids"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_many_receipt","params":{"ids":[1]}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"uint64","minimum":0,"title":"uint64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_receipt":{"post":{"operationId":"count_receipt","summary":"Count receipt — CRUD.","description":"Count receipt — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"receipt","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_receipt"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_receipt"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#find_receipt_by_number":{"post":{"operationId":"find_receipt_by_number","summary":"Find receipt by receipt_number; optional kind filter","description":"Find receipt by receipt_number; optional kind filter\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"receipt","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"find_receipt_by_number"},"params":{"type":"object","properties":{"data":{"properties":{"kind":{"anyOf":[{"$ref":"#/components/schemas/ReceiptType"},{"type":"null"}],"description":"Optional filter by `receipt_type`. When `None` the lookup matches any type. When `Some(t)` and the row exists with a different type, the response is `null` (treated as not-found, the same as if the number were missing entirely)."},"number":{"description":"`receipt.receipt_number` — UNIQUE per warehouse, used by RF / UI scan-and-go flows.","type":"string"}},"required":["number"],"title":"FindReceiptByNumberInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"find_receipt_by_number","params":{"data":{"number":"<number>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"anyOf":[{"$ref":"#/components/schemas/Receipt"},{"type":"null"}],"title":"Nullable_Receipt"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"completion":{},"id":1,"inventory_tracking_granularity":{},"mod_when":"<mod_when>","mod_who":1,"owner_id":1,"receipt_number":"<receipt_number>","receipt_type":"Normal","status":"Open","version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#find_receipt_by_rma":{"post":{"operationId":"find_receipt_by_rma","summary":"Find Customer Return by RMA reference (receipt.rma OR external_receipt_number, scoped to receipt_type=CustomerReturn)","description":"Find Customer Return by RMA reference (receipt.rma OR external_receipt_number, scoped to receipt_type=CustomerReturn)\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"receipt","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"find_receipt_by_rma"},"params":{"type":"object","properties":{"data":{"properties":{"rma_number":{"description":"RMA reference as the operator scans / types it. Two upstream sources of this string can both legitimately appear: 1. ERP wrote the value into `receipt.rma` when creating the Customer Return — the dedicated RMA column. 2. ERP integration posted the value via `external_receipt_number` because that's the field their integration mapper happens to use. We accept either.","type":"string"}},"required":["rma_number"],"title":"FindReceiptByRmaInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"find_receipt_by_rma","params":{"data":{"rma_number":"<rma_number>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"anyOf":[{"$ref":"#/components/schemas/Receipt"},{"type":"null"}],"title":"Nullable_Receipt"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"completion":{},"id":1,"inventory_tracking_granularity":{},"mod_when":"<mod_when>","mod_who":1,"owner_id":1,"receipt_number":"<receipt_number>","receipt_type":"Normal","status":"Open","version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#find_receipt_line_by_sku":{"post":{"operationId":"find_receipt_line_by_sku","summary":"Find receipt_detail by (receipt_id, sku_code) — single row; null if absent","description":"Find receipt_detail by (receipt_id, sku_code) — single row; null if absent\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"receipt","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"find_receipt_line_by_sku"},"params":{"type":"object","properties":{"data":{"properties":{"owner_id":{"description":"Optional. If `None` the BMC matches any owner — reasonable default for single-tenant warehouses or when caller knows the receipt already disambiguates owner. RF flows that scan inside an owner-scoped receipt header should pass it explicitly.","format":"int64","type":["integer","null"]},"receipt_id":{"format":"int64","type":"integer"},"sku_code":{"type":"string"}},"required":["receipt_id","sku_code"],"title":"FindReceiptLineBySkuInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"find_receipt_line_by_sku","params":{"data":{"receipt_id":1,"sku_code":"<sku_code>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"anyOf":[{"$ref":"#/components/schemas/ReceiptDetail"},{"type":"null"}],"title":"Nullable_ReceiptDetail"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"completion":{},"effective_date":"<effective_date>","id":1,"lot_attr_check_mode":{},"mod_when":"<mod_when>","mod_who":1,"owner_id":1,"receipt_id":1,"receipt_line_number":"<receipt_line_number>","receipt_type":"Normal","sku":"<sku>","status":"Open","target_disposition":{},"version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#validate_lpn_unused":{"post":{"operationId":"validate_lpn_unused","summary":"Check if an LPN code is free to assign (no live inventory under that container)","description":"Check if an LPN code is free to assign (no live inventory under that container)\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"receipt","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"validate_lpn_unused"},"params":{"type":"object","properties":{"data":{"properties":{"lpn_code":{"description":"`container.code` to check — what an operator scans / types as an LPN.","type":"string"}},"required":["lpn_code"],"title":"ValidateLpnUnusedInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"validate_lpn_unused","params":{"data":{"lpn_code":"<lpn_code>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"container_id":{"description":"The matching container.id when one exists with this code, regardless of usage state. Caller can use this to short-circuit a subsequent container lookup.","format":"int64","type":["integer","null"]},"is_unused":{"description":"True when the LPN code is safe to assign to a fresh receipt.","type":"boolean"},"reason":{"description":"Human-readable reason when `is_unused = false`. One of: - \"container is Active and carries N units of inventory\" - \"container exists with status InTransit\" `None` when `is_unused = true`.","type":["string","null"]}},"required":["is_unused"],"title":"ValidateLpnUnusedResult","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"is_unused":false}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#find_printer_for_context":{"post":{"operationId":"find_printer_for_context","summary":"Resolve a printer for (user, owner, warehouse) via the User→Owner→Warehouse priority chain","description":"Resolve a printer for (user, owner, warehouse) via the User→Owner→Warehouse priority chain\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"receipt","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"find_printer_for_context"},"params":{"type":"object","properties":{"data":{"properties":{"owner_id":{"description":"Optional. When `None` the Owner-scope tier is skipped.","format":"int64","type":["integer","null"]},"user_id":{"format":"int64","type":"integer"},"warehouse_id":{"description":"Warehouse the assignment is being looked up in. The wh_schema in `Ctx` already binds the search to a single warehouse's `printer_assignments` table, so this id is mainly used to match `scope_type='Warehouse'` rows.","format":"int64","type":"integer"}},"required":["user_id","warehouse_id"],"title":"FindPrinterForContextInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"find_printer_for_context","params":{"data":{"user_id":1,"warehouse_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"matched_scope":{"description":"Which scope tier resolved — for the UI to surface \"you're using the warehouse-default printer\" type messages. None paired with printer_id=None means no assignment exists at all.","type":["string","null"]},"printer_id":{"description":"The chosen printer_id, or None when no assignment matches at any scope level.","format":"int64","type":["integer","null"]}},"title":"FindPrinterForContextResult","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"matched_scope":"<matched_scope>","printer_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_receipt_summary":{"post":{"operationId":"get_receipt_summary","summary":"Receipt summary for close confirmation: per-line ordered/received/short/over/damaged + totals + can_close hint","description":"Receipt summary for close confirmation: per-line ordered/received/short/over/damaged + totals + can_close hint\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"receipt","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_receipt_summary"},"params":{"type":"object","properties":{"data":{"properties":{"receipt_id":{"format":"int64","type":"integer"}},"required":["receipt_id"],"title":"GetReceiptSummaryInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_receipt_summary","params":{"data":{"receipt_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"can_close":{"description":"True when no exceptions exist AND status is not already terminal. This is a *hint* for the UI — the actual close decision still goes through `CloseReceipt` which honours `ALLOW_CLOSE_WITH_DISCREPANCY` and supervisor-override code 71 (D-21).","type":"boolean"},"completion":{"type":["string","null"]},"exception_lines":{"description":"Count of detail lines that have any of: short>0, over>0, damaged>0, rejected>0. Used by the close-confirmation UI to surface a single \"N exceptions\" badge.","format":"int64","type":"integer"},"lines":{"description":"Per-line breakdown. Empty when receipt has no detail rows yet.","items":{"$ref":"#/components/schemas/ReceiptSummaryLine"},"type":"array"},"receipt_id":{"format":"int64","type":"integer"},"receipt_number":{"type":"string"},"status":{"type":"string"},"total_damaged":{"description":"Sum of `lines[].damaged`.","format":"double","type":"number"},"total_ordered":{"description":"Sum of `lines[].ordered`.","format":"double","type":"number"},"total_received":{"description":"Sum of `lines[].received`.","format":"double","type":"number"}},"required":["can_close","exception_lines","lines","receipt_id","receipt_number","status","total_damaged","total_ordered","total_received"],"title":"ReceiptSummary","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"can_close":false,"exception_lines":1,"lines":[{"damaged":1.5,"ordered":1.5,"over":1.5,"receipt_detail_id":1,"receipt_line_number":"<receipt_line_number>","received":1.5,"rejected":1.5,"short":1.5,"sku":"<sku>","status":"<status>"}],"receipt_id":1,"receipt_number":"<receipt_number>","status":"<status>","total_damaged":1.5,"total_ordered":1.5,"total_received":1.5}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_receipt_full":{"post":{"operationId":"get_receipt_full","summary":"Receipt envelope: header + lines + last audit row in one roundtrip","description":"Receipt envelope: header + lines + last audit row in one roundtrip\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"receipt","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_receipt_full"},"params":{"type":"object","properties":{"data":{"properties":{"receipt_id":{"format":"int64","type":"integer"}},"required":["receipt_id"],"title":"GetReceiptFullInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_receipt_full","params":{"data":{"receipt_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"## 'RMA' Field: Return Merchandise Authorization, <p>In WMS terms, an RMA receipt refers to the process of receiving returned goods into the warehouse that were previously shipped to a customer. It is a structured way to handle customer returns.</p> # Key Aspects of RMA in WMS | Aspect            | Description                                                              | | ----------------- | ------------------------------------------------------------------------ | | **Purpose**       | To manage and track the return of products from customers or stores.     | | **Authorization** | Usually issued by a customer service or sales system before the return.  | | **Receipt Type**  | RMA receipts are often a **distinct type of inbound receipt**.           | | **Validation**    | WMS verifies returned items against the authorized RMA before receiving. | | **Disposition**   | Returned items may be **restocked**, **scrapped**, or **quarantined**.   |","properties":{"actual_ship_date":{"default":null,"type":["string","null"]},"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"arrival_date":{"default":null,"type":["string","null"]},"cancel_summary":{"description":"Per Decisions Log D-19. JSON snapshot at CancelReceipt time."},"carrier_id":{"format":"int64","type":["integer","null"]},"close_date":{"default":null,"type":["string","null"]},"close_summary":{"description":"Per Decisions Log D-18. JSON snapshot at CloseReceipt time. Immutable after close."},"completion":{"allOf":[{"$ref":"#/components/schemas/ReceiptCompletion"}],"description":"Per Decisions Log D-05. Live-updated from details on every receive command."},"door":{"type":["string","null"]},"driver_name":{"type":["string","null"]},"effective_date":{"default":null,"type":["string","null"]},"expected_receipt_date":{"default":null,"type":["string","null"]},"external_receipt_number":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"inventory_tracking_granularity":{"allOf":[{"$ref":"#/components/schemas/InventoryTrackingGranularity"}],"description":"ADR-046 D-69b — frozen at creation. Aggregate (default) preserves pre-case-level behaviour; Pallet/Case enable case-scanning flow."},"last_audit_event":{"anyOf":[{"$ref":"#/components/schemas/ReceiptAudit"},{"type":"null"}],"description":"Most recent audit row for the receipt; None when nothing audited yet. Caller can render \"last touched at X by user Y\" from this without a follow-up roundtrip."},"lines":{"description":"All receipt_detail rows for this receipt, sorted by line_number.","items":{"$ref":"#/components/schemas/ReceiptDetail"},"type":"array"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"owner_id":{"format":"int64","type":"integer"},"planned_ship_date":{"default":null,"type":["string","null"]},"po_id":{"format":"int64","type":["integer","null"]},"promised_ship_date":{"default":null,"type":["string","null"]},"receipt_date":{"default":null,"type":["string","null"]},"receipt_number":{"type":"string"},"receipt_type":{"$ref":"#/components/schemas/ReceiptType"},"rma":{"type":["string","null"]},"scheduled_ship_date":{"default":null,"type":["string","null"]},"status":{"$ref":"#/components/schemas/ReceiptStatus"},"supplier_id":{"format":"int64","type":["integer","null"]},"temperature":{"format":"double","type":["number","null"]},"total_volume":{"format":"double","type":["number","null"]},"total_weight":{"format":"double","type":["number","null"]},"trailer_plate":{"type":["string","null"]},"trailer_type":{"type":["string","null"]},"unplanned_case_on_asn":{"anyOf":[{"$ref":"#/components/schemas/AllowError"},{"type":"null"}],"description":"ADR-046 OQ-03 — what to do when scan hits a case not on ASN. NULL when granularity = Aggregate (cases not scanned)."},"vehicle_date":{"default":null,"type":["string","null"]},"vehicle_plate":{"type":["string","null"]},"version":{"description":"Per Decisions Log D-07. Optimistic-lock. Incremented via `ReceiptRepository::update_with_version`.","format":"int32","type":"integer"}},"required":["add_when","add_who","completion","id","inventory_tracking_granularity","lines","mod_when","mod_who","owner_id","receipt_number","receipt_type","status","version"],"title":"General Receipt model","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"completion":{},"id":1,"inventory_tracking_granularity":{},"lines":[{"add_when":"<add_when>","add_who":1,"completion":{},"effective_date":"<effective_date>","id":1,"lot_attr_check_mode":{},"mod_when":"<mod_when>","mod_who":1,"owner_id":1,"receipt_id":1,"receipt_line_number":"<receipt_line_number>","receipt_type":"Normal","sku":"<sku>","status":"Open","target_disposition":{},"version":1}],"mod_when":"<mod_when>","mod_who":1,"owner_id":1,"receipt_number":"<receipt_number>","receipt_type":"Normal","status":"Open","version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_sku_envelope":{"post":{"operationId":"get_sku_envelope","summary":"SKU envelope: sku + serial_config + barcodes for receive-flow round-trip elimination","description":"SKU envelope: sku + serial_config + barcodes for receive-flow round-trip elimination\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"receipt","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_sku_envelope"},"params":{"type":"object","properties":{"data":{"properties":{"owner_code":{"default":null,"description":"Business owner code (e.g. \"OWNER002\"). Used by RCBLIND01 / any flow where the operator scans / picks by code rather than id. Server resolves to `owner_id` via OwnerBmc lookup; not-found → typed Validation error. Exactly one of (`owner_id`, `owner_code`) is required.","type":["string","null"]},"owner_id":{"default":null,"description":"Numeric owner id. Preferred when the caller already has it (RCASN01SKU resolves it via the ASN lookup). Mutually exclusive with `owner_code` — `owner_id` wins when both are supplied.","format":"int64","type":["integer","null"]},"receipt_id":{"default":null,"description":"Optional receipt context. When the SKU is scanned *against an ASN* (RCASN01SKU passes `display.receipt_id`), the envelope resolves the matching receipt line and pre-fills / locks its expected lot attributes (ADR-050). Blind receive (RCBLIND01) omits it → plain prompt, no pre-fill.","format":"int64","type":["integer","null"]},"sku_code":{"type":"string"}},"required":["sku_code"],"title":"GetSkuEnvelopeInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_sku_envelope","params":{"data":{"sku_code":"<sku_code>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"barcodes":{"description":"All active barcodes for this SKU. Empty Vec when none registered; caller can fall back to scanning by sku.code directly.","items":{"$ref":"#/components/schemas/SkuBarcode"},"type":"array"},"expected_lpn":{"description":"The LPN RF prefills To LPN with: the supplier's expected LPN, when every open line of this SKU on the receipt that offers one offers the same one — a line offers its expected LPN unless it was already received into ANOTHER LPN. `None` when no line offers one, lines offer different ones, and on a blind scan (no `receipt_id`) — the operator scans the label and the cascade finds the line by it. Rule: `wms_inbound::service::receipt::expected_lpn`.","type":["string","null"]},"lot_policy_attributes":{"description":"Lot-attribute prompt for this SKU (`show=true` attrs only). When the scan is against an ASN (`receipt_id` supplied + a matching line), each entry is pre-filled with the line's expected `value` and `readonly` on a Strict line (ADR-050); otherwise blank + editable. Empty when the SKU has no lot_policy. RF prompts the operator for these before submitting receive_blind / receive_against_asn — required attrs left unsupplied fail server-side validation.","items":{"$ref":"#/components/schemas/LotAttributePrompt"},"type":"array"},"owner_id":{"description":"Resolved owner id. Always set on a successful response. Surfaced so callers that started with `owner_code` (RCBLIND01, slice C.5) can copy the numeric id into `display.owner_id` for the rest of the chain — the LINE call still wants i64 on the wire. Callers that already had `owner_id` (RCASN01SKU) can ignore the field.","format":"int64","type":"integer"},"pack":{"anyOf":[{"$ref":"#/components/schemas/Pack"},{"type":"null"}],"description":"Default Pack tied to `sku.pack_id`. RF shows `pack.code` (or `pack.descr`) on receive screens so the operator sees a name instead of a meaningless integer. None only if the pack row vanished (referential-integrity break) — normal operation always returns it."},"serial_config":{"anyOf":[{"$ref":"#/components/schemas/SkuSerialConfig"},{"type":"null"}],"description":"Per-SKU serial-tracking configuration. None when no row exists yet — the SKU is not serial-tracked (or hasn't been configured)."},"sku":{"$ref":"#/components/schemas/Sku"}},"required":["barcodes","lot_policy_attributes","owner_id","sku"],"title":"SkuEnvelope","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"barcodes":[{"add_when":"<add_when>","add_who":1,"barcode":"<barcode>","default_uom":"<default_uom>","id":1,"mod_when":"<mod_when>","mod_who":1,"owner_id":1,"pack_id":1,"sku_code":"<sku_code>","sku_id":1}],"lot_policy_attributes":[{"attrib_code":"<attrib_code>","is_date":false,"readonly":false,"required":false}],"owner_id":1,"sku":{"add_when":"<add_when>","add_who":1,"code":"<code>","descr":"<descr>","id":1,"mod_when":"<mod_when>","mod_who":1,"owner_id":1,"pack_id":1,"requires_temperature_capture":false}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#assign_lpn":{"post":{"operationId":"assign_lpn","summary":"Mint N fresh LPN codes from the warehouse container_code sequence (FOR-UPDATE-locked, no collisions)","description":"Mint N fresh LPN codes from the warehouse container_code sequence (FOR-UPDATE-locked, no collisions)\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"receipt","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"assign_lpn"},"params":{"type":"object","properties":{"data":{"properties":{"format_id":{"description":"Catalog spec mentions a numeric `format_id`. Per Container Spec §3.3 + §5 the actual format is OwnerConfig.auto_generate_lpn_format (a string template) — not a numeric id. This field is accepted for backwards-compat with the catalog but currently ignored; generation uses the global `code_counter.container_code` sequence via `GenKey::get(CounterName::ContainerCode)` which is owner- agnostic and warehouse-scoped (per typed `Ctx::data_scope`).","format":"int64","type":["integer","null"]},"qty":{"description":"How many LPN codes to mint in this batch. `None` or `Some(0)` returns an empty Vec (no-op). `Some(n)` returns exactly n codes. Bulk-allocate when the operator is about to receive a multi-pallet shipment — saves N round-trips compared to calling once per pallet.","format":"int64","type":["integer","null"]},"sku_id":{"description":"Informational only — recorded in event payloads / audit when this becomes a tracked allocation. Today the SKU is not used by the generator but the API accepts it so callers can keep their payload stable through future enhancements.","format":"int64","type":["integer","null"]}},"title":"AssignLpnInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"assign_lpn","params":{"data":{"format_id":1,"qty":1,"sku_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"lpns":{"description":"Newly minted LPN codes, in the order they were drawn from the sequence. Each is a 10-char zero-padded numeric string — guaranteed unique within this warehouse schema and never reused.","items":{"type":"string"},"type":"array"}},"required":["lpns"],"title":"AssignLpnResult","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"lpns":["<lpns>"]}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_owner_damage_policy":{"post":{"operationId":"get_owner_damage_policy","summary":"Damage routing policy for an owner (None/Hold/Reject per severity)","description":"Damage routing policy for an owner (None/Hold/Reject per severity)\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"receipt","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_owner_damage_policy"},"params":{"type":"object","properties":{"data":{"properties":{"owner_id":{"description":"`owners.id` of the SKU's owner. Resolved upstream by the caller (e.g. `Receipt::owner_id` for a damage report tied to a receipt).","format":"int64","type":"integer"}},"required":["owner_id"],"title":"GetOwnerDamagePolicyInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_owner_damage_policy","params":{"data":{"owner_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"anyOf":[{"$ref":"#/components/schemas/OwnerDamagePolicy"},{"type":"null"}],"title":"Nullable_OwnerDamagePolicy"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"damage_major_action":"None","damage_minor_action":"None","damage_total_action":"None","owner_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_my_open_receipts":{"post":{"operationId":"list_my_open_receipts","summary":"List non-terminal receipts created by a user (RF 'my open' landing list)","description":"List non-terminal receipts created by a user (RF 'my open' landing list)\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"receipt","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_my_open_receipts"},"params":{"type":"object","properties":{"data":{"properties":{"limit":{"description":"Cap on rows returned. `None` defaults to 50 — enough for an RF \"my open\" list without paging. Hard upper bound is 500 to keep the response small for radio-network clients.","format":"int64","type":["integer","null"]},"user_id":{"description":"Receipts created by this user (`receipt.add_who`). RF \"my work\" view filters by the operator's id; supervisors pass another user id to peek at someone else's queue.","format":"int64","type":"integer"},"warehouse_id":{"description":"Warehouse scope is already implicit in `Ctx.wh_schema` — the row list is restricted to that schema's `receipt` table. The id is accepted on the input so callers can keep their payload symmetric with other RF endpoints; it is not currently used in the WHERE clause (the schema bind is sufficient).","format":"int64","type":"integer"}},"required":["user_id","warehouse_id"],"title":"ListMyOpenReceiptsInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_my_open_receipts","params":{"data":{"user_id":1,"warehouse_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/Receipt"},"title":"Array_of_Receipt","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"completion":{},"id":1,"inventory_tracking_granularity":{},"mod_when":"<mod_when>","mod_who":1,"owner_id":1,"receipt_number":"<receipt_number>","receipt_type":"Normal","status":"Open","version":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_receipt_hold_history":{"post":{"operationId":"get_receipt_hold_history","summary":"Receipt OnHold history (place/release events) sourced from receipt_audit status field","description":"Receipt OnHold history (place/release events) sourced from receipt_audit status field\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"receipt","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_receipt_hold_history"},"params":{"type":"object","properties":{"data":{"properties":{"receipt_id":{"format":"int64","type":"integer"}},"required":["receipt_id"],"title":"GetReceiptHoldHistoryInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_receipt_hold_history","params":{"data":{"receipt_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/ReceiptHoldEvent"},"title":"Array_of_ReceiptHoldEvent","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"audit_id":1,"changed_at":"2026-01-01T00:00:00Z","changed_by":1,"direction":"<direction>"}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_receipt_detail_history":{"post":{"operationId":"get_receipt_detail_history","summary":"Per-line history: header audit + matching transaction_log entries (no detail-audit table; this is the closest available)","description":"Per-line history: header audit + matching transaction_log entries (no detail-audit table; this is the closest available)\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"receipt","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_receipt_detail_history"},"params":{"type":"object","properties":{"data":{"properties":{"receipt_detail_id":{"format":"int64","type":"integer"}},"required":["receipt_detail_id"],"title":"GetReceiptDetailHistoryInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_receipt_detail_history","params":{"data":{"receipt_detail_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/ReceiptDetailHistoryEvent"},"title":"Array_of_ReceiptDetailHistoryEvent","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"at":"2026-01-01T00:00:00Z","event_id":1,"event_kind":"<event_kind>","label":"<label>"}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_close_blockers":{"post":{"operationId":"get_close_blockers","summary":"Reasons CloseReceipt would refuse: terminal status, unresolved serial capture, qty mismatch, pending damage","description":"Reasons CloseReceipt would refuse: terminal status, unresolved serial capture, qty mismatch, pending damage\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"receipt","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_close_blockers"},"params":{"type":"object","properties":{"data":{"properties":{"receipt_id":{"format":"int64","type":"integer"}},"required":["receipt_id"],"title":"GetCloseBlockersInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_close_blockers","params":{"data":{"receipt_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/CloseBlocker"},"title":"Array_of_CloseBlocker","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"code":"<code>","message":"<message>"}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_cancel_blockers":{"post":{"operationId":"get_cancel_blockers","summary":"Reasons CancelReceipt would refuse (D-19): terminal status, non-Pending completion, received qty present","description":"Reasons CancelReceipt would refuse (D-19): terminal status, non-Pending completion, received qty present\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"receipt","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_cancel_blockers"},"params":{"type":"object","properties":{"data":{"properties":{"receipt_id":{"format":"int64","type":"integer"}},"required":["receipt_id"],"title":"GetCancelBlockersInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_cancel_blockers","params":{"data":{"receipt_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/CancelBlocker"},"title":"Array_of_CancelBlocker","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"code":"<code>","message":"<message>"}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#lookup_asn":{"post":{"operationId":"lookup_asn","summary":"Search non-terminal ASN headers by number / external_number; predefined filters for the receive-against-ASN UI","description":"Search non-terminal ASN headers by number / external_number; predefined filters for the receive-against-ASN UI\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"receipt","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"lookup_asn"},"params":{"type":"object","properties":{"data":{"properties":{"page":{"description":"1-indexed page number. Default 1.","format":"int64","type":["integer","null"]},"page_size":{"description":"Page size. Default 50, capped at 200.","format":"int64","type":["integer","null"]},"q":{"description":"Optional substring on `receipt_number` or `external_receipt_number`. `None` returns the full window of recent ASN headers.","type":["string","null"]}},"title":"LookupAsnInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"lookup_asn","params":{"data":{"page":1,"page_size":1,"q":"<q>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/AsnHeader"},"title":"Array_of_AsnHeader","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"completion":"<completion>","id":1,"owner_code":"<owner_code>","owner_company":"<owner_company>","owner_id":1,"receipt_number":"<receipt_number>","status":"<status>"}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#search_asns":{"post":{"operationId":"search_asns","summary":"Substring search of non-terminal ASN headers (alias for lookup_asn; used by RCASN01 F2 picker)","description":"Substring search of non-terminal ASN headers (alias for lookup_asn; used by RCASN01 F2 picker)\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"receipt","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"search_asns"},"params":{"type":"object","properties":{"data":{"properties":{"page":{"description":"1-indexed page number. Default 1.","format":"int64","type":["integer","null"]},"page_size":{"description":"Page size. Default 50, capped at 200.","format":"int64","type":["integer","null"]},"q":{"description":"Optional substring on `receipt_number` or `external_receipt_number`. `None` returns the full window of recent ASN headers.","type":["string","null"]}},"title":"LookupAsnInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"search_asns","params":{"data":{"page":1,"page_size":1,"q":"<q>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/AsnHeader"},"title":"Array_of_AsnHeader","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"completion":"<completion>","id":1,"owner_code":"<owner_code>","owner_company":"<owner_company>","owner_id":1,"receipt_number":"<receipt_number>","status":"<status>"}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_asn_by_number":{"post":{"operationId":"get_asn_by_number","summary":"Exact-match resolver for a scanned ASN — single receipt or DocumentNotFound; used by RCASN01 autoSubmit","description":"Exact-match resolver for a scanned ASN — single receipt or DocumentNotFound; used by RCASN01 autoSubmit\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"receipt","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_asn_by_number"},"params":{"type":"object","properties":{"data":{"properties":{"receipt_number":{"description":"Exact receipt_number (e.g. \"0000000100\"). Matched by equality, not substring — scan-flow on RCASN01 hands a single scanned barcode and expects a single result.","type":"string"}},"required":["receipt_number"],"title":"GetAsnByNumberInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_asn_by_number","params":{"data":{"receipt_number":"<receipt_number>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"AsnHeader plus per-receipt qty roll-ups. Used by `get_asn_by_number` (scan-flow exact match) to feed RCASN01SUM progress widget without a separate aggregate RPC.","properties":{"completion":{"type":"string"},"expected_receipt_date":{"description":"RFC 3339 in UTC; RF shows it in the viewer's own zone.","format":"date-time","type":["string","null"]},"external_receipt_number":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"inventory_tracking_granularity":{"description":"`receipt.inventory_tracking_granularity` (`Aggregate` | `Pallet` | `Case`). RCCASE01 (case-level entry screen) reads this to decide whether to push the case-scan loop or surface a typed error (\"ASN is Aggregate — use Receive Against ASN instead\"). RCASN01 ignores it (Aggregate is the implicit default).","type":"string"},"open_episode":{"anyOf":[{"$ref":"#/components/schemas/OpenEpisodeBrief"},{"type":"null"}],"description":"First Open / InProgress / AwaitingConfirmation serial-capture episode attached to any detail of this receipt, if any. Null when none. RCASN01 / RCASN01SUM check this on entry / resume to surface the spec §10.13 recovery flow — re-route the operator straight into RCSN01 with prior progress instead of restarting capture."},"owner_code":{"type":"string"},"owner_company":{"type":"string"},"owner_id":{"format":"int64","type":"integer"},"qty_expected_total":{"format":"double","type":"number"},"qty_received_total":{"format":"double","type":"number"},"receipt_number":{"type":"string"},"status":{"type":"string"},"version":{"description":"OCC version (per CLAUDE.md classifier rules) — receipt is a stateful entity, downstream commands (`receipt_close` / `receipt_cancel` / `receipt_adjust_received_qty`) carry this on submit. RCASN01's `onResponseReceive.set` reads `response.version → display.receipt_version`; without it the rule silently resolved to undefined and any later stateful_command was sent without OCC protection.\n\nLives on `AsnDetails`, NOT on `AsnHeader`, because only the \"read full ASN to operate on it\" path needs the version. The F2 picker (`lookup_asn`/`search_asns`) lists candidates only — the operator picks one and then the flow fetches details via `get_asn_by_number`. Exposing version on every picker row was the \"version just in case from frontend\" anti-pattern.","format":"int32","type":"integer"}},"required":["completion","id","inventory_tracking_granularity","owner_code","owner_company","owner_id","qty_expected_total","qty_received_total","receipt_number","status","version"],"title":"AsnDetails","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"completion":"<completion>","id":1,"inventory_tracking_granularity":"<inventory_tracking_granularity>","owner_code":"<owner_code>","owner_company":"<owner_company>","owner_id":1,"qty_expected_total":1.5,"qty_received_total":1.5,"receipt_number":"<receipt_number>","status":"<status>","version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_open_blind_receipts":{"post":{"operationId":"list_open_blind_receipts","summary":"List open NoAsn receipts for the Receive Blind landing screen","description":"List open NoAsn receipts for the Receive Blind landing screen\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"receipt","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_open_blind_receipts"},"params":{"type":"object","properties":{"data":{"properties":{"owner_id":{"description":"Optional owner filter — when present, restricts to that owner's blind receipts.","format":"int64","type":["integer","null"]},"warehouse_id":{"description":"Compatibility field used by existing RF payloads. The authorized warehouse still comes from `Ctx`; this value must agree with it.","format":"int64","type":"integer"}},"required":["warehouse_id"],"title":"ListOpenBlindReceiptsInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_open_blind_receipts","params":{"data":{"warehouse_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/Receipt"},"title":"Array_of_Receipt","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"completion":{},"id":1,"inventory_tracking_granularity":{},"mod_when":"<mod_when>","mod_who":1,"owner_id":1,"receipt_number":"<receipt_number>","receipt_type":"Normal","status":"Open","version":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_damage_severity_codes":{"post":{"operationId":"list_damage_severity_codes","summary":"Active damage severity codes (Minor/Major/Total) — code_list_id 1006","description":"Active damage severity codes (Minor/Major/Total) — code_list_id 1006\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"receipt","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_damage_severity_codes"},"params":{"type":"object","properties":{"data":{"title":"EmptyInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_damage_severity_codes","params":{"data":{}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/CodeListEntry"},"title":"Array_of_CodeListEntry","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"code":"<code>","description":"<description>","display_order":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_damage_action_codes":{"post":{"operationId":"list_damage_action_codes","summary":"Active damage action codes (None/Hold/Reject) — code_list_id 1005","description":"Active damage action codes (None/Hold/Reject) — code_list_id 1005\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"receipt","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_damage_action_codes"},"params":{"type":"object","properties":{"data":{"title":"EmptyInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_damage_action_codes","params":{"data":{}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/CodeListEntry"},"title":"Array_of_CodeListEntry","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"code":"<code>","description":"<description>","display_order":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_shortage_reasons":{"post":{"operationId":"list_shortage_reasons","summary":"Shortage reasons for a short ASN receive — code list `shortage_reason`","description":"Shortage reasons for a short ASN receive — code list `shortage_reason`\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"receipt","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_shortage_reasons"},"params":{"type":"object","properties":{"data":{"title":"EmptyInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_shortage_reasons","params":{"data":{}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/ActiveCodeListValue"},"title":"Array_of_ActiveCodeListValue","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"code":"<code>","description":"<description>","display_order":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#search_open_lpns":{"post":{"operationId":"search_open_lpns","summary":"Plates a receive may be sent to, by code substring — the Receive dialog's LPN picker. Excludes Disposed (terminal). `residents_refuse_another_lot` predicts the commingle rule from the plate's own residents; the landing authority stays commingle_check.","description":"Plates a receive may be sent to, by code substring — the Receive dialog's LPN picker. Excludes Disposed (terminal). `residents_refuse_another_lot` predicts the commingle rule from the plate's own residents; the landing authority stays commingle_check.\n\n**Category:** `query`. Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":true,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"receipt","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"search_open_lpns"},"params":{"type":"object","properties":{"data":{"properties":{"limit":{"description":"Page size. Default 30, capped at 100 — the picker is a window, not a report.","format":"int64","type":["integer","null"]},"q":{"description":"Optional substring on the plate's code. `None` returns the newest window of plates.","type":["string","null"]}},"title":"SearchOpenLpnsInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"search_open_lpns","params":{"data":{"limit":1,"q":"<q>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/OpenLpn"},"title":"Array_of_OpenLpn","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"code":"<code>","residents_refuse_another_lot":false}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_qty_adjust_reasons":{"post":{"operationId":"list_qty_adjust_reasons","summary":"Reasons for adjusting a received qty — code list `qty_adjust_reason`","description":"Reasons for adjusting a received qty — code list `qty_adjust_reason`\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"receipt","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_qty_adjust_reasons"},"params":{"type":"object","properties":{"data":{"title":"EmptyInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_qty_adjust_reasons","params":{"data":{}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/ActiveCodeListValue"},"title":"Array_of_ActiveCodeListValue","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"code":"<code>","description":"<description>","display_order":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_open_customer_returns":{"post":{"operationId":"list_open_customer_returns","summary":"List open Customer Returns (CustomerReturn type, NOT Closed/Cancelled) for the RCRTN01 F2 picker","description":"List open Customer Returns (CustomerReturn type, NOT Closed/Cancelled) for the RCRTN01 F2 picker\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"receipt","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_open_customer_returns"},"params":{"type":"object","properties":{"data":{"properties":{"owner_id":{"description":"Optional owner filter — when present, restricts to that owner's open customer returns.","format":"int64","type":["integer","null"]},"q":{"description":"Substring match against `receipt.rma` (case-insensitive). `None` or empty → all open returns within the limit. rf-go's F2 picker always sends this as `q` (model.go `triggerLookupValues`).","type":["string","null"]}},"title":"ListOpenCustomerReturnsInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_open_customer_returns","params":{"data":{"owner_id":1,"q":"<q>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/Receipt"},"title":"Array_of_Receipt","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"completion":{},"id":1,"inventory_tracking_granularity":{},"mod_when":"<mod_when>","mod_who":1,"owner_id":1,"receipt_number":"<receipt_number>","receipt_type":"Normal","status":"Open","version":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#pre_validate_adjust_qty":{"post":{"operationId":"pre_validate_adjust_qty","summary":"Dry-run AdjustQty: terminal-status / negative-qty / picked-qty mismatch checks","description":"Dry-run AdjustQty: terminal-status / negative-qty / picked-qty mismatch checks\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"receipt","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"pre_validate_adjust_qty"},"params":{"type":"object","properties":{"data":{"properties":{"new_qty_received":{"description":"New `qty_received` the operator wants to set on the line. The dry-run rejects when this would push the line into \"received less than already picked / allocated\" territory (no negative inventory).","format":"double","type":"number"},"receipt_detail_id":{"format":"int64","type":"integer"}},"required":["new_qty_received","receipt_detail_id"],"title":"PreValidateAdjustQtyInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"pre_validate_adjust_qty","params":{"data":{"new_qty_received":1.5,"receipt_detail_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"Generic dry-run result for V-class endpoints. `can_proceed=true` means the corresponding command would (currently) succeed; `false` means at least one blocker is present and `reasons` enumerates them.\n\nV-class endpoints intentionally do NOT execute the real command — they are read-only previews for UI flows that want to disable a button before the operator pushes it. The authoritative gate is still the command itself, which performs the same checks under transactional lock and is the only path that mutates state.","properties":{"can_proceed":{"type":"boolean"},"reasons":{"items":{"type":"string"},"type":"array"}},"required":["can_proceed","reasons"],"title":"PreValidateResult","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"can_proceed":false,"reasons":["<reasons>"]}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#pre_validate_close":{"post":{"operationId":"pre_validate_close","summary":"Dry-run CloseReceipt — wraps get_close_blockers with the D-21 allow_discrepancy override","description":"Dry-run CloseReceipt — wraps get_close_blockers with the D-21 allow_discrepancy override\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"receipt","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"pre_validate_close"},"params":{"type":"object","properties":{"data":{"properties":{"allow_discrepancy":{"description":"Defaults to false. Set true to mirror CloseReceipt's `ALLOW_CLOSE_WITH_DISCREPANCY` system setting + supervisor override (D-21) — the `qty_mismatch` blocker is then downgraded to a warning (still surfaced in `reasons`, but `can_proceed=true`).","type":["boolean","null"]},"receipt_id":{"format":"int64","type":"integer"}},"required":["receipt_id"],"title":"PreValidateCloseInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"pre_validate_close","params":{"data":{"receipt_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"Generic dry-run result for V-class endpoints. `can_proceed=true` means the corresponding command would (currently) succeed; `false` means at least one blocker is present and `reasons` enumerates them.\n\nV-class endpoints intentionally do NOT execute the real command — they are read-only previews for UI flows that want to disable a button before the operator pushes it. The authoritative gate is still the command itself, which performs the same checks under transactional lock and is the only path that mutates state.","properties":{"can_proceed":{"type":"boolean"},"reasons":{"items":{"type":"string"},"type":"array"}},"required":["can_proceed","reasons"],"title":"PreValidateResult","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"can_proceed":false,"reasons":["<reasons>"]}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#pre_validate_cancel":{"post":{"operationId":"pre_validate_cancel","summary":"Dry-run CancelReceipt — derived from get_cancel_blockers (D-19 rules)","description":"Dry-run CancelReceipt — derived from get_cancel_blockers (D-19 rules)\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"receipt","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"pre_validate_cancel"},"params":{"type":"object","properties":{"data":{"properties":{"receipt_id":{"format":"int64","type":"integer"}},"required":["receipt_id"],"title":"PreValidateCancelInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"pre_validate_cancel","params":{"data":{"receipt_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"Generic dry-run result for V-class endpoints. `can_proceed=true` means the corresponding command would (currently) succeed; `false` means at least one blocker is present and `reasons` enumerates them.\n\nV-class endpoints intentionally do NOT execute the real command — they are read-only previews for UI flows that want to disable a button before the operator pushes it. The authoritative gate is still the command itself, which performs the same checks under transactional lock and is the only path that mutates state.","properties":{"can_proceed":{"type":"boolean"},"reasons":{"items":{"type":"string"},"type":"array"}},"required":["can_proceed","reasons"],"title":"PreValidateResult","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"can_proceed":false,"reasons":["<reasons>"]}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#pre_validate_put_on_hold":{"post":{"operationId":"pre_validate_put_on_hold","summary":"Dry-run PutOnHold — refuses on terminal status; surfaces 'already on hold' as a noop hint","description":"Dry-run PutOnHold — refuses on terminal status; surfaces 'already on hold' as a noop hint\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"receipt","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"pre_validate_put_on_hold"},"params":{"type":"object","properties":{"data":{"properties":{"receipt_id":{"format":"int64","type":"integer"}},"required":["receipt_id"],"title":"PreValidatePutOnHoldInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"pre_validate_put_on_hold","params":{"data":{"receipt_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"Generic dry-run result for V-class endpoints. `can_proceed=true` means the corresponding command would (currently) succeed; `false` means at least one blocker is present and `reasons` enumerates them.\n\nV-class endpoints intentionally do NOT execute the real command — they are read-only previews for UI flows that want to disable a button before the operator pushes it. The authoritative gate is still the command itself, which performs the same checks under transactional lock and is the only path that mutates state.","properties":{"can_proceed":{"type":"boolean"},"reasons":{"items":{"type":"string"},"type":"array"}},"required":["can_proceed","reasons"],"title":"PreValidateResult","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"can_proceed":false,"reasons":["<reasons>"]}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#pre_validate_report_damage":{"post":{"operationId":"pre_validate_report_damage","summary":"Dry-run ReportDamage: terminal-status / non-positive qty / damage exceeds unallocated received qty","description":"Dry-run ReportDamage: terminal-status / non-positive qty / damage exceeds unallocated received qty\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"receipt","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"pre_validate_report_damage"},"params":{"type":"object","properties":{"data":{"properties":{"qty_damaged":{"description":"Damaged qty the operator wants to record. Must be > 0 and must not exceed `qty_received - qty_damaged_already - qty_rejected` (you cannot damage more than has actually arrived and isn't already accounted for).","format":"double","type":"number"},"receipt_detail_id":{"format":"int64","type":"integer"}},"required":["qty_damaged","receipt_detail_id"],"title":"PreValidateReportDamageInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"pre_validate_report_damage","params":{"data":{"qty_damaged":1.5,"receipt_detail_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"Generic dry-run result for V-class endpoints. `can_proceed=true` means the corresponding command would (currently) succeed; `false` means at least one blocker is present and `reasons` enumerates them.\n\nV-class endpoints intentionally do NOT execute the real command — they are read-only previews for UI flows that want to disable a button before the operator pushes it. The authoritative gate is still the command itself, which performs the same checks under transactional lock and is the only path that mutates state.","properties":{"can_proceed":{"type":"boolean"},"reasons":{"items":{"type":"string"},"type":"array"}},"required":["can_proceed","reasons"],"title":"PreValidateResult","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"can_proceed":false,"reasons":["<reasons>"]}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#pre_validate_receive_against_asn":{"post":{"operationId":"pre_validate_receive_against_asn","summary":"Dry-run ReceiveAgainstAsn: receipt status / qty > 0 / temperature / pack-multiple / dates / serials / lot attrs vs expected / hold conditions","description":"Dry-run ReceiveAgainstAsn: receipt status / qty > 0 / temperature / pack-multiple / dates / serials / lot attrs vs expected / hold conditions\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"receipt","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"pre_validate_receive_against_asn"},"params":{"type":"object","properties":{"data":{"properties":{"external_lot":{"default":null,"description":"Optional supplier-side lot ID (cascade tier 4).","type":["string","null"]},"lot_attributes":{"additionalProperties":{"type":"string"},"default":{},"type":"object"},"qty":{"format":"double","type":"number"},"receipt_id":{"description":"Required — the receipt the operator is working against.","format":"int64","type":"integer"},"serial_numbers":{"items":{"type":"string"},"type":["array","null"]},"shortage_reason":{"type":["string","null"]},"sku_code":{"description":"The operator's scan: a SKU code or one of its barcodes (any GTIN width). The cascade keys on the SKU code it resolves to.","type":"string"},"temperature":{"format":"double","type":["number","null"]},"to_lpn":{"type":["string","null"]}},"required":["qty","receipt_id","sku_code"],"title":"PreValidateReceiveAgainstAsnInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"pre_validate_receive_against_asn","params":{"data":{"qty":1.5,"receipt_id":1,"sku_code":"<sku_code>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"Generic dry-run result for V-class endpoints. `can_proceed=true` means the corresponding command would (currently) succeed; `false` means at least one blocker is present and `reasons` enumerates them.\n\nV-class endpoints intentionally do NOT execute the real command — they are read-only previews for UI flows that want to disable a button before the operator pushes it. The authoritative gate is still the command itself, which performs the same checks under transactional lock and is the only path that mutates state.","properties":{"can_proceed":{"type":"boolean"},"reasons":{"items":{"type":"string"},"type":"array"}},"required":["can_proceed","reasons"],"title":"PreValidateResult","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"can_proceed":false,"reasons":["<reasons>"]}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#pre_validate_receive_blind_line":{"post":{"operationId":"pre_validate_receive_blind_line","summary":"Dry-run ReceiveBlindLine: receipt status / qty / SKU + owner / pipeline (no expected lot attrs comparison)","description":"Dry-run ReceiveBlindLine: receipt status / qty / SKU + owner / pipeline (no expected lot attrs comparison)\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"receipt","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"pre_validate_receive_blind_line"},"params":{"type":"object","properties":{"data":{"properties":{"lot_attributes":{"additionalProperties":{"type":"string"},"default":{},"type":"object"},"owner_id":{"description":"Optional override; falls back to receipt.owner_id when omitted.","format":"int64","type":["integer","null"]},"qty":{"format":"double","type":"number"},"receipt_id":{"format":"int64","type":"integer"},"serial_numbers":{"items":{"type":"string"},"type":["array","null"]},"sku_code":{"type":"string"},"temperature":{"format":"double","type":["number","null"]},"to_lpn":{"type":["string","null"]}},"required":["qty","receipt_id","sku_code"],"title":"PreValidateReceiveBlindLineInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"pre_validate_receive_blind_line","params":{"data":{"qty":1.5,"receipt_id":1,"sku_code":"<sku_code>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"Generic dry-run result for V-class endpoints. `can_proceed=true` means the corresponding command would (currently) succeed; `false` means at least one blocker is present and `reasons` enumerates them.\n\nV-class endpoints intentionally do NOT execute the real command — they are read-only previews for UI flows that want to disable a button before the operator pushes it. The authoritative gate is still the command itself, which performs the same checks under transactional lock and is the only path that mutates state.","properties":{"can_proceed":{"type":"boolean"},"reasons":{"items":{"type":"string"},"type":"array"}},"required":["can_proceed","reasons"],"title":"PreValidateResult","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"can_proceed":false,"reasons":["<reasons>"]}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#pre_validate_receive_return":{"post":{"operationId":"pre_validate_receive_return","summary":"Dry-run ReceiveReturn: qty / SKU lookup / pipeline (Resaleable+NeedsRefurb only) — Damaged/Discard skip pipeline","description":"Dry-run ReceiveReturn: qty / SKU lookup / pipeline (Resaleable+NeedsRefurb only) — Damaged/Discard skip pipeline\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"receipt","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"pre_validate_receive_return"},"params":{"type":"object","properties":{"data":{"properties":{"condition":{"description":"One of `Resaleable | NeedsRefurb | Damaged | Discard`. The dry-run short-circuits the SKU validation pipeline on `Damaged`/`Discard` (those don't enter inventory) and only enforces qty + SKU lookup.","type":"string"},"lot_attributes":{"additionalProperties":{"type":"string"},"default":{},"type":"object"},"owner_id":{"format":"int64","type":"integer"},"qty":{"format":"double","type":"number"},"sku_code":{"type":"string"},"temperature":{"format":"double","type":["number","null"]},"to_lpn":{"type":["string","null"]}},"required":["condition","owner_id","qty","sku_code"],"title":"PreValidateReceiveReturnInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"pre_validate_receive_return","params":{"data":{"condition":"<condition>","owner_id":1,"qty":1.5,"sku_code":"<sku_code>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"Generic dry-run result for V-class endpoints. `can_proceed=true` means the corresponding command would (currently) succeed; `false` means at least one blocker is present and `reasons` enumerates them.\n\nV-class endpoints intentionally do NOT execute the real command — they are read-only previews for UI flows that want to disable a button before the operator pushes it. The authoritative gate is still the command itself, which performs the same checks under transactional lock and is the only path that mutates state.","properties":{"can_proceed":{"type":"boolean"},"reasons":{"items":{"type":"string"},"type":"array"}},"required":["can_proceed","reasons"],"title":"PreValidateResult","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"can_proceed":false,"reasons":["<reasons>"]}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#receipt_receive_against_asn":{"post":{"operationId":"receipt_receive_against_asn","summary":"Receive against an existing ASN line (D-22).","description":"Receive against an existing ASN line (D-22).\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n- This method can ask for a supervisor override. Send the codes the operator accepted in `acknowledged_overrides`. See 04-command-types-and-concurrency.md and 05-errors.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"receipt_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"receipt_receive_against_asn"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"acknowledged_overrides":{"default":[],"items":{"format":"int16","type":"integer"},"type":"array","uniqueItems":true},"damage_info":{"anyOf":[{"$ref":"#/components/schemas/DamageInfo"},{"type":"null"}],"default":null,"description":"UC-RCV-09 — ASN F4 damage hot-key sub-flow. When the operator inside an ASN summary marks goods as damaged, RF sends nested DamageInfo here. Auto-fired ReportDamage attaches the audit row to the synth-line that the cascade lookup creates for unplanned damaged units. (Planned-line UPDATE path doesn't propagate yet — rare in practice; tracked as a follow-up.)"},"external_lot":{"default":null,"description":"Supplier-side lot ID scanned by the operator (cascade tier 4). Optional — most receives don't carry one.","type":["string","null"]},"idempotency_key":{"format":"uuid","type":"string"},"lot_attributes":{"additionalProperties":{"type":"string"},"default":{},"type":"object"},"override_grant_id":{"default":null,"description":"A supervisor's grant (`supervisor_override_grant`) authorising a capability-gated override on the LINE this receive books onto — a shortage (28) or an excess (27) — for an operator who does not hold the capability. Its pairs must be `{code, subject: \"receipt:<receipt_id>/line:<receipt_detail_id>\"}`, where the line is the one the cascade resolves this scan to; a refused receive names that exact pair in `context.pairs`. A receive that opens a new (synthetic) line cannot be authorised by grant. The authoriser recorded is the grant's, never a field of this request. Optional: a caller who holds the capability keeps acknowledging with the bare code in `acknowledged_overrides`, exactly as before. See `shared::override_grant`.","format":"uuid","type":["string","null"]},"pack_id":{"format":"int64","type":["integer","null"]},"printer_id":{"format":"int64","type":["integer","null"]},"qty":{"format":"double","type":"number"},"receipt_id":{"format":"int64","type":"integer"},"serial_numbers":{"items":{"type":"string"},"type":["array","null"]},"shortage_reason":{"type":["string","null"]},"sku_code":{"description":"SKU code from the operator's scan — the cascade keys on it. Mandatory: per ADR-047 the receive API takes business-level identifiers only (no `receipt_detail_id` leaks). The system resolves to a target `receipt_detail` row internally via `cascade_lookup`, or creates a synthetic line when no open ASN line matches.","type":"string"},"target_container":{"anyOf":[{"$ref":"#/components/schemas/TargetContainerSpec"},{"type":"null"}],"default":null,"description":"Phase 4 — preferred container intent. Resolved to a container_id at the deposit/event boundary via `ContainerService::resolve_or_create`. When `None`, the command falls back to `to_lpn` (legacy path)."},"temperature":{"format":"double","type":["number","null"]},"to_loc":{"type":"string"},"to_lpn":{"description":"Legacy LPN-string input (Phase 1-3). Still accepted for backward compatibility; ignored when `target_container` is populated.","type":["string","null"]},"uom":{"type":["string","null"]},"uom_received":{"default":null,"description":"ADR-045 §1 — operator-entered native UOM. For ASN flow, falls back to `receipt_detail.uom` (line-level expected) → `sku.default_uom`.","type":["string","null"]}},"required":["idempotency_key","qty","receipt_id","sku_code","to_loc"],"title":"ReceiveAgainstAsn","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"receipt_receive_against_asn","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"qty":1.5,"receipt_id":1,"sku_code":"<sku_code>","to_loc":"<to_loc>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"collect_serials":{"description":"Backend-driven gate for the `RCSN01` serial-capture loop (ADR-062, G-12). `true` when the SKU is serial-tracked (`sku_serial_config.continuous_serial_tracking`) AND the operator did NOT pass `serial_numbers` inline on this call — i.e. the deferred capture flow is needed. Seed routes RCSN01 only when this is `true`.","type":"boolean"},"completion_detail":{"$ref":"#/components/schemas/ReceiptCompletion"},"completion_header":{"$ref":"#/components/schemas/ReceiptCompletion"},"holds_applied":{"description":"D-28 — auto-holds applied to LPN during this receive. Empty if none.","items":{"$ref":"#/components/schemas/HoldInfo"},"type":"array"},"line_number":{"type":"string"},"new_version":{"format":"int32","type":"integer"},"open_episode":{"anyOf":[{"$ref":"#/components/schemas/OpenEpisodeState"},{"type":"null"}],"description":"The capture episode this receive opened or folded into, with what it now holds in total. A progress panel reads THIS, never the increment above: a second receive on the same line sums into one episode."},"owner_id":{"description":"Owner that owns the just-received line. Surfaced so RCSN01 / its status bar can render `owner / sku / lot` without a second round-trip; future `capture_serial` validation will also cross- check the operator's session against this.","format":"int64","type":"integer"},"qty_received":{"format":"double","type":"number"},"receipt_detail_id":{"format":"int64","type":"integer"},"receipt_id":{"format":"int64","type":"integer"},"serials_to_collect_qty":{"description":"How many serials the operator must collect to satisfy the just- received line. `qty as u32` (floored — serial-tracked SKUs are always integer-unit). Zero when `collect_serials` is `false`.\n\nTHIS call's obligation. The episode may hold more — see `open_episode`.","format":"uint32","minimum":0,"type":"integer"},"sku_code":{"description":"SKU code of the just-received line (matches `receipt_detail.sku`). Same rationale as `owner_id` — keeps the deferred loop screen self-sufficient.","type":"string"},"sku_id":{"description":"SKU primary key. Needed by clients that want to query `sku_serial_config` (anomaly thresholds, parse mode, etc.) without first resolving by code + owner.","format":"int64","type":"integer"}},"required":["collect_serials","completion_detail","completion_header","holds_applied","line_number","new_version","owner_id","qty_received","receipt_detail_id","receipt_id","serials_to_collect_qty","sku_code","sku_id"],"title":"ReceiveAgainstAsnResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"collect_serials":false,"completion_detail":"Pending","completion_header":"Pending","holds_applied":[{"code":"<code>","reason":"<reason>","scope":{"kind":null,"value":null}}],"line_number":"<line_number>","new_version":1,"owner_id":1,"qty_received":1.5,"receipt_detail_id":1,"receipt_id":1,"serials_to_collect_qty":1,"sku_code":"<sku_code>","sku_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#receipt_cancel":{"post":{"operationId":"receipt_cancel","summary":"Cancel a receipt (D-19, completion=Pending only).","description":"Cancel a receipt (D-19, completion=Pending only).\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n**Versioned entities:** receipt (id in data.receipt_id, version in data.expected_receipt_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_receipt_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n- This method can ask for a supervisor override. Send the codes the operator accepted in `acknowledged_overrides`. See 04-command-types-and-concurrency.md and 05-errors.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[{"entity":"receipt","id_field":"receipt_id","version_field":"expected_receipt_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"receipt_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"receipt_cancel"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"acknowledged_overrides":{"default":[],"items":{"format":"int16","type":"integer"},"type":"array","uniqueItems":true},"cancel_reason":{"type":"string"},"expected_receipt_version":{"description":"Receipt-header OCC version (per the `expected_<entity>_version` naming convention shared with `AdjustReceivedQty::expected_line_version` and `SetDamageDisposition::expected_damage_version`).","format":"int32","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"},"receipt_id":{"format":"int64","type":"integer"}},"required":["cancel_reason","expected_receipt_version","idempotency_key","receipt_id"],"title":"CancelReceipt","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"receipt_cancel","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"cancel_reason":"<cancel_reason>","expected_receipt_version":1,"receipt_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"cancel_summary":true,"new_version":{"format":"int32","type":"integer"},"receipt_id":{"format":"int64","type":"integer"}},"required":["cancel_summary","new_version","receipt_id"],"title":"CancelReceiptResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"cancel_summary":null,"new_version":1,"receipt_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#receipt_put_on_hold":{"post":{"operationId":"receipt_put_on_hold","summary":"Put a receipt on hold (cascades to non-terminal details).","description":"Put a receipt on hold (cascades to non-terminal details).\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n- This method can ask for a supervisor override. Send the codes the operator accepted in `acknowledged_overrides`. See 04-command-types-and-concurrency.md and 05-errors.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"receipt_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"receipt_put_on_hold"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"acknowledged_overrides":{"default":[],"items":{"format":"int16","type":"integer"},"type":"array","uniqueItems":true},"comments":{"type":["string","null"]},"hold_reason_code":{"type":"string"},"idempotency_key":{"format":"uuid","type":"string"},"receipt_id":{"format":"int64","type":"integer"}},"required":["hold_reason_code","idempotency_key","receipt_id"],"title":"PutOnHold","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"receipt_put_on_hold","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"hold_reason_code":"<hold_reason_code>","receipt_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"details_held":{"format":"uint64","minimum":0,"type":"integer"},"new_version":{"format":"int32","type":"integer"},"receipt_id":{"format":"int64","type":"integer"}},"required":["details_held","new_version","receipt_id"],"title":"PutOnHoldResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"details_held":1,"new_version":1,"receipt_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#receipt_release_from_hold":{"post":{"operationId":"receipt_release_from_hold","summary":"Release a receipt from hold.","description":"Release a receipt from hold.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n- This method can ask for a supervisor override. Send the codes the operator accepted in `acknowledged_overrides`. See 04-command-types-and-concurrency.md and 05-errors.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"receipt_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"receipt_release_from_hold"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"acknowledged_overrides":{"default":[],"items":{"format":"int16","type":"integer"},"type":"array","uniqueItems":true},"idempotency_key":{"format":"uuid","type":"string"},"receipt_id":{"format":"int64","type":"integer"},"release_comments":{"type":["string","null"]}},"required":["idempotency_key","receipt_id"],"title":"ReleaseFromHold","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"receipt_release_from_hold","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"receipt_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"details_released":{"format":"uint64","minimum":0,"type":"integer"},"new_version":{"format":"int32","type":"integer"},"receipt_id":{"format":"int64","type":"integer"}},"required":["details_released","new_version","receipt_id"],"title":"ReleaseFromHoldResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"details_released":1,"new_version":1,"receipt_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#receipt_report_damage":{"post":{"operationId":"receipt_report_damage","summary":"Report damage on a receipt detail (D-26).","description":"Report damage on a receipt detail (D-26).\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n- This method can ask for a supervisor override. Send the codes the operator accepted in `acknowledged_overrides`. See 04-command-types-and-concurrency.md and 05-errors.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"receipt_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"receipt_report_damage"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"acknowledged_overrides":{"default":[],"items":{"format":"int16","type":"integer"},"type":"array","uniqueItems":true},"damaged_qty":{"format":"double","type":"number"},"dest_loc":{"default":null,"description":"Optional destination location for an auto-triggered Move primitive (Move Spec §0 D-9, Kanban M-115). When populated: - severity=Major  → MoveCommand(source_type=MoveToQc, dest_loc=...) - severity=Total  → MoveCommand(source_type=MoveToDamage, dest_loc=...) - severity=Minor  → no move regardless of dest_loc. When `None` → legacy behavior (damage row + lpn hold only, no physical move). Caller (operator UI / future allocation policy epic) resolves which location to use; MoveCommand never resolves itself.","type":["string","null"]},"idempotency_key":{"format":"uuid","type":"string"},"photo_attachment_ids":{"description":"Ключи объектов, которые оператор уже загрузил по подписанным ссылкам (`receipt_damage_photo_upload_url`). Ложатся в `receipt_detail_damage.photo_attachment_ids` В ТОЙ ЖЕ ТРАНЗАКЦИИ, что и сама запись, — либо запись с фотографиями, либо ни то, ни другое.\n\nНеобязательны, и это не формальность: в макете фото «recommended», и повреждение записывается без них.\n\n**Тип поля был `Option<Vec<i64>>`** — с Phase 1, где фотографии мыслились числовыми id вложений (колонку завела wms-app 084 как «Phase 2+ attachments»). Ключ объекта в S3 — строка, и в `i64` он не влезает; менять тип безопасно, потому что отправителя у поля никогда не было: во всех вызовах (включая `app_server_quick_dev`) оно `null`. Имя колонки осталось историческим — миграции под фото не требуется.\n\nКаждый ключ проверяется на принадлежность ЭТОЙ строке приёмки ([`photo_column_for_line`]): значение приезжает от клиента, и без проверки к своему повреждению можно было бы прицепить чужую фотографию.","items":{"type":"string"},"type":["array","null"]},"reason_code":{"type":"string"},"reason_description":{"type":["string","null"]},"receipt_detail_id":{"format":"int64","type":"integer"},"receipt_id":{"format":"int64","type":"integer"},"severity":{"$ref":"#/components/schemas/DamageSeverity"},"vendor_responsibility":{"default":false,"description":"Operator's assessment: true = vendor responsible (drives ERP vendor-claim event downstream); false (default) = warehouse-eaten / undecided. Audit-only — Quark doesn't branch on it.","type":"boolean"}},"required":["damaged_qty","idempotency_key","reason_code","receipt_detail_id","receipt_id","severity"],"title":"ReportDamage","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"receipt_report_damage","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"damaged_qty":1.5,"reason_code":"<reason_code>","receipt_detail_id":1,"receipt_id":1,"severity":"Minor"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"action_taken":{"$ref":"#/components/schemas/DamageAction"},"damage_record_id":{"format":"int64","type":"integer"},"holds_applied":{"default":[],"description":"Holds applied as a side-effect of severity-mapped action (e.g. `DamageAction::Hold` → 1 entry with code='Damaged' on the LPN). Empty when severity maps to None/Reject, OR when the LPN lookup found nothing to hold (CRUD-fixture line without a deposit step).","items":{"$ref":"#/components/schemas/HoldInfo"},"type":"array"},"new_qty_damaged":{"format":"double","type":"number"},"new_version":{"format":"int32","type":"integer"},"receipt_id":{"format":"int64","type":"integer"}},"required":["action_taken","damage_record_id","new_qty_damaged","new_version","receipt_id"],"title":"ReportDamageResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"action_taken":"None","damage_record_id":1,"new_qty_damaged":1.5,"new_version":1,"receipt_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#receipt_write_off_damage":{"post":{"operationId":"receipt_write_off_damage","summary":"Write off a damage record — decrements inventory, releases Damaged hold, sets disposition='WrittenOff', publishes damage.disposition_decided + damage.written_off (T-062).","description":"Write off a damage record — decrements inventory, releases Damaged hold, sets disposition='WrittenOff', publishes damage.disposition_decided + damage.written_off (T-062).\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"receipt_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"receipt_write_off_damage"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"damage_record_id":{"format":"int64","type":"integer"},"gl_account_hint":{"description":"Optional GL account override; when None, falls back to `OwnerConfig.write_off_gl_account_hint` for the receipt's owner. Either way, ERP partner consumes the hint or maps it through their own table.","type":["string","null"]},"idempotency_key":{"format":"uuid","type":"string"},"reason_code":{"description":"Free-form reason code (e.g. NoRecoveryValue, TotalLoss, OperatorAccident).","type":"string"},"reason_description":{"type":["string","null"]}},"required":["damage_record_id","idempotency_key","reason_code"],"title":"WriteOffDamage","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"receipt_write_off_damage","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"damage_record_id":1,"reason_code":"<reason_code>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"damage_record_id":{"format":"int64","type":"integer"},"disposition":{"type":"string"},"holds_released":{"description":"Number of Damaged-code holds released as part of write-off.","format":"uint","minimum":0,"type":"integer"},"transaction_log_id":{"description":"transaction_log row id created by the inventory decrement.","format":"int64","type":"integer"},"written_off_qty":{"format":"double","type":"number"}},"required":["damage_record_id","disposition","holds_released","transaction_log_id","written_off_qty"],"title":"WriteOffDamageResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"damage_record_id":1,"disposition":"<disposition>","holds_released":1,"transaction_log_id":1,"written_off_qty":1.5}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#receipt_move_damage_to_rtv":{"post":{"operationId":"receipt_move_damage_to_rtv","summary":"Move a damaged LPN to RTV staging — triggers MoveCommand(MoveToRtv), sets disposition='RTV', publishes damage.disposition_decided + damage.rtv_initiated (T-062).","description":"Move a damaged LPN to RTV staging — triggers MoveCommand(MoveToRtv), sets disposition='RTV', publishes damage.disposition_decided + damage.rtv_initiated (T-062).\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n- This method can ask for a supervisor override. Send the codes the operator accepted in `acknowledged_overrides`. See 04-command-types-and-concurrency.md and 05-errors.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"receipt_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"receipt_move_damage_to_rtv"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"acknowledged_overrides":{"default":[],"description":"Forwarded to the inner Move primitive's hold-aware validator (§3.2.3) — supervisor overrides cascade through.","items":{"format":"int16","type":"integer"},"type":"array","uniqueItems":true},"claim_amount_hint":{"description":"Optional operator/supervisor estimate of vendor claim amount; passed as `claim_amount_hint` in the outbox event for the ERP-side claim.","format":"double","type":["number","null"]},"currency":{"type":["string","null"]},"damage_record_id":{"format":"int64","type":"integer"},"dest_loc":{"description":"Optional explicit destination override. When None, falls back to `OwnerConfig.default_rtv_loc` → `OwnerConfig.default_returns_loc`.","type":["string","null"]},"gl_account_hint":{"description":"Optional GL account override; when None, falls back to `OwnerConfig.rtv_gl_account_hint`.","type":["string","null"]},"idempotency_key":{"format":"uuid","type":"string"},"reason_code":{"description":"Free-form reason code (e.g. SUPPLIER_PACKAGING, TRANSIT_DAMAGE).","type":"string"},"reason_description":{"type":["string","null"]},"vendor_id":{"format":"int64","type":["integer","null"]}},"required":["damage_record_id","idempotency_key","reason_code"],"title":"MoveDamageToRtv","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"receipt_move_damage_to_rtv","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"damage_record_id":1,"reason_code":"<reason_code>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"damage_record_id":{"format":"int64","type":"integer"},"disposition":{"type":"string"},"from_loc":{"type":["string","null"]},"qty_moved":{"format":"double","type":"number"},"to_loc":{"type":"string"}},"required":["damage_record_id","disposition","qty_moved","to_loc"],"title":"MoveDamageToRtvResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"damage_record_id":1,"disposition":"<disposition>","qty_moved":1.5,"to_loc":"<to_loc>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#receipt_set_damage_disposition":{"post":{"operationId":"receipt_set_damage_disposition","summary":"Set damage disposition marker (Repurpose | Destroyed) — no physical effect, just records the decision + publishes damage.disposition_decided (T-062).","description":"Set damage disposition marker (Repurpose | Destroyed) — no physical effect, just records the decision + publishes damage.disposition_decided (T-062).\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n**Versioned entities:** receipt_detail_damage (id in data.damage_record_id, version in data.expected_damage_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_damage_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[{"entity":"receipt_detail_damage","id_field":"damage_record_id","version_field":"expected_damage_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"receipt_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"receipt_set_damage_disposition"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"damage_record_id":{"format":"int64","type":"integer"},"disposition":{"$ref":"#/components/schemas/SetDamageDispositionKind"},"expected_damage_version":{"description":"Per-row OCC version (Slice #3, migration 157). Operator's disposition decision depends on what they read about the damage record (severity is immutable, but `move_failed` may flip false→true asynchronously after an auto-move retry). Stale read of `move_failed=false` → operator chose Repurpose, but the auto-move actually failed → operator might have escalated instead. OCC surfaces the change so the operator re-decides.\n\nVersioned entity: `receipt_detail_damage`.","format":"int32","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"},"reason_code":{"type":"string"},"reason_description":{"type":["string","null"]}},"required":["damage_record_id","disposition","expected_damage_version","idempotency_key","reason_code"],"title":"SetDamageDisposition","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"receipt_set_damage_disposition","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"damage_record_id":1,"disposition":"Repurpose","expected_damage_version":1,"reason_code":"<reason_code>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"damage_record_id":{"format":"int64","type":"integer"},"disposition":{"type":"string"},"new_damage_version":{"description":"Post-bump damage_record version (Slice #3). Caller chains this into any follow-up command on the same damage row.","format":"int32","type":"integer"}},"required":["damage_record_id","disposition","new_damage_version"],"title":"SetDamageDispositionResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"damage_record_id":1,"disposition":"<disposition>","new_damage_version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#receipt_receive_blind":{"post":{"operationId":"receipt_receive_blind","summary":"Open a fully blind receipt + first line.","description":"Open a fully blind receipt + first line.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n- This method can ask for a supervisor override. Send the codes the operator accepted in `acknowledged_overrides`. See 04-command-types-and-concurrency.md and 05-errors.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"receipt_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"receipt_receive_blind"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"acknowledged_overrides":{"default":[],"items":{"format":"int16","type":"integer"},"type":"array","uniqueItems":true},"carrier_id":{"format":"int64","type":["integer","null"]},"damage_info":{"anyOf":[{"$ref":"#/components/schemas/DamageInfo"},{"type":"null"}],"default":null,"description":"UC-RCV-09 — when the operator marks this receive line as damaged (RCDMG_RECV01 flow), the RF client sends a nested DamageInfo payload. Backend auto-fires `ReportDamage` in the same tx so the audit row lands atomically with the receipt_detail row."},"external_lot":{"default":null,"description":"Supplier-side lot ID scanned by the operator. Triggers D-64 `validate_external_lot_uniqueness` in the validation pipeline. Optional — most blind receives don't carry one.","type":["string","null"]},"idempotency_key":{"format":"uuid","type":"string"},"lot_attributes":{"additionalProperties":{"type":"string"},"default":{},"type":"object"},"owner_id":{"format":"int64","type":"integer"},"pack_id":{"format":"int64","type":["integer","null"]},"po_id":{"format":"int64","type":["integer","null"]},"printer_id":{"format":"int64","type":["integer","null"]},"qty":{"format":"double","type":"number"},"receipt_number":{"type":["string","null"]},"receipt_type":{"allOf":[{"$ref":"#/components/schemas/ReceiptType"}],"description":"Legacy wire field. The server persists NoAsn regardless of this input."},"serial_numbers":{"items":{"type":"string"},"type":["array","null"]},"sku_code":{"type":"string"},"supplier_id":{"format":"int64","type":["integer","null"]},"target_container":{"anyOf":[{"$ref":"#/components/schemas/TargetContainerSpec"},{"type":"null"}],"default":null,"description":"Phase 4 — preferred container intent. Falls back to `to_lpn` when None."},"temperature":{"format":"double","type":["number","null"]},"to_loc":{"type":"string"},"to_lpn":{"description":"Legacy LPN-string input. Ignored when `target_container` is populated.","type":["string","null"]},"uom":{"type":["string","null"]},"uom_received":{"default":null,"description":"ADR-045 §1 — operator-entered native UOM (e.g. \"CS\"). When None, resolver falls back to `sku.default_uom`. `qty` field above is interpreted in this UOM; resolver converts to base for storage.","type":["string","null"]}},"required":["idempotency_key","owner_id","qty","receipt_type","sku_code","to_loc"],"title":"ReceiveBlind","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"receipt_receive_blind","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"owner_id":1,"qty":1.5,"receipt_type":{},"sku_code":"<sku_code>","to_loc":"<to_loc>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"collect_serials":{"description":"Mirror of `ReceiveAgainstAsnResult.collect_serials` (G-12). True when the just-received line needs the deferred RCSN01 capture loop next — SKU is serial-tracked AND the operator didn't supply serials inline. RCBLIND01LINE.onResponseReceive uses this to branch into RCSN01 instead of dropping straight to DONE.","type":"boolean"},"completion_detail":{"$ref":"#/components/schemas/ReceiptCompletion"},"completion_header":{"$ref":"#/components/schemas/ReceiptCompletion"},"holds_applied":{"description":"D-28 — auto-holds applied during this receive.","items":{"$ref":"#/components/schemas/HoldInfo"},"type":"array"},"line_number":{"type":"string"},"new_version":{"format":"int32","type":"integer"},"open_episode":{"anyOf":[{"$ref":"#/components/schemas/OpenEpisodeState"},{"type":"null"}],"description":"The capture episode this receive opened or folded into. A progress panel reads this, never the increment above."},"qty_received":{"format":"double","type":"number"},"receipt_detail_id":{"format":"int64","type":"integer"},"receipt_id":{"format":"int64","type":"integer"},"receipt_number":{"type":"string"},"serials_to_collect_qty":{"description":"Number of serials the operator must collect to satisfy this line. `floor(qty)` for serial-tracked SKUs (always integer-unit); zero when `collect_serials` is `false`. THIS call's obligation — the episode may hold more, see `open_episode`.","format":"uint32","minimum":0,"type":"integer"}},"required":["collect_serials","completion_detail","completion_header","holds_applied","line_number","new_version","qty_received","receipt_detail_id","receipt_id","receipt_number","serials_to_collect_qty"],"title":"ReceiveBlindResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"collect_serials":false,"completion_detail":"Pending","completion_header":"Pending","holds_applied":[{"code":"<code>","reason":"<reason>","scope":{"kind":null,"value":null}}],"line_number":"<line_number>","new_version":1,"qty_received":1.5,"receipt_detail_id":1,"receipt_id":1,"receipt_number":"<receipt_number>","serials_to_collect_qty":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#receipt_receive_blind_line":{"post":{"operationId":"receipt_receive_blind_line","summary":"Receive a blind SKU line on an existing receipt.","description":"Receive a blind SKU line on an existing receipt.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n- This method can ask for a supervisor override. Send the codes the operator accepted in `acknowledged_overrides`. See 04-command-types-and-concurrency.md and 05-errors.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"receipt_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"receipt_receive_blind_line"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"acknowledged_overrides":{"default":[],"items":{"format":"int16","type":"integer"},"type":"array","uniqueItems":true},"damage_info":{"anyOf":[{"$ref":"#/components/schemas/DamageInfo"},{"type":"null"}],"default":null,"description":"UC-RCV-09 — see ReceiveBlind.damage_info doc."},"external_lot":{"default":null,"description":"Supplier-side lot ID scanned by the operator. Triggers D-64 `validate_external_lot_uniqueness` in the validation pipeline. Optional — most blind receives don't carry one.","type":["string","null"]},"idempotency_key":{"format":"uuid","type":"string"},"lot_attributes":{"additionalProperties":{"type":"string"},"default":{},"type":"object"},"owner_id":{"format":"int64","type":["integer","null"]},"pack_id":{"format":"int64","type":["integer","null"]},"printer_id":{"format":"int64","type":["integer","null"]},"qty":{"format":"double","type":"number"},"receipt_id":{"format":"int64","type":"integer"},"serial_numbers":{"items":{"type":"string"},"type":["array","null"]},"sku_code":{"type":"string"},"target_container":{"anyOf":[{"$ref":"#/components/schemas/TargetContainerSpec"},{"type":"null"}],"default":null,"description":"Phase 4 — preferred container intent. Falls back to `to_lpn` when None."},"temperature":{"format":"double","type":["number","null"]},"to_loc":{"type":"string"},"to_lpn":{"description":"Legacy LPN-string input. Ignored when `target_container` is populated.","type":["string","null"]},"uom":{"type":["string","null"]},"uom_received":{"default":null,"description":"ADR-045 §1 — native UOM as entered (defaults to sku.default_uom).","type":["string","null"]}},"required":["idempotency_key","qty","receipt_id","sku_code","to_loc"],"title":"ReceiveBlindLine","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"receipt_receive_blind_line","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"qty":1.5,"receipt_id":1,"sku_code":"<sku_code>","to_loc":"<to_loc>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"collect_serials":{"description":"Mirror of `ReceiveAgainstAsnResult.collect_serials` — true when the just-added line needs the RCSN01 deferred-capture loop next. See `receive_blind.rs` doc for the full rationale.","type":"boolean"},"completion_detail":{"$ref":"#/components/schemas/ReceiptCompletion"},"completion_header":{"$ref":"#/components/schemas/ReceiptCompletion"},"holds_applied":{"items":{"$ref":"#/components/schemas/HoldInfo"},"type":"array"},"line_number":{"type":"string"},"new_version":{"format":"int32","type":"integer"},"open_episode":{"anyOf":[{"$ref":"#/components/schemas/OpenEpisodeState"},{"type":"null"}],"description":"The capture episode this receive opened or folded into. A progress panel reads this, never the increment above."},"qty_received":{"format":"double","type":"number"},"receipt_detail_id":{"format":"int64","type":"integer"},"receipt_id":{"format":"int64","type":"integer"},"serials_to_collect_qty":{"description":"Number of serials the operator must collect; `floor(qty)` for serial-tracked SKUs (always integer-unit), zero otherwise. THIS call's obligation — the episode may hold more, see `open_episode`.","format":"uint32","minimum":0,"type":"integer"}},"required":["collect_serials","completion_detail","completion_header","holds_applied","line_number","new_version","qty_received","receipt_detail_id","receipt_id","serials_to_collect_qty"],"title":"ReceiveBlindLineResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"collect_serials":false,"completion_detail":"Pending","completion_header":"Pending","holds_applied":[{"code":"<code>","reason":"<reason>","scope":{"kind":null,"value":null}}],"line_number":"<line_number>","new_version":1,"qty_received":1.5,"receipt_detail_id":1,"receipt_id":1,"serials_to_collect_qty":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#receipt_receive_return":{"post":{"operationId":"receipt_receive_return","summary":"Receive a customer return (RMA flow).","description":"Receive a customer return (RMA flow).\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n- This method can ask for a supervisor override. Send the codes the operator accepted in `acknowledged_overrides`. See 04-command-types-and-concurrency.md and 05-errors.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"receipt_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"receipt_receive_return"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"acknowledged_overrides":{"default":[],"items":{"format":"int16","type":"integer"},"type":"array","uniqueItems":true},"condition":{"$ref":"#/components/schemas/ReturnCondition"},"damage_info":{"anyOf":[{"$ref":"#/components/schemas/DamageInfo"},{"type":"null"}],"default":null,"description":"UC-RCV-09 + UC-RCV-03 — when condition=Damaged operator may also capture severity/reason/description/vendor_responsibility via this nested payload. Auto-fired ReportDamage attaches the audit row to the just-created return line. No-op when None (Resaleable / NeedsRefurb / Discard receives, OR Damaged receives without extra details)."},"idempotency_key":{"format":"uuid","type":"string"},"lot_attributes":{"additionalProperties":{"type":"string"},"default":{},"type":"object"},"original_order_id":{"format":"int64","type":["integer","null"]},"owner_id":{"format":"int64","type":"integer"},"pack_id":{"format":"int64","type":["integer","null"]},"printer_id":{"format":"int64","type":["integer","null"]},"qty":{"format":"double","type":"number"},"return_reason_code":{"type":"string"},"rma":{"type":"string"},"sku_code":{"type":"string"},"target_container":{"anyOf":[{"$ref":"#/components/schemas/TargetContainerSpec"},{"type":"null"}],"default":null,"description":"Phase 4 — preferred container intent. Falls back to `to_lpn` when None."},"temperature":{"format":"double","type":["number","null"]},"to_loc":{"type":"string"},"to_lpn":{"description":"Legacy LPN-string input. Ignored when `target_container` is populated.","type":["string","null"]},"uom":{"type":["string","null"]},"uom_received":{"default":null,"description":"ADR-045 §1 — native UOM as entered by the operator at return.","type":["string","null"]}},"required":["condition","idempotency_key","owner_id","qty","return_reason_code","rma","sku_code","to_loc"],"title":"ReceiveReturn","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"receipt_receive_return","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"condition":"Resaleable","owner_id":1,"qty":1.5,"return_reason_code":"<return_reason_code>","rma":"<rma>","sku_code":"<sku_code>","to_loc":"<to_loc>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"completion_detail":{"$ref":"#/components/schemas/ReceiptCompletion"},"completion_header":{"$ref":"#/components/schemas/ReceiptCompletion"},"deposited":{"description":"Echoed for post_commit auto-print decision (whether deposit happened).","type":"boolean"},"holds_applied":{"description":"D-28 — auto-holds applied during this receive (Resaleable / NeedsRefurb only).","items":{"$ref":"#/components/schemas/HoldInfo"},"type":"array"},"line_number":{"type":"string"},"new_version":{"format":"int32","type":"integer"},"qty_damaged":{"format":"double","type":"number"},"qty_received":{"format":"double","type":"number"},"qty_rejected":{"format":"double","type":"number"},"receipt_detail_id":{"format":"int64","type":"integer"},"receipt_id":{"format":"int64","type":"integer"},"receipt_number":{"type":"string"}},"required":["completion_detail","completion_header","deposited","holds_applied","line_number","new_version","qty_damaged","qty_received","qty_rejected","receipt_detail_id","receipt_id","receipt_number"],"title":"ReceiveReturnResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"completion_detail":"Pending","completion_header":"Pending","deposited":false,"holds_applied":[{"code":"<code>","reason":"<reason>","scope":{"kind":null,"value":null}}],"line_number":"<line_number>","new_version":1,"qty_damaged":1.5,"qty_received":1.5,"qty_rejected":1.5,"receipt_detail_id":1,"receipt_id":1,"receipt_number":"<receipt_number>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#receipt_receive_return_line":{"post":{"operationId":"receipt_receive_return_line","summary":"Receive an additional line on an existing Customer Return (multi-line F3).","description":"Receive an additional line on an existing Customer Return (multi-line F3).\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n- This method can ask for a supervisor override. Send the codes the operator accepted in `acknowledged_overrides`. See 04-command-types-and-concurrency.md and 05-errors.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"receipt_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"receipt_receive_return_line"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"acknowledged_overrides":{"default":[],"items":{"format":"int16","type":"integer"},"type":"array","uniqueItems":true},"condition":{"$ref":"#/components/schemas/ReturnCondition"},"damage_info":{"anyOf":[{"$ref":"#/components/schemas/DamageInfo"},{"type":"null"}],"default":null,"description":"UC-RCV-09 + UC-RCV-03 — see ReceiveReturn.damage_info doc."},"idempotency_key":{"format":"uuid","type":"string"},"lot_attributes":{"additionalProperties":{"type":"string"},"default":{},"type":"object"},"owner_id":{"description":"Owner_id is **optional** here — when None, falls back to the locked receipt's owner_id. ReceiveReturn pinned this from the original RMA submission; subsequent lines don't need to repeat it because the receipt is already owner-pinned.","format":"int64","type":["integer","null"]},"pack_id":{"format":"int64","type":["integer","null"]},"printer_id":{"format":"int64","type":["integer","null"]},"qty":{"format":"double","type":"number"},"receipt_id":{"format":"int64","type":"integer"},"return_reason_code":{"type":"string"},"rma":{"type":"string"},"sku_code":{"type":"string"},"target_container":{"anyOf":[{"$ref":"#/components/schemas/TargetContainerSpec"},{"type":"null"}],"default":null},"temperature":{"format":"double","type":["number","null"]},"to_loc":{"type":"string"},"to_lpn":{"description":"Legacy LPN-string input. Ignored when `target_container` is populated.","type":["string","null"]},"uom":{"type":["string","null"]},"uom_received":{"default":null,"description":"ADR-045 §1 — native UOM as entered by the operator at return.","type":["string","null"]}},"required":["condition","idempotency_key","qty","receipt_id","return_reason_code","rma","sku_code","to_loc"],"title":"ReceiveReturnLine","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"receipt_receive_return_line","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"condition":"Resaleable","qty":1.5,"receipt_id":1,"return_reason_code":"<return_reason_code>","rma":"<rma>","sku_code":"<sku_code>","to_loc":"<to_loc>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"completion_detail":{"$ref":"#/components/schemas/ReceiptCompletion"},"completion_header":{"$ref":"#/components/schemas/ReceiptCompletion"},"deposited":{"description":"Echoed for post_commit auto-print decision (whether deposit happened).","type":"boolean"},"holds_applied":{"items":{"$ref":"#/components/schemas/HoldInfo"},"type":"array"},"line_number":{"type":"string"},"new_version":{"format":"int32","type":"integer"},"qty_damaged":{"format":"double","type":"number"},"qty_received":{"format":"double","type":"number"},"qty_rejected":{"format":"double","type":"number"},"receipt_detail_id":{"format":"int64","type":"integer"},"receipt_id":{"format":"int64","type":"integer"}},"required":["completion_detail","completion_header","deposited","holds_applied","line_number","new_version","qty_damaged","qty_received","qty_rejected","receipt_detail_id","receipt_id"],"title":"ReceiveReturnLineResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"completion_detail":"Pending","completion_header":"Pending","deposited":false,"holds_applied":[{"code":"<code>","reason":"<reason>","scope":{"kind":null,"value":null}}],"line_number":"<line_number>","new_version":1,"qty_damaged":1.5,"qty_received":1.5,"qty_rejected":1.5,"receipt_detail_id":1,"receipt_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#receipt_close":{"post":{"operationId":"receipt_close","summary":"Close a receipt with optional discrepancy override (D-21).","description":"Close a receipt with optional discrepancy override (D-21).\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n**Versioned entities:** receipt (id in data.receipt_id, version in data.expected_receipt_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_receipt_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n- This method can ask for a supervisor override. Send the codes the operator accepted in `acknowledged_overrides`. See 04-command-types-and-concurrency.md and 05-errors.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[{"entity":"receipt","id_field":"receipt_id","version_field":"expected_receipt_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"receipt_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"receipt_close"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"acknowledged_overrides":{"default":[],"items":{"format":"int16","type":"integer"},"type":"array","uniqueItems":true},"expected_receipt_version":{"description":"Receipt-header OCC version (per the `expected_<entity>_version` naming convention shared with `AdjustReceivedQty::expected_line_version` and `SetDamageDisposition::expected_damage_version`).","format":"int32","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"},"override_grant_id":{"default":null,"description":"A supervisor's grant (`supervisor_override_grant`) authorising the discrepancy (code 71) on THIS receipt, for a receiver who does not hold `receipt.override_close_discrepancy`. Its pair must be `{code: 71, subject: \"receipt:<receipt_id>\"}`; the authoriser recorded in `close_summary.discrepancy_override` and on the closed event is the grant's, never a field of this request. Optional: a supervisor closing on their own capability keeps sending the bare 71 in `acknowledged_overrides`, exactly as before. Not part of the OCC contract — `receipt_close` stays a `stateful_command` versioned on the receipt alone. See `shared::override_grant`.","format":"uuid","type":["string","null"]},"receipt_id":{"format":"int64","type":"integer"}},"required":["expected_receipt_version","idempotency_key","receipt_id"],"title":"CloseReceipt","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"receipt_close","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"expected_receipt_version":1,"receipt_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"close_summary":true,"completion":{"$ref":"#/components/schemas/ReceiptCompletion"},"new_version":{"format":"int32","type":"integer"},"receipt_id":{"format":"int64","type":"integer"},"status":{"$ref":"#/components/schemas/ReceiptStatus"}},"required":["close_summary","completion","new_version","receipt_id","status"],"title":"CloseReceiptResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"close_summary":null,"completion":"Pending","new_version":1,"receipt_id":1,"status":"Open"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#receipt_adjust_received_qty":{"post":{"operationId":"receipt_adjust_received_qty","summary":"Adjust a previously received qty (delta + reason).","description":"Adjust a previously received qty (delta + reason).\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n**Versioned entities:** receipt_detail (id in data.receipt_detail_id, version in data.expected_line_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_line_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n- This method can ask for a supervisor override. Send the codes the operator accepted in `acknowledged_overrides`. See 04-command-types-and-concurrency.md and 05-errors.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[{"entity":"receipt_detail","id_field":"receipt_detail_id","version_field":"expected_line_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"receipt_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"receipt_adjust_received_qty"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"acknowledged_overrides":{"default":[],"items":{"format":"int16","type":"integer"},"type":"array","uniqueItems":true},"delta_qty":{"format":"double","type":"number"},"expected_line_version":{"description":"Per-line OCC version (Slice #2, migration 156). Previous wiring used the receipt HEADER version — the \"aggregate version on header for line-level commands\" anti-pattern from `.claude/rules/api-versioning-and-idempotency.md`. Two pickers adjusting DIFFERENT lines collided on the shared header version with false OCC conflicts. Now each line carries its own version and adjust OCC-checks against the line.\n\nWire field renamed from `expected_version` to surface the classifier change loudly to existing callers (deserialize error on stale shape, not silent header-vs-line confusion).","format":"int32","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"},"reason_code":{"type":"string"},"reason_description":{"type":["string","null"]},"receipt_detail_id":{"format":"int64","type":"integer"},"receipt_id":{"format":"int64","type":"integer"}},"required":["delta_qty","expected_line_version","idempotency_key","reason_code","receipt_detail_id","receipt_id"],"title":"AdjustReceivedQty","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"receipt_adjust_received_qty","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"delta_qty":1.5,"expected_line_version":1,"reason_code":"<reason_code>","receipt_detail_id":1,"receipt_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"completion_detail":{"$ref":"#/components/schemas/ReceiptCompletion"},"completion_header":{"$ref":"#/components/schemas/ReceiptCompletion"},"new_header_version":{"description":"Post-bump header version. Adjust still touches the header (via `recompute_completion` → header.completion), so callers that need to issue a subsequent header-level command (`receipt_close`, `receipt_cancel`) must refresh against this.","format":"int32","type":"integer"},"new_line_version":{"description":"Post-bump line version (Slice #2). Replaces the previous `new_version` which was the bumped HEADER version. Callers chain this into a follow-up `expected_line_version` if they're issuing more adjusts on the same line.","format":"int32","type":"integer"},"new_qty_received":{"format":"double","type":"number"},"receipt_detail_id":{"format":"int64","type":"integer"},"receipt_id":{"format":"int64","type":"integer"},"transaction_log_id":{"description":"Id of the corrective transaction_log row. Every successful adjustment is negative; positive adjustments are refused before mutation because they need the physical context carried by a Receive command.","format":"int64","type":"integer"}},"required":["completion_detail","completion_header","new_header_version","new_line_version","new_qty_received","receipt_detail_id","receipt_id","transaction_log_id"],"title":"AdjustReceivedQtyResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"completion_detail":"Pending","completion_header":"Pending","new_header_version":1,"new_line_version":1,"new_qty_received":1.5,"receipt_detail_id":1,"receipt_id":1,"transaction_log_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#receipt_kpi_aggregate":{"post":{"operationId":"receipt_kpi_aggregate","summary":"Aggregate receipt KPI metrics from integration_event (Spec 5.5.4).","description":"Aggregate receipt KPI metrics from integration_event (Spec 5.5.4).\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"receipt_commands","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"receipt_kpi_aggregate"},"params":{"type":"object","properties":{"data":{"properties":{"since":{"description":"Inclusive lower-bound (UTC ISO 8601). Default: 7 days ago.","type":["string","null"]},"until":{"description":"Exclusive upper-bound. Default: now.","type":["string","null"]},"warehouse":{"description":"Optional warehouse filter (matches `enterprise.integration_event.warehouse`).","type":["string","null"]}},"title":"ReceiptKpiQuery","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"receipt_kpi_aggregate","params":{"data":{"since":"<since>","until":"<until>","warehouse":"<warehouse>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"avg_completion_pct":{"description":"Avg completion ratio across receipts that have been closed in window.","format":"double","type":["number","null"]},"dock_to_stock_avg_seconds":{"description":"Average dock-to-stock duration in seconds (D-34 ready_for_putaway events).","format":"double","type":["number","null"]},"dock_to_stock_count":{"description":"Number of receipts that completed the dock-to-stock cycle in window.","format":"int64","type":"integer"},"line_damaged_count":{"format":"int64","type":"integer"},"line_over_count":{"format":"int64","type":"integer"},"line_received_count":{"description":"Total `process.receipt.line_received` events in window.","format":"int64","type":"integer"},"line_short_count":{"description":"Over/Short/Damaged counts.","format":"int64","type":"integer"},"lines_per_hour_per_user":{"description":"Per-user throughput. Vec of (user_id, count, hours_span, lines_per_hour).","items":{"$ref":"#/components/schemas/UserThroughput"},"type":"array"},"osd_rate_pct":{"description":"(short + over + damaged) / line_received × 100.","format":"double","type":"number"},"since":{"type":"string"},"until":{"type":"string"},"warehouse":{"type":["string","null"]}},"required":["dock_to_stock_count","line_damaged_count","line_over_count","line_received_count","line_short_count","lines_per_hour_per_user","osd_rate_pct","since","until"],"title":"ReceiptKpiResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"dock_to_stock_count":1,"line_damaged_count":1,"line_over_count":1,"line_received_count":1,"line_short_count":1,"lines_per_hour_per_user":[{"hours_span":1.5,"line_count":1,"lines_per_hour":1.5,"user_id":1}],"osd_rate_pct":1.5,"since":"<since>","until":"<until>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_receipt_audit":{"post":{"operationId":"get_receipt_audit","summary":"Get a receipt_audit by ID — CRUD.","description":"Get a receipt_audit by ID — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"receipt_audit","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_receipt_audit"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_receipt_audit","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"changed_at":{"type":"string"},"changed_by":{"format":"int64","type":"integer"},"field_name":{"type":"string"},"id":{"format":"int64","type":"integer"},"new_value":{"type":["string","null"]},"old_value":{"type":["string","null"]},"receipt_id":{"format":"int64","type":"integer"}},"required":["changed_at","changed_by","field_name","id","receipt_id"],"title":"ReceiptAudit","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"changed_at":"<changed_at>","changed_by":1,"field_name":"<field_name>","id":1,"receipt_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_receipt_audit":{"post":{"operationId":"list_receipt_audit","summary":"List receipt_audit — CRUD.","description":"List receipt_audit — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"receipt_audit","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_receipt_audit"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_receipt_audit"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/ReceiptAudit"},"title":"Array_of_ReceiptAudit","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"changed_at":"<changed_at>","changed_by":1,"field_name":"<field_name>","id":1,"receipt_id":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#create_receipt_detail":{"post":{"operationId":"create_receipt_detail","summary":"Add a receipt line atomically while the parent receipt accepts planning changes. Optional `expected_lpn` names the LPN the supplier announced the line on (EDI 856): the server plans that container (or reuses this receipt's planned one) and binds the line to it, so a scan of that LPN finds the line.","description":"Add a receipt line atomically while the parent receipt accepts planning changes. Optional `expected_lpn` names the LPN the supplier announced the line on (EDI 856): the server plans that container (or reuses this receipt's planned one) and binds the line to it, so a scan of that LPN finds the line.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"receipt_detail","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"create_receipt_detail"},"params":{"type":"object","properties":{"data":{"description":"What `create_receipt_detail` receives: the planned line, and optionally the LPN the supplier announced it on (EDI 856 SSCC).","properties":{"barcode":{"type":["string","null"]},"best_by_date":{"default":null,"type":["string","null"]},"completion":{"anyOf":[{"$ref":"#/components/schemas/ReceiptCompletion"},{"type":"null"}],"description":"Per Decisions Log D-05. Default Pending; updated in recompute_completion."},"container_id":{"format":"int64","type":["integer","null"]},"delivery_by_date":{"default":null,"type":["string","null"]},"effective_date":{"default":null,"type":["string","null"]},"expected_lpn":{"default":null,"description":"The supplier's LPN for this line, by code. The server plans that container (`Planned`, owned by the line's owner, planned at this receipt) or reuses the one an earlier line of this receipt planned, and binds the line to it as its EXPECTED LPN (`container_id`). A scan of that LPN then finds the line by cascade tier 2.","type":["string","null"]},"expiration_date":{"default":null,"type":["string","null"]},"external_lot":{"type":["string","null"]},"external_receipt_line_number":{"type":["string","null"]},"external_receipt_number":{"type":["string","null"]},"hold_code":{"description":"Receive-time hold code mirroring `inv_hold_code` enum values. See entity `hold_code` doc for usage.","type":["string","null"]},"lot_attr_check_mode":{"anyOf":[{"$ref":"#/components/schemas/LotAttrCheckMode"},{"type":"null"}],"description":"Per-line lot-attribute policy. None on insert → DB default `Disabled` (column has `NOT NULL DEFAULT 'Disabled'`)."},"manufactured_date":{"default":null,"type":["string","null"]},"owner_id":{"format":"int64","type":"integer"},"pack_id":{"format":"int64","type":["integer","null"]},"po_detail_id":{"format":"int64","type":["integer","null"]},"po_id":{"format":"int64","type":["integer","null"]},"qty_adjusted":{"format":"double","type":["number","null"]},"qty_damaged":{"description":"Per Decisions Log D-26.","format":"double","type":["number","null"]},"qty_expected":{"format":"double","type":["number","null"]},"qty_received":{"format":"double","type":["number","null"]},"qty_rejected":{"format":"double","type":["number","null"]},"reason_code":{"type":["string","null"]},"receipt_id":{"format":"int64","type":"integer"},"receipt_line_number":{"type":"string"},"receipt_type":{"$ref":"#/components/schemas/ReceiptType"},"return_reason":{"type":["string","null"]},"return_type":{"type":["string","null"]},"rma":{"type":["string","null"]},"sku":{"type":"string"},"status":{"$ref":"#/components/schemas/ReceiptStatus"},"target_disposition":{"anyOf":[{"$ref":"#/components/schemas/ReceiptTargetDisposition"},{"type":"null"}],"description":"Per Decisions Log D-36."},"temperature":{"format":"double","type":["number","null"]},"to_container_id":{"format":"int64","type":["integer","null"]},"to_loc":{"type":["string","null"]},"to_lot":{"type":["string","null"]},"uom":{"type":["string","null"]},"uom_received":{"description":"ADR-045 §1 — native UOM. Set by writers via ReceiveLineDefaults resolver.","type":["string","null"]}},"required":["owner_id","receipt_id","receipt_line_number","receipt_type","sku","status"],"title":"ReceiptLinePlanForCreate","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"create_receipt_detail","params":{"data":{"owner_id":1,"receipt_id":1,"receipt_line_number":"<receipt_line_number>","receipt_type":"Normal","sku":"<sku>","status":"Open"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"barcode":{"type":["string","null"]},"best_by_date":{"type":["string","null"]},"completion":{"allOf":[{"$ref":"#/components/schemas/ReceiptCompletion"}],"description":"Per Decisions Log D-05. Live-updated in `ReceiptRepository::recompute_completion`."},"container_id":{"description":"The EXPECTED LPN — the container the supplier announced the goods on. Written when the line is planned, never by receive: it stays as the record of what was promised even when the operator receives onto a label of their own. Where the goods really are is `to_container_id`.","format":"int64","type":["integer","null"]},"delivery_by_date":{"type":["string","null"]},"effective_date":{"type":"string"},"expiration_date":{"type":["string","null"]},"external_lot":{"type":["string","null"]},"external_receipt_line_number":{"type":["string","null"]},"external_receipt_number":{"type":["string","null"]},"hold_code":{"description":"Hold code at receive time — VARCHAR mirroring `inv_hold_code` enum values (e.g. `Damaged`, `QcRequired`, `CustomerReturn`). NULL when the line carries no auto-hold. Filled by the receive command per flow: damage receive → `Damaged`, return condition=NeedsRefurb → `QcRequired`, etc. Audit-only on the line; the actual ATP-blocking hold lives in `inventory_hold` on the LPN / location.","type":["string","null"]},"id":{"format":"int64","type":"integer"},"lot_attr_check_mode":{"allOf":[{"$ref":"#/components/schemas/LotAttrCheckMode"}],"description":"Per-line lot-attributes validation policy. See `LotAttrCheckMode` for semantics. Replaces the legacy `match_lot_attributes` `Option<bool>` + `match_lot_attributes_strict` `bool` pair."},"manufactured_date":{"type":["string","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"owner_id":{"format":"int64","type":"integer"},"pack_id":{"format":"int64","type":["integer","null"]},"po_detail_id":{"format":"int64","type":["integer","null"]},"po_id":{"format":"int64","type":["integer","null"]},"qty_adjusted":{"format":"double","type":["number","null"]},"qty_damaged":{"description":"Per Decisions Log D-26 (ReportDamage Reject action) and D-05 (completion algorithm).","format":"double","type":["number","null"]},"qty_expected":{"format":"double","type":["number","null"]},"qty_received":{"format":"double","type":["number","null"]},"qty_rejected":{"format":"double","type":["number","null"]},"reason_code":{"type":["string","null"]},"receipt_id":{"format":"int64","type":"integer"},"receipt_line_number":{"type":"string"},"receipt_type":{"$ref":"#/components/schemas/ReceiptType"},"return_reason":{"type":["string","null"]},"return_type":{"type":["string","null"]},"rma":{"type":["string","null"]},"sku":{"type":"string"},"status":{"$ref":"#/components/schemas/ReceiptStatus"},"target_disposition":{"allOf":[{"$ref":"#/components/schemas/ReceiptTargetDisposition"}],"description":"Per Decisions Log D-36. Stock | CrossDock | Hold. Default Stock."},"temperature":{"format":"double","type":["number","null"]},"to_container_id":{"description":"The ACTUAL LPN — the container receive put the goods into (the supplier's, or one the operator minted). NULL until the first receive, and for loose stock. Anything that acts on the goods reads this, not `container_id`.","format":"int64","type":["integer","null"]},"to_loc":{"type":["string","null"]},"to_lot":{"type":["string","null"]},"uom":{"type":["string","null"]},"uom_received":{"description":"ADR-045 §1 — native UOM as entered by the operator at receive time (e.g. \"CS\" when receiving 10 cases of 24 EA each). `qty_received` always stays in base units. Native qty is derivable from `qty_received / pack_item.base_qty WHERE pack_id, uom = uom_received`.","type":["string","null"]},"version":{"description":"Per-line OCC version (Slice #2, migration 156). Independent of `receipt.version` (which guards header-level state transitions like close / cancel). `receipt_adjust_received_qty` checks this on submit; receive_* / report_damage / recompute paths bump it atomically without check. Default 1 on insert.","format":"int32","type":"integer"}},"required":["add_when","add_who","completion","effective_date","id","lot_attr_check_mode","mod_when","mod_who","owner_id","receipt_id","receipt_line_number","receipt_type","sku","status","target_disposition","version"],"title":"ReceiptDetail","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"completion":{},"effective_date":"<effective_date>","id":1,"lot_attr_check_mode":{},"mod_when":"<mod_when>","mod_who":1,"owner_id":1,"receipt_id":1,"receipt_line_number":"<receipt_line_number>","receipt_type":"Normal","sku":"<sku>","status":"Open","target_disposition":{},"version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_receipt_detail":{"post":{"operationId":"get_receipt_detail","summary":"Get a receipt_detail by ID — CRUD.","description":"Get a receipt_detail by ID — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"receipt_detail","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_receipt_detail"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_receipt_detail","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"barcode":{"type":["string","null"]},"best_by_date":{"type":["string","null"]},"completion":{"allOf":[{"$ref":"#/components/schemas/ReceiptCompletion"}],"description":"Per Decisions Log D-05. Live-updated in `ReceiptRepository::recompute_completion`."},"container_id":{"description":"The EXPECTED LPN — the container the supplier announced the goods on. Written when the line is planned, never by receive: it stays as the record of what was promised even when the operator receives onto a label of their own. Where the goods really are is `to_container_id`.","format":"int64","type":["integer","null"]},"delivery_by_date":{"type":["string","null"]},"effective_date":{"type":"string"},"expiration_date":{"type":["string","null"]},"external_lot":{"type":["string","null"]},"external_receipt_line_number":{"type":["string","null"]},"external_receipt_number":{"type":["string","null"]},"hold_code":{"description":"Hold code at receive time — VARCHAR mirroring `inv_hold_code` enum values (e.g. `Damaged`, `QcRequired`, `CustomerReturn`). NULL when the line carries no auto-hold. Filled by the receive command per flow: damage receive → `Damaged`, return condition=NeedsRefurb → `QcRequired`, etc. Audit-only on the line; the actual ATP-blocking hold lives in `inventory_hold` on the LPN / location.","type":["string","null"]},"id":{"format":"int64","type":"integer"},"lot_attr_check_mode":{"allOf":[{"$ref":"#/components/schemas/LotAttrCheckMode"}],"description":"Per-line lot-attributes validation policy. See `LotAttrCheckMode` for semantics. Replaces the legacy `match_lot_attributes` `Option<bool>` + `match_lot_attributes_strict` `bool` pair."},"manufactured_date":{"type":["string","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"owner_id":{"format":"int64","type":"integer"},"pack_id":{"format":"int64","type":["integer","null"]},"po_detail_id":{"format":"int64","type":["integer","null"]},"po_id":{"format":"int64","type":["integer","null"]},"qty_adjusted":{"format":"double","type":["number","null"]},"qty_damaged":{"description":"Per Decisions Log D-26 (ReportDamage Reject action) and D-05 (completion algorithm).","format":"double","type":["number","null"]},"qty_expected":{"format":"double","type":["number","null"]},"qty_received":{"format":"double","type":["number","null"]},"qty_rejected":{"format":"double","type":["number","null"]},"reason_code":{"type":["string","null"]},"receipt_id":{"format":"int64","type":"integer"},"receipt_line_number":{"type":"string"},"receipt_type":{"$ref":"#/components/schemas/ReceiptType"},"return_reason":{"type":["string","null"]},"return_type":{"type":["string","null"]},"rma":{"type":["string","null"]},"sku":{"type":"string"},"status":{"$ref":"#/components/schemas/ReceiptStatus"},"target_disposition":{"allOf":[{"$ref":"#/components/schemas/ReceiptTargetDisposition"}],"description":"Per Decisions Log D-36. Stock | CrossDock | Hold. Default Stock."},"temperature":{"format":"double","type":["number","null"]},"to_container_id":{"description":"The ACTUAL LPN — the container receive put the goods into (the supplier's, or one the operator minted). NULL until the first receive, and for loose stock. Anything that acts on the goods reads this, not `container_id`.","format":"int64","type":["integer","null"]},"to_loc":{"type":["string","null"]},"to_lot":{"type":["string","null"]},"uom":{"type":["string","null"]},"uom_received":{"description":"ADR-045 §1 — native UOM as entered by the operator at receive time (e.g. \"CS\" when receiving 10 cases of 24 EA each). `qty_received` always stays in base units. Native qty is derivable from `qty_received / pack_item.base_qty WHERE pack_id, uom = uom_received`.","type":["string","null"]},"version":{"description":"Per-line OCC version (Slice #2, migration 156). Independent of `receipt.version` (which guards header-level state transitions like close / cancel). `receipt_adjust_received_qty` checks this on submit; receive_* / report_damage / recompute paths bump it atomically without check. Default 1 on insert.","format":"int32","type":"integer"}},"required":["add_when","add_who","completion","effective_date","id","lot_attr_check_mode","mod_when","mod_who","owner_id","receipt_id","receipt_line_number","receipt_type","sku","status","target_disposition","version"],"title":"ReceiptDetail","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"completion":{},"effective_date":"<effective_date>","id":1,"lot_attr_check_mode":{},"mod_when":"<mod_when>","mod_who":1,"owner_id":1,"receipt_id":1,"receipt_line_number":"<receipt_line_number>","receipt_type":"Normal","sku":"<sku>","status":"Open","target_disposition":{},"version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_receipt_detail":{"post":{"operationId":"list_receipt_detail","summary":"List receipt_detail — CRUD.","description":"List receipt_detail — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"receipt_detail","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_receipt_detail"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_receipt_detail"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/ReceiptDetail"},"title":"Array_of_ReceiptDetail","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"completion":{},"effective_date":"<effective_date>","id":1,"lot_attr_check_mode":{},"mod_when":"<mod_when>","mod_who":1,"owner_id":1,"receipt_id":1,"receipt_line_number":"<receipt_line_number>","receipt_type":"Normal","sku":"<sku>","status":"Open","target_disposition":{},"version":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_receipt_detail_lines":{"post":{"operationId":"list_receipt_detail_lines","summary":"List receipt lines with their open-serial-capture flag — the receipt screen's read.","description":"List receipt lines with their open-serial-capture flag — the receipt screen's read.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"receipt_detail","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_receipt_detail_lines"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_receipt_detail_lines"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/ReceiptLine"},"title":"Array_of_ReceiptLine","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"completion":{},"effective_date":"<effective_date>","id":1,"lot_attr_check_mode":{},"mod_when":"<mod_when>","mod_who":1,"owner_id":1,"receipt_id":1,"receipt_line_number":"<receipt_line_number>","receipt_type":"Normal","serial_capture_open":false,"sku":"<sku>","status":"Open","target_disposition":{},"version":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_receipt_detail_line":{"post":{"operationId":"get_receipt_detail_line","summary":"Get one receipt line with its open-serial-capture flag and LPN codes — the line card's read.","description":"Get one receipt line with its open-serial-capture flag and LPN codes — the line card's read.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"receipt_detail","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_receipt_detail_line"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_receipt_detail_line","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"A receipt line as the receipt screen lists it.","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"barcode":{"type":["string","null"]},"best_by_date":{"type":["string","null"]},"completion":{"allOf":[{"$ref":"#/components/schemas/ReceiptCompletion"}],"description":"Per Decisions Log D-05. Live-updated in `ReceiptRepository::recompute_completion`."},"container_id":{"description":"The EXPECTED LPN — the container the supplier announced the goods on. Written when the line is planned, never by receive: it stays as the record of what was promised even when the operator receives onto a label of their own. Where the goods really are is `to_container_id`.","format":"int64","type":["integer","null"]},"delivery_by_date":{"type":["string","null"]},"effective_date":{"type":"string"},"expiration_date":{"type":["string","null"]},"external_lot":{"type":["string","null"]},"external_receipt_line_number":{"type":["string","null"]},"external_receipt_number":{"type":["string","null"]},"hold_code":{"description":"Hold code at receive time — VARCHAR mirroring `inv_hold_code` enum values (e.g. `Damaged`, `QcRequired`, `CustomerReturn`). NULL when the line carries no auto-hold. Filled by the receive command per flow: damage receive → `Damaged`, return condition=NeedsRefurb → `QcRequired`, etc. Audit-only on the line; the actual ATP-blocking hold lives in `inventory_hold` on the LPN / location.","type":["string","null"]},"id":{"format":"int64","type":"integer"},"lot_attr_check_mode":{"allOf":[{"$ref":"#/components/schemas/LotAttrCheckMode"}],"description":"Per-line lot-attributes validation policy. See `LotAttrCheckMode` for semantics. Replaces the legacy `match_lot_attributes` `Option<bool>` + `match_lot_attributes_strict` `bool` pair."},"lpn":{"description":"Code of the EXPECTED LPN (`container_id`) — the one the supplier announced. `None` when the line announces none.","type":["string","null"]},"manufactured_date":{"type":["string","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"owner_id":{"format":"int64","type":"integer"},"pack_id":{"format":"int64","type":["integer","null"]},"po_detail_id":{"format":"int64","type":["integer","null"]},"po_id":{"format":"int64","type":["integer","null"]},"qty_adjusted":{"format":"double","type":["number","null"]},"qty_damaged":{"description":"Per Decisions Log D-26 (ReportDamage Reject action) and D-05 (completion algorithm).","format":"double","type":["number","null"]},"qty_expected":{"format":"double","type":["number","null"]},"qty_received":{"format":"double","type":["number","null"]},"qty_rejected":{"format":"double","type":["number","null"]},"reason_code":{"type":["string","null"]},"receipt_id":{"format":"int64","type":"integer"},"receipt_line_number":{"type":"string"},"receipt_type":{"$ref":"#/components/schemas/ReceiptType"},"return_reason":{"type":["string","null"]},"return_type":{"type":["string","null"]},"rma":{"type":["string","null"]},"serial_capture_open":{"description":"A serial capture is open on this line — it can be picked up again.","type":"boolean"},"sku":{"type":"string"},"status":{"$ref":"#/components/schemas/ReceiptStatus"},"target_disposition":{"allOf":[{"$ref":"#/components/schemas/ReceiptTargetDisposition"}],"description":"Per Decisions Log D-36. Stock | CrossDock | Hold. Default Stock."},"temperature":{"format":"double","type":["number","null"]},"to_container_id":{"description":"The ACTUAL LPN — the container receive put the goods into (the supplier's, or one the operator minted). NULL until the first receive, and for loose stock. Anything that acts on the goods reads this, not `container_id`.","format":"int64","type":["integer","null"]},"to_loc":{"type":["string","null"]},"to_lot":{"type":["string","null"]},"to_lpn":{"description":"Code of the ACTUAL LPN (`to_container_id`) — the one the goods were received into. `None` until the first receive, and for loose stock.","type":["string","null"]},"uom":{"type":["string","null"]},"uom_received":{"description":"ADR-045 §1 — native UOM as entered by the operator at receive time (e.g. \"CS\" when receiving 10 cases of 24 EA each). `qty_received` always stays in base units. Native qty is derivable from `qty_received / pack_item.base_qty WHERE pack_id, uom = uom_received`.","type":["string","null"]},"version":{"description":"Per-line OCC version (Slice #2, migration 156). Independent of `receipt.version` (which guards header-level state transitions like close / cancel). `receipt_adjust_received_qty` checks this on submit; receive_* / report_damage / recompute paths bump it atomically without check. Default 1 on insert.","format":"int32","type":"integer"}},"required":["add_when","add_who","completion","effective_date","id","lot_attr_check_mode","mod_when","mod_who","owner_id","receipt_id","receipt_line_number","receipt_type","serial_capture_open","sku","status","target_disposition","version"],"title":"ReceiptLine","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"completion":{},"effective_date":"<effective_date>","id":1,"lot_attr_check_mode":{},"mod_when":"<mod_when>","mod_who":1,"owner_id":1,"receipt_id":1,"receipt_line_number":"<receipt_line_number>","receipt_type":"Normal","serial_capture_open":false,"sku":"<sku>","status":"Open","target_disposition":{},"version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_receipt_receive_context":{"post":{"operationId":"get_receipt_receive_context","summary":"One receipt line as the Receive dialog shows it: pack units, lot prompts, offered LPN, over-receipt limits.","description":"One receipt line as the Receive dialog shows it: pack units, lot prompts, offered LPN, over-receipt limits.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"receipt_detail","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_receipt_receive_context"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_receipt_receive_context","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"The Receive dialog's read of one line.","properties":{"base_uom":{"type":"string"},"default_location":{"description":"Ячейка, с которой окно открывается, — `owner_config.default_receiving_loc` владельца строки (миграция 350). `None` = владелец её не назвал, и оператор выбирает сам.","type":["string","null"]},"expected_lpn":{"type":["string","null"]},"limits":{"$ref":"#/components/schemas/ReceiveLimits"},"line_number":{"type":"string"},"lot_prompts":{"description":"Exactly what RF prompts for (`build_prompts`), for THIS line.","items":{"$ref":"#/components/schemas/LotAttributePrompt"},"type":"array"},"owner_id":{"format":"int64","type":"integer"},"packs":{"description":"Smallest first. Empty when the pack has no usable item.","items":{"$ref":"#/components/schemas/PackUnit"},"type":"array"},"qty_expected":{"format":"double","type":"number"},"qty_received":{"format":"double","type":"number"},"receipt_detail_id":{"format":"int64","type":"integer"},"receipt_id":{"format":"int64","type":"integer"},"receipt_no":{"type":"string"},"shelf_life":{"$ref":"#/components/schemas/ShelfLife"},"sku_code":{"type":"string"},"sku_descr":{"type":"string"},"to_lpn":{"description":"What To LPN opens with — [`offered`].","type":["string","null"]},"without_lpn":{"$ref":"#/components/schemas/AllowError"}},"required":["base_uom","limits","line_number","lot_prompts","owner_id","packs","qty_expected","qty_received","receipt_detail_id","receipt_id","receipt_no","shelf_life","sku_code","sku_descr","without_lpn"],"title":"ReceiveContext","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"base_uom":"<base_uom>","limits":{"approval_possible":false},"line_number":"<line_number>","lot_prompts":[{"attrib_code":"<attrib_code>","is_date":false,"readonly":false,"required":false}],"owner_id":1,"packs":[{"factor":1.5,"uom":"<uom>"}],"qty_expected":1.5,"qty_received":1.5,"receipt_detail_id":1,"receipt_id":1,"receipt_no":"<receipt_no>","shelf_life":{},"sku_code":"<sku_code>","sku_descr":"<sku_descr>","without_lpn":"Allow"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#update_receipt_detail":{"post":{"operationId":"update_receipt_detail","summary":"Update the reference data on a receipt line — refused once the receipt is Closed or Cancelled.","description":"Update the reference data on a receipt line — refused once the receipt is Closed or Cancelled.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"receipt_detail","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"update_receipt_detail"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"},"data":{"additionalProperties":false,"description":"What a client may change on a receipt line: reference and planning data, and nothing the receipt is judged by.\n\nDeliberately NOT [`ReceiptDetailForUpdate`]. That struct carries `status`, `completion` and all five `qty_*` buckets — correctly, because the receive, damage and completion paths write them — and exposing it on the wire turned the generic CRUD update into a second, unguarded way to move a receipt. Measured against a live dev backend on 2026-07-31, on a receipt in `Closed`, a status whose `allowed_operations` list is EMPTY:\n\n```text update_receipt_detail{ qty_received: 9999, status: \"Open\", completion: \"Full\" } → 200 OK ```\n\n`qty_received` went 0 → 9999 against a `qty_expected` of 50, the line reopened inside a closed receipt, and the header was left reading `Closed / Pending` while its only line claimed `Full`. No version check, no stock movement, no audit row. `op1` (OPERATOR) could do it — while being denied `receipt_adjust_received_qty`, the command that does the same thing with an OCC version and a state-machine check.\n\nThe quantities are absent by CONSTRUCTION rather than filtered at runtime: a field that cannot be deserialized cannot be reintroduced by someone adding a line to a mapping function. They move only through their own commands.\n\nAlso absent, and each for its own reason: - `receipt_id` — re-parenting a line is not an edit, it is two lifecycle events on two receipts. - `container_id` — the supplier's expected LPN, fixed by the plan; the operator does not edit it. - `to_container_id` — where the stock physically is, set by receive. - `hold_code` — owned by put-on-hold / release. - `owner_id`, `receipt_type` — identity, fixed when the line is created. - `effective_date`, `uom_received` — stamped at receive time. `deny_unknown_fields` is the point, not a detail. Serde's default is to IGNORE fields it does not know, so a client sending `qty_received: 9999` would get `200 OK` and a response showing the old quantity — the write silently dropped, the caller convinced it landed. For a number the whole receipt is judged by, refusing loudly is the only honest answer.","properties":{"barcode":{"type":["string","null"]},"best_by_date":{"type":["string","null"]},"delivery_by_date":{"type":["string","null"]},"expiration_date":{"type":["string","null"]},"external_lot":{"type":["string","null"]},"external_receipt_line_number":{"type":["string","null"]},"external_receipt_number":{"type":["string","null"]},"manufactured_date":{"description":"RF and web clients historically send different documented date dialects. `BusinessDate` preserves those dialects but rejects malformed input instead of silently turning it into an omitted update.","type":["string","null"]},"pack_id":{"format":"int64","type":"integer"},"po_detail_id":{"format":"int64","type":["integer","null"]},"po_id":{"format":"int64","type":["integer","null"]},"qty_expected":{"format":"double","type":"number"},"reason_code":{"type":["string","null"]},"return_reason":{"type":["string","null"]},"return_type":{"type":["string","null"]},"rma":{"type":["string","null"]},"sku":{"type":"string"},"temperature":{"format":"double","type":["number","null"]},"to_loc":{"type":["string","null"]},"to_lot":{"type":["string","null"]},"uom":{"type":["string","null"]}},"title":"ReceiptDetailUpdateApi","type":"object"}},"required":["id","data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"update_receipt_detail","params":{"id":1,"data":{"barcode":"<barcode>","best_by_date":"<best_by_date>","delivery_by_date":"<delivery_by_date>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"barcode":{"type":["string","null"]},"best_by_date":{"type":["string","null"]},"completion":{"allOf":[{"$ref":"#/components/schemas/ReceiptCompletion"}],"description":"Per Decisions Log D-05. Live-updated in `ReceiptRepository::recompute_completion`."},"container_id":{"description":"The EXPECTED LPN — the container the supplier announced the goods on. Written when the line is planned, never by receive: it stays as the record of what was promised even when the operator receives onto a label of their own. Where the goods really are is `to_container_id`.","format":"int64","type":["integer","null"]},"delivery_by_date":{"type":["string","null"]},"effective_date":{"type":"string"},"expiration_date":{"type":["string","null"]},"external_lot":{"type":["string","null"]},"external_receipt_line_number":{"type":["string","null"]},"external_receipt_number":{"type":["string","null"]},"hold_code":{"description":"Hold code at receive time — VARCHAR mirroring `inv_hold_code` enum values (e.g. `Damaged`, `QcRequired`, `CustomerReturn`). NULL when the line carries no auto-hold. Filled by the receive command per flow: damage receive → `Damaged`, return condition=NeedsRefurb → `QcRequired`, etc. Audit-only on the line; the actual ATP-blocking hold lives in `inventory_hold` on the LPN / location.","type":["string","null"]},"id":{"format":"int64","type":"integer"},"lot_attr_check_mode":{"allOf":[{"$ref":"#/components/schemas/LotAttrCheckMode"}],"description":"Per-line lot-attributes validation policy. See `LotAttrCheckMode` for semantics. Replaces the legacy `match_lot_attributes` `Option<bool>` + `match_lot_attributes_strict` `bool` pair."},"manufactured_date":{"type":["string","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"owner_id":{"format":"int64","type":"integer"},"pack_id":{"format":"int64","type":["integer","null"]},"po_detail_id":{"format":"int64","type":["integer","null"]},"po_id":{"format":"int64","type":["integer","null"]},"qty_adjusted":{"format":"double","type":["number","null"]},"qty_damaged":{"description":"Per Decisions Log D-26 (ReportDamage Reject action) and D-05 (completion algorithm).","format":"double","type":["number","null"]},"qty_expected":{"format":"double","type":["number","null"]},"qty_received":{"format":"double","type":["number","null"]},"qty_rejected":{"format":"double","type":["number","null"]},"reason_code":{"type":["string","null"]},"receipt_id":{"format":"int64","type":"integer"},"receipt_line_number":{"type":"string"},"receipt_type":{"$ref":"#/components/schemas/ReceiptType"},"return_reason":{"type":["string","null"]},"return_type":{"type":["string","null"]},"rma":{"type":["string","null"]},"sku":{"type":"string"},"status":{"$ref":"#/components/schemas/ReceiptStatus"},"target_disposition":{"allOf":[{"$ref":"#/components/schemas/ReceiptTargetDisposition"}],"description":"Per Decisions Log D-36. Stock | CrossDock | Hold. Default Stock."},"temperature":{"format":"double","type":["number","null"]},"to_container_id":{"description":"The ACTUAL LPN — the container receive put the goods into (the supplier's, or one the operator minted). NULL until the first receive, and for loose stock. Anything that acts on the goods reads this, not `container_id`.","format":"int64","type":["integer","null"]},"to_loc":{"type":["string","null"]},"to_lot":{"type":["string","null"]},"uom":{"type":["string","null"]},"uom_received":{"description":"ADR-045 §1 — native UOM as entered by the operator at receive time (e.g. \"CS\" when receiving 10 cases of 24 EA each). `qty_received` always stays in base units. Native qty is derivable from `qty_received / pack_item.base_qty WHERE pack_id, uom = uom_received`.","type":["string","null"]},"version":{"description":"Per-line OCC version (Slice #2, migration 156). Independent of `receipt.version` (which guards header-level state transitions like close / cancel). `receipt_adjust_received_qty` checks this on submit; receive_* / report_damage / recompute paths bump it atomically without check. Default 1 on insert.","format":"int32","type":"integer"}},"required":["add_when","add_who","completion","effective_date","id","lot_attr_check_mode","mod_when","mod_who","owner_id","receipt_id","receipt_line_number","receipt_type","sku","status","target_disposition","version"],"title":"ReceiptDetail","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"completion":{},"effective_date":"<effective_date>","id":1,"lot_attr_check_mode":{},"mod_when":"<mod_when>","mod_who":1,"owner_id":1,"receipt_id":1,"receipt_line_number":"<receipt_line_number>","receipt_type":"Normal","sku":"<sku>","status":"Open","target_disposition":{},"version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_receipt_detail":{"post":{"operationId":"delete_receipt_detail","summary":"Delete a receipt line — refused once the receipt is Closed, Cancelled or OnHold.","description":"Delete a receipt line — refused once the receipt is Closed, Cancelled or OnHold.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"receipt_detail","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_receipt_detail"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_receipt_detail","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"barcode":{"type":["string","null"]},"best_by_date":{"type":["string","null"]},"completion":{"allOf":[{"$ref":"#/components/schemas/ReceiptCompletion"}],"description":"Per Decisions Log D-05. Live-updated in `ReceiptRepository::recompute_completion`."},"container_id":{"description":"The EXPECTED LPN — the container the supplier announced the goods on. Written when the line is planned, never by receive: it stays as the record of what was promised even when the operator receives onto a label of their own. Where the goods really are is `to_container_id`.","format":"int64","type":["integer","null"]},"delivery_by_date":{"type":["string","null"]},"effective_date":{"type":"string"},"expiration_date":{"type":["string","null"]},"external_lot":{"type":["string","null"]},"external_receipt_line_number":{"type":["string","null"]},"external_receipt_number":{"type":["string","null"]},"hold_code":{"description":"Hold code at receive time — VARCHAR mirroring `inv_hold_code` enum values (e.g. `Damaged`, `QcRequired`, `CustomerReturn`). NULL when the line carries no auto-hold. Filled by the receive command per flow: damage receive → `Damaged`, return condition=NeedsRefurb → `QcRequired`, etc. Audit-only on the line; the actual ATP-blocking hold lives in `inventory_hold` on the LPN / location.","type":["string","null"]},"id":{"format":"int64","type":"integer"},"lot_attr_check_mode":{"allOf":[{"$ref":"#/components/schemas/LotAttrCheckMode"}],"description":"Per-line lot-attributes validation policy. See `LotAttrCheckMode` for semantics. Replaces the legacy `match_lot_attributes` `Option<bool>` + `match_lot_attributes_strict` `bool` pair."},"manufactured_date":{"type":["string","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"owner_id":{"format":"int64","type":"integer"},"pack_id":{"format":"int64","type":["integer","null"]},"po_detail_id":{"format":"int64","type":["integer","null"]},"po_id":{"format":"int64","type":["integer","null"]},"qty_adjusted":{"format":"double","type":["number","null"]},"qty_damaged":{"description":"Per Decisions Log D-26 (ReportDamage Reject action) and D-05 (completion algorithm).","format":"double","type":["number","null"]},"qty_expected":{"format":"double","type":["number","null"]},"qty_received":{"format":"double","type":["number","null"]},"qty_rejected":{"format":"double","type":["number","null"]},"reason_code":{"type":["string","null"]},"receipt_id":{"format":"int64","type":"integer"},"receipt_line_number":{"type":"string"},"receipt_type":{"$ref":"#/components/schemas/ReceiptType"},"return_reason":{"type":["string","null"]},"return_type":{"type":["string","null"]},"rma":{"type":["string","null"]},"sku":{"type":"string"},"status":{"$ref":"#/components/schemas/ReceiptStatus"},"target_disposition":{"allOf":[{"$ref":"#/components/schemas/ReceiptTargetDisposition"}],"description":"Per Decisions Log D-36. Stock | CrossDock | Hold. Default Stock."},"temperature":{"format":"double","type":["number","null"]},"to_container_id":{"description":"The ACTUAL LPN — the container receive put the goods into (the supplier's, or one the operator minted). NULL until the first receive, and for loose stock. Anything that acts on the goods reads this, not `container_id`.","format":"int64","type":["integer","null"]},"to_loc":{"type":["string","null"]},"to_lot":{"type":["string","null"]},"uom":{"type":["string","null"]},"uom_received":{"description":"ADR-045 §1 — native UOM as entered by the operator at receive time (e.g. \"CS\" when receiving 10 cases of 24 EA each). `qty_received` always stays in base units. Native qty is derivable from `qty_received / pack_item.base_qty WHERE pack_id, uom = uom_received`.","type":["string","null"]},"version":{"description":"Per-line OCC version (Slice #2, migration 156). Independent of `receipt.version` (which guards header-level state transitions like close / cancel). `receipt_adjust_received_qty` checks this on submit; receive_* / report_damage / recompute paths bump it atomically without check. Default 1 on insert.","format":"int32","type":"integer"}},"required":["add_when","add_who","completion","effective_date","id","lot_attr_check_mode","mod_when","mod_who","owner_id","receipt_id","receipt_line_number","receipt_type","sku","status","target_disposition","version"],"title":"ReceiptDetail","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"completion":{},"effective_date":"<effective_date>","id":1,"lot_attr_check_mode":{},"mod_when":"<mod_when>","mod_who":1,"owner_id":1,"receipt_id":1,"receipt_line_number":"<receipt_line_number>","receipt_type":"Normal","sku":"<sku>","status":"Open","target_disposition":{},"version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_many_receipt_detail":{"post":{"operationId":"delete_many_receipt_detail","summary":"Delete receipt lines atomically after locking and validating every affected parent.","description":"Delete receipt lines atomically after locking and validating every affected parent.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"receipt_detail","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_many_receipt_detail"},"params":{"type":"object","properties":{"ids":{"items":{"format":"int64","type":"integer"},"type":"array","description":"Record IDs"}},"required":["ids"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_many_receipt_detail","params":{"ids":[1]}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"uint64","minimum":0,"title":"uint64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_receipt_detail":{"post":{"operationId":"count_receipt_detail","summary":"Count receipt_detail — CRUD.","description":"Count receipt_detail — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"receipt_detail","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_receipt_detail"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_receipt_detail"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#create_receipt_detail_lot_attributes":{"post":{"operationId":"create_receipt_detail_lot_attributes","summary":"Add an expected lot attribute while the parent receipt accepts planning changes.","description":"Add an expected lot attribute while the parent receipt accepts planning changes.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"receipt_expected_lot_attributes","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"create_receipt_detail_lot_attributes"},"params":{"type":"object","properties":{"data":{"additionalProperties":false,"description":"The supplier promise attached to one receipt line.\n\nThis is deliberately a command DTO rather than the model's generic create type: unknown fields are rejected, and the command below owns lifecycle, parent-lock and policy-membership validation.","properties":{"attribute_value":{"type":"string"},"lot_policy_attribute_id":{"format":"int64","type":"integer"},"receipt_detail_id":{"format":"int64","type":"integer"}},"required":["attribute_value","lot_policy_attribute_id","receipt_detail_id"],"title":"ReceiptExpectedLotAttributeCreateApi","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"create_receipt_detail_lot_attributes","params":{"data":{"attribute_value":"<attribute_value>","lot_policy_attribute_id":1,"receipt_detail_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"Per-`receipt_detail` expected lot-attribute snapshot.\n\nMigration 133 (T-034 step 1) collapsed this table to the synthetic FK link only — the legacy natural-key columns `(receipt_id, receipt_line_number, owner_id, sku)` were redundant and have been dropped. Callers that need the line/owner/sku context JOIN through `receipt_detail`.","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"attribute_value":{"type":"string"},"id":{"format":"int64","type":"integer"},"lot_policy_attribute_id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"receipt_detail_id":{"format":"int64","type":"integer"}},"required":["add_when","add_who","attribute_value","id","lot_policy_attribute_id","mod_when","mod_who","receipt_detail_id"],"title":"ReceiptDetailLotAttributes","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"attribute_value":"<attribute_value>","id":1,"lot_policy_attribute_id":1,"mod_when":"<mod_when>","mod_who":1,"receipt_detail_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_receipt_detail_lot_attributes":{"post":{"operationId":"get_receipt_detail_lot_attributes","summary":"Get a receipt_detail_lot_attributes by ID — CRUD.","description":"Get a receipt_detail_lot_attributes by ID — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"receipt_expected_lot_attributes","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_receipt_detail_lot_attributes"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_receipt_detail_lot_attributes","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"Per-`receipt_detail` expected lot-attribute snapshot.\n\nMigration 133 (T-034 step 1) collapsed this table to the synthetic FK link only — the legacy natural-key columns `(receipt_id, receipt_line_number, owner_id, sku)` were redundant and have been dropped. Callers that need the line/owner/sku context JOIN through `receipt_detail`.","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"attribute_value":{"type":"string"},"id":{"format":"int64","type":"integer"},"lot_policy_attribute_id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"receipt_detail_id":{"format":"int64","type":"integer"}},"required":["add_when","add_who","attribute_value","id","lot_policy_attribute_id","mod_when","mod_who","receipt_detail_id"],"title":"ReceiptDetailLotAttributes","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"attribute_value":"<attribute_value>","id":1,"lot_policy_attribute_id":1,"mod_when":"<mod_when>","mod_who":1,"receipt_detail_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_receipt_detail_lot_attributes":{"post":{"operationId":"list_receipt_detail_lot_attributes","summary":"List receipt_detail_lot_attributes — CRUD.","description":"List receipt_detail_lot_attributes — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"receipt_expected_lot_attributes","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_receipt_detail_lot_attributes"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_receipt_detail_lot_attributes"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/ReceiptDetailLotAttributes"},"title":"Array_of_ReceiptDetailLotAttributes","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"attribute_value":"<attribute_value>","id":1,"lot_policy_attribute_id":1,"mod_when":"<mod_when>","mod_who":1,"receipt_detail_id":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#update_receipt_detail_lot_attributes":{"post":{"operationId":"update_receipt_detail_lot_attributes","summary":"Update an expected lot value without moving the row to another attribute.","description":"Update an expected lot value without moving the row to another attribute.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"receipt_expected_lot_attributes","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"update_receipt_detail_lot_attributes"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"},"data":{"additionalProperties":false,"description":"The selected lot-policy attribute is row identity. Editing the supplier promise changes only its expected value.","properties":{"attribute_value":{"type":"string"}},"title":"ReceiptExpectedLotAttributeUpdateApi","type":"object"}},"required":["id","data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"update_receipt_detail_lot_attributes","params":{"id":1,"data":{"attribute_value":"<attribute_value>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"Per-`receipt_detail` expected lot-attribute snapshot.\n\nMigration 133 (T-034 step 1) collapsed this table to the synthetic FK link only — the legacy natural-key columns `(receipt_id, receipt_line_number, owner_id, sku)` were redundant and have been dropped. Callers that need the line/owner/sku context JOIN through `receipt_detail`.","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"attribute_value":{"type":"string"},"id":{"format":"int64","type":"integer"},"lot_policy_attribute_id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"receipt_detail_id":{"format":"int64","type":"integer"}},"required":["add_when","add_who","attribute_value","id","lot_policy_attribute_id","mod_when","mod_who","receipt_detail_id"],"title":"ReceiptDetailLotAttributes","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"attribute_value":"<attribute_value>","id":1,"lot_policy_attribute_id":1,"mod_when":"<mod_when>","mod_who":1,"receipt_detail_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_receipt_detail_lot_attributes":{"post":{"operationId":"delete_receipt_detail_lot_attributes","summary":"Delete an expected lot attribute while the parent receipt accepts planning changes.","description":"Delete an expected lot attribute while the parent receipt accepts planning changes.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"receipt_expected_lot_attributes","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_receipt_detail_lot_attributes"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_receipt_detail_lot_attributes","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"Per-`receipt_detail` expected lot-attribute snapshot.\n\nMigration 133 (T-034 step 1) collapsed this table to the synthetic FK link only — the legacy natural-key columns `(receipt_id, receipt_line_number, owner_id, sku)` were redundant and have been dropped. Callers that need the line/owner/sku context JOIN through `receipt_detail`.","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"attribute_value":{"type":"string"},"id":{"format":"int64","type":"integer"},"lot_policy_attribute_id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"receipt_detail_id":{"format":"int64","type":"integer"}},"required":["add_when","add_who","attribute_value","id","lot_policy_attribute_id","mod_when","mod_who","receipt_detail_id"],"title":"ReceiptDetailLotAttributes","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"attribute_value":"<attribute_value>","id":1,"lot_policy_attribute_id":1,"mod_when":"<mod_when>","mod_who":1,"receipt_detail_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_receipt_detail_lot_attributes":{"post":{"operationId":"count_receipt_detail_lot_attributes","summary":"Count receipt_detail_lot_attributes — CRUD.","description":"Count receipt_detail_lot_attributes — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"receipt_expected_lot_attributes","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_receipt_detail_lot_attributes"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_receipt_detail_lot_attributes"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_receipt_detail_damage":{"post":{"operationId":"get_receipt_detail_damage","summary":"Get a receipt_detail_damage by ID — CRUD.","description":"Get a receipt_detail_damage by ID — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"receipt_detail_damage","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_receipt_detail_damage"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_receipt_detail_damage","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"applied_action":{"allOf":[{"$ref":"#/components/schemas/DamageAction"}],"description":"Migration 239 — the owner action that ACTUALLY ran when this row was written (`ReportDamage::handle_damage_action`).\n\nOnly `Reject` adds `damaged_qty` to `receipt_detail.qty_damaged`, so this is what tells a later reader which rows are echoed in that column and which are not — the distinction the line's damage ceiling stands on. Deriving it from today's `owner_config` instead would be wrong for history: the mapping is owner-configurable and can change between two reports on the same line.\n\n`None` on a row created through plain CRUD (`create_receipt_detail_damage`): no action ran, nothing was echoed."},"damaged_qty":{"format":"double","type":"number"},"disposition":{"description":"Final disposition decision. NULL = pending. Values: WrittenOff | RTV | Repurpose | Destroyed. VARCHAR (not enum) so Phase 2 vocabulary growth doesn't require ALTER TYPE.","type":["string","null"]},"disposition_decided_at":{"default":null,"type":["string","null"]},"disposition_decided_by":{"format":"int64","type":["integer","null"]},"disposition_reason":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"move_failed":{"description":"TRUE if auto-move to QC/Damage/RTV loc failed. Operator must resolve manually.","type":"boolean"},"photo_attachment_ids":{"description":"Phase 2+ attachments (see Spec 04 photo attachments)."},"reason_code":{"type":"string"},"reason_description":{"type":["string","null"]},"receipt_detail_id":{"format":"int64","type":"integer"},"receipt_id":{"format":"int64","type":"integer"},"reported_at":{"type":"string"},"reported_by":{"format":"int64","type":"integer"},"severity":{"$ref":"#/components/schemas/DamageSeverity"},"vendor_responsibility":{"description":"Migration 161 — operator's assessment at receive: true = vendor is responsible for the damage (drives vendor-claim event in ERP); false (default) = warehouse-eaten / undecided. Audit-only — no Quark business logic branches on it; ERP integration consumes via outbox.","type":"boolean"},"version":{"description":"Per-row OCC version (Slice #3, migration 157). Independent of `receipt.version` (header) and `receipt_detail.version` (line). `receipt_set_damage_disposition` OCC-checks this on submit; `write_off_damage` / `move_damage_to_rtv` bump it without check (they're stateless terminal actions). Default 1 on insert.","format":"int32","type":"integer"}},"required":["applied_action","damaged_qty","id","move_failed","reason_code","receipt_detail_id","receipt_id","reported_at","reported_by","severity","vendor_responsibility","version"],"title":"ReceiptDetailDamage","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"applied_action":{},"damaged_qty":1.5,"id":1,"move_failed":false,"reason_code":"<reason_code>","receipt_detail_id":1,"receipt_id":1,"reported_at":"<reported_at>","reported_by":1,"severity":"Minor","vendor_responsibility":false,"version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_receipt_detail_damage":{"post":{"operationId":"list_receipt_detail_damage","summary":"List receipt_detail_damage — CRUD.","description":"List receipt_detail_damage — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"receipt_detail_damage","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_receipt_detail_damage"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_receipt_detail_damage"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/ReceiptDetailDamage"},"title":"Array_of_ReceiptDetailDamage","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"applied_action":{},"damaged_qty":1.5,"id":1,"move_failed":false,"reason_code":"<reason_code>","receipt_detail_id":1,"receipt_id":1,"reported_at":"<reported_at>","reported_by":1,"severity":"Minor","vendor_responsibility":false,"version":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_receipt_detail_damage":{"post":{"operationId":"count_receipt_detail_damage","summary":"Count receipt_detail_damage — CRUD.","description":"Count receipt_detail_damage — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"receipt_detail_damage","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_receipt_detail_damage"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_receipt_detail_damage"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#receipt_damage_vocabulary":{"post":{"operationId":"receipt_damage_vocabulary","summary":"What a damage report may say: with no severity, the four severities the `damage_severity` column accepts; with one, the `damage_reason` values tagged for it plus the untagged ones (`Other`). `stage` says which of the two was answered. A blank or unrecognised severity narrows rather than refusing — exactly as the metadata dropdown source it replaces did.","description":"What a damage report may say: with no severity, the four severities the `damage_severity` column accepts; with one, the `damage_reason` values tagged for it plus the untagged ones (`Other`). `stage` says which of the two was answered. A blank or unrecognised severity narrows rather than refusing — exactly as the metadata dropdown source it replaces did.\n\n**Category:** `query`. Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":true,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"receipt_detail_damage","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"receipt_damage_vocabulary"},"params":{"type":"object","properties":{"severity":{"default":null,"description":"A [`DamageSeverity`] spelling. A `String` and not the enum on purpose: an unrecognised spelling must behave the way the SQL source behaved — match nothing tagged — and a typed field would have serde refuse the whole request instead.","type":["string","null"]}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"receipt_damage_vocabulary"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"Which of the two questions this answers.","properties":{"items":{"items":{"$ref":"#/components/schemas/DamageVocabularyItem"},"type":"array"},"stage":{"description":"[`SEVERITY_STAGE`] | [`REASON_STAGE`]. A protocol token the client compares, not a word it prints.","type":"string"}},"required":["items","stage"],"title":"DamageVocabularyAnswer","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"items":[{"code":"<code>","display":"<display>"}],"stage":"<stage>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#receipt_damage_destination":{"post":{"operationId":"receipt_damage_destination","summary":"Where a damage report of this severity sends the goods: whether the destination field is shown at all (only Major → QC and Total → Damage move anything), and the location code to put in it. `prefill` null means leave the operator's own choice alone; an empty string means the warehouse has no location of that type and the field is cleared rather than filled with a fallback. Send `current` — what the field holds now — or the answer cannot tell the operator's choice from a previous severity's prefill.","description":"Where a damage report of this severity sends the goods: whether the destination field is shown at all (only Major → QC and Total → Damage move anything), and the location code to put in it. `prefill` null means leave the operator's own choice alone; an empty string means the warehouse has no location of that type and the field is cleared rather than filled with a fallback. Send `current` — what the field holds now — or the answer cannot tell the operator's choice from a previous severity's prefill.\n\n**Category:** `query`. Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":true,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"receipt_detail_damage","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"receipt_damage_destination"},"params":{"type":"object","properties":{"current":{"default":null,"description":"What the destination field holds RIGHT NOW. Absent and empty mean the same thing, and both mean \"nobody has put anything there yet\".\n\nThe server cannot know this and must not guess it: it is the whole input to the rule that distinguishes a code the machine put there from a location the operator chose.","type":["string","null"]},"severity":{"default":null,"description":"The severity the operator has picked, if any. A `String` for the same reason the vocabulary's is: an unrecognised spelling moves nothing and hides the field, which is what the transferred rule did with it — not a refusal of the whole request.","type":["string","null"]}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"receipt_damage_destination"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"What the screen should do with its destination field.","properties":{"prefill":{"description":"The code to WRITE into the field. `None` means \"leave what is there alone\" — the operator chose it. `Some(\"\")` is a real answer and not a missing one: the warehouse has no location of the needed type, and the field is cleared rather than filled with an invented fallback.","type":["string","null"]},"show":{"description":"Draw the field at all. `false` for every severity that moves nothing.","type":"boolean"}},"required":["show"],"title":"DamageDestination","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"show":false}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#receipt_damage_context":{"post":{"operationId":"receipt_damage_context","summary":"What a damage report on one receipt line is about: the line number, the SKU and its description, the receipt number, the line's unit, how much physically ARRIVED on the line (not qty_received — a return booked as Damaged records its whole arrival in qty_damaged), how much has already been reported damaged, and how much may still be reported. The last number is the ceiling `receipt_report_damage` itself enforces, computed by the same function, so a client shows what the write will allow rather than guessing it. A line that does not exist answers null rather than refusing.","description":"What a damage report on one receipt line is about: the line number, the SKU and its description, the receipt number, the line's unit, how much physically ARRIVED on the line (not qty_received — a return booked as Damaged records its whole arrival in qty_damaged), how much has already been reported damaged, and how much may still be reported. The last number is the ceiling `receipt_report_damage` itself enforces, computed by the same function, so a client shows what the write will allow rather than guessing it. A line that does not exist answers null rather than refusing.\n\n**Category:** `query`. Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":true,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"receipt_detail_damage","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"receipt_damage_context"},"params":{"type":"object","properties":{"receipt_detail_id":{"format":"int64","type":"integer"}},"required":["receipt_detail_id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"receipt_damage_context","params":{"receipt_detail_id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"anyOf":[{"$ref":"#/components/schemas/DamageContext"},{"type":"null"}],"title":"Nullable_DamageContext"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"already_damaged":1.5,"arrived":1.5,"available":1.5,"line_number":"<line_number>","receipt_detail_id":1,"receipt_id":1,"receipt_no":"<receipt_no>","sku_code":"<sku_code>","sku_descr":"<sku_descr>","uom":"<uom>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#receipt_damage_photo_upload_url":{"post":{"operationId":"receipt_damage_photo_upload_url","summary":"Ask for a presigned PUT link to upload one damage photo, for a receipt line. Answers the object key to send back in receipt_report_damage's photo_attachment_ids, the link itself, the Content-Type that is SIGNED into it (send exactly that header or the signature will not match), and how many seconds the link lives. The server owns the limits and enforces them here and again on save: at most 6 photos per damage record (counted from the ids already stored — pass damage_record_id to have them counted), at most 10 MiB per file, and only image/jpeg, image/png, image/heic. A refusal says why in words. When the deployment has no object storage configured the answer is a refusal saying so — reporting the damage itself keeps working without photos, because photos are recommended and not required.","description":"Ask for a presigned PUT link to upload one damage photo, for a receipt line. Answers the object key to send back in receipt_report_damage's photo_attachment_ids, the link itself, the Content-Type that is SIGNED into it (send exactly that header or the signature will not match), and how many seconds the link lives. The server owns the limits and enforces them here and again on save: at most 6 photos per damage record (counted from the ids already stored — pass damage_record_id to have them counted), at most 10 MiB per file, and only image/jpeg, image/png, image/heic. A refusal says why in words. When the deployment has no object storage configured the answer is a refusal saying so — reporting the damage itself keeps working without photos, because photos are recommended and not required.\n\n**Category:** `query`. Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":true,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"receipt_damage_photo","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"receipt_damage_photo_upload_url"},"params":{"type":"object","properties":{"byte_size":{"description":"Размер файла в байтах.","format":"uint64","minimum":0,"type":"integer"},"content_type":{"description":"`Content-Type` файла. Он ПОДПИСЫВАЕТСЯ вместе со ссылкой, поэтому загрузчик обязан прислать ровно его — ответ повторяет его явно.","type":"string"},"damage_record_id":{"default":null,"description":"Запись о повреждении, если она уже существует (фотографию добавляют к сохранённому повреждению). Тогда потолок считается по уже сохранённым id этой записи. `None` — повреждение ещё не записано, и потолок сработает при сохранении: `receipt_report_damage` отказывает списку длиннее шести.","format":"int64","type":["integer","null"]},"receipt_detail_id":{"format":"int64","type":"integer"},"receipt_id":{"format":"int64","type":"integer"}},"required":["byte_size","content_type","receipt_detail_id","receipt_id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"receipt_damage_photo_upload_url","params":{"byte_size":1,"content_type":"<content_type>","receipt_detail_id":1,"receipt_id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"content_type":{"description":"Тот `Content-Type`, который подписан. Пришлёте другой — подпись не сойдётся, и хранилище откажет.","type":"string"},"expires_in_secs":{"description":"Сколько секунд ссылка действительна. Не «до какого времени»: часы терминала и сервера расходятся, а разница длительностей — нет.","format":"uint64","minimum":0,"type":"integer"},"max_bytes":{"description":"Предел на один файл, в байтах.","format":"uint64","minimum":0,"type":"integer"},"max_photos_per_record":{"description":"Сколько фотографий держит одна запись о повреждении.","format":"uint","minimum":0,"type":"integer"},"object_key":{"description":"Ключ объекта. Его — и только его — клиент возвращает в `photo_attachment_ids`, когда сохраняет повреждение.","type":"string"},"upload_url":{"description":"Подписанная ссылка на `PUT`. Доверенность: в лог не писать, в состояние сессии не складывать.","type":"string"}},"required":["content_type","expires_in_secs","max_bytes","max_photos_per_record","object_key","upload_url"],"title":"DamagePhotoUploadUrlResult","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"content_type":"<content_type>","expires_in_secs":1,"max_bytes":1,"max_photos_per_record":1,"object_key":"<object_key>","upload_url":"<upload_url>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#receipt_damage_photo_view_urls":{"post":{"operationId":"receipt_damage_photo_view_urls","summary":"Presigned GET links for the photos already stored on one damage record. Keys come from the record itself, never from the caller, so a photo belonging to another receipt cannot be asked for. An empty list means the record has no photos — an ordinary answer, not a refusal. When the deployment has no object storage configured the answer is a refusal saying so; the damage record itself still reads normally through get_receipt_detail_damage.","description":"Presigned GET links for the photos already stored on one damage record. Keys come from the record itself, never from the caller, so a photo belonging to another receipt cannot be asked for. An empty list means the record has no photos — an ordinary answer, not a refusal. When the deployment has no object storage configured the answer is a refusal saying so; the damage record itself still reads normally through get_receipt_detail_damage.\n\n**Category:** `query`. Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":true,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"receipt_damage_photo","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"receipt_damage_photo_view_urls"},"params":{"type":"object","properties":{"damage_record_id":{"format":"int64","type":"integer"}},"required":["damage_record_id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"receipt_damage_photo_view_urls","params":{"damage_record_id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"photos":{"description":"В порядке, в котором ключи лежат в записи. Пусто — фотографий нет; это обычный ответ, а не отказ.","items":{"$ref":"#/components/schemas/DamagePhotoViewLink"},"type":"array"}},"required":["photos"],"title":"DamagePhotoViewUrlsResult","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"photos":[{"expires_in_secs":1,"object_key":"<object_key>","view_url":"<view_url>"}]}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#find_planned_case":{"post":{"operationId":"find_planned_case","summary":"Find a planned case row by label within a case-level receipt","description":"Find a planned case row by label within a case-level receipt\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"case_level","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"find_planned_case"},"params":{"type":"object","properties":{"data":{"properties":{"case_label":{"description":"Operator-scanned case label (= `container.code` of the case container). Filtered by receipt_id per D-69e SameReceipt scope.","type":"string"},"receipt_id":{"format":"int64","type":"integer"}},"required":["case_label","receipt_id"],"title":"FindPlannedCaseInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"find_planned_case","params":{"data":{"case_label":"<case_label>","receipt_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"anyOf":[{"$ref":"#/components/schemas/PlannedCaseDetail"},{"type":"null"}],"title":"Nullable_PlannedCaseDetail"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"container_id":1,"expected_qty":1.5,"owner_id":1,"receipt_detail_case_id":1,"receipt_detail_id":1,"sku_code":"<sku_code>","status":"<status>","was_unplanned":false}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_case_envelope":{"post":{"operationId":"get_case_envelope","summary":"Case envelope: resolve a scanned case label to its SKU + lot_policy_attributes for the RCCASE02LINE dynamic lot-attribute prompt","description":"Case envelope: resolve a scanned case label to its SKU + lot_policy_attributes for the RCCASE02LINE dynamic lot-attribute prompt\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"case_level","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_case_envelope"},"params":{"type":"object","properties":{"data":{"properties":{"case_label":{"description":"Operator-scanned case label (= `container.code` of the case container), resolved within this receipt per D-69e SameReceipt.","type":"string"},"receipt_id":{"format":"int64","type":"integer"}},"required":["case_label","receipt_id"],"title":"GetCaseEnvelopeInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_case_envelope","params":{"data":{"case_label":"<case_label>","receipt_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"case_label":{"type":"string"},"container_id":{"format":"int64","type":"integer"},"expected_qty":{"format":"double","type":"number"},"lot_policy_attributes":{"description":"Lot-attribute prompt for the case's SKU (ADR-050): each shown attribute pre-filled with the line's ASN-expected value (`value`) and locked (`readonly`) when the line is strict-match. Empty when the SKU has no lot_policy. RF expands these into the RCCASE02LINE `_dyn_lot_attrs` widget so the operator confirms / supplies COLOR / dates / etc. before committing the case receive.","items":{"$ref":"#/components/schemas/LotAttributePrompt"},"type":"array"},"owner_id":{"description":"Owner resolved from the parent `receipt_detail.owner_id` — RF copies it forward; the LINE call needs it on the wire.","format":"int64","type":"integer"},"receipt_detail_case_id":{"format":"int64","type":"integer"},"receipt_detail_id":{"format":"int64","type":"integer"},"sku_code":{"description":"Parent SKU (from `receipt_detail.sku`) the scanned case belongs to.","type":"string"},"status":{"type":"string"}},"required":["case_label","container_id","expected_qty","lot_policy_attributes","owner_id","receipt_detail_case_id","receipt_detail_id","sku_code","status"],"title":"CaseEnvelope","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"case_label":"<case_label>","container_id":1,"expected_qty":1.5,"lot_policy_attributes":[{"attrib_code":"<attrib_code>","is_date":false,"readonly":false,"required":false}],"owner_id":1,"receipt_detail_case_id":1,"receipt_detail_id":1,"sku_code":"<sku_code>","status":"<status>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#validate_pallet_unique":{"post":{"operationId":"validate_pallet_unique","summary":"Check if a pallet LPN is unique enough to assign on a given receipt","description":"Check if a pallet LPN is unique enough to assign on a given receipt\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"case_level","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"validate_pallet_unique"},"params":{"type":"object","properties":{"data":{"properties":{"pallet_lpn":{"description":"LPN code the operator is about to assign (in CreateCaseLevelAsn, ReplacePallet's new_pallet_lpn, or any other pallet-create flow).","type":"string"},"receipt_id":{"description":"Optional: receipt the operator is working in. When supplied and the lpn exists on a DIFFERENT receipt the response flags it as a cross-receipt collision (the ReplacePallet command rejects this case at runtime; surfacing it in the validate response lets the UI prevent the operator from even submitting).","format":"int64","type":["integer","null"]}},"required":["pallet_lpn"],"title":"ValidatePalletUniqueInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"validate_pallet_unique","params":{"data":{"pallet_lpn":"<pallet_lpn>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"conflicting_receipt_id":{"description":"`Some(_)` when the existing pallet's `planned_at_receipt_id` differs from the input — this is the cross-receipt collision the caller wants to know about.","format":"int64","type":["integer","null"]},"existing_container_id":{"description":"`Some(_)` when an existing pallet was found.","format":"int64","type":["integer","null"]},"is_unique":{"description":"True when the lpn is free to use on the current receipt: - no pallet container exists with this code anywhere, OR - the only existing pallet is on the SAME `receipt_id` (caller can reuse it as a destination for ReplacePallet).","type":"boolean"}},"required":["is_unique"],"title":"ValidatePalletUniqueResult","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"is_unique":false}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_receipt_cases":{"post":{"operationId":"list_receipt_cases","summary":"List cases on a receipt with optional status / pallet filter","description":"List cases on a receipt with optional status / pallet filter\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"case_level","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_receipt_cases"},"params":{"type":"object","properties":{"data":{"properties":{"pallet_lpn_filter":{"default":null,"description":"Optional pallet LPN filter — narrows the listing to cases under a specific pallet. RF \"open pallet\" detail screen uses this.","type":["string","null"]},"receipt_id":{"format":"int64","type":"integer"},"status_filter":{"default":null,"description":"Optional status filter. Common values: \"Planned\", \"Received\", \"Cancelled\", \"NotReceived\". `None` returns every status.","type":["string","null"]}},"required":["receipt_id"],"title":"ListReceiptCasesInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_receipt_cases","params":{"data":{"receipt_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/ReceiptCaseRow"},"title":"Array_of_ReceiptCaseRow","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"case_label":"<case_label>","container_id":1,"expected_qty":1.5,"receipt_detail_case_id":1,"receipt_detail_id":1,"sku_code":"<sku_code>","status":"<status>","was_unplanned":false}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#find_unreceived_cases":{"post":{"operationId":"find_unreceived_cases","summary":"Cases still in Planned status — what's expected but not yet received","description":"Cases still in Planned status — what's expected but not yet received\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"case_level","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"find_unreceived_cases"},"params":{"type":"object","properties":{"data":{"properties":{"receipt_id":{"format":"int64","type":"integer"}},"required":["receipt_id"],"title":"FindUnreceivedCasesInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"find_unreceived_cases","params":{"data":{"receipt_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/ReceiptCaseRow"},"title":"Array_of_ReceiptCaseRow","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"case_label":"<case_label>","container_id":1,"expected_qty":1.5,"receipt_detail_case_id":1,"receipt_detail_id":1,"sku_code":"<sku_code>","status":"<status>","was_unplanned":false}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#pre_validate_receive_case_level":{"post":{"operationId":"pre_validate_receive_case_level","summary":"Dry-run ReceiveCaseLevelLine: receipt status / case status / unplanned-policy / SKU presence","description":"Dry-run ReceiveCaseLevelLine: receipt status / case status / unplanned-policy / SKU presence\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"case_level","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"pre_validate_receive_case_level"},"params":{"type":"object","properties":{"data":{"properties":{"case_label":{"type":"string"},"qty":{"format":"double","type":"number"},"receipt_id":{"format":"int64","type":"integer"},"sku_code":{"default":null,"description":"Optional — required only when the unplanned-case path may need to auto-create a parent receipt_detail (scenario 3 in the command's body). Validate-side mirrors the runtime requirement: if case is not on ASN and `sku_code` is None, the validate flags this as a hard fail so RF disables the submit button.","type":["string","null"]}},"required":["case_label","qty","receipt_id"],"title":"PreValidateReceiveCaseLevelInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"pre_validate_receive_case_level","params":{"data":{"case_label":"<case_label>","qty":1.5,"receipt_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"Generic dry-run result for V-class endpoints. `can_proceed=true` means the corresponding command would (currently) succeed; `false` means at least one blocker is present and `reasons` enumerates them.\n\nV-class endpoints intentionally do NOT execute the real command — they are read-only previews for UI flows that want to disable a button before the operator pushes it. The authoritative gate is still the command itself, which performs the same checks under transactional lock and is the only path that mutates state.","properties":{"can_proceed":{"type":"boolean"},"reasons":{"items":{"type":"string"},"type":"array"}},"required":["can_proceed","reasons"],"title":"PreValidateResult","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"can_proceed":false,"reasons":["<reasons>"]}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_case_level_asn_by_number":{"post":{"operationId":"get_case_level_asn_by_number","summary":"Case-level entry-screen lookup: same shape as get_asn_by_number, errors out when receipt is Aggregate-granularity","description":"Case-level entry-screen lookup: same shape as get_asn_by_number, errors out when receipt is Aggregate-granularity\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"case_level","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_case_level_asn_by_number"},"params":{"type":"object","properties":{"data":{"properties":{"receipt_number":{"description":"Exact receipt_number (e.g. \"0000000100\"). Matched by equality, not substring — scan-flow on RCASN01 hands a single scanned barcode and expects a single result.","type":"string"}},"required":["receipt_number"],"title":"GetAsnByNumberInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_case_level_asn_by_number","params":{"data":{"receipt_number":"<receipt_number>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"AsnHeader plus per-receipt qty roll-ups. Used by `get_asn_by_number` (scan-flow exact match) to feed RCASN01SUM progress widget without a separate aggregate RPC.","properties":{"completion":{"type":"string"},"expected_receipt_date":{"description":"RFC 3339 in UTC; RF shows it in the viewer's own zone.","format":"date-time","type":["string","null"]},"external_receipt_number":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"inventory_tracking_granularity":{"description":"`receipt.inventory_tracking_granularity` (`Aggregate` | `Pallet` | `Case`). RCCASE01 (case-level entry screen) reads this to decide whether to push the case-scan loop or surface a typed error (\"ASN is Aggregate — use Receive Against ASN instead\"). RCASN01 ignores it (Aggregate is the implicit default).","type":"string"},"open_episode":{"anyOf":[{"$ref":"#/components/schemas/OpenEpisodeBrief"},{"type":"null"}],"description":"First Open / InProgress / AwaitingConfirmation serial-capture episode attached to any detail of this receipt, if any. Null when none. RCASN01 / RCASN01SUM check this on entry / resume to surface the spec §10.13 recovery flow — re-route the operator straight into RCSN01 with prior progress instead of restarting capture."},"owner_code":{"type":"string"},"owner_company":{"type":"string"},"owner_id":{"format":"int64","type":"integer"},"qty_expected_total":{"format":"double","type":"number"},"qty_received_total":{"format":"double","type":"number"},"receipt_number":{"type":"string"},"status":{"type":"string"},"version":{"description":"OCC version (per CLAUDE.md classifier rules) — receipt is a stateful entity, downstream commands (`receipt_close` / `receipt_cancel` / `receipt_adjust_received_qty`) carry this on submit. RCASN01's `onResponseReceive.set` reads `response.version → display.receipt_version`; without it the rule silently resolved to undefined and any later stateful_command was sent without OCC protection.\n\nLives on `AsnDetails`, NOT on `AsnHeader`, because only the \"read full ASN to operate on it\" path needs the version. The F2 picker (`lookup_asn`/`search_asns`) lists candidates only — the operator picks one and then the flow fetches details via `get_asn_by_number`. Exposing version on every picker row was the \"version just in case from frontend\" anti-pattern.","format":"int32","type":"integer"}},"required":["completion","id","inventory_tracking_granularity","owner_code","owner_company","owner_id","qty_expected_total","qty_received_total","receipt_number","status","version"],"title":"AsnDetails","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"completion":"<completion>","id":1,"inventory_tracking_granularity":"<inventory_tracking_granularity>","owner_code":"<owner_code>","owner_company":"<owner_company>","owner_id":1,"qty_expected_total":1.5,"qty_received_total":1.5,"receipt_number":"<receipt_number>","status":"<status>","version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#lookup_case_level_asn":{"post":{"operationId":"lookup_case_level_asn","summary":"lookup_asn restricted to case-level inventory tracking: Pallet or Case (RCCASE01 picker)","description":"lookup_asn restricted to case-level inventory tracking: Pallet or Case (RCCASE01 picker)\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"case_level","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"lookup_case_level_asn"},"params":{"type":"object","properties":{"data":{"properties":{"page":{"description":"1-indexed page number. Default 1.","format":"int64","type":["integer","null"]},"page_size":{"description":"Page size. Default 50, capped at 200.","format":"int64","type":["integer","null"]},"q":{"description":"Optional substring on `receipt_number` or `external_receipt_number`. `None` returns the full window of recent ASN headers.","type":["string","null"]}},"title":"LookupAsnInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"lookup_case_level_asn","params":{"data":{"page":1,"page_size":1,"q":"<q>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/AsnHeader"},"title":"Array_of_AsnHeader","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"completion":"<completion>","id":1,"owner_code":"<owner_code>","owner_company":"<owner_company>","owner_id":1,"receipt_number":"<receipt_number>","status":"<status>"}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#receipt_create_case_level_asn":{"post":{"operationId":"receipt_create_case_level_asn","summary":"Load a case-level ASN (D-69, ADR-046).","description":"Load a case-level ASN (D-69, ADR-046).\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"case_level_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"receipt_create_case_level_asn"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"description":"ERP-supplied ASN payload that gets converted into a planned receipt with per-case manifest. The shape is hierarchical (line → pallet → case) because that's how ASN documents are usually structured: SKU lines that each break down into one or more pallet-of-cases shipments.","properties":{"carrier_id":{"format":"int64","type":["integer","null"]},"expected_receipt_date_rfc3339":{"description":"Expected arrival date as RFC3339 string (e.g. \"2026-05-15T08:00:00Z\"). Parsed inside the command rather than typed as `OffsetDateTime` directly so we don't need the `serde-well-known` time feature in this crate. Sub-chunk 3 may swap to a typed wrapper if needed. `None` → no expected date set on the receipt.","type":["string","null"]},"external_receipt_number":{"description":"External reference (`receipt.external_receipt_number`) — typically the ERP's own ASN number / PO number. Operators scan this in RF flows to find the receipt.","type":["string","null"]},"idempotency_key":{"format":"uuid","type":"string"},"inventory_tracking_granularity":{"anyOf":[{"$ref":"#/components/schemas/InventoryTrackingGranularity"},{"type":"null"}],"default":null,"description":"Cascade input #1 for granularity. Falls through to operator UI override → `owner_config.default_inventory_tracking_granularity` → `Aggregate` per `resolve_granularity`."},"lines":{"items":{"$ref":"#/components/schemas/AsnLine"},"type":"array"},"owner_id":{"format":"int64","type":"integer"},"po_id":{"format":"int64","type":["integer","null"]},"receipt_number":{"description":"When None, GenKey mints the next `receipt_number` from the warehouse counter. When Some, the value lands directly — useful for tests that need deterministic numbers.","type":["string","null"]},"receipt_type":{"$ref":"#/components/schemas/ReceiptType"},"supplier_id":{"format":"int64","type":["integer","null"]},"unplanned_case_on_asn":{"anyOf":[{"$ref":"#/components/schemas/AllowError"},{"type":"null"}],"default":null,"description":"Cascade input #2 — same path. When the resolved granularity is case-level (Pallet | Case) and this resolves to None even after the cascade, the command hard-errors. When granularity is Aggregate this is ignored entirely."}},"required":["idempotency_key","lines","owner_id","receipt_type"],"title":"CreateCaseLevelAsn","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"receipt_create_case_level_asn","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"lines":[{"sku_code":"<sku_code>"}],"owner_id":1,"receipt_type":"Normal"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"case_count":{"format":"uint","minimum":0,"type":"integer"},"effective_granularity":{"allOf":[{"$ref":"#/components/schemas/InventoryTrackingGranularity"}],"description":"Effective granularity after cascade resolution — useful for the caller to confirm the receipt landed in the mode they expected."},"effective_unplanned_policy":{"anyOf":[{"$ref":"#/components/schemas/AllowError"},{"type":"null"}],"description":"Effective unplanned policy. None when granularity = Aggregate."},"line_count":{"format":"uint","minimum":0,"type":"integer"},"pallet_count":{"format":"uint","minimum":0,"type":"integer"},"receipt_id":{"format":"int64","type":"integer"},"receipt_number":{"type":"string"}},"required":["case_count","effective_granularity","line_count","pallet_count","receipt_id","receipt_number"],"title":"CreateCaseLevelAsnResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"case_count":1,"effective_granularity":{},"line_count":1,"pallet_count":1,"receipt_id":1,"receipt_number":"<receipt_number>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#receipt_receive_case_level_line":{"post":{"operationId":"receipt_receive_case_level_line","summary":"Commit one case-level scan (planned or unplanned).","description":"Commit one case-level scan (planned or unplanned).\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n- This method can ask for a supervisor override. Send the codes the operator accepted in `acknowledged_overrides`. See 04-command-types-and-concurrency.md and 05-errors.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"case_level_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"receipt_receive_case_level_line"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"description":"Operator scan against an already-loaded case-level receipt. Single scan = single RPC = single transaction (per OQ-05).","properties":{"acknowledged_overrides":{"default":[],"description":"Override codes the operator already acknowledged via a prior `showConfirm` prompt — mirrors the same mechanism `receive_against_asn` uses. Empty on the first attempt; populated when re-submitted after a confirmation.","items":{"format":"int16","type":"integer"},"type":"array","uniqueItems":true},"case_label":{"description":"The case label the operator scanned. Resolves to `container.code` for a container row of `container_type='Case'` linked back to this receipt via `receipt_detail_case`.","type":"string"},"idempotency_key":{"format":"uuid","type":"string"},"lot_attributes":{"additionalProperties":{"type":"string"},"default":{},"description":"Operator-supplied lot attributes (COLOR, SIZE, etc.) from the RCCASE02 `_dyn_lot_attrs` capture. Merged over the line's ASN-expected snapshot in `deposit_for_case_scan`: operator value wins on conflict and fills attributes the ASN did not pre-declare. Empty → the planning/expected snapshot is used unchanged (prior behaviour). Applies to BOTH planned and unplanned paths.","type":"object"},"override_grant_id":{"default":null,"description":"A supervisor's grant (`supervisor_override_grant`) authorising a capability-gated override of a planned case's count — a per-case shortage (28) or excess (27) — for an operator who does not hold the capability. Its pairs must name the receipt LINE the case belongs to: `{code, subject: \"receipt:<receipt_id>/line:<receipt_detail_id>\"}` (the case's parent `receipt_detail`, not the case itself); a refused scan names that exact pair in `context.pairs`. The authoriser recorded is the grant's, never a field of this request. Optional: a caller who holds the capability keeps acknowledging with the bare code in `acknowledged_overrides`, exactly as before. See `shared::override_grant`.","format":"uuid","type":["string","null"]},"qty":{"description":"Physically-counted qty. Usually matches the planned `receipt_detail_case.expected_qty` but short / over receipts are allowed at the line level (rolled into the parent `receipt_detail.qty_received` and surfaced via the existing excess/shortage `AllowError` policy chain at receipt close).","format":"double","type":"number"},"receipt_id":{"format":"int64","type":"integer"},"sku_code":{"description":"Optional SKU code. Required when sub-chunk 2 lands the unplanned-case path (we need to know the SKU before the policy check can decide whether to auto-create a parent receipt_detail). In sub-chunk 1's happy path it's unused — the planned case row resolves SKU through receipt_detail_id.","type":["string","null"]},"to_loc":{"description":"Physical landing location for the scanned case (the dock/door or the put-away staging zone, whichever the warehouse uses for at-receive-time storage).","type":["string","null"]},"uom_received":{"default":null,"description":"Unit the operator used to enter `qty`. Drives the case-vs-EA translation done inside this command: * `Some(\"CS\")` — \"I received N cases\" (RF default in the widget). For a planned case the backend multiplies by that case's expected quantity; for an unplanned case it uses the receipt line's active pack hierarchy. qty=1 with planned 10 EA/case → 10 EA deposit. The full-case path is the trusted-label scenario; receipt_policy validation still runs in case the operator typed a partial case (qty=0.5 CS = 5 EA on a 10-pack). * `Some(\"EA\")` — \"I opened the case and physically counted N units\". qty IS the base-UOM total. Backend compares against the planned case qty and routes any deviation through `receipt_policy.{shortage,excess}_*` rules so the operator either gets a clean override prompt (within allowed %) or a hard rejection. * `None` — back-compat default = treat qty as base-UOM (EA). Pre-widget clients (integration tests, older RF builds) send qty in EA directly without specifying uom.","type":["string","null"]}},"required":["case_label","idempotency_key","qty","receipt_id"],"title":"ReceiveCaseLevelLine","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"receipt_receive_case_level_line","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"case_label":"<case_label>","qty":1.5,"receipt_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"container_id":{"description":"`container.id` of the case container — useful for follow-up label-print or move operations.","format":"int64","type":"integer"},"line_complete":{"description":"True when the just-scanned case rolled the line up to `qty_received >= qty_expected`. RCCASE02 branches on this to auto-navigate to RCCASE_DONE (close confirmation) instead of leaving the operator stuck on the scan loop with no more planned cases to receive.","type":"boolean"},"line_qty_received":{"description":"Receipt-detail line `qty_received` after this scan rolled forward — lets the RF UI show \"23 of 50 received\" without an extra round-trip.","format":"double","type":"number"},"receipt_detail_case_id":{"description":"Primary key of the `receipt_detail_case` row that flipped to Received (or was synthesised, in sub-chunks 2-3).","format":"int64","type":"integer"},"receipt_detail_id":{"format":"int64","type":"integer"},"receipt_id":{"format":"int64","type":"integer"},"was_unplanned":{"description":"True when the row was synthesised under the `unplanned_case_on_asn = Allow | Warning` path. Sub-chunk 1 always returns false (synthesis lands in sub-chunk 2).","type":"boolean"}},"required":["container_id","line_complete","line_qty_received","receipt_detail_case_id","receipt_detail_id","receipt_id","was_unplanned"],"title":"ReceiveCaseLevelLineResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"container_id":1,"line_complete":false,"line_qty_received":1.5,"receipt_detail_case_id":1,"receipt_detail_id":1,"receipt_id":1,"was_unplanned":false}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#receipt_replace_pallet":{"post":{"operationId":"receipt_replace_pallet","summary":"Regroup all/some Planned cases onto another pallet; received stock requires an inventory move (D-69d).","description":"Regroup all/some Planned cases onto another pallet; received stock requires an inventory move (D-69d).\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"case_level_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"receipt_replace_pallet"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"case_labels":{"default":null,"description":"`None` = move every case currently on the old pallet. `Some(...)` = move only the named cases. Empty Vec is rejected (zero-case move is a no-op the caller probably didn't mean to issue).","items":{"type":"string"},"type":["array","null"]},"idempotency_key":{"format":"uuid","type":"string"},"new_pallet_lpn":{"description":"LPN code of the destination pallet. Created on the fly when the code isn't already a container — useful for ad-hoc operator-typed pallets.","type":"string"},"old_pallet_lpn":{"description":"LPN code of the pallet the cases are leaving.","type":"string"},"receipt_id":{"format":"int64","type":"integer"}},"required":["idempotency_key","new_pallet_lpn","old_pallet_lpn","receipt_id"],"title":"ReplacePallet","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"receipt_replace_pallet","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"new_pallet_lpn":"<new_pallet_lpn>","old_pallet_lpn":"<old_pallet_lpn>","receipt_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"moved_case_count":{"format":"int64","type":"integer"},"new_pallet_container_id":{"format":"int64","type":"integer"},"new_pallet_was_created":{"description":"True when the new pallet was minted by this command (lpn didn't exist beforehand). False when the destination was an existing pallet container.","type":"boolean"},"old_pallet_container_id":{"format":"int64","type":"integer"},"receipt_id":{"format":"int64","type":"integer"}},"required":["moved_case_count","new_pallet_container_id","new_pallet_was_created","old_pallet_container_id","receipt_id"],"title":"ReplacePalletResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"moved_case_count":1,"new_pallet_container_id":1,"new_pallet_was_created":false,"old_pallet_container_id":1,"receipt_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#receipt_cancel_planned_case":{"post":{"operationId":"receipt_cancel_planned_case","summary":"Cancel a planned case before it is received (D-69e SameReceipt).","description":"Cancel a planned case before it is received (D-69e SameReceipt).\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"case_level_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"receipt_cancel_planned_case"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"case_label":{"type":"string"},"idempotency_key":{"format":"uuid","type":"string"},"reason":{"description":"Required free-text justification. Empty / whitespace-only is rejected — the audit trail needs to know why a case was cancelled, otherwise dispute resolution six months later has nothing to go on.","type":"string"},"receipt_id":{"format":"int64","type":"integer"}},"required":["case_label","idempotency_key","reason","receipt_id"],"title":"CancelPlannedCase","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"receipt_cancel_planned_case","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"case_label":"<case_label>","reason":"<reason>","receipt_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"container_id":{"format":"int64","type":"integer"},"receipt_detail_case_id":{"format":"int64","type":"integer"},"receipt_id":{"format":"int64","type":"integer"}},"required":["container_id","receipt_detail_case_id","receipt_id"],"title":"CancelPlannedCaseResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"container_id":1,"receipt_detail_case_id":1,"receipt_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#create_putaway_policy":{"post":{"operationId":"create_putaway_policy","summary":"Create a putaway policy whose steps are owned by the putaway pipeline.","description":"Create a putaway policy whose steps are owned by the putaway pipeline.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog does not say whether this method needs an idempotency key.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"putaway_policy","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"create_putaway_policy"},"params":{"type":"object","properties":{"data":{"additionalProperties":false,"properties":{"code":{"type":"string"},"description":{"description":"Optional on create: a policy is identified by its code, and demanding a description to write one down would be a field invented by the form rather than by the warehouse.","type":["string","null"]}},"required":["code"],"title":"PutawayPolicyForCreate","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"create_putaway_policy","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"code":"<code>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"description":{"description":"What the policy is FOR, in the operator's words.\n\nNullable, and it stays nullable: the column arrived (migration 265) after policies already existed, and a default would have put text nobody wrote on every row in every warehouse — indistinguishable from text somebody did.","type":["string","null"]},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"version":{"description":"Optimistic lock (migration 349). Absent from `ForUpdate` — a caller must never write it; it moves only through [`PutawayPolicyBmc::bump_version_checked`].","format":"int32","type":"integer"}},"required":["add_when","add_who","code","id","mod_when","mod_who","version"],"title":"PutawayPolicy","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","id":1,"mod_when":"<mod_when>","mod_who":1,"version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_putaway_policy":{"post":{"operationId":"get_putaway_policy","summary":"Get a putaway_policy by ID — CRUD.","description":"Get a putaway_policy by ID — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"putaway_policy","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_putaway_policy"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_putaway_policy","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"description":{"description":"What the policy is FOR, in the operator's words.\n\nNullable, and it stays nullable: the column arrived (migration 265) after policies already existed, and a default would have put text nobody wrote on every row in every warehouse — indistinguishable from text somebody did.","type":["string","null"]},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"version":{"description":"Optimistic lock (migration 349). Absent from `ForUpdate` — a caller must never write it; it moves only through [`PutawayPolicyBmc::bump_version_checked`].","format":"int32","type":"integer"}},"required":["add_when","add_who","code","id","mod_when","mod_who","version"],"title":"PutawayPolicy","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","id":1,"mod_when":"<mod_when>","mod_who":1,"version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_putaway_policy":{"post":{"operationId":"list_putaway_policy","summary":"List putaway_policy — CRUD.","description":"List putaway_policy — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"putaway_policy","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_putaway_policy"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_putaway_policy"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/PutawayPolicy"},"title":"Array_of_PutawayPolicy","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"code":"<code>","id":1,"mod_when":"<mod_when>","mod_who":1,"version":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#update_putaway_policy":{"post":{"operationId":"update_putaway_policy","summary":"Update a putaway policy header without overwriting a newer edit.","description":"Update a putaway policy header without overwriting a newer edit.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n**Versioned entities:** putaway_policy (id in data.id, version in data.expected_version).\n\n\n**Notes**\n\n- The catalog does not say whether this method needs an idempotency key.\n- Send the current version of the row in `expected_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[{"entity":"putaway_policy","id_field":"id","version_field":"expected_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"putaway_policy","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"update_putaway_policy"},"params":{"type":"object","properties":{"meta":{"type":"object","description":"Control-plane envelope supplied by the platform."},"data":{"properties":{"data":{"additionalProperties":false,"description":"Editable putaway-policy header fields. `code` is deliberately absent and therefore cannot be renamed through this public API.","properties":{"description":{"type":["string","null"]}},"title":"PutawayPolicyHeaderUpdate","type":"object"},"expected_version":{"format":"int32","type":"integer"},"id":{"format":"int64","type":"integer"}},"required":["id","expected_version","data"],"type":"object","description":"Versioned update payload."}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"update_putaway_policy","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"id":1,"expected_version":1,"data":{"description":"<description>"}}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"description":{"description":"What the policy is FOR, in the operator's words.\n\nNullable, and it stays nullable: the column arrived (migration 265) after policies already existed, and a default would have put text nobody wrote on every row in every warehouse — indistinguishable from text somebody did.","type":["string","null"]},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"version":{"description":"Optimistic lock (migration 349). Absent from `ForUpdate` — a caller must never write it; it moves only through [`PutawayPolicyBmc::bump_version_checked`].","format":"int32","type":"integer"}},"required":["add_when","add_who","code","id","mod_when","mod_who","version"],"title":"PutawayPolicy","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","id":1,"mod_when":"<mod_when>","mod_who":1,"version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_putaway_policy":{"post":{"operationId":"delete_putaway_policy","summary":"Delete an unreferenced putaway policy and all of its owned steps and criteria.","description":"Delete an unreferenced putaway policy and all of its owned steps and criteria.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog does not say whether this method needs an idempotency key.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"putaway_policy","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_putaway_policy"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_putaway_policy","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"description":{"description":"What the policy is FOR, in the operator's words.\n\nNullable, and it stays nullable: the column arrived (migration 265) after policies already existed, and a default would have put text nobody wrote on every row in every warehouse — indistinguishable from text somebody did.","type":["string","null"]},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"version":{"description":"Optimistic lock (migration 349). Absent from `ForUpdate` — a caller must never write it; it moves only through [`PutawayPolicyBmc::bump_version_checked`].","format":"int32","type":"integer"}},"required":["add_when","add_who","code","id","mod_when","mod_who","version"],"title":"PutawayPolicy","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","id":1,"mod_when":"<mod_when>","mod_who":1,"version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_many_putaway_policy":{"post":{"operationId":"delete_many_putaway_policy","summary":"Delete unreferenced putaway policies and their owned steps and criteria.","description":"Delete unreferenced putaway policies and their owned steps and criteria.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog does not say whether this method needs an idempotency key.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"putaway_policy","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_many_putaway_policy"},"params":{"type":"object","properties":{"ids":{"items":{"format":"int64","type":"integer"},"type":"array","description":"Record IDs"}},"required":["ids"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_many_putaway_policy","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"ids":[1]}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"uint64","minimum":0,"title":"uint64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_putaway_policy":{"post":{"operationId":"count_putaway_policy","summary":"Count putaway_policy — CRUD.","description":"Count putaway_policy — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"putaway_policy","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_putaway_policy"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_putaway_policy"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_putaway_policy_detail":{"post":{"operationId":"get_putaway_policy_detail","summary":"Get a putaway_policy_detail by ID — CRUD.","description":"Get a putaway_policy_detail by ID — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"putaway_policy","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_putaway_policy_detail"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_putaway_policy_detail","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"`Deserialize` as well as `Serialize`, for the reason [`super::PutawayStepCriterion`] gives: the step editor's sentence is rendered by `web-ui-server`, which reads the step back over `get_putaway_policy_detail` and needs the four axis enums and the six booleans as TYPES, not as strings it re-parses.","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"allow_mixed_lot":{"type":["boolean","null"]},"allow_mixed_sku":{"description":"Whether the suggested location may already hold other SKUs / other lots, and whether it must be empty.\n\n`Some(true)` / `Some(true)` / `Some(false)` is the state a step is in when it says nothing about mixing: the location's own flags and the commingle rules decide. That is what `INHERIT` meant, and it is the column default — a step that says nothing about mixing must not start forbidding it.\n\n**`None` used to be that state too, and app migration 290 removed it.** `MixCheck::from_toggles` (`wms-inventory`) reads `None` and `Some(true)` on a mixing toggle into the SAME arm, so the two were already indistinguishable to the engine while the step card drew `None` as an UNTICKED box — which reads as \"mixing is not allowed\", the opposite of what the engine did. Filling the NULLs is what makes the box tell the truth. The columns stay nullable (nothing writes NULL today, and NOT NULL is its own decision), so this type keeps its `Option` and every reader here keeps reading three values.","type":["boolean","null"]},"fit_by_cube":{"description":"Which PHYSICAL checks this step applies (migration 231).\n\n`NOT NULL`, unlike the three mixing toggles above: those need a third \"no opinion\" state because the location's own flags can answer instead, and these have nothing to defer to. `fit_by_cube` / `fit_by_weight` default `true` because that is what the engine has always done; `fit_by_pallet_dims` defaults `false` because it is new arithmetic.\n\nRead as a set by [`crate::model::policies`]' consumer `putaway::space::FitToggles`, never one at a time — the whole point of three columns is that they are independent, and a caller that reads one of them alone is deciding for the other two.","type":"boolean"},"fit_by_pallet_dims":{"type":"boolean"},"fit_by_quantity":{"description":"What the location already holds, plus what is arriving, against `location.max_qty_capacity` — how a pick face is sized: it holds so many EACHes and then it is full.","type":"boolean"},"fit_by_stack_limit":{"description":"Refuse a location whose pallet POSITIONS are taken — `location.footprint × location.stack_limit`, the count Infor calls Fit by Stack Limit. The one capacity a bulk floor bay actually has, and the only one that binds in a warehouse keeping no cube on its items.","type":"boolean"},"fit_by_weight":{"type":"boolean"},"from_location":{"type":["string","null"]},"from_zone":{"type":["string","null"]},"guard":{"$ref":"#/components/schemas/PutawayGuard"},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"mode":{"$ref":"#/components/schemas/PutawayMode"},"ordering":{"$ref":"#/components/schemas/PutawayOrdering"},"putaway_policy_id":{"format":"int64","type":"integer"},"require_empty":{"type":["boolean","null"]},"respect_temperature":{"description":"Reject a location whose temperature range does not cover the SKU's. The numbers come from the SKU card, never retyped here, so the step cannot drift away from the product master.","type":"boolean"},"scope":{"$ref":"#/components/schemas/PutawayScope"},"sequence":{"description":"Execution order within the policy. Unique per policy (migration 191).","format":"int32","type":"integer"},"step_num":{"description":"User-facing step label. NOT an ordering key — see `sequence`.","type":"string"},"to_location":{"type":["string","null"]},"to_zone":{"type":["string","null"]},"version":{"description":"Optimistic lock (migration 349). Absent from `PutawayPolicyDetailForUpdate` — a caller must never write it; it moves only through [`PutawayPolicyDetailBmc::update_checked`], which bumps it in the same statement as the write.","format":"int32","type":"integer"}},"required":["add_when","add_who","fit_by_cube","fit_by_pallet_dims","fit_by_quantity","fit_by_stack_limit","fit_by_weight","guard","id","mod_when","mod_who","mode","ordering","putaway_policy_id","respect_temperature","scope","sequence","step_num","version"],"title":"PutawayPolicyDetail","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"fit_by_cube":false,"fit_by_pallet_dims":false,"fit_by_quantity":false,"fit_by_stack_limit":false,"fit_by_weight":false,"guard":"None","id":1,"mod_when":"<mod_when>","mod_who":1,"mode":"Suitable","ordering":"Route","putaway_policy_id":1,"respect_temperature":false,"scope":"ZoneFromStep","sequence":1,"step_num":"<step_num>","version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_putaway_policy_detail":{"post":{"operationId":"list_putaway_policy_detail","summary":"List putaway_policy_detail — CRUD.","description":"List putaway_policy_detail — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"putaway_policy","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_putaway_policy_detail"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_putaway_policy_detail"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/PutawayPolicyDetail"},"title":"Array_of_PutawayPolicyDetail","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"fit_by_cube":false,"fit_by_pallet_dims":false,"fit_by_quantity":false,"fit_by_stack_limit":false,"fit_by_weight":false,"guard":"None","id":1,"mod_when":"<mod_when>","mod_who":1,"mode":"Suitable","ordering":"Route","putaway_policy_id":1,"respect_temperature":false,"scope":"ZoneFromStep","sequence":1,"step_num":"<step_num>","version":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_putaway_policy_detail":{"post":{"operationId":"count_putaway_policy_detail","summary":"Count putaway_policy_detail — CRUD.","description":"Count putaway_policy_detail — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"putaway_policy","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_putaway_policy_detail"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_putaway_policy_detail"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_putaway_step_criterion":{"post":{"operationId":"get_putaway_step_criterion","summary":"Get a putaway_step_criterion by ID — CRUD.","description":"Get a putaway_step_criterion by ID — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"putaway_policy","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_putaway_step_criterion"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_putaway_step_criterion","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"`Deserialize` as well as `Serialize`, unlike most entities here: the step editor's sentence (`putaway_step_describe`) is rendered by `web-ui-server`, which has no database of its own and reads a step's criteria back over `list_putaway_step_criterion`. Reading them into the entity — rather than picking fields out of a `serde_json::Value` on the web side — is what keeps `describe_step`'s exhaustive matches meaningful: a hand-parsed row could carry a property spelling no `CriterionProperty` variant has, and the compiler would never notice.","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"attribute_code":{"description":"Which attribute the criterion narrows on (COLOR, SIZE) — set for exactly the three attribute properties (`LotAttribute`, `SkuAttribute`, `LocationAttribute`) and NULL for every other. `chk_step_criterion_attribute_code` (migration 209, widened by 218) enforces the pairing in both directions.","type":["string","null"]},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"property":{"$ref":"#/components/schemas/CriterionProperty"},"putaway_policy_detail_id":{"format":"int64","type":"integer"},"rule":{"$ref":"#/components/schemas/CriterionRule"},"subject":{"$ref":"#/components/schemas/CriterionSubject"},"values":{"description":"The `text[]` column (migration 209): one column serves every property kind (an enum's SQL label, `'true'`/`'false'`, or a one-element array for a scalar) because the resolver — not the storage — knows the type.\n\nA plain `Vec<String>`, carried by `Fields` like every other column: the workspace enables the `postgres-array` feature on both `sea-query` and `sea-query-binder`, so `Vec<String>` converts into a `sea_query::Value::Array` and binds as a real `text[]`. No cast-as is needed (the column is `text[]`, not an enum array), and no newtype — this field was `#[field(skip)]` until that feature was turned on, which is also why `putaway_policy_detail.rs` once wrapped its `loc_type[]` columns in a local `LocTypes` newtype with five hand-written trait impls. Both workarounds are gone; the whole entity now travels the generic CRUD path.\n\n**An empty array is not NULL, and is not a state a row can be in.** `chk_step_criterion_values_nonempty` (migration 209) rejects `cardinality(values) = 0` at this table, so \"no values\" is a write-time database refusal rather than something stored and later interpreted — a reader here never has to decide what an empty criterion means. (It would mean \"narrow the candidates to nothing\", indistinguishable in a trace from an exhausted zone. That is the refusal's whole point.)","items":{"type":"string"},"type":"array"}},"required":["add_when","add_who","id","mod_when","mod_who","property","putaway_policy_detail_id","rule","subject","values"],"title":"PutawayStepCriterion","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"id":1,"mod_when":"<mod_when>","mod_who":1,"property":"LocationType","putaway_policy_detail_id":1,"rule":"Include","subject":"Product","values":["<values>"]}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_putaway_step_criterion":{"post":{"operationId":"list_putaway_step_criterion","summary":"List putaway_step_criterion — CRUD.","description":"List putaway_step_criterion — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"putaway_policy","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_putaway_step_criterion"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_putaway_step_criterion"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/PutawayStepCriterion"},"title":"Array_of_PutawayStepCriterion","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"id":1,"mod_when":"<mod_when>","mod_who":1,"property":"LocationType","putaway_policy_detail_id":1,"rule":"Include","subject":"Product","values":["<values>"]}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_putaway_step_criterion":{"post":{"operationId":"count_putaway_step_criterion","summary":"Count putaway_step_criterion — CRUD.","description":"Count putaway_step_criterion — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"putaway_policy","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_putaway_step_criterion"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_putaway_step_criterion"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#putaway_pipeline_view":{"post":{"operationId":"putaway_pipeline_view","summary":"Read one putaway policy's step pipeline with its criteria, its readback, its refusals and its never-runs marks.","description":"Read one putaway policy's step pipeline with its criteria, its readback, its refusals and its never-runs marks.\n\n**Category:** `query`. Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"query","x-quark-category-declared":true,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"putaway_policy","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"putaway_pipeline_view"},"params":{"type":"object","properties":{"drafts":{"default":null,"items":{"$ref":"#/components/schemas/StepDraft"},"type":["array","null"]},"id":{"format":"int64","type":"integer"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"putaway_pipeline_view","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"One putaway policy's pipeline, with everything the card draws beside each step.","properties":{"next_step_num":{"description":"What the system will call the next step the operator adds. Shown on the \"+ Add step\" affordance BEFORE the add, which is why it is here and not only in the add command's answer.","type":"string"},"policy_code":{"type":"string"},"policy_id":{"format":"int64","type":"integer"},"policy_version":{"description":"The policy's own optimistic lock — what a reorder must echo back.","format":"int32","type":"integer"},"steps":{"description":"Every step of the policy in execution order (`sequence`, never `step_num` — that is `varchar(5)` and sorts '10' before '2').","items":{"$ref":"#/components/schemas/PutawayPipelineStep"},"type":"array"}},"required":["next_step_num","policy_code","policy_id","policy_version","steps"],"title":"PutawayPipelineView","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"next_step_num":"<next_step_num>","policy_code":"<policy_code>","policy_id":1,"policy_version":1,"steps":[{"clauses":[{"runs":null,"text":null,"topic":null}],"criteria":[{"property":null,"rule":null,"values":null}],"fields":{"fit_by_cube":false,"fit_by_pallet_dims":false,"fit_by_quantity":false,"fit_by_stack_limit":false,"fit_by_weight":false,"guard":null,"mode":null,"ordering":null,"respect_temperature":false,"scope":null},"id":1,"refusals":[{"runs":null,"text":null,"topic":null}],"sequence":1,"step_num":"<step_num>","version":1}]}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#putaway_criterion_vocabulary":{"post":{"operationId":"putaway_criterion_vocabulary","summary":"The values a putaway criterion may take: its properties, their attributes, and the values of one.","description":"The values a putaway criterion may take: its properties, their attributes, and the values of one.\n\n**Category:** `query`. Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"query","x-quark-category-declared":true,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"putaway_policy","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"putaway_criterion_vocabulary"},"params":{"type":"object","properties":{"attribute_code":{"default":null,"type":["string","null"]},"property":{"default":null,"description":"A [`CriterionProperty`] label, as the engine spells it. A `String` and not the enum: an unfamiliar spelling has to come back as a refusal naming it, and a typed field would be refused by serde at the transport boundary with a message about the whole request.","type":["string","null"]}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"putaway_criterion_vocabulary"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"Which of the three questions this answers.","properties":{"items":{"items":{"$ref":"#/components/schemas/VocabularyItem"},"type":"array"},"stage":{"description":"`\"property\"` | `\"attribute\"` | `\"value\"`.","type":"string"}},"required":["items","stage"],"title":"VocabularyAnswer","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"items":[{"code":"<code>","display":"<display>"}],"stage":"<stage>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#putaway_dry_run":{"post":{"operationId":"putaway_dry_run","summary":"What the putaway engine would do with one LPN under one policy, in words: the pallet, which step wins and where it would go, and every step of the pipeline with why it did or did not answer — including the ones the engine never reached. Evaluates the SAVED policy, not an unsaved draft, so a step edited on screen is previewed only after it is saved. Reserves nothing (the walk is rolled back). An LPN carrying no stock, or loose stock rather than a container, comes back as a worded `refusal` on a successful response — not as an error; only a policy that does not exist or will not load is a refusal of the call.","description":"What the putaway engine would do with one LPN under one policy, in words: the pallet, which step wins and where it would go, and every step of the pipeline with why it did or did not answer — including the ones the engine never reached. Evaluates the SAVED policy, not an unsaved draft, so a step edited on screen is previewed only after it is saved. Reserves nothing (the walk is rolled back). An LPN carrying no stock, or loose stock rather than a container, comes back as a worded `refusal` on a successful response — not as an error; only a policy that does not exist or will not load is a refusal of the call.\n\n**Category:** `query`. Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"query","x-quark-category-declared":true,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"putaway_policy","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"putaway_dry_run"},"params":{"type":"object","properties":{"lpn":{"type":"string"},"policy_id":{"format":"int64","type":"integer"}},"required":["lpn","policy_id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"putaway_dry_run","params":{"lpn":"<lpn>","policy_id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"What the engine would do with one LPN under one policy, in words.","properties":{"chosen":{"description":"The location the engine would take, when a step matched.","type":["string","null"]},"lpn":{"description":"Echoed back, trimmed — the panel keeps its own field, and a report that did not name its subject cannot be read beside a second one.","type":"string"},"pallet":{"anyOf":[{"$ref":"#/components/schemas/DryRunPallet"},{"type":"null"}],"description":"What the LPN carries. `None` when the report was refused before a pallet was known, and present even for some refusals: knowing WHAT is on the pallet is most of the answer to \"why did nothing match it\"."},"refusal":{"description":"Why there is no walk to report, worded. Not an error: an operator who typed an unknown LPN asked a question and gets an answer.","type":["string","null"]},"steps":{"description":"EVERY step of the policy, in `sequence` order. Empty only when the report was refused.","items":{"$ref":"#/components/schemas/DryRunStep"},"type":"array"},"verdict":{"description":"One sentence: which step won, or that none did. Always present, so the panel has exactly one thing to print at the top — on a refusal it is the refusal, said once rather than in two places that could disagree.","type":"string"}},"required":["lpn","steps","verdict"],"title":"PutawayDryRun","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"lpn":"<lpn>","steps":[{"candidates":[{"location":null,"outcome":null,"predicate":null}],"candidates_seen":1,"explanation":"<explanation>","outcome":"Matched","step_num":"<step_num>"}],"verdict":"<verdict>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#putaway_steps_save":{"post":{"operationId":"putaway_steps_save","summary":"Write every edited putaway step of one policy, each against its own version, with its conditions.","description":"Write every edited putaway step of one policy, each against its own version, with its conditions.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n**Versioned entities:** putaway_policy_detail (id in data.steps[].step_id, version in data.steps[].expected_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `steps[].expected_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[{"entity":"putaway_policy_detail","id_field":"steps[].step_id","version_field":"steps[].expected_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"putaway_policy","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"putaway_steps_save"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","description":"Resolved at the RPC boundary from `params.meta` when the wire did not put it here — see `IdempotencyKey::unset` for why the default is a sentinel and never a fresh random key.","format":"uuid","type":"string"},"policy_id":{"format":"int64","type":"integer"},"steps":{"items":{"$ref":"#/components/schemas/PutawayStepEdit"},"type":"array"}},"required":["policy_id","steps"],"title":"SavePutawaySteps","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"putaway_steps_save","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"policy_id":1,"steps":[{"expected_version":1,"fields":null,"step_id":1}]}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"versions":{"items":{"$ref":"#/components/schemas/StepVersion"},"type":"array"}},"required":["versions"],"title":"SavePutawayStepsResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"versions":[{"step_id":1,"version":1}]}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#putaway_step_add":{"post":{"operationId":"putaway_step_add","summary":"Add an empty step at the end of one putaway policy's pipeline; the system numbers it.","description":"Add an empty step at the end of one putaway policy's pipeline; the system numbers it.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"putaway_policy","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"putaway_step_add"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"policy_id":{"format":"int64","type":"integer"}},"required":["policy_id"],"title":"AddPutawayStep","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"putaway_step_add","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"policy_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"step_id":{"format":"int64","type":"integer"},"step_num":{"description":"What the system called it — the label the operator now reads on the card, which is why the caller gets it back rather than guessing.","type":"string"}},"required":["step_id","step_num"],"title":"AddPutawayStepResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"step_id":1,"step_num":"<step_num>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#putaway_step_delete":{"post":{"operationId":"putaway_step_delete","summary":"Delete one putaway step, against the version it was read at; its conditions go with it.","description":"Delete one putaway step, against the version it was read at; its conditions go with it.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n**Versioned entities:** putaway_policy_detail (id in data.step_id, version in data.expected_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[{"entity":"putaway_policy_detail","id_field":"step_id","version_field":"expected_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"putaway_policy","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"putaway_step_delete"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"expected_version":{"format":"int32","type":"integer"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"step_id":{"format":"int64","type":"integer"}},"required":["expected_version","step_id"],"title":"DeletePutawayStep","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"putaway_step_delete","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"expected_version":1,"step_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"step_id":{"format":"int64","type":"integer"}},"required":["step_id"],"title":"DeletePutawayStepResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"step_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#putaway_steps_reorder":{"post":{"operationId":"putaway_steps_reorder","summary":"Reorder one putaway policy's steps, against the policy's version.","description":"Reorder one putaway policy's steps, against the policy's version.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n**Versioned entities:** putaway_policy (id in data.policy_id, version in data.expected_policy_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_policy_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[{"entity":"putaway_policy","id_field":"policy_id","version_field":"expected_policy_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"putaway_policy","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"putaway_steps_reorder"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"expected_policy_version":{"format":"int32","type":"integer"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"policy_id":{"format":"int64","type":"integer"},"step_ids":{"description":"Every step of the policy, in the order the screen now shows them. A permutation of the pipeline — `PutawayPolicyDetailBmc::pipeline_order` refuses anything else.","items":{"format":"int64","type":"integer"},"type":"array"}},"required":["expected_policy_version","policy_id","step_ids"],"title":"ReorderPutawaySteps","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"putaway_steps_reorder","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"expected_policy_version":1,"policy_id":1,"step_ids":[1]}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"new_policy_version":{"format":"int32","type":"integer"}},"required":["new_policy_version"],"title":"ReorderPutawayStepsResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"new_policy_version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#create_inventory_hold_code":{"post":{"operationId":"create_inventory_hold_code","summary":"Create a new inventory_hold_code — CRUD.","description":"Create a new inventory_hold_code — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"UNIQUE_VIOLATION or INVALID_DATA","when":"The code already exists, or a value breaks a rule."}],"x-quark-module":"inventory_hold_code","x-quark-operation":"create","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"create_inventory_hold_code"},"params":{"type":"object","properties":{"data":{"properties":{"active":{"type":"boolean"},"block_inbound_flow":{"type":"boolean"},"block_outbound_flow":{"type":"boolean"},"code":{"type":"string"},"description":{"type":["string","null"]},"enforce":{"type":"boolean"},"overridable":{"type":"boolean"},"rank":{"format":"int64","type":"integer"}},"required":["active","block_inbound_flow","block_outbound_flow","code","enforce","overridable","rank"],"title":"InventoryHoldCodeForCreate","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"create_inventory_hold_code","params":{"data":{"active":false,"block_inbound_flow":false,"block_outbound_flow":false,"code":"<code>","enforce":false,"overridable":false,"rank":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"active":{"type":"boolean"},"block_inbound_flow":{"description":"Does this hold forbid PUTTING stock into the place it covers?\n\nSeparate from [`Self::block_outbound_flow`] because the warehouse asks two different questions of one hold, and one flag used to answer both. The dedicated damage bay carries a permanent `Damaged` hold so its contents never reach an order — that is a PICKING ban — and the same flag was read as \"nothing may be put here\", which refused the damaged return the bay exists to receive. `enforce` / `overridable` stay the STRENGTH of the ban; these two say what it applies TO.","type":"boolean"},"block_outbound_flow":{"description":"Does this hold forbid TAKING stock out of the place it covers?\n\nRead by the availability view (`inventory_balance_atp`), by the reservation re-check (`InventoryHoldBmc::covers_position`) and by the source side of a move. See [`Self::block_inbound_flow`].","type":"boolean"},"code":{"type":"string"},"description":{"type":["string","null"]},"enforce":{"type":"boolean"},"id":{"format":"int64","type":"integer"},"overridable":{"type":"boolean"},"rank":{"description":"Intended as the dropdown sort order (low rank on top, migration 142).\n\n**Nothing reads it.** It did NOT set loc_status precedence, whatever this comment claimed before: `derive_loc_status` (`wms-inventory::hold`) ranks a location by matching the literal code `\"Damaged\"`, so renumbering ranks changes no behaviour — and the admin form (migration 189) nevertheless demands a value for it. Kept as-is rather than dropped because that is the owner's call, not a cleanup: see migration 199, which dropped `ack_code` for exactly this reason once the same question was answered.","format":"int64","type":"integer"}},"required":["active","block_inbound_flow","block_outbound_flow","code","enforce","id","overridable","rank"],"title":"InventoryHoldCode","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"active":false,"block_inbound_flow":false,"block_outbound_flow":false,"code":"<code>","enforce":false,"id":1,"overridable":false,"rank":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_inventory_hold_code":{"post":{"operationId":"get_inventory_hold_code","summary":"Get a inventory_hold_code by ID — CRUD.","description":"Get a inventory_hold_code by ID — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"inventory_hold_code","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_inventory_hold_code"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_inventory_hold_code","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"active":{"type":"boolean"},"block_inbound_flow":{"description":"Does this hold forbid PUTTING stock into the place it covers?\n\nSeparate from [`Self::block_outbound_flow`] because the warehouse asks two different questions of one hold, and one flag used to answer both. The dedicated damage bay carries a permanent `Damaged` hold so its contents never reach an order — that is a PICKING ban — and the same flag was read as \"nothing may be put here\", which refused the damaged return the bay exists to receive. `enforce` / `overridable` stay the STRENGTH of the ban; these two say what it applies TO.","type":"boolean"},"block_outbound_flow":{"description":"Does this hold forbid TAKING stock out of the place it covers?\n\nRead by the availability view (`inventory_balance_atp`), by the reservation re-check (`InventoryHoldBmc::covers_position`) and by the source side of a move. See [`Self::block_inbound_flow`].","type":"boolean"},"code":{"type":"string"},"description":{"type":["string","null"]},"enforce":{"type":"boolean"},"id":{"format":"int64","type":"integer"},"overridable":{"type":"boolean"},"rank":{"description":"Intended as the dropdown sort order (low rank on top, migration 142).\n\n**Nothing reads it.** It did NOT set loc_status precedence, whatever this comment claimed before: `derive_loc_status` (`wms-inventory::hold`) ranks a location by matching the literal code `\"Damaged\"`, so renumbering ranks changes no behaviour — and the admin form (migration 189) nevertheless demands a value for it. Kept as-is rather than dropped because that is the owner's call, not a cleanup: see migration 199, which dropped `ack_code` for exactly this reason once the same question was answered.","format":"int64","type":"integer"}},"required":["active","block_inbound_flow","block_outbound_flow","code","enforce","id","overridable","rank"],"title":"InventoryHoldCode","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"active":false,"block_inbound_flow":false,"block_outbound_flow":false,"code":"<code>","enforce":false,"id":1,"overridable":false,"rank":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_inventory_hold_code":{"post":{"operationId":"list_inventory_hold_code","summary":"List inventory_hold_code — CRUD.","description":"List inventory_hold_code — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"inventory_hold_code","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_inventory_hold_code"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_inventory_hold_code"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/InventoryHoldCode"},"title":"Array_of_InventoryHoldCode","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"active":false,"block_inbound_flow":false,"block_outbound_flow":false,"code":"<code>","enforce":false,"id":1,"overridable":false,"rank":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#update_inventory_hold_code":{"post":{"operationId":"update_inventory_hold_code","summary":"Update hold-code behavior without changing its stable code.","description":"Update hold-code behavior without changing its stable code.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"INVALID_DATA","when":"A value breaks a rule."}],"x-quark-module":"inventory_hold_code","x-quark-operation":"update","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"update_inventory_hold_code"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"},"data":{"additionalProperties":false,"properties":{"active":{"type":"boolean"},"block_inbound_flow":{"type":"boolean"},"block_outbound_flow":{"type":"boolean"},"description":{"type":["string","null"]},"enforce":{"type":"boolean"},"overridable":{"type":"boolean"},"rank":{"format":"int64","type":"integer"}},"title":"InventoryHoldCodeUpdateApi","type":"object"}},"required":["id","data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"update_inventory_hold_code","params":{"id":1,"data":{"active":false,"block_inbound_flow":false,"block_outbound_flow":false}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"active":{"type":"boolean"},"block_inbound_flow":{"description":"Does this hold forbid PUTTING stock into the place it covers?\n\nSeparate from [`Self::block_outbound_flow`] because the warehouse asks two different questions of one hold, and one flag used to answer both. The dedicated damage bay carries a permanent `Damaged` hold so its contents never reach an order — that is a PICKING ban — and the same flag was read as \"nothing may be put here\", which refused the damaged return the bay exists to receive. `enforce` / `overridable` stay the STRENGTH of the ban; these two say what it applies TO.","type":"boolean"},"block_outbound_flow":{"description":"Does this hold forbid TAKING stock out of the place it covers?\n\nRead by the availability view (`inventory_balance_atp`), by the reservation re-check (`InventoryHoldBmc::covers_position`) and by the source side of a move. See [`Self::block_inbound_flow`].","type":"boolean"},"code":{"type":"string"},"description":{"type":["string","null"]},"enforce":{"type":"boolean"},"id":{"format":"int64","type":"integer"},"overridable":{"type":"boolean"},"rank":{"description":"Intended as the dropdown sort order (low rank on top, migration 142).\n\n**Nothing reads it.** It did NOT set loc_status precedence, whatever this comment claimed before: `derive_loc_status` (`wms-inventory::hold`) ranks a location by matching the literal code `\"Damaged\"`, so renumbering ranks changes no behaviour — and the admin form (migration 189) nevertheless demands a value for it. Kept as-is rather than dropped because that is the owner's call, not a cleanup: see migration 199, which dropped `ack_code` for exactly this reason once the same question was answered.","format":"int64","type":"integer"}},"required":["active","block_inbound_flow","block_outbound_flow","code","enforce","id","overridable","rank"],"title":"InventoryHoldCode","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"active":false,"block_inbound_flow":false,"block_outbound_flow":false,"code":"<code>","enforce":false,"id":1,"overridable":false,"rank":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_inventory_hold_code":{"post":{"operationId":"delete_inventory_hold_code","summary":"Delete a inventory_hold_code by ID — CRUD.","description":"Delete a inventory_hold_code by ID — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"DEPENDENT_DATA_EXIST","when":"Other rows still use this row."}],"x-quark-module":"inventory_hold_code","x-quark-operation":"delete","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_inventory_hold_code"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_inventory_hold_code","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"active":{"type":"boolean"},"block_inbound_flow":{"description":"Does this hold forbid PUTTING stock into the place it covers?\n\nSeparate from [`Self::block_outbound_flow`] because the warehouse asks two different questions of one hold, and one flag used to answer both. The dedicated damage bay carries a permanent `Damaged` hold so its contents never reach an order — that is a PICKING ban — and the same flag was read as \"nothing may be put here\", which refused the damaged return the bay exists to receive. `enforce` / `overridable` stay the STRENGTH of the ban; these two say what it applies TO.","type":"boolean"},"block_outbound_flow":{"description":"Does this hold forbid TAKING stock out of the place it covers?\n\nRead by the availability view (`inventory_balance_atp`), by the reservation re-check (`InventoryHoldBmc::covers_position`) and by the source side of a move. See [`Self::block_inbound_flow`].","type":"boolean"},"code":{"type":"string"},"description":{"type":["string","null"]},"enforce":{"type":"boolean"},"id":{"format":"int64","type":"integer"},"overridable":{"type":"boolean"},"rank":{"description":"Intended as the dropdown sort order (low rank on top, migration 142).\n\n**Nothing reads it.** It did NOT set loc_status precedence, whatever this comment claimed before: `derive_loc_status` (`wms-inventory::hold`) ranks a location by matching the literal code `\"Damaged\"`, so renumbering ranks changes no behaviour — and the admin form (migration 189) nevertheless demands a value for it. Kept as-is rather than dropped because that is the owner's call, not a cleanup: see migration 199, which dropped `ack_code` for exactly this reason once the same question was answered.","format":"int64","type":"integer"}},"required":["active","block_inbound_flow","block_outbound_flow","code","enforce","id","overridable","rank"],"title":"InventoryHoldCode","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"active":false,"block_inbound_flow":false,"block_outbound_flow":false,"code":"<code>","enforce":false,"id":1,"overridable":false,"rank":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_many_inventory_hold_code":{"post":{"operationId":"delete_many_inventory_hold_code","summary":"Delete multiple inventory_hold_code by IDs — CRUD.","description":"Delete multiple inventory_hold_code by IDs — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"DEPENDENT_DATA_EXIST","when":"Other rows still use this row."}],"x-quark-module":"inventory_hold_code","x-quark-operation":"delete","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_many_inventory_hold_code"},"params":{"type":"object","properties":{"ids":{"items":{"format":"int64","type":"integer"},"type":"array","description":"Record IDs"}},"required":["ids"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_many_inventory_hold_code","params":{"ids":[1]}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"uint64","minimum":0,"title":"uint64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_inventory_hold_code":{"post":{"operationId":"count_inventory_hold_code","summary":"Count inventory_hold_code — CRUD.","description":"Count inventory_hold_code — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"inventory_hold_code","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_inventory_hold_code"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_inventory_hold_code"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#move_execute":{"post":{"operationId":"move_execute","summary":"Generic Move primitive — validates and executes inventory movement (Putaway, Pick, MoveToQc, MoveToDamage, MoveToRtv, ReleaseFromQc, etc.) with full pipeline. Pass pending_move_in_id (from putaway_suggest_location) to run the move as DIRECTED: the executor re-validates that reservation, downgrades a soft rule broken on the reserved location to an acknowledgement instead of a refusal, answers a process-banned location with a redirect, and retires the reservation when the stock lands. An acknowledgement is a PAIR, {code, subject}, sent back in meta.acknowledged_overrides: for a directed deviation the code is 85 and the subject is the rule that refused (capacity, sku_mixing, lot_mixing, multi_lot_on_lpn, attribute_mixing, loc_type) — ONE pair per rule, never per offending line. Every unacknowledged pair of the whole move arrives together in error.data.detail.context.pairs with is_overridable=true, so one prompt collects them all; acking a pair the server did not raise is a hard UnknownAckSubject, not silent leniency. A redirect answers with error.data.detail.context.redirect = {location, pending_move_in_id} — the nearest usable location to the one being refused, ALREADY RESERVED for this pallet (pass that id back as pending_move_in_id to stay in directed mode), with the promise on the refused location released; when no replacement could be named there is no context and the client asks putaway_suggest_location again. Directed leniency applies ONLY while dest_loc is the reserved location — a destination the operator chose themselves keeps every ordinary refusal. A move out of or into a location an open Hard inventory count is counting is refused (LOCATION_BEING_COUNTED, is_overridable=true); context.pairs names the pair {code: 87, subject: \"count:<inventory_count_id>\"} a shift lead's supervisor_override_grant must carry — with a reason, which is recorded on the count — and its id goes in ctx.override_grant_id like every other move override.","description":"Generic Move primitive — validates and executes inventory movement (Putaway, Pick, MoveToQc, MoveToDamage, MoveToRtv, ReleaseFromQc, etc.) with full pipeline. Pass pending_move_in_id (from putaway_suggest_location) to run the move as DIRECTED: the executor re-validates that reservation, downgrades a soft rule broken on the reserved location to an acknowledgement instead of a refusal, answers a process-banned location with a redirect, and retires the reservation when the stock lands. An acknowledgement is a PAIR, {code, subject}, sent back in meta.acknowledged_overrides: for a directed deviation the code is 85 and the subject is the rule that refused (capacity, sku_mixing, lot_mixing, multi_lot_on_lpn, attribute_mixing, loc_type) — ONE pair per rule, never per offending line. Every unacknowledged pair of the whole move arrives together in error.data.detail.context.pairs with is_overridable=true, so one prompt collects them all; acking a pair the server did not raise is a hard UnknownAckSubject, not silent leniency. A redirect answers with error.data.detail.context.redirect = {location, pending_move_in_id} — the nearest usable location to the one being refused, ALREADY RESERVED for this pallet (pass that id back as pending_move_in_id to stay in directed mode), with the promise on the refused location released; when no replacement could be named there is no context and the client asks putaway_suggest_location again. Directed leniency applies ONLY while dest_loc is the reserved location — a destination the operator chose themselves keeps every ordinary refusal. A move out of or into a location an open Hard inventory count is counting is refused (LOCATION_BEING_COUNTED, is_overridable=true); context.pairs names the pair {code: 87, subject: \"count:<inventory_count_id>\"} a shift lead's supervisor_override_grant must carry — with a reason, which is recorded on the count — and its id goes in ctx.override_grant_id like every other move override.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n- This method can ask for a supervisor override. Send the codes the operator accepted in `acknowledged_overrides`. See 04-command-types-and-concurrency.md and 05-errors.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"move_command","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"move_execute"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"already_printed_lpn":{"default":null,"description":"F2(b): the LPN the operator already printed by hand for this move (the New-LPN \"Print\" button fires before submit so the label can be applied to the pallet). When it equals the container the move creates, `move_execute` skips the post-commit auto-print — otherwise the pallet gets two identical labels. Optional + defaulted so every non-New-LPN caller omits it and the pipeline (which reads only `ctx`) is unaffected.","type":["string","null"]},"ctx":{"$ref":"#/components/schemas/MoveContext"}},"required":["ctx"],"title":"MoveCommand","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"move_execute","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"ctx":{"recursive":false,"source_type":"putaway"}}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"Success-path return. Failures surface via `MoveError`.\n\nCompletion timestamp deliberately NOT included — the outbox event `inventory.moved` carries the canonical timestamp, and `transaction_log` has `add_when` per move line. Adding it here would only duplicate.","properties":{"ask_location_empty":{"default":false,"description":"Count spec Appendix L (ZERO_CONFIRMATION): the move took the last stock out of `source_location`, and the moved stock's owner asks (`owner_config.confirm_empty_on_move`) — the RF asks the operator whether that location is empty (`location_confirm_empty`, source `Move`, `source_id` = `move_log_id`). Only a manual move asks.","type":"boolean"},"created_lpn":{"default":null,"description":"The LPN of a container this move CREATED (New-LPN: manual or auto), so the caller can auto-print its label. `None` when the move relocated, merged into an existing container, or landed loose — nothing new to label.","type":["string","null"]},"fragments_processed":{"format":"uint32","minimum":0,"type":"integer"},"holds_added":{"description":"`inventory_hold.id` rows INSERTed by §4.3 hold cascade.","items":{"format":"int64","type":"integer"},"type":"array"},"holds_released":{"description":"`inventory_hold.id` rows UPDATEd to `is_hold_on=false`.","items":{"format":"int64","type":"integer"},"type":"array"},"idempotency_key":{"format":"uuid","type":"string"},"move_log_id":{"default":null,"description":"The move's first `transaction_log` row: the operation an answer names.","format":"int64","type":["integer","null"]},"source_location":{"default":"","description":"The location the stock left.","type":"string"},"total_qty_moved":{"format":"double","type":"number"},"warnings":{"description":"Non-fatal warnings (e.g. `acknowledged_overrides` consumed; future a warning for a hold that does not move with the stock, once Phase 3 lands `inventory_hold.moves_with_stock`).","items":{"$ref":"#/components/schemas/MoveWarning"},"type":"array"}},"required":["fragments_processed","holds_added","holds_released","idempotency_key","total_qty_moved","warnings"],"title":"MoveResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"fragments_processed":1,"holds_added":[1],"holds_released":[1],"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f","total_qty_moved":1.5,"warnings":[{"hold_code":null,"hold_id":1,"kind":"hold_on_source_lpn_acknowledged"}]}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#generate_lpn":{"post":{"operationId":"generate_lpn","summary":"Generate a fresh LPN container code (LPN + zero-padded sequence) for the Hard-Move New-LPN preview.","description":"Generate a fresh LPN container code (LPN + zero-padded sequence) for the Hard-Move New-LPN preview.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog says this method needs no idempotency key.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"move_command","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"generate_lpn"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"description":"Owner whose next LPN to generate. `owner_id` is carried for future per-owner LPN formats; today's `LPN{seq}` format ignores it.","properties":{"owner_id":{"format":"int64","type":"integer"}},"required":["owner_id"],"title":"GenerateLpn","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"generate_lpn","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"owner_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"The generated LPN container code (e.g. `LPN0000042`).","properties":{"code":{"type":"string"}},"required":["code"],"title":"GenerateLpnResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"code":"<code>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#print_lpn_label":{"post":{"operationId":"print_lpn_label","summary":"Print the LPN-ID label (ZPL) for a container to the operator's resolved printer.","description":"Print the LPN-ID label (ZPL) for a container to the operator's resolved printer.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog says this method needs no idempotency key.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"move_command","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"print_lpn_label"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"description":"Input for the New-LPN block's \"Print\" button: the container code whose LPN-ID label to send to the operator's printer as ZPL.","properties":{"lpn":{"type":"string"},"owner_id":{"default":0,"description":"Owner context for printer resolution. The New-LPN \"Print\" fires BEFORE the move creates the container (print the label, apply it to the pallet, then submit — which creates that exact container), so there is nothing to derive the owner from yet: the caller passes the move's source owner. Ignored when the container already exists (reprint). 0 → falls back to the Warehouse-default printer via the resolution walk.","format":"int64","type":"integer"}},"required":["lpn"],"title":"PrintLpnLabel","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"print_lpn_label","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"lpn":"<lpn>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"Outcome of a manual label print: whether ZPL reached a printer, which one, and a human message for the toast. Best-effort — a missing printer or an unreachable device is reported (not raised as an error) so the UI shows it inline.","properties":{"message":{"type":"string"},"printer":{"type":["string","null"]},"sent":{"type":"boolean"}},"required":["message","sent"],"title":"PrintLpnLabelResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"message":"<message>","sent":false}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#move_source_holds":{"post":{"operationId":"move_source_holds","summary":"The holds on a move's source, sorted by what can be done about them: `overridable` codes a supervisor can lift for this move, `blocking` codes nobody can (the move is refused whoever asks). Decided by the same hold policy `move_execute` applies, so a screen can offer only the quantity the move would accept. Read-only; changes nothing.","description":"The holds on a move's source, sorted by what can be done about them: `overridable` codes a supervisor can lift for this move, `blocking` codes nobody can (the move is refused whoever asks). Decided by the same hold policy `move_execute` applies, so a screen can offer only the quantity the move would accept. Read-only; changes nothing.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"move_command","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"move_source_holds"},"params":{"type":"object","properties":{"data":{"description":"Which position to ask about: the same two facts `move_execute` resolves its source holds from.","properties":{"container_id":{"description":"The container the stock is in; `None` for loose stock.","format":"int64","type":["integer","null"]},"location":{"description":"The source location code.","type":"string"}},"required":["location"],"title":"MoveSourceHoldsParams","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"move_source_holds","params":{"data":{"location":"<location>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"The holds covering a move's source, sorted by what can be done about them (see [`HoldPolicy::split_outbound`]).","properties":{"blocking":{"description":"Codes nobody can lift: the move is refused whoever asks (`decide` says `Block`, an unknown code included).","items":{"type":"string"},"type":"array"},"overridable":{"description":"Codes a supervisor can lift for this move (`decide` says `Warn`).","items":{"type":"string"},"type":"array"}},"required":["blocking","overridable"],"title":"OutboundHoldSplit","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"blocking":["<blocking>"],"overridable":["<overridable>"]}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#putaway_suggest_location":{"post":{"operationId":"putaway_suggest_location","summary":"Suggest and reserve the location a received LPN should be put away into. Reserves space in inventory_pending_move_in and returns pending_move_in_id — pass it to move_execute as pending_move_in_id to run the move as DIRECTED: a soft rule broken on that location (capacity, mixing, loc_type) then asks the operator to acknowledge the pair {code:85, subject:<the rule that refused>} instead of refusing, a process ban on the location answers with a redirect, and the reservation is retired when the pallet lands. A null location with a reason means nothing qualified — read trace for which rule refused how many locations. Mint a FRESH idempotency_key for every re-ask: a null answer is a success, so re-using the key replays that null for the key's whole TTL instead of asking again; one key per user intent. A replayed expires_at may already be in the past — the reservation TTL is minutes, the idempotency TTL days — so the id is a handle, not a promise: move_execute re-checks the row is still Active and unexpired and refuses a stale one outright rather than quietly running an undirected move.","description":"Suggest and reserve the location a received LPN should be put away into. Reserves space in inventory_pending_move_in and returns pending_move_in_id — pass it to move_execute as pending_move_in_id to run the move as DIRECTED: a soft rule broken on that location (capacity, mixing, loc_type) then asks the operator to acknowledge the pair {code:85, subject:<the rule that refused>} instead of refusing, a process ban on the location answers with a redirect, and the reservation is retired when the pallet lands. A null location with a reason means nothing qualified — read trace for which rule refused how many locations. Mint a FRESH idempotency_key for every re-ask: a null answer is a success, so re-using the key replays that null for the key's whole TTL instead of asking again; one key per user intent. A replayed expires_at may already be in the past — the reservation TTL is minutes, the idempotency TTL days — so the id is a handle, not a promise: move_execute re-checks the row is still Active and unexpired and refuses a stale one outright rather than quietly running an undirected move.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"putaway","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"putaway_suggest_location"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"description":"Ask the engine for a location for one received LPN, and reserve it.\n\n`idempotency_key` lives on the struct rather than being read from `params.meta` because `CommandParams` mirrors meta into data on the way in and `payload_for_hash` strips it on the way out — the same shape `DisposeContainer` and `MoveCommand` use.","properties":{"container_id":{"description":"The pallet to put away. It must be positioned (`current_loc`) and hold stock — the engine refuses otherwise rather than suggesting a location no `move_execute` could use.","format":"int64","type":"integer"},"exclude_locations":{"default":[],"description":"Locations the operator has already refused. Skipped without evaluation.","items":{"type":"string"},"type":"array"},"idempotency_key":{"format":"uuid","type":"string"},"trace_detail":{"allOf":[{"$ref":"#/components/schemas/TraceDetail"}],"default":"Summary","description":"`Full` records every candidate and every predicate verdict. Per-request because it is what a support engineer turns on for ONE pallet that went somewhere surprising; on by default it would be paid for on every suggestion sent to a handheld."}},"required":["container_id","idempotency_key"],"title":"SuggestLocation","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"putaway_suggest_location","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"container_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"The suggestion as it goes over the wire.\n\n`location: None` with a `reason` is a normal answer — the warehouse had nothing to offer — not an error. An error means the engine could not ASK the question.\n\n# One idempotency key per user intent — every re-ask needs a fresh one\n\nA `null` location IS a success, so the runner stores it and replays it for the key's whole TTL (days). The natural retry after [`REASON_PALLET_ALREADY_RESERVED`] — same pallet, nothing new to exclude — is a byte-identical payload, so re-using the key does not re-ask the engine: it replays the stale \"no\" even though that reason is documented as retryable. `exclude_locations` changes the hash and so re-asks on its own, but a plain retry does not.\n\nSo: mint a NEW `idempotency_key` for every re-ask. The key deduplicates ONE user intent (\"where does this pallet go, asked now\") against network retries of that same request; a second ask is a second intent.","properties":{"expires_at":{"description":"RFC3339. When it lapses the reservation stops holding space; the operator has to ask again.\n\n**A replayed value may already be in the past.** The idempotency TTL is days and a reservation's is minutes, so a late retry on the same key replays a `pending_move_in_id` whose reservation has since expired. Shortening the shared idempotency TTL for this one command would trade a general contract for a special case, so the id is deliberately not a guarantee: whoever executes against it re-checks the row is still `status = Active AND expires_at > now()` rather than trusting the handle. `move_execute` does exactly that (`movement::directed::open`) and answers a stale handle with `ReservationNotUsable` — the client's cue to ask for a fresh suggestion under a fresh idempotency key.","type":["string","null"]},"location":{"type":["string","null"]},"pending_move_in_id":{"description":"Hand this to `move_execute` as `pending_move_in_id` to run the suggestion as a DIRECTED move: the executor then treats a soft rule broken on this location as an acknowledgeable deviation rather than a refusal, and retires the reservation when the pallet lands.\n\nNot a guarantee: see [`Self::expires_at`]. The executor re-reads the row and refuses a stale handle outright rather than silently running an undirected move.","format":"int64","type":["integer","null"]},"reason":{"description":"Set exactly when `location` is `None`. One of [`REASON_PALLET_ALREADY_RESERVED`] / [`REASON_NO_ELIGIBLE_LOCATION`] — a code and not a sentence, because the caller branches on it (retry vs. escalate) and the operator-facing wording is the client's to choose.","type":["string","null"]},"trace":{"description":"[`PutawayTrace`], as JSON. Present on success too — there it is the record of which step won and what it passed over."}},"required":["trace"],"title":"SuggestLocationResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"trace":null}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#putaway_explain_location":{"post":{"operationId":"putaway_explain_location","summary":"Ask the putaway engine which location it would choose for a received LPN, without reserving anything. Runs the identical policy walk putaway_suggest_location runs, inside a transaction that is always rolled back before this returns — so a real reservation the pallet already held (an operator walking toward it) is untouched, and nothing this call writes survives it. The response carries location, reason and trace — the same fields putaway_suggest_location returns for those — but never pending_move_in_id or expires_at: this call reserves nothing, so there is no row for either to name. Built for the putaway step page's dry-run panel; any caller wanting to preview a policy without disturbing a live pallet is the intended audience.","description":"Ask the putaway engine which location it would choose for a received LPN, without reserving anything. Runs the identical policy walk putaway_suggest_location runs, inside a transaction that is always rolled back before this returns — so a real reservation the pallet already held (an operator walking toward it) is untouched, and nothing this call writes survives it. The response carries location, reason and trace — the same fields putaway_suggest_location returns for those — but never pending_move_in_id or expires_at: this call reserves nothing, so there is no row for either to name. Built for the putaway step page's dry-run panel; any caller wanting to preview a policy without disturbing a live pallet is the intended audience.\n\n**Category:** `query`. Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"query","x-quark-category-declared":true,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"putaway","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"putaway_explain_location"},"params":{"type":"object","properties":{"data":{"description":"Ask the engine the same question [`SuggestLocation`] asks, without `idempotency_key` — a query carries none (`.claude/rules/api-versioning-and-idempotency.md`).","properties":{"container_id":{"description":"Same field, same meaning as [`SuggestLocation::container_id`].","format":"int64","type":"integer"},"exclude_locations":{"default":[],"items":{"type":"string"},"type":"array"},"trace_detail":{"allOf":[{"$ref":"#/components/schemas/TraceDetail"}],"default":"Summary"}},"required":["container_id"],"title":"ExplainLocation","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"putaway_explain_location","params":{"data":{"container_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"The answer, over the wire — and deliberately NOT [`SuggestLocationResult`].\n\nThat struct carries `pending_move_in_id` and `expires_at`: handles to a row this call's transaction never commits. Shipping them here would hand a client an id that names nothing the moment the response leaves the process — worse than omitting it, because a caller could mistake it for something `move_execute` might accept. `location`, `reason` and `trace` are facts about the DECISION the engine reached, which the rollback does not erase; nothing on this struct is a handle to a database row.","properties":{"location":{"type":["string","null"]},"reason":{"description":"Set exactly when `location` is `None`. Same vocabulary as [`SuggestLocationResult::reason`].","type":["string","null"]},"trace":{"description":"[`PutawayTrace`], as JSON — same shape [`SuggestLocationResult::trace`] carries."}},"required":["trace"],"title":"ExplainLocationResult","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"trace":null}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#putaway_release_reservation":{"post":{"operationId":"putaway_release_reservation","summary":"Release a pending putaway reservation, freeing the location before its TTL expires. Cancels the inventory_pending_move_in row named by id, together with any neighbour positions it shares a reservation group with (an oversized load spanning several positions holds one row per position) — the whole group releases as one call. The location's promised space (active_totals) drops by the released rows' cube and weight immediately, so the next putaway_suggest_location can offer the location again. Active-only: a reservation already consumed by an arriving pallet, cancelled, or expired by the sweeper is left exactly as it is and the call answers released: false — a normal outcome for a double-click or a row the sweeper reached first, not an error.","description":"Release a pending putaway reservation, freeing the location before its TTL expires. Cancels the inventory_pending_move_in row named by id, together with any neighbour positions it shares a reservation group with (an oversized load spanning several positions holds one row per position) — the whole group releases as one call. The location's promised space (active_totals) drops by the released rows' cube and weight immediately, so the next putaway_suggest_location can offer the location again. Active-only: a reservation already consumed by an arriving pallet, cancelled, or expired by the sweeper is left exactly as it is and the call answers released: false — a normal outcome for a double-click or a row the sweeper reached first, not an error.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"putaway","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"putaway_release_reservation"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"pending_move_in_id":{"description":"`inventory_pending_move_in.id` — the row the supervisor selected on the Pending Move-In screen.","format":"int64","type":"integer"}},"required":["pending_move_in_id"],"title":"ReleaseReservationParams","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"putaway_release_reservation","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"pending_move_in_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"released":{"description":"`false` when the reservation was already consumed, cancelled or expired. That is a normal answer, not an error: the sweeper may have reached the row between the page render and the click, and a double-click makes the second press land on a row that is no longer Active.","type":"boolean"}},"required":["released"],"title":"ReleaseReservationResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"released":false}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_inventory_pending_move_in":{"post":{"operationId":"list_inventory_pending_move_in","summary":"List inventory_pending_move_in — CRUD.","description":"List inventory_pending_move_in — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"putaway","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_inventory_pending_move_in"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_inventory_pending_move_in"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/InventoryPendingMoveIn"},"title":"Array_of_InventoryPendingMoveIn","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"container_id":1,"cube":1.5,"expires_at":"<expires_at>","id":1,"location":"<location>","mod_when":"<mod_when>","mod_who":1,"source":"Putaway","status":"Active","weight":1.5}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_inventory_pending_move_in":{"post":{"operationId":"count_inventory_pending_move_in","summary":"Count inventory_pending_move_in — CRUD.","description":"Count inventory_pending_move_in — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"putaway","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_inventory_pending_move_in"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_inventory_pending_move_in"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_active_holds_by_lpn":{"post":{"operationId":"list_active_holds_by_lpn","summary":"List active inventory holds attached to an LPN; optional `code` filter narrows by hold-type.","description":"List active inventory holds attached to an LPN; optional `code` filter narrows by hold-type.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"hold","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_active_holds_by_lpn"},"params":{"type":"object","properties":{"data":{"properties":{"code":{"description":"Optional filter by hold-type identifier (`inventory_hold.code`, e.g. \"QcQuarantine\"). When omitted — returns all active holds on the LPN.","type":["string","null"]},"lpn":{"type":"string"}},"required":["lpn"],"title":"ListActiveHoldsByLpnParams","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_active_holds_by_lpn","params":{"data":{"lpn":"<lpn>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/InventoryHoldRowDto"},"title":"Array_of_InventoryHoldRowDto","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"code":"<code>","date_on":"<date_on>","id":1,"is_hold_on":false}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#create_inventory_hold":{"post":{"operationId":"create_inventory_hold","summary":"Create an inventory hold scoped to a lot, location, or container (LPN).","description":"Create an inventory hold scoped to a lot, location, or container (LPN).\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"hold","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"create_inventory_hold"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"description":"The business fields needed to place a hold. Shared by BOTH create entry points — the idempotent `create_inventory_hold` command (`CommandParams` envelope) and the CRUD-shape `create_inventory_hold_row` the Holds form posts to (`ParamsForCreate` envelope). It deliberately carries only the operator-supplied fields — the system columns (`is_hold_on` / `status` / `date_on` / `who_on`) are filled by `HoldService::execute`, NOT by the caller, so they are absent here (using the DB-insert `InventoryHoldForCreate` as the wire type would force the form to post them).","properties":{"auto_release_date":{"description":"Optional release instant. The DateTimePicker sends RFC 3339 in UTC; an omitted/null value means the hold has no scheduled release.","format":"date-time","type":["string","null"]},"code":{"description":"Hold reason code (`inventory_hold.code`), e.g. `\"Damaged\"`, `\"QcQuarantine\"`, `\"Rtv\"`.","type":"string"},"comments":{"description":"Optional free-text note.","type":["string","null"]},"loc":{"type":["string","null"]},"lot":{"description":"Hold scope: set EXACTLY ONE of lot / loc / lpn — that field's value is the thing being frozen. These mirror the three `inventory_hold` scope columns, so the create form's three pickers map straight through.","type":["string","null"]},"lpn":{"type":["string","null"]}},"required":["code"],"title":"HoldRequestData","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"create_inventory_hold","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"code":"<code>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"hold_id":{"format":"int64","type":"integer"}},"required":["hold_id"],"title":"CreateHoldResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"hold_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#create_inventory_hold_row":{"post":{"operationId":"create_inventory_hold_row","summary":"Create an inventory hold from the Holds form (CRUD shape; system fields filled by HoldService).","description":"Create an inventory hold from the Holds form (CRUD shape; system fields filled by HoldService).\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"hold","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"create_inventory_hold_row"},"params":{"type":"object","properties":{"data":{"description":"The business fields needed to place a hold. Shared by BOTH create entry points — the idempotent `create_inventory_hold` command (`CommandParams` envelope) and the CRUD-shape `create_inventory_hold_row` the Holds form posts to (`ParamsForCreate` envelope). It deliberately carries only the operator-supplied fields — the system columns (`is_hold_on` / `status` / `date_on` / `who_on`) are filled by `HoldService::execute`, NOT by the caller, so they are absent here (using the DB-insert `InventoryHoldForCreate` as the wire type would force the form to post them).","properties":{"auto_release_date":{"description":"Optional release instant. The DateTimePicker sends RFC 3339 in UTC; an omitted/null value means the hold has no scheduled release.","format":"date-time","type":["string","null"]},"code":{"description":"Hold reason code (`inventory_hold.code`), e.g. `\"Damaged\"`, `\"QcQuarantine\"`, `\"Rtv\"`.","type":"string"},"comments":{"description":"Optional free-text note.","type":["string","null"]},"loc":{"type":["string","null"]},"lot":{"description":"Hold scope: set EXACTLY ONE of lot / loc / lpn — that field's value is the thing being frozen. These mirror the three `inventory_hold` scope columns, so the create form's three pickers map straight through.","type":["string","null"]},"lpn":{"type":["string","null"]}},"required":["code"],"title":"HoldRequestData","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"create_inventory_hold_row","params":{"data":{"code":"<code>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"Represents a hold placed on inventory, supporting lot, location, or LPN-based holds.\n\nThis struct is designed for detailed tracking and auditing of inventory holds in a warehouse management system. It supports flexible hold types (lot, location, LPN), status management, and full audit trails.\n\n# Fields - `id`: Unique identifier for the hold record. - `code`: Business code for the hold (may be used for grouping or referencing). - `lot`: Optional lot number, if the hold is placed at the lot level. - `loc`: Optional location code, if the hold is placed at the location level. - `lpn`: Optional License Plate Number, if the hold is placed on a movable unit. - `is_hold_on`: `true` if the hold is currently active, `false` if released. - `status`: The current status of the hold (custom enum). - `date_on`: Timestamp when the hold was placed. - `who_on`: User ID or actor who placed the hold. - `date_off`: Timestamp when the hold was released (if applicable). - `who_off`: User ID or actor who released the hold (if applicable). - `comments`: Optional comments or notes about the hold. - `hours_to_hold`: Optional planned duration (in hours) for the hold. - `auto_release_date`: Optional date when the hold should be automatically released. - `add_who`: User ID who created the record. - `add_when`: Timestamp when the record was created. - `mod_who`: User ID who last modified the record. - `mod_when`: Timestamp when the record was last modified.\n\n# Serialization - Uses RFC3339 datetime format for all timestamps. - Designed for use with Serde and SQLx for seamless database and API integration.\n\n# Example ``` let hold = InventoryHold { id: 1, code: \"HOLD-2025-001\".to_string(), lot: Some(\"LOT-123\".to_string()), loc: None, lpn: None, is_hold_on: true, status: InventoryStatusHold::Active, date_on: OffsetDateTime::now_utc(), who_on: 42, date_off: OffsetDateTime::now_utc(), who_off: 0, comments: Some(\"Quality check pending\".to_string()), hours_to_hold: Some(24.0), auto_release_date: OffsetDateTime::now_utc(), add_who: 42, add_when: OffsetDateTime::now_utc(), mod_who: 42, mod_when: OffsetDateTime::now_utc(), }; ```","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"auto_release_date":{"default":null,"type":["string","null"]},"code":{"type":"string"},"comments":{"type":["string","null"]},"date_off":{"default":null,"type":["string","null"]},"date_on":{"default":null,"type":["string","null"]},"hours_to_hold":{"format":"double","type":["number","null"]},"id":{"format":"int64","type":"integer"},"is_hold_on":{"type":"boolean"},"loc":{"type":["string","null"]},"lot":{"type":["string","null"]},"lpn":{"type":["string","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"status":{"$ref":"#/components/schemas/InventoryStatusHold"},"who_off":{"format":"int64","type":["integer","null"]},"who_on":{"format":"int64","type":["integer","null"]}},"required":["add_when","add_who","code","id","is_hold_on","mod_when","mod_who","status"],"title":"InventoryHold","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","id":1,"is_hold_on":false,"mod_when":"<mod_when>","mod_who":1,"status":"None"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#release_inventory_hold":{"post":{"operationId":"release_inventory_hold","summary":"Release an inventory hold by id.","description":"Release an inventory hold by id.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"hold","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"release_inventory_hold"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"hold_id":{"format":"int64","type":"integer"},"reason":{"default":null,"type":["string","null"]}},"required":["hold_id"],"title":"ReleaseHoldCommand","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"release_inventory_hold","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"hold_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"released":{"type":"boolean"}},"required":["released"],"title":"ReleaseHoldResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"released":false}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#serial_reserve":{"post":{"operationId":"serial_reserve","summary":"Reserve a serial for an allocation (Active → Reserved).","description":"Reserve a serial for an allocation (Active → Reserved).\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"serial_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"serial_reserve"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"allocation_id":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"},"serial_id":{"format":"int64","type":"integer"}},"required":["allocation_id","idempotency_key","serial_id"],"title":"ReserveSerial","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"serial_reserve","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"allocation_id":1,"serial_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"serial_id":{"format":"int64","type":"integer"},"serial_number":{"type":"string"}},"required":["serial_id","serial_number"],"title":"ReserveSerialResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"serial_id":1,"serial_number":"<serial_number>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#serial_pick":{"post":{"operationId":"serial_pick","summary":"Pick a reserved serial onto a pick task (Reserved → Picked).","description":"Pick a reserved serial onto a pick task (Reserved → Picked).\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"serial_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"serial_pick"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"idempotency_key":{"format":"uuid","type":"string"},"pick_task_id":{"format":"int64","type":"integer"},"picked_to_container":{"format":"int64","type":["integer","null"]},"serial_id":{"format":"int64","type":"integer"}},"required":["idempotency_key","pick_task_id","serial_id"],"title":"PickSerial","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"serial_pick","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"pick_task_id":1,"serial_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"serial_id":{"format":"int64","type":"integer"},"serial_number":{"type":"string"}},"required":["serial_id","serial_number"],"title":"PickSerialResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"serial_id":1,"serial_number":"<serial_number>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#serial_ship":{"post":{"operationId":"serial_ship","summary":"Ship a picked serial to a customer (Picked → Shipped, clears location).","description":"Ship a picked serial to a customer (Picked → Shipped, clears location).\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"serial_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"serial_ship"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"customer_id":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"},"serial_id":{"format":"int64","type":"integer"},"shipment_id":{"format":"int64","type":"integer"}},"required":["customer_id","idempotency_key","serial_id","shipment_id"],"title":"ShipSerial","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"serial_ship","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"customer_id":1,"serial_id":1,"shipment_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"serial_id":{"format":"int64","type":"integer"},"serial_number":{"type":"string"}},"required":["serial_id","serial_number"],"title":"ShipSerialResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"serial_id":1,"serial_number":"<serial_number>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#serial_return":{"post":{"operationId":"serial_return","summary":"Return a previously shipped serial via RMA receipt (Shipped → Returned). Anomaly 88 if status != Shipped.","description":"Return a previously shipped serial via RMA receipt (Shipped → Returned). Anomaly 88 if status != Shipped.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"serial_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"serial_return"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"idempotency_key":{"format":"uuid","type":"string"},"new_container_id":{"format":"int64","type":["integer","null"]},"new_location":{"type":"string"},"owner_id":{"format":"int64","type":"integer"},"return_via":{"format":"int64","type":"integer"},"serial_number":{"type":"string"}},"required":["idempotency_key","new_location","owner_id","return_via","serial_number"],"title":"ReturnSerial","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"serial_return","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"new_location":"<new_location>","owner_id":1,"return_via":1,"serial_number":"<serial_number>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"serial_id":{"format":"int64","type":"integer"},"serial_number":{"type":"string"}},"required":["serial_id","serial_number"],"title":"ReturnSerialResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"serial_id":1,"serial_number":"<serial_number>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#serial_dispose":{"post":{"operationId":"serial_dispose","summary":"Dispose a damaged or returned serial (terminal).","description":"Dispose a damaged or returned serial (terminal).\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"serial_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"serial_dispose"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"idempotency_key":{"format":"uuid","type":"string"},"reason":{"type":"string"},"serial_id":{"format":"int64","type":"integer"}},"required":["idempotency_key","reason","serial_id"],"title":"DisposeSerial","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"serial_dispose","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"reason":"<reason>","serial_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"serial_id":{"format":"int64","type":"integer"},"serial_number":{"type":"string"}},"required":["serial_id","serial_number"],"title":"DisposeSerialResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"serial_id":1,"serial_number":"<serial_number>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#serial_move":{"post":{"operationId":"serial_move","summary":"Move an Active or Held serial to a new location/container.","description":"Move an Active or Held serial to a new location/container.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"serial_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"serial_move"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"description":"The bare serial move. It does NOT judge or place a `new_container_id`: the landing rule for an existing container lives in `wms-inventory`, which this crate cannot reach. Every generic caller goes through `wms_inventory::service::container::commands::serial_landing::MoveSerialIntoPlace` (the `serial_move` RPC does); only a caller that has already landed the container itself may run this directly.","properties":{"idempotency_key":{"format":"uuid","type":"string"},"new_container_id":{"format":"int64","type":["integer","null"]},"new_location":{"type":"string"},"serial_id":{"format":"int64","type":"integer"}},"required":["idempotency_key","new_location","serial_id"],"title":"MoveSerial","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"serial_move","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"new_location":"<new_location>","serial_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"serial_id":{"format":"int64","type":"integer"},"serial_number":{"type":"string"}},"required":["serial_id","serial_number"],"title":"MoveSerialResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"serial_id":1,"serial_number":"<serial_number>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#remove_captured_serial":{"post":{"operationId":"remove_captured_serial","summary":"Drop one wrongly-captured serial from an open episode. Decrements captured_qty. Spec §7.4 (RemoveCapturedSerial).","description":"Drop one wrongly-captured serial from an open episode. Decrements captured_qty. Spec §7.4 (RemoveCapturedSerial).\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"serial_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"remove_captured_serial"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"episode_id":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"},"serial_number":{"description":"Serial to drop. Must match an existing `serial_capture_episode_item.serial_number` for this episode.","type":"string"}},"required":["episode_id","idempotency_key","serial_number"],"title":"RemoveCapturedSerial","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"remove_captured_serial","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"episode_id":1,"serial_number":"<serial_number>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"episode_id":{"format":"int64","type":"integer"},"serials_collected_qty":{"format":"int32","type":"integer"}},"required":["episode_id","serials_collected_qty"],"title":"RemoveCapturedSerialResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"episode_id":1,"serials_collected_qty":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#capture_serial":{"post":{"operationId":"capture_serial","summary":"Capture one serial during a receipt-line collection loop. Server-side episode is auto-opened on first call and auto-committed (serials registered into inventory_balances_serial, episode closed) when captured_qty reaches expected_qty. See ADR-062.","description":"Capture one serial during a receipt-line collection loop. Server-side episode is auto-opened on first call and auto-committed (serials registered into inventory_balances_serial, episode closed) when captured_qty reaches expected_qty. See ADR-062.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"serial_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"capture_serial"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"business_operation":{"allOf":[{"$ref":"#/components/schemas/EpisodeBusinessOperation"}],"default":"Receive","description":"Polymorphic discriminator (spec §7.4 / §16.8). Drives both the open-context extractor and the commit dispatcher. Defaults to `Receive` so callers from the existing receipt flow don't need to be updated."},"business_ref_id":{"description":"Polymorphic reference to the business document the episode is anchored to: * Receive  → `receipt_detail.id` * Move     → `move.id` * Pick     → `pick_task.id` (line via `business_ref_line`) * Pack     → `shipping_carton.id` * Ship     → `shipment.id` * Return   → `receipt.id` (RMA) * Adjust   → `inventory_adjustment.id` * Inventory→ `count_session.id`","format":"int64","type":"integer"},"business_ref_line":{"default":null,"description":"Optional line-level discriminator within the document (e.g. `pick_task_line.id`). Null when the op is anchored at the document level (typical Receive case).","format":"int64","type":["integer","null"]},"idempotency_key":{"format":"uuid","type":"string"},"serial_number":{"description":"The serial barcode the operator just scanned.","type":"string"},"to_location":{"default":null,"description":"Receive-context location. Required on the FIRST `Receive` call (no open episode yet); ignored on subsequent. Server stores on the episode and reuses at commit time.\n\nNote: container_id is NOT a client-side input — the server resolves it from the business document (`receipt_detail .container_id` for Receive). Client doesn't have a numeric container_id anyway, only the LPN string operators typed at receive-time, which the receive handler already resolved into the FK before we get here.","type":["string","null"]}},"required":["business_ref_id","idempotency_key","serial_number"],"title":"CaptureSerial","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"capture_serial","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"business_ref_id":1,"serial_number":"<serial_number>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"already_captured":{"description":"`true` when `serial_number` was already in this episode — the insert was a no-op and the counter did NOT increment. UI uses it to surface the spec §10.1 \"accidentally scanned twice? Y/N\" prompt.","type":"boolean"},"episode_id":{"format":"int64","type":"integer"},"episode_status":{"$ref":"#/components/schemas/EpisodeStatus"},"serials_collected_qty":{"description":"How many serials have been captured in this episode so far. Matches `serial_capture_episode.captured_qty`. Named with the `serials_` prefix so the rf-go seed reads `response.serials_*_qty` alongside the same names returned by `receive_against_asn` — one vocabulary across the whole capture flow.","format":"int32","type":"integer"},"serials_to_collect_qty":{"description":"How many serials this episode aims to collect — derived from the business document (receipt_detail.qty_expected for Receive).","format":"int32","type":"integer"}},"required":["already_captured","episode_id","episode_status","serials_collected_qty","serials_to_collect_qty"],"title":"CaptureSerialResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"already_captured":false,"episode_id":1,"episode_status":"Open","serials_collected_qty":1,"serials_to_collect_qty":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#cancel_episode":{"post":{"operationId":"cancel_episode","summary":"Operator-explicit episode cancellation. status → Cancelled, items preserved for audit, qty_received untouched. Spec §7.4. Stateless: operator's decision is intent-driven (cancel this episode), independent of captured_qty / status — re-checked atomically inside tx.","description":"Operator-explicit episode cancellation. status → Cancelled, items preserved for audit, qty_received untouched. Spec §7.4. Stateless: operator's decision is intent-driven (cancel this episode), independent of captured_qty / status — re-checked atomically inside tx.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"serial_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"cancel_episode"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"episode_id":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"},"reason":{"default":null,"description":"Free-text reason persisted to `serial_capture_episode.closed_reason`. Defaults to `operator_cancel` when caller omits it.","type":["string","null"]}},"required":["episode_id","idempotency_key"],"title":"CancelEpisode","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"cancel_episode","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"episode_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"captured_qty_at_cancel":{"description":"`captured_qty` at the moment of cancel — UI surfaces \"discarded N scanned serials\" so the operator sees what was lost.","format":"int32","type":"integer"},"episode_id":{"format":"int64","type":"integer"},"status":{"$ref":"#/components/schemas/EpisodeStatus"}},"required":["captured_qty_at_cancel","episode_id","status"],"title":"CancelEpisodeResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"captured_qty_at_cancel":1,"episode_id":1,"status":"Open"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#force_close_episode":{"post":{"operationId":"force_close_episode","summary":"Supervisor force-close of an episode that's stuck or abandoned. status → Cancelled, items preserved for audit, closed_reason='supervisor_force_close:{reason}'. Used to unblock receipt_close when the original operator can't drive the episode to a terminal state. Spec §7.4 / slice 3d. Stateless: supervisor's intent is fixed (force-close THIS episode); idempotent on re-entry (already-terminal returns current state).","description":"Supervisor force-close of an episode that's stuck or abandoned. status → Cancelled, items preserved for audit, closed_reason='supervisor_force_close:{reason}'. Used to unblock receipt_close when the original operator can't drive the episode to a terminal state. Spec §7.4 / slice 3d. Stateless: supervisor's intent is fixed (force-close THIS episode); idempotent on re-entry (already-terminal returns current state).\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"serial_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"force_close_episode"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"episode_id":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"},"reason":{"description":"Free-text reason, persisted to `serial_capture_episode.closed_reason` as `\"supervisor_force_close:{reason}\"`. Required — supervisor terminating someone else's work always needs an audit trail.","type":"string"}},"required":["episode_id","idempotency_key","reason"],"title":"ForceCloseEpisode","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"force_close_episode","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"episode_id":1,"reason":"<reason>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"captured_qty_at_close":{"description":"`captured_qty` at the moment of force-close. Lets the supervisor UI display \"discarded N pending serials\" so the impact is visible before/after the action.","format":"int32","type":"integer"},"episode_id":{"format":"int64","type":"integer"},"original_operator_id":{"description":"Original operator who owned the episode. Surfaced so the supervisor's audit log can show \"force-closed operator X's episode\" without an extra round-trip.","format":"int64","type":"integer"},"status":{"$ref":"#/components/schemas/EpisodeStatus"}},"required":["captured_qty_at_close","episode_id","original_operator_id","status"],"title":"ForceCloseEpisodeResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"captured_qty_at_close":1,"episode_id":1,"original_operator_id":1,"status":"Open"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_open_episodes_for_receipt":{"post":{"operationId":"list_open_episodes_for_receipt","summary":"List Open / InProgress / AwaitingConfirmation serial-capture episodes attached to any detail of a receipt. Used by RF to surface the resume-prompt on ASN re-entry and by close_receipt to enforce the close-blocker. Spec §7.4 / §10.13.","description":"List Open / InProgress / AwaitingConfirmation serial-capture episodes attached to any detail of a receipt. Used by RF to surface the resume-prompt on ASN re-entry and by close_receipt to enforce the close-blocker. Spec §7.4 / §10.13.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"serial_commands","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_open_episodes_for_receipt"},"params":{"type":"object","properties":{"data":{"properties":{"receipt_id":{"format":"int64","type":"integer"}},"required":["receipt_id"],"title":"ListOpenEpisodesForReceiptInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_open_episodes_for_receipt","params":{"data":{"receipt_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/OpenEpisodeRow"},"title":"Array_of_OpenEpisodeRow","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"captured_qty":1,"episode_id":1,"expected_qty":1,"receipt_detail_id":1,"sku_code":"<sku_code>","status":"<status>"}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_open_episodes_for_operator":{"post":{"operationId":"list_open_episodes_for_operator","summary":"List the calling operator's own still-open serial-capture episodes (Open / InProgress / AwaitingConfirmation). Pre-enriched with receipt_number + owner_code + owner_company so the RF recovery screen can render each row without per-row lookups. Used by RCSN_RECOVERY (slice 3b) to let an operator returning to a terminal pick up wherever they left off.","description":"List the calling operator's own still-open serial-capture episodes (Open / InProgress / AwaitingConfirmation). Pre-enriched with receipt_number + owner_code + owner_company so the RF recovery screen can render each row without per-row lookups. Used by RCSN_RECOVERY (slice 3b) to let an operator returning to a terminal pick up wherever they left off.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"serial_commands","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_open_episodes_for_operator"},"params":{"type":"object","properties":{}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_open_episodes_for_operator"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/OperatorOpenEpisodeRow"},"title":"Array_of_OperatorOpenEpisodeRow","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"captured_qty":1,"episode_id":1,"expected_qty":1,"opened_at":"<opened_at>","owner_code":"<owner_code>","owner_company":"<owner_company>","owner_id":1,"receipt_detail_id":1,"receipt_id":1,"receipt_number":"<receipt_number>","sku_code":"<sku_code>","status":"<status>"}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_force_close_candidates":{"post":{"operationId":"list_force_close_candidates","summary":"List every unresolved Receive or Pick serial-capture episode in the warehouse — Open / InProgress / AwaitingConfirmation / Abandoned. No operator filter: the supervisor sees everyone's stuck episodes so they can drive `force_close_episode` (slice 3d): a Receive episode blocks `receipt_close`, an Abandoned Pick episode blocks `move_execute` of its stock. Pre-enriched with business_operation, document_number (receipt or order number), location, owner and operator_id for the RCSN_FORCE picker label (slice B).","description":"List every unresolved Receive or Pick serial-capture episode in the warehouse — Open / InProgress / AwaitingConfirmation / Abandoned. No operator filter: the supervisor sees everyone's stuck episodes so they can drive `force_close_episode` (slice 3d): a Receive episode blocks `receipt_close`, an Abandoned Pick episode blocks `move_execute` of its stock. Pre-enriched with business_operation, document_number (receipt or order number), location, owner and operator_id for the RCSN_FORCE picker label (slice B).\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"serial_commands","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_force_close_candidates"},"params":{"type":"object","properties":{}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_force_close_candidates"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/EpisodeForceCloseRow"},"title":"Array_of_EpisodeForceCloseRow","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"business_operation":"<business_operation>","captured_qty":1,"document_number":"<document_number>","episode_id":1,"expected_qty":1,"opened_at":"<opened_at>","operator_id":1,"owner_code":"<owner_code>","owner_company":"<owner_company>","owner_id":1,"sku_code":"<sku_code>","status":"<status>"}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_transaction_log":{"post":{"operationId":"list_transaction_log","summary":"List transaction_log — CRUD.","description":"List transaction_log — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"transaction_log","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_transaction_log"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_transaction_log"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/TransactionLog"},"title":"Array_of_TransactionLog","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"code":"<code>","effective_date":"<effective_date>","from_loc":"<from_loc>","from_lpn":"<from_lpn>","id":1,"mod_when":"<mod_when>","mod_who":1,"owner_id":1,"qty":1.5,"sku_code":"<sku_code>","status":"<status>","to_loc":"<to_loc>","to_lpn":"<to_lpn>","transaction_type":"Deposit"}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_transaction_log":{"post":{"operationId":"get_transaction_log","summary":"Get a transaction_log by ID — CRUD.","description":"Get a transaction_log by ID — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"transaction_log","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_transaction_log"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_transaction_log","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"Core transaction log entity tracking inventory movements","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"best_by_date":{"type":["string","null"]},"code":{"type":"string"},"delivery_by_date":{"type":["string","null"]},"effective_date":{"type":"string"},"expiration_date":{"type":["string","null"]},"from_loc":{"type":"string"},"from_lpn":{"type":"string"},"hold_code":{"anyOf":[{"$ref":"#/components/schemas/InventoryStatusHold"},{"type":"null"}]},"id":{"format":"int64","type":"integer"},"idempotency_key":{"description":"Correlates rows from the same MoveCommand (one UUID, multiple fragments). NULL on receive-time deposits.","format":"uuid","type":["string","null"]},"lot":{"type":["string","null"]},"manufactured_date":{"type":["string","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"owner_id":{"format":"int64","type":"integer"},"pack_id":{"format":"int64","type":["integer","null"]},"qty":{"format":"double","type":"number"},"qty_after":{"format":"double","type":["number","null"]},"qty_before":{"description":"Balance quantity before / after this row (wms-app 052) — written by inventory adjustments; NULL for other operations.","format":"double","type":["number","null"]},"reason_code":{"description":"Free-form audit hint (≤80 chars).","type":["string","null"]},"sku_code":{"type":"string"},"source_code":{"type":["string","null"]},"source_type":{"description":"Snake-case discriminator (`MoveSourceType::as_code()`) — populated by Move-primitive writes since migration 144. Receive-time deposits leave this NULL.","type":["string","null"]},"status":{"type":"string"},"to_loc":{"type":"string"},"to_lpn":{"type":"string"},"transaction_type":{"$ref":"#/components/schemas/TransactionType"},"uom":{"type":["string","null"]}},"required":["add_when","add_who","code","effective_date","from_loc","from_lpn","id","mod_when","mod_who","owner_id","qty","sku_code","status","to_loc","to_lpn","transaction_type"],"title":"TransactionLog","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","effective_date":"<effective_date>","from_loc":"<from_loc>","from_lpn":"<from_lpn>","id":1,"mod_when":"<mod_when>","mod_who":1,"owner_id":1,"qty":1.5,"sku_code":"<sku_code>","status":"<status>","to_loc":"<to_loc>","to_lpn":"<to_lpn>","transaction_type":"Deposit"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_transaction_log":{"post":{"operationId":"count_transaction_log","summary":"Count transaction_log — CRUD.","description":"Count transaction_log — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"transaction_log","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_transaction_log"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_transaction_log"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_sku_pick_location":{"post":{"operationId":"get_sku_pick_location","summary":"Get one pick location of a SKU.","description":"Get one pick location of a SKU.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"sku_pick_location","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_sku_pick_location"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_sku_pick_location","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"A row of `sku_pick_location_view`: what the SKU card lists and shows.","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"id":{"format":"int64","type":"integer"},"location":{"type":"string"},"max_qty":{"format":"double","type":"number"},"min_qty":{"format":"double","type":"number"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"owner_code":{"type":"string"},"owner_id":{"format":"int64","type":"integer"},"pick_type":{"$ref":"#/components/schemas/PickLocationType"},"putawayzone":{"type":["string","null"]},"route_sequence":{"type":["string","null"]},"sku_code":{"type":"string"},"sku_id":{"format":"int64","type":"integer"},"uom":{"type":"string"},"version":{"format":"int32","type":"integer"}},"required":["add_when","add_who","id","location","max_qty","min_qty","mod_when","mod_who","owner_code","owner_id","pick_type","sku_code","sku_id","uom","version"],"title":"SkuPickLocationView","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"id":1,"location":"<location>","max_qty":1.5,"min_qty":1.5,"mod_when":"<mod_when>","mod_who":1,"owner_code":"<owner_code>","owner_id":1,"pick_type":"Each","sku_code":"<sku_code>","sku_id":1,"uom":"<uom>","version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_sku_pick_location":{"post":{"operationId":"list_sku_pick_location","summary":"List the pick locations of SKUs, with the SKU's owner and the location's zone and route.","description":"List the pick locations of SKUs, with the SKU's owner and the location's zone and route.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"sku_pick_location","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_sku_pick_location"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_sku_pick_location"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/SkuPickLocationView"},"title":"Array_of_SkuPickLocationView","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"id":1,"location":"<location>","max_qty":1.5,"min_qty":1.5,"mod_when":"<mod_when>","mod_who":1,"owner_code":"<owner_code>","owner_id":1,"pick_type":"Each","sku_code":"<sku_code>","sku_id":1,"uom":"<uom>","version":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_sku_pick_location":{"post":{"operationId":"count_sku_pick_location","summary":"Count the pick locations of SKUs.","description":"Count the pick locations of SKUs.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"sku_pick_location","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_sku_pick_location"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_sku_pick_location"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#create_sku_pick_location":{"post":{"operationId":"create_sku_pick_location","summary":"Assign a pick location to a SKU: a Pick, SpeedPick or Case location, in a unit of the SKU's pack.","description":"Assign a pick location to a SKU: a Pick, SpeedPick or Case location, in a unit of the SKU's pack.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog does not say whether this method needs an idempotency key.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"sku_pick_location","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"create_sku_pick_location"},"params":{"type":"object","properties":{"data":{"properties":{"location":{"type":"string"},"max_qty":{"format":"double","type":"number"},"min_qty":{"format":"double","type":"number"},"pick_type":{"$ref":"#/components/schemas/PickLocationType"},"sku_id":{"format":"int64","type":"integer"},"uom":{"type":"string"}},"required":["location","max_qty","min_qty","pick_type","sku_id","uom"],"title":"SkuPickLocationForCreate","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"create_sku_pick_location","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"location":"<location>","max_qty":1.5,"min_qty":1.5,"pick_type":"Each","sku_id":1,"uom":"<uom>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"A row of `sku_pick_location_view`: what the SKU card lists and shows.","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"id":{"format":"int64","type":"integer"},"location":{"type":"string"},"max_qty":{"format":"double","type":"number"},"min_qty":{"format":"double","type":"number"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"owner_code":{"type":"string"},"owner_id":{"format":"int64","type":"integer"},"pick_type":{"$ref":"#/components/schemas/PickLocationType"},"putawayzone":{"type":["string","null"]},"route_sequence":{"type":["string","null"]},"sku_code":{"type":"string"},"sku_id":{"format":"int64","type":"integer"},"uom":{"type":"string"},"version":{"format":"int32","type":"integer"}},"required":["add_when","add_who","id","location","max_qty","min_qty","mod_when","mod_who","owner_code","owner_id","pick_type","sku_code","sku_id","uom","version"],"title":"SkuPickLocationView","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"id":1,"location":"<location>","max_qty":1.5,"min_qty":1.5,"mod_when":"<mod_when>","mod_who":1,"owner_code":"<owner_code>","owner_id":1,"pick_type":"Each","sku_code":"<sku_code>","sku_id":1,"uom":"<uom>","version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#update_sku_pick_location":{"post":{"operationId":"update_sku_pick_location","summary":"Edit a pick location of a SKU on the version read.","description":"Edit a pick location of a SKU on the version read.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n**Versioned entities:** sku_pick_location (id in data.id, version in data.expected_version).\n\n\n**Notes**\n\n- The catalog does not say whether this method needs an idempotency key.\n- Send the current version of the row in `expected_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[{"entity":"sku_pick_location","id_field":"id","version_field":"expected_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"sku_pick_location","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"update_sku_pick_location"},"params":{"type":"object","properties":{"meta":{"type":"object","description":"Control-plane envelope supplied by the platform."},"data":{"properties":{"data":{"description":"The editable fields; `sku_id` is the row's identity and never changes.","properties":{"location":{"type":["string","null"]},"max_qty":{"format":"double","type":["number","null"]},"min_qty":{"format":"double","type":["number","null"]},"pick_type":{"anyOf":[{"$ref":"#/components/schemas/PickLocationType"},{"type":"null"}]},"uom":{"type":["string","null"]}},"title":"SkuPickLocationForUpdate","type":"object"},"expected_version":{"format":"int32","type":"integer"},"id":{"format":"int64","type":"integer"}},"required":["id","expected_version","data"],"type":"object","description":"Versioned update payload."}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"update_sku_pick_location","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"id":1,"expected_version":1,"data":{"location":"<location>","max_qty":1.5,"min_qty":1.5}}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"A row of `sku_pick_location_view`: what the SKU card lists and shows.","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"id":{"format":"int64","type":"integer"},"location":{"type":"string"},"max_qty":{"format":"double","type":"number"},"min_qty":{"format":"double","type":"number"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"owner_code":{"type":"string"},"owner_id":{"format":"int64","type":"integer"},"pick_type":{"$ref":"#/components/schemas/PickLocationType"},"putawayzone":{"type":["string","null"]},"route_sequence":{"type":["string","null"]},"sku_code":{"type":"string"},"sku_id":{"format":"int64","type":"integer"},"uom":{"type":"string"},"version":{"format":"int32","type":"integer"}},"required":["add_when","add_who","id","location","max_qty","min_qty","mod_when","mod_who","owner_code","owner_id","pick_type","sku_code","sku_id","uom","version"],"title":"SkuPickLocationView","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"id":1,"location":"<location>","max_qty":1.5,"min_qty":1.5,"mod_when":"<mod_when>","mod_who":1,"owner_code":"<owner_code>","owner_id":1,"pick_type":"Each","sku_code":"<sku_code>","sku_id":1,"uom":"<uom>","version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_sku_pick_location":{"post":{"operationId":"delete_sku_pick_location","summary":"Unassign a pick location from a SKU; refused while the location holds the SKU.","description":"Unassign a pick location from a SKU; refused while the location holds the SKU.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog does not say whether this method needs an idempotency key.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"sku_pick_location","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_sku_pick_location"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_sku_pick_location","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"One row of `sku_pick_location`.","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"id":{"format":"int64","type":"integer"},"location":{"type":"string"},"max_qty":{"format":"double","type":"number"},"min_qty":{"format":"double","type":"number"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"pick_type":{"$ref":"#/components/schemas/PickLocationType"},"sku_id":{"format":"int64","type":"integer"},"uom":{"type":"string"},"version":{"format":"int32","type":"integer"}},"required":["add_when","add_who","id","location","max_qty","min_qty","mod_when","mod_who","pick_type","sku_id","uom","version"],"title":"SkuPickLocation","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"id":1,"location":"<location>","max_qty":1.5,"min_qty":1.5,"mod_when":"<mod_when>","mod_who":1,"pick_type":"Each","sku_id":1,"uom":"<uom>","version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#replenishment_take_next":{"post":{"operationId":"replenishment_take_next","summary":"Give the operator their next replenishment: the one in hand first, else one from the pool of their areas.","description":"Give the operator their next replenishment: the one in hand first, else one from the pool of their areas.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"replenishment","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"replenishment_take_next"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"work_area_code":{"default":null,"description":"The work area scanned; blank or absent — the whole warehouse.","type":["string","null"]}},"title":"TakeNextReplenishment","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"replenishment_take_next","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"work_area_code":"<work_area_code>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"One row of `replenishment`.","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"container_id":{"format":"int64","type":["integer","null"]},"from_location":{"type":"string"},"id":{"format":"int64","type":"integer"},"lot":{"type":["string","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"owner_id":{"format":"int64","type":"integer"},"qty":{"format":"double","type":"number"},"qty_moved":{"format":"double","type":"number"},"short_reason":{"type":["string","null"]},"sku_code":{"type":"string"},"status":{"$ref":"#/components/schemas/ReplenishmentStatus"},"to_location":{"type":"string"},"uom":{"type":"string"},"uom_qty":{"format":"double","type":"number"},"urgency":{"format":"int16","type":"integer"},"version":{"format":"int32","type":"integer"}},"required":["add_when","add_who","from_location","id","mod_when","mod_who","owner_id","qty","qty_moved","sku_code","status","to_location","uom","uom_qty","urgency","version"],"title":"Replenishment","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"add_when":"<add_when>","add_who":1,"from_location":"<from_location>","id":1,"mod_when":"<mod_when>","mod_who":1,"owner_id":1,"qty":1.5,"qty_moved":1.5,"sku_code":"<sku_code>","status":"Open","to_location":"<to_location>","uom":"<uom>","uom_qty":1.5,"urgency":1,"version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#replenishment_confirm":{"post":{"operationId":"replenishment_confirm","summary":"The operator brought a replenishment: the stock moves into the pick location and the task closes (short with a reason).","description":"The operator brought a replenishment: the stock moves into the pick location and the task closes (short with a reason).\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"replenishment","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"replenishment_confirm"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"from_location":{"description":"The location scanned at the source.","type":"string"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"replenishment_id":{"format":"int64","type":"integer"},"short_reason":{"default":null,"description":"Why less than planned was brought; required then.","type":["string","null"]},"to_location":{"description":"The pick location scanned on arrival.","type":"string"},"uom_qty":{"description":"Units of the replenishment's unit brought.","format":"double","type":"number"}},"required":["from_location","replenishment_id","to_location","uom_qty"],"title":"ConfirmReplenishment","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"replenishment_confirm","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"from_location":"<from_location>","replenishment_id":1,"to_location":"<to_location>","uom_qty":1.5}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"One row of `replenishment`.","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"container_id":{"format":"int64","type":["integer","null"]},"from_location":{"type":"string"},"id":{"format":"int64","type":"integer"},"lot":{"type":["string","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"owner_id":{"format":"int64","type":"integer"},"qty":{"format":"double","type":"number"},"qty_moved":{"format":"double","type":"number"},"short_reason":{"type":["string","null"]},"sku_code":{"type":"string"},"status":{"$ref":"#/components/schemas/ReplenishmentStatus"},"to_location":{"type":"string"},"uom":{"type":"string"},"uom_qty":{"format":"double","type":"number"},"urgency":{"format":"int16","type":"integer"},"version":{"format":"int32","type":"integer"}},"required":["add_when","add_who","from_location","id","mod_when","mod_who","owner_id","qty","qty_moved","sku_code","status","to_location","uom","uom_qty","urgency","version"],"title":"Replenishment","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"add_when":"<add_when>","add_who":1,"from_location":"<from_location>","id":1,"mod_when":"<mod_when>","mod_who":1,"owner_id":1,"qty":1.5,"qty_moved":1.5,"sku_code":"<sku_code>","status":"Open","to_location":"<to_location>","uom":"<uom>","uom_qty":1.5,"urgency":1,"version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#replenishment_plan":{"post":{"operationId":"replenishment_plan","summary":"Replenish now: every pick location at or below its minimum gets what it lacks from storage, as Replenish tasks.","description":"Replenish now: every pick location at or below its minimum gets what it lacks from storage, as Replenish tasks.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"replenishment","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"replenishment_plan"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"}},"title":"PlanReplenishment","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"replenishment_plan","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"What one pass ordered.","properties":{"created":{"description":"The replenishments created, in the order they were planned.","items":{"format":"int64","type":"integer"},"type":"array"},"without_source":{"description":"Pick locations due but with nothing to take anywhere.","items":{"type":"string"},"type":"array"}},"required":["created","without_source"],"title":"PlanOutcome","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"created":[1],"without_source":["<without_source>"]}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#replenishment_cancel":{"post":{"operationId":"replenishment_cancel","summary":"Call an open replenishment off on the version read; its task leaves the pool.","description":"Call an open replenishment off on the version read; its task leaves the pool.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n**Versioned entities:** replenishment (id in data.replenishment_id, version in data.expected_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[{"entity":"replenishment","id_field":"replenishment_id","version_field":"expected_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"replenishment","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"replenishment_cancel"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"expected_version":{"format":"int32","type":"integer"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"replenishment_id":{"format":"int64","type":"integer"}},"required":["expected_version","replenishment_id"],"title":"CancelReplenishment","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"replenishment_cancel","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"expected_version":1,"replenishment_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"One row of `replenishment`.","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"container_id":{"format":"int64","type":["integer","null"]},"from_location":{"type":"string"},"id":{"format":"int64","type":"integer"},"lot":{"type":["string","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"owner_id":{"format":"int64","type":"integer"},"qty":{"format":"double","type":"number"},"qty_moved":{"format":"double","type":"number"},"short_reason":{"type":["string","null"]},"sku_code":{"type":"string"},"status":{"$ref":"#/components/schemas/ReplenishmentStatus"},"to_location":{"type":"string"},"uom":{"type":"string"},"uom_qty":{"format":"double","type":"number"},"urgency":{"format":"int16","type":"integer"},"version":{"format":"int32","type":"integer"}},"required":["add_when","add_who","from_location","id","mod_when","mod_who","owner_id","qty","qty_moved","sku_code","status","to_location","uom","uom_qty","urgency","version"],"title":"Replenishment","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"add_when":"<add_when>","add_who":1,"from_location":"<from_location>","id":1,"mod_when":"<mod_when>","mod_who":1,"owner_id":1,"qty":1.5,"qty_moved":1.5,"sku_code":"<sku_code>","status":"Open","to_location":"<to_location>","uom":"<uom>","uom_qty":1.5,"urgency":1,"version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#replenishment_get":{"post":{"operationId":"replenishment_get","summary":"Get one replenishment.","description":"Get one replenishment.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"replenishment","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"replenishment_get"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"replenishment_get","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"One row of `replenishment`.","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"container_id":{"format":"int64","type":["integer","null"]},"from_location":{"type":"string"},"id":{"format":"int64","type":"integer"},"lot":{"type":["string","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"owner_id":{"format":"int64","type":"integer"},"qty":{"format":"double","type":"number"},"qty_moved":{"format":"double","type":"number"},"short_reason":{"type":["string","null"]},"sku_code":{"type":"string"},"status":{"$ref":"#/components/schemas/ReplenishmentStatus"},"to_location":{"type":"string"},"uom":{"type":"string"},"uom_qty":{"format":"double","type":"number"},"urgency":{"format":"int16","type":"integer"},"version":{"format":"int32","type":"integer"}},"required":["add_when","add_who","from_location","id","mod_when","mod_who","owner_id","qty","qty_moved","sku_code","status","to_location","uom","uom_qty","urgency","version"],"title":"Replenishment","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"from_location":"<from_location>","id":1,"mod_when":"<mod_when>","mod_who":1,"owner_id":1,"qty":1.5,"qty_moved":1.5,"sku_code":"<sku_code>","status":"Open","to_location":"<to_location>","uom":"<uom>","uom_qty":1.5,"urgency":1,"version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#replenishment_list":{"post":{"operationId":"replenishment_list","summary":"List replenishments, filtered like any list (by status, pick location, SKU).","description":"List replenishments, filtered like any list (by status, pick location, SKU).\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"replenishment","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"replenishment_list"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"replenishment_list"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/Replenishment"},"title":"Array_of_Replenishment","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"from_location":"<from_location>","id":1,"mod_when":"<mod_when>","mod_who":1,"owner_id":1,"qty":1.5,"qty_moved":1.5,"sku_code":"<sku_code>","status":"Open","to_location":"<to_location>","uom":"<uom>","uom_qty":1.5,"urgency":1,"version":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#replenishment_count":{"post":{"operationId":"replenishment_count","summary":"Count replenishments.","description":"Count replenishments.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"replenishment","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"replenishment_count"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"replenishment_count"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#create_sku_serial_config":{"post":{"operationId":"create_sku_serial_config","summary":"Create the optional serial-tracking configuration owned by one SKU.","description":"Create the optional serial-tracking configuration owned by one SKU.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog does not say whether this method needs an idempotency key.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"sku_serial_config","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"create_sku_serial_config"},"params":{"type":"object","properties":{"data":{"properties":{"allow_asn_pre_advised":{"type":["boolean","null"]},"allow_deferred_capture":{"type":["boolean","null"]},"allow_receive_capture":{"type":["boolean","null"]},"anomaly_block_severity":{"type":["boolean","null"]},"anomaly_max_per_lpn":{"format":"int32","type":["integer","null"]},"anomaly_velocity_threshold_min":{"format":"int32","type":["integer","null"]},"anomaly_vendor_surge_factor":{"format":"double","type":["number","null"]},"check_digit_algorithm":{"type":["string","null"]},"continuous_serial_tracking":{"type":["boolean","null"]},"industry_profile":{"type":["string","null"]},"multi_serial_delimiter":{"type":["string","null"]},"multi_serial_fixed_length":{"format":"int32","type":["integer","null"]},"pick_episode_reassignment_mode":{"type":["string","null"]},"profile_mode":{"type":["string","null"]},"require_unique_global":{"type":["boolean","null"]},"serial_auto_increment":{"type":["boolean","null"]},"serial_format":{"type":["string","null"]},"serial_increment_length":{"format":"int32","type":["integer","null"]},"serial_increment_source_position":{"format":"int32","type":["integer","null"]},"serial_length":{"format":"int32","type":["integer","null"]},"serial_mask_format":{"type":["string","null"]},"serial_parse_frequency":{"format":"int32","type":["integer","null"]},"serial_parse_mode":{"anyOf":[{"$ref":"#/components/schemas/SerialParseMode"},{"type":"null"}]},"serial_parse_start_after":{"format":"int32","type":["integer","null"]},"serial_parse_start_position":{"format":"int32","type":["integer","null"]},"serial_scope":{"type":["string","null"]},"serials_per_barcode":{"format":"int32","type":["integer","null"]},"sku_id":{"format":"int64","type":"integer"},"warranty_period_days":{"format":"int32","type":["integer","null"]}},"required":["sku_id"],"title":"SkuSerialConfigForCreate","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"create_sku_serial_config","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"sku_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"allow_asn_pre_advised":{"type":"boolean"},"allow_deferred_capture":{"description":"Explicit permission to receive inventory before serial capture is complete. Deliberately separate from `allow_receive_capture`, which merely enables capture at the receive checkpoint.","type":"boolean"},"allow_receive_capture":{"type":"boolean"},"anomaly_block_severity":{"type":["boolean","null"]},"anomaly_max_per_lpn":{"format":"int32","type":["integer","null"]},"anomaly_velocity_threshold_min":{"format":"int32","type":["integer","null"]},"anomaly_vendor_surge_factor":{"format":"double","type":["number","null"]},"check_digit_algorithm":{"type":["string","null"]},"continuous_serial_tracking":{"description":"Master flag. If false — other fields ignored.","type":"boolean"},"id":{"format":"int64","type":"integer"},"industry_profile":{"type":["string","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"multi_serial_delimiter":{"type":["string","null"]},"multi_serial_fixed_length":{"format":"int32","type":["integer","null"]},"pick_episode_reassignment_mode":{"description":"Behaviour when a different operator resumes a Pick with an unfinished serial episode.","type":"string"},"profile_mode":{"description":"Movement/capture coupling policy (ADR-090).","type":"string"},"require_unique_global":{"type":"boolean"},"serial_auto_increment":{"type":"boolean"},"serial_format":{"type":["string","null"]},"serial_increment_length":{"format":"int32","type":["integer","null"]},"serial_increment_source_position":{"format":"int32","type":["integer","null"]},"serial_length":{"format":"int32","type":["integer","null"]},"serial_mask_format":{"type":["string","null"]},"serial_parse_frequency":{"format":"int32","type":["integer","null"]},"serial_parse_mode":{"$ref":"#/components/schemas/SerialParseMode"},"serial_parse_start_after":{"format":"int32","type":["integer","null"]},"serial_parse_start_position":{"format":"int32","type":["integer","null"]},"serial_scope":{"description":"Migration 153 — serial granularity. Tells receive_against_asn / capture_serial how to compute `serials_to_collect_qty` from the operator's submitted qty: - `PerUnit`      → 1 serial per atomic EA (qty_base from pack hierarchy) - `PerCase`      → 1 serial per submitted UOM (typical SSCC) - `PerPallet`    → 1 serial per pack_item.uom='PL' tier - `PerInnerPack` → 1 serial per pack_item.uom='IP' tier Default `PerUnit`. Stored as VARCHAR with CHECK constraint.","type":"string"},"serials_per_barcode":{"format":"int32","type":"integer"},"sku_id":{"format":"int64","type":"integer"},"warranty_period_days":{"format":"int32","type":["integer","null"]}},"required":["add_when","add_who","allow_asn_pre_advised","allow_deferred_capture","allow_receive_capture","continuous_serial_tracking","id","mod_when","mod_who","pick_episode_reassignment_mode","profile_mode","require_unique_global","serial_auto_increment","serial_parse_mode","serial_scope","serials_per_barcode","sku_id"],"title":"SkuSerialConfig","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"allow_asn_pre_advised":false,"allow_deferred_capture":false,"allow_receive_capture":false,"continuous_serial_tracking":false,"id":1,"mod_when":"<mod_when>","mod_who":1,"pick_episode_reassignment_mode":"<pick_episode_reassignment_mode>","profile_mode":"<profile_mode>","require_unique_global":false,"serial_auto_increment":false,"serial_parse_mode":"None","serial_scope":"<serial_scope>","serials_per_barcode":1,"sku_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_sku_serial_config":{"post":{"operationId":"get_sku_serial_config","summary":"Get a sku_serial_config by ID — CRUD.","description":"Get a sku_serial_config by ID — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"sku_serial_config","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_sku_serial_config"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_sku_serial_config","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"allow_asn_pre_advised":{"type":"boolean"},"allow_deferred_capture":{"description":"Explicit permission to receive inventory before serial capture is complete. Deliberately separate from `allow_receive_capture`, which merely enables capture at the receive checkpoint.","type":"boolean"},"allow_receive_capture":{"type":"boolean"},"anomaly_block_severity":{"type":["boolean","null"]},"anomaly_max_per_lpn":{"format":"int32","type":["integer","null"]},"anomaly_velocity_threshold_min":{"format":"int32","type":["integer","null"]},"anomaly_vendor_surge_factor":{"format":"double","type":["number","null"]},"check_digit_algorithm":{"type":["string","null"]},"continuous_serial_tracking":{"description":"Master flag. If false — other fields ignored.","type":"boolean"},"id":{"format":"int64","type":"integer"},"industry_profile":{"type":["string","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"multi_serial_delimiter":{"type":["string","null"]},"multi_serial_fixed_length":{"format":"int32","type":["integer","null"]},"pick_episode_reassignment_mode":{"description":"Behaviour when a different operator resumes a Pick with an unfinished serial episode.","type":"string"},"profile_mode":{"description":"Movement/capture coupling policy (ADR-090).","type":"string"},"require_unique_global":{"type":"boolean"},"serial_auto_increment":{"type":"boolean"},"serial_format":{"type":["string","null"]},"serial_increment_length":{"format":"int32","type":["integer","null"]},"serial_increment_source_position":{"format":"int32","type":["integer","null"]},"serial_length":{"format":"int32","type":["integer","null"]},"serial_mask_format":{"type":["string","null"]},"serial_parse_frequency":{"format":"int32","type":["integer","null"]},"serial_parse_mode":{"$ref":"#/components/schemas/SerialParseMode"},"serial_parse_start_after":{"format":"int32","type":["integer","null"]},"serial_parse_start_position":{"format":"int32","type":["integer","null"]},"serial_scope":{"description":"Migration 153 — serial granularity. Tells receive_against_asn / capture_serial how to compute `serials_to_collect_qty` from the operator's submitted qty: - `PerUnit`      → 1 serial per atomic EA (qty_base from pack hierarchy) - `PerCase`      → 1 serial per submitted UOM (typical SSCC) - `PerPallet`    → 1 serial per pack_item.uom='PL' tier - `PerInnerPack` → 1 serial per pack_item.uom='IP' tier Default `PerUnit`. Stored as VARCHAR with CHECK constraint.","type":"string"},"serials_per_barcode":{"format":"int32","type":"integer"},"sku_id":{"format":"int64","type":"integer"},"warranty_period_days":{"format":"int32","type":["integer","null"]}},"required":["add_when","add_who","allow_asn_pre_advised","allow_deferred_capture","allow_receive_capture","continuous_serial_tracking","id","mod_when","mod_who","pick_episode_reassignment_mode","profile_mode","require_unique_global","serial_auto_increment","serial_parse_mode","serial_scope","serials_per_barcode","sku_id"],"title":"SkuSerialConfig","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"allow_asn_pre_advised":false,"allow_deferred_capture":false,"allow_receive_capture":false,"continuous_serial_tracking":false,"id":1,"mod_when":"<mod_when>","mod_who":1,"pick_episode_reassignment_mode":"<pick_episode_reassignment_mode>","profile_mode":"<profile_mode>","require_unique_global":false,"serial_auto_increment":false,"serial_parse_mode":"None","serial_scope":"<serial_scope>","serials_per_barcode":1,"sku_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_sku_serial_config_by_sku":{"post":{"operationId":"get_sku_serial_config_by_sku","summary":"Get SKU serial config by SKU ID (1:1 relationship)","description":"Get SKU serial config by SKU ID (1:1 relationship)\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"sku_serial_config","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_sku_serial_config_by_sku"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_sku_serial_config_by_sku","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"anyOf":[{"$ref":"#/components/schemas/SkuSerialConfig"},{"type":"null"}],"title":"Nullable_SkuSerialConfig"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"allow_asn_pre_advised":false,"allow_deferred_capture":false,"allow_receive_capture":false,"continuous_serial_tracking":false,"id":1,"mod_when":"<mod_when>","mod_who":1,"pick_episode_reassignment_mode":"<pick_episode_reassignment_mode>","profile_mode":"<profile_mode>","require_unique_global":false,"serial_auto_increment":false,"serial_parse_mode":"None","serial_scope":"<serial_scope>","serials_per_barcode":1,"sku_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_sku_serial_config":{"post":{"operationId":"list_sku_serial_config","summary":"List sku_serial_config — CRUD.","description":"List sku_serial_config — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"sku_serial_config","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_sku_serial_config"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_sku_serial_config"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/SkuSerialConfig"},"title":"Array_of_SkuSerialConfig","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"allow_asn_pre_advised":false,"allow_deferred_capture":false,"allow_receive_capture":false,"continuous_serial_tracking":false,"id":1,"mod_when":"<mod_when>","mod_who":1,"pick_episode_reassignment_mode":"<pick_episode_reassignment_mode>","profile_mode":"<profile_mode>","require_unique_global":false,"serial_auto_increment":false,"serial_parse_mode":"None","serial_scope":"<serial_scope>","serials_per_barcode":1,"sku_id":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#update_sku_serial_config":{"post":{"operationId":"update_sku_serial_config","summary":"Update serial-tracking settings without changing their SKU identity.","description":"Update serial-tracking settings without changing their SKU identity.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"INVALID_DATA","when":"A value breaks a rule."}],"x-quark-module":"sku_serial_config","x-quark-operation":"update","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"update_sku_serial_config"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"},"data":{"additionalProperties":false,"properties":{"allow_asn_pre_advised":{"type":"boolean"},"allow_deferred_capture":{"type":"boolean"},"allow_receive_capture":{"type":"boolean"},"anomaly_block_severity":{"type":["boolean","null"]},"anomaly_max_per_lpn":{"format":"int32","type":["integer","null"]},"anomaly_velocity_threshold_min":{"format":"int32","type":["integer","null"]},"anomaly_vendor_surge_factor":{"format":"double","type":["number","null"]},"check_digit_algorithm":{"type":["string","null"]},"continuous_serial_tracking":{"type":"boolean"},"industry_profile":{"type":["string","null"]},"multi_serial_delimiter":{"type":["string","null"]},"multi_serial_fixed_length":{"format":"int32","type":["integer","null"]},"pick_episode_reassignment_mode":{"oneOf":[{"enum":["Block","CancelAndRestart"],"type":"string"},{"description":"The open episode is handed over to the operator the work moved to.","enum":["Handover"],"type":"string"}]},"profile_mode":{"description":"Operational policy for stock whose serial capture is not complete yet.\n\nStored as VARCHAR so the profile remains an application-level policy and can evolve without a PostgreSQL enum migration.","oneOf":[{"description":"Every inventory movement requires a fully committed serial register.","enum":["Strict"],"type":"string"},{"description":"Capture may be deferred; only an unchanged full LPN may move while an episode follows that LPN atomically.","enum":["Flexible"],"type":"string"},{"description":"Serial tracking is disabled for movement-policy purposes.","enum":["NotTracked"],"type":"string"}]},"require_unique_global":{"type":"boolean"},"serial_auto_increment":{"type":"boolean"},"serial_format":{"type":["string","null"]},"serial_increment_length":{"format":"int32","type":["integer","null"]},"serial_increment_source_position":{"format":"int32","type":["integer","null"]},"serial_length":{"format":"int32","type":["integer","null"]},"serial_mask_format":{"type":["string","null"]},"serial_parse_frequency":{"format":"int32","type":["integer","null"]},"serial_parse_mode":{"description":"Per Decisions Log D-32. How serial is extracted from a scanned barcode.","enum":["None","Fixed","Bounded"],"type":"string"},"serial_parse_start_after":{"format":"int32","type":["integer","null"]},"serial_parse_start_position":{"format":"int32","type":["integer","null"]},"serial_scope":{"description":"Supported serial granularity at the public API boundary.","enum":["PerUnit","PerCase","PerPallet","PerInnerPack"],"type":"string"},"serials_per_barcode":{"format":"int32","type":"integer"},"warranty_period_days":{"format":"int32","type":["integer","null"]}},"title":"SkuSerialConfigUpdateApi","type":"object"}},"required":["id","data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"update_sku_serial_config","params":{"id":1,"data":{"allow_asn_pre_advised":false,"allow_deferred_capture":false,"allow_receive_capture":false}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"allow_asn_pre_advised":{"type":"boolean"},"allow_deferred_capture":{"description":"Explicit permission to receive inventory before serial capture is complete. Deliberately separate from `allow_receive_capture`, which merely enables capture at the receive checkpoint.","type":"boolean"},"allow_receive_capture":{"type":"boolean"},"anomaly_block_severity":{"type":["boolean","null"]},"anomaly_max_per_lpn":{"format":"int32","type":["integer","null"]},"anomaly_velocity_threshold_min":{"format":"int32","type":["integer","null"]},"anomaly_vendor_surge_factor":{"format":"double","type":["number","null"]},"check_digit_algorithm":{"type":["string","null"]},"continuous_serial_tracking":{"description":"Master flag. If false — other fields ignored.","type":"boolean"},"id":{"format":"int64","type":"integer"},"industry_profile":{"type":["string","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"multi_serial_delimiter":{"type":["string","null"]},"multi_serial_fixed_length":{"format":"int32","type":["integer","null"]},"pick_episode_reassignment_mode":{"description":"Behaviour when a different operator resumes a Pick with an unfinished serial episode.","type":"string"},"profile_mode":{"description":"Movement/capture coupling policy (ADR-090).","type":"string"},"require_unique_global":{"type":"boolean"},"serial_auto_increment":{"type":"boolean"},"serial_format":{"type":["string","null"]},"serial_increment_length":{"format":"int32","type":["integer","null"]},"serial_increment_source_position":{"format":"int32","type":["integer","null"]},"serial_length":{"format":"int32","type":["integer","null"]},"serial_mask_format":{"type":["string","null"]},"serial_parse_frequency":{"format":"int32","type":["integer","null"]},"serial_parse_mode":{"$ref":"#/components/schemas/SerialParseMode"},"serial_parse_start_after":{"format":"int32","type":["integer","null"]},"serial_parse_start_position":{"format":"int32","type":["integer","null"]},"serial_scope":{"description":"Migration 153 — serial granularity. Tells receive_against_asn / capture_serial how to compute `serials_to_collect_qty` from the operator's submitted qty: - `PerUnit`      → 1 serial per atomic EA (qty_base from pack hierarchy) - `PerCase`      → 1 serial per submitted UOM (typical SSCC) - `PerPallet`    → 1 serial per pack_item.uom='PL' tier - `PerInnerPack` → 1 serial per pack_item.uom='IP' tier Default `PerUnit`. Stored as VARCHAR with CHECK constraint.","type":"string"},"serials_per_barcode":{"format":"int32","type":"integer"},"sku_id":{"format":"int64","type":"integer"},"warranty_period_days":{"format":"int32","type":["integer","null"]}},"required":["add_when","add_who","allow_asn_pre_advised","allow_deferred_capture","allow_receive_capture","continuous_serial_tracking","id","mod_when","mod_who","pick_episode_reassignment_mode","profile_mode","require_unique_global","serial_auto_increment","serial_parse_mode","serial_scope","serials_per_barcode","sku_id"],"title":"SkuSerialConfig","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"allow_asn_pre_advised":false,"allow_deferred_capture":false,"allow_receive_capture":false,"continuous_serial_tracking":false,"id":1,"mod_when":"<mod_when>","mod_who":1,"pick_episode_reassignment_mode":"<pick_episode_reassignment_mode>","profile_mode":"<profile_mode>","require_unique_global":false,"serial_auto_increment":false,"serial_parse_mode":"None","serial_scope":"<serial_scope>","serials_per_barcode":1,"sku_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_sku_serial_config":{"post":{"operationId":"count_sku_serial_config","summary":"Count sku_serial_config — CRUD.","description":"Count sku_serial_config — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"sku_serial_config","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_sku_serial_config"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_sku_serial_config"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_inventory_balance_serial":{"post":{"operationId":"get_inventory_balance_serial","summary":"Get a inventory_balance_serial by ID — CRUD.","description":"Get a inventory_balance_serial by ID — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"inventory_balance_serial","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_inventory_balance_serial"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_inventory_balance_serial","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"anomaly_flags":true,"capture_method":{"$ref":"#/components/schemas/SerialCaptureMethod"},"container_id":{"format":"int64","type":["integer","null"]},"customer_id":{"format":"int64","type":["integer","null"]},"damage_id":{"format":"int64","type":["integer","null"]},"disposal_reason":{"type":["string","null"]},"disposed_at":{"default":null,"type":["string","null"]},"has_planned_line":{"type":"boolean"},"hold_id":{"format":"int64","type":["integer","null"]},"id":{"format":"int64","type":"integer"},"last_moved_at":{"default":null,"type":["string","null"]},"last_moved_by":{"format":"int64","type":["integer","null"]},"location":{"type":["string","null"]},"lot":{"type":["string","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"owner_id":{"format":"int64","type":"integer"},"picked_via":{"format":"int64","type":["integer","null"]},"previous_status":{"anyOf":[{"$ref":"#/components/schemas/SerialStatus"},{"type":"null"}]},"received_at":{"type":"string"},"received_by":{"format":"int64","type":"integer"},"received_via":{"description":"`receipt_detail.id` of the line that captured it; `None` for a serial a count registered (`registered_via_count`).","format":"int64","type":["integer","null"]},"registered_via_adjustment":{"description":"The adjustment that registered one (adjustment spec Appendix D).","format":"int64","type":["integer","null"]},"registered_via_count":{"description":"The count task that registered a serial no receipt brought (count spec Appendix K).","format":"int64","type":["integer","null"]},"reserved_for":{"format":"int64","type":["integer","null"]},"return_via":{"format":"int64","type":["integer","null"]},"returned_at":{"default":null,"type":["string","null"]},"serial_format":{"type":["string","null"]},"serial_number":{"type":"string"},"shipped_at":{"default":null,"type":["string","null"]},"shipped_via":{"format":"int64","type":["integer","null"]},"sku_code":{"type":"string"},"status":{"$ref":"#/components/schemas/SerialStatus"}},"required":["add_when","add_who","capture_method","has_planned_line","id","mod_when","mod_who","owner_id","received_at","received_by","serial_number","sku_code","status"],"title":"InventoryBalanceSerial","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"capture_method":"Asn","has_planned_line":false,"id":1,"mod_when":"<mod_when>","mod_who":1,"owner_id":1,"received_at":"<received_at>","received_by":1,"serial_number":"<serial_number>","sku_code":"<sku_code>","status":"Active"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_inventory_balance_serial":{"post":{"operationId":"list_inventory_balance_serial","summary":"List inventory_balance_serial — CRUD.","description":"List inventory_balance_serial — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"inventory_balance_serial","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_inventory_balance_serial"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_inventory_balance_serial"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/InventoryBalanceSerial"},"title":"Array_of_InventoryBalanceSerial","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"capture_method":"Asn","has_planned_line":false,"id":1,"mod_when":"<mod_when>","mod_who":1,"owner_id":1,"received_at":"<received_at>","received_by":1,"serial_number":"<serial_number>","sku_code":"<sku_code>","status":"Active"}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_inventory_balance_serial":{"post":{"operationId":"count_inventory_balance_serial","summary":"Count inventory_balance_serial — CRUD.","description":"Count inventory_balance_serial — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"inventory_balance_serial","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_inventory_balance_serial"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_inventory_balance_serial"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#handling_unit_register":{"post":{"operationId":"handling_unit_register","summary":"Register N handling units of one type at a location and print their labels once.","description":"Register N handling units of one type at a location and print their labels once.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"handling_unit","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"handling_unit_register"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"asset_owner_kind":{"$ref":"#/components/schemas/AssetOwnerKind"},"count":{"format":"uint32","minimum":0,"type":"integer"},"handling_unit_type_id":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"},"location":{"type":"string"},"owner_id":{"default":null,"description":"Required with `Owner`, refused with `ThisWarehouse`.","format":"int64","type":["integer","null"]},"print":{"default":false,"type":"boolean"},"printer_id":{"default":null,"format":"int64","type":["integer","null"]}},"required":["asset_owner_kind","count","handling_unit_type_id","idempotency_key","location"],"title":"RegisterHandlingUnits","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"handling_unit_register","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"asset_owner_kind":"ThisWarehouse","count":1,"handling_unit_type_id":1,"location":"<location>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"containers":{"items":{"$ref":"#/components/schemas/RegisteredHandlingUnit"},"type":"array"},"handling_unit_type_id":{"format":"int64","type":"integer"}},"required":["containers","handling_unit_type_id"],"title":"RegisterHandlingUnitsResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"containers":[{"code":"<code>","container_id":1}],"handling_unit_type_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_handling_unit":{"post":{"operationId":"list_handling_unit","summary":"List registered handling units, filtered like any list (by type, status, location).","description":"List registered handling units, filtered like any list (by type, status, location).\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"handling_unit","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_handling_unit"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_handling_unit"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/Container"},"title":"Array_of_Container","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"code":"<code>","container_type":"Pallet","disposable":false,"id":1,"is_reusable":false,"mod_when":"<mod_when>","mod_who":1,"origin":"Receipt","owner_id":1,"status":"Active"}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#inventory_adjustment_create":{"post":{"operationId":"inventory_adjustment_create","summary":"Create a Draft inventory adjustment, optionally with its lines.","description":"Create a Draft inventory adjustment, optionally with its lines.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"inventory_adjustment","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"inventory_adjustment_create"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"adjustment_number":{"default":null,"description":"The number the new form already showed (its counter ran at New, as for receipts and orders); `None` = take the next one now.","type":["string","null"]},"comment":{"type":["string","null"]},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"lines":{"default":[],"items":{"$ref":"#/components/schemas/NewAdjustmentLine"},"type":"array"},"reason_code":{"type":"string"},"source_type":{"description":"`Manual` (default) or `Import`.","type":["string","null"]}},"required":["reason_code"],"title":"CreateInventoryAdjustment","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"inventory_adjustment_create","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"reason_code":"<reason_code>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"A document with its lines, as every command answers.","properties":{"has_invalid_lines":{"description":"Whether any line was judged Invalid — a validation that refused. The command went through and the document is Draft; the screen shows the [`summary`] as a warning, not as a success.","type":"boolean"},"header":{"$ref":"#/components/schemas/InventoryAdjustment"},"lines":{"items":{"$ref":"#/components/schemas/InventoryAdjustmentDetail"},"type":"array"},"needs_approval":{"description":"Whether a reason the document uses asks for approval before posting.","type":"boolean"},"summary":{"description":"Where the document stands, in words — what the screen says after a command. A refused validation names the lines and why ([`summary`]).","type":"string"}},"required":["has_invalid_lines","header","lines","needs_approval","summary"],"title":"InventoryAdjustmentView","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"has_invalid_lines":false,"header":{"add_when":"<add_when>","add_who":1,"adjustment_number":"<adjustment_number>","id":1,"mod_when":"<mod_when>","mod_who":1,"reason_code":"<reason_code>","source_type":"<source_type>","status":"Draft","version":1},"lines":[{"add_when":"<add_when>","add_who":1,"id":1,"inventory_adjustment_id":1,"line_no":1,"location":"<location>","lot":"<lot>","mod_when":"<mod_when>","mod_who":1,"owner_id":1,"pack_id":1,"sku_code":"<sku_code>","status":"Pending","target_mode":"Existing","target_qty":1.5,"uom":"<uom>","version":1}],"needs_approval":false,"summary":"<summary>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#inventory_adjustment_add_lines":{"post":{"operationId":"inventory_adjustment_add_lines","summary":"Add lines (identity + target quantity) to an unposted adjustment.","description":"Add lines (identity + target quantity) to an unposted adjustment.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"inventory_adjustment","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"inventory_adjustment_add_lines"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"adjustment_id":{"format":"int64","type":"integer"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"lines":{"items":{"$ref":"#/components/schemas/NewAdjustmentLine"},"type":"array"}},"required":["adjustment_id","lines"],"title":"AddInventoryAdjustmentLines","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"inventory_adjustment_add_lines","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"adjustment_id":1,"lines":[{"location":"<location>","lot":"<lot>","owner_id":1,"pack_id":1,"sku_code":"<sku_code>","target_qty":1.5,"uom":"<uom>"}]}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"A document with its lines, as every command answers.","properties":{"has_invalid_lines":{"description":"Whether any line was judged Invalid — a validation that refused. The command went through and the document is Draft; the screen shows the [`summary`] as a warning, not as a success.","type":"boolean"},"header":{"$ref":"#/components/schemas/InventoryAdjustment"},"lines":{"items":{"$ref":"#/components/schemas/InventoryAdjustmentDetail"},"type":"array"},"needs_approval":{"description":"Whether a reason the document uses asks for approval before posting.","type":"boolean"},"summary":{"description":"Where the document stands, in words — what the screen says after a command. A refused validation names the lines and why ([`summary`]).","type":"string"}},"required":["has_invalid_lines","header","lines","needs_approval","summary"],"title":"InventoryAdjustmentView","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"has_invalid_lines":false,"header":{"add_when":"<add_when>","add_who":1,"adjustment_number":"<adjustment_number>","id":1,"mod_when":"<mod_when>","mod_who":1,"reason_code":"<reason_code>","source_type":"<source_type>","status":"Draft","version":1},"lines":[{"add_when":"<add_when>","add_who":1,"id":1,"inventory_adjustment_id":1,"line_no":1,"location":"<location>","lot":"<lot>","mod_when":"<mod_when>","mod_who":1,"owner_id":1,"pack_id":1,"sku_code":"<sku_code>","status":"Pending","target_mode":"Existing","target_qty":1.5,"uom":"<uom>","version":1}],"needs_approval":false,"summary":"<summary>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#inventory_adjustment_add_line":{"post":{"operationId":"inventory_adjustment_add_line","summary":"Add one line from flat fields (container by code; pack and unit default to the SKU's).","description":"Add one line from flat fields (container by code; pack and unit default to the SKU's).\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"inventory_adjustment","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"inventory_adjustment_add_line"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"adjustment_id":{"format":"int64","type":"integer"},"comment":{"type":["string","null"]},"container_code":{"description":"The container's code (LPN); empty = loose stock.","type":["string","null"]},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"location":{"type":"string"},"lot":{"type":"string"},"owner_code":{"description":"The owner by its code — picked from the list or typed.","type":"string"},"pack_id":{"description":"Empty = the SKU's pack.","format":"int64","type":["integer","null"]},"reason_code":{"type":["string","null"]},"serials_in":{"default":null,"type":["string","null"]},"serials_out":{"default":null,"description":"A serial-tracked SKU's serials to write off and to add, as typed or scanned: one a line (Appendix D). Then the target follows from them.","type":["string","null"]},"sku_code":{"type":"string"},"target_qty":{"format":"double","type":"number"},"uom":{"description":"Empty = the SKU's default unit.","type":["string","null"]}},"required":["adjustment_id","location","lot","owner_code","sku_code","target_qty"],"title":"AddInventoryAdjustmentLine","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"inventory_adjustment_add_line","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"adjustment_id":1,"location":"<location>","lot":"<lot>","owner_code":"<owner_code>","sku_code":"<sku_code>","target_qty":1.5}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"A document with its lines, as every command answers.","properties":{"has_invalid_lines":{"description":"Whether any line was judged Invalid — a validation that refused. The command went through and the document is Draft; the screen shows the [`summary`] as a warning, not as a success.","type":"boolean"},"header":{"$ref":"#/components/schemas/InventoryAdjustment"},"lines":{"items":{"$ref":"#/components/schemas/InventoryAdjustmentDetail"},"type":"array"},"needs_approval":{"description":"Whether a reason the document uses asks for approval before posting.","type":"boolean"},"summary":{"description":"Where the document stands, in words — what the screen says after a command. A refused validation names the lines and why ([`summary`]).","type":"string"}},"required":["has_invalid_lines","header","lines","needs_approval","summary"],"title":"InventoryAdjustmentView","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"has_invalid_lines":false,"header":{"add_when":"<add_when>","add_who":1,"adjustment_number":"<adjustment_number>","id":1,"mod_when":"<mod_when>","mod_who":1,"reason_code":"<reason_code>","source_type":"<source_type>","status":"Draft","version":1},"lines":[{"add_when":"<add_when>","add_who":1,"id":1,"inventory_adjustment_id":1,"line_no":1,"location":"<location>","lot":"<lot>","mod_when":"<mod_when>","mod_who":1,"owner_id":1,"pack_id":1,"sku_code":"<sku_code>","status":"Pending","target_mode":"Existing","target_qty":1.5,"uom":"<uom>","version":1}],"needs_approval":false,"summary":"<summary>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#inventory_adjustment_generate_lines":{"post":{"operationId":"inventory_adjustment_generate_lines","summary":"Add a line, target = current quantity, for every stock row a filter names.","description":"Add a line, target = current quantity, for every stock row a filter names.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"inventory_adjustment","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"inventory_adjustment_generate_lines"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"adjustment_id":{"format":"int64","type":"integer"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"location":{"type":["string","null"]},"lot":{"type":["string","null"]},"owner_code":{"description":"The owner by its code.","type":["string","null"]},"sku_code":{"type":["string","null"]},"zone":{"description":"The location's put-away zone.","type":["string","null"]}},"required":["adjustment_id"],"title":"GenerateInventoryAdjustmentLines","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"inventory_adjustment_generate_lines","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"adjustment_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"A document with its lines, as every command answers.","properties":{"has_invalid_lines":{"description":"Whether any line was judged Invalid — a validation that refused. The command went through and the document is Draft; the screen shows the [`summary`] as a warning, not as a success.","type":"boolean"},"header":{"$ref":"#/components/schemas/InventoryAdjustment"},"lines":{"items":{"$ref":"#/components/schemas/InventoryAdjustmentDetail"},"type":"array"},"needs_approval":{"description":"Whether a reason the document uses asks for approval before posting.","type":"boolean"},"summary":{"description":"Where the document stands, in words — what the screen says after a command. A refused validation names the lines and why ([`summary`]).","type":"string"}},"required":["has_invalid_lines","header","lines","needs_approval","summary"],"title":"InventoryAdjustmentView","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"has_invalid_lines":false,"header":{"add_when":"<add_when>","add_who":1,"adjustment_number":"<adjustment_number>","id":1,"mod_when":"<mod_when>","mod_who":1,"reason_code":"<reason_code>","source_type":"<source_type>","status":"Draft","version":1},"lines":[{"add_when":"<add_when>","add_who":1,"id":1,"inventory_adjustment_id":1,"line_no":1,"location":"<location>","lot":"<lot>","mod_when":"<mod_when>","mod_who":1,"owner_id":1,"pack_id":1,"sku_code":"<sku_code>","status":"Pending","target_mode":"Existing","target_qty":1.5,"uom":"<uom>","version":1}],"needs_approval":false,"summary":"<summary>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#inventory_adjustment_update_line":{"post":{"operationId":"inventory_adjustment_update_line","summary":"Change one line's target quantity, reason or comment.","description":"Change one line's target quantity, reason or comment.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n**Versioned entities:** inventory_adjustment_detail (id in data.line_id, version in data.expected_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[{"entity":"inventory_adjustment_detail","id_field":"line_id","version_field":"expected_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"inventory_adjustment","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"inventory_adjustment_update_line"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"comment":{"type":["string","null"]},"expected_version":{"format":"int32","type":"integer"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"line_id":{"format":"int64","type":"integer"},"reason_code":{"description":"`None` = the document's reason.","type":["string","null"]},"serials_in":{"default":null,"items":{"type":"string"},"type":["array","null"]},"serials_out":{"default":null,"description":"A serial line's serials named again (Appendix D); `None` keeps the ones it names. A serial line's target follows its serials.","items":{"type":"string"},"type":["array","null"]},"target_qty":{"format":"double","type":"number"}},"required":["expected_version","line_id","target_qty"],"title":"UpdateInventoryAdjustmentLine","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"inventory_adjustment_update_line","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"expected_version":1,"line_id":1,"target_qty":1.5}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"A document with its lines, as every command answers.","properties":{"has_invalid_lines":{"description":"Whether any line was judged Invalid — a validation that refused. The command went through and the document is Draft; the screen shows the [`summary`] as a warning, not as a success.","type":"boolean"},"header":{"$ref":"#/components/schemas/InventoryAdjustment"},"lines":{"items":{"$ref":"#/components/schemas/InventoryAdjustmentDetail"},"type":"array"},"needs_approval":{"description":"Whether a reason the document uses asks for approval before posting.","type":"boolean"},"summary":{"description":"Where the document stands, in words — what the screen says after a command. A refused validation names the lines and why ([`summary`]).","type":"string"}},"required":["has_invalid_lines","header","lines","needs_approval","summary"],"title":"InventoryAdjustmentView","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"has_invalid_lines":false,"header":{"add_when":"<add_when>","add_who":1,"adjustment_number":"<adjustment_number>","id":1,"mod_when":"<mod_when>","mod_who":1,"reason_code":"<reason_code>","source_type":"<source_type>","status":"Draft","version":1},"lines":[{"add_when":"<add_when>","add_who":1,"id":1,"inventory_adjustment_id":1,"line_no":1,"location":"<location>","lot":"<lot>","mod_when":"<mod_when>","mod_who":1,"owner_id":1,"pack_id":1,"sku_code":"<sku_code>","status":"Pending","target_mode":"Existing","target_qty":1.5,"uom":"<uom>","version":1}],"needs_approval":false,"summary":"<summary>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#inventory_adjustment_remove_line":{"post":{"operationId":"inventory_adjustment_remove_line","summary":"Remove one line from an unposted adjustment.","description":"Remove one line from an unposted adjustment.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n**Versioned entities:** inventory_adjustment_detail (id in data.line_id, version in data.expected_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[{"entity":"inventory_adjustment_detail","id_field":"line_id","version_field":"expected_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"inventory_adjustment","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"inventory_adjustment_remove_line"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"expected_version":{"format":"int32","type":"integer"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"line_id":{"format":"int64","type":"integer"}},"required":["expected_version","line_id"],"title":"RemoveInventoryAdjustmentLine","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"inventory_adjustment_remove_line","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"expected_version":1,"line_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"A document with its lines, as every command answers.","properties":{"has_invalid_lines":{"description":"Whether any line was judged Invalid — a validation that refused. The command went through and the document is Draft; the screen shows the [`summary`] as a warning, not as a success.","type":"boolean"},"header":{"$ref":"#/components/schemas/InventoryAdjustment"},"lines":{"items":{"$ref":"#/components/schemas/InventoryAdjustmentDetail"},"type":"array"},"needs_approval":{"description":"Whether a reason the document uses asks for approval before posting.","type":"boolean"},"summary":{"description":"Where the document stands, in words — what the screen says after a command. A refused validation names the lines and why ([`summary`]).","type":"string"}},"required":["has_invalid_lines","header","lines","needs_approval","summary"],"title":"InventoryAdjustmentView","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"has_invalid_lines":false,"header":{"add_when":"<add_when>","add_who":1,"adjustment_number":"<adjustment_number>","id":1,"mod_when":"<mod_when>","mod_who":1,"reason_code":"<reason_code>","source_type":"<source_type>","status":"Draft","version":1},"lines":[{"add_when":"<add_when>","add_who":1,"id":1,"inventory_adjustment_id":1,"line_no":1,"location":"<location>","lot":"<lot>","mod_when":"<mod_when>","mod_who":1,"owner_id":1,"pack_id":1,"sku_code":"<sku_code>","status":"Pending","target_mode":"Existing","target_qty":1.5,"uom":"<uom>","version":1}],"needs_approval":false,"summary":"<summary>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#inventory_adjustment_validate":{"post":{"operationId":"inventory_adjustment_validate","summary":"Judge every line without changing stock; Validated when all pass.","description":"Judge every line without changing stock; Validated when all pass.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"inventory_adjustment","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"inventory_adjustment_validate"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"adjustment_id":{"format":"int64","type":"integer"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"}},"required":["adjustment_id"],"title":"ValidateInventoryAdjustment","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"inventory_adjustment_validate","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"adjustment_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"A document with its lines, as every command answers.","properties":{"has_invalid_lines":{"description":"Whether any line was judged Invalid — a validation that refused. The command went through and the document is Draft; the screen shows the [`summary`] as a warning, not as a success.","type":"boolean"},"header":{"$ref":"#/components/schemas/InventoryAdjustment"},"lines":{"items":{"$ref":"#/components/schemas/InventoryAdjustmentDetail"},"type":"array"},"needs_approval":{"description":"Whether a reason the document uses asks for approval before posting.","type":"boolean"},"summary":{"description":"Where the document stands, in words — what the screen says after a command. A refused validation names the lines and why ([`summary`]).","type":"string"}},"required":["has_invalid_lines","header","lines","needs_approval","summary"],"title":"InventoryAdjustmentView","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"has_invalid_lines":false,"header":{"add_when":"<add_when>","add_who":1,"adjustment_number":"<adjustment_number>","id":1,"mod_when":"<mod_when>","mod_who":1,"reason_code":"<reason_code>","source_type":"<source_type>","status":"Draft","version":1},"lines":[{"add_when":"<add_when>","add_who":1,"id":1,"inventory_adjustment_id":1,"line_no":1,"location":"<location>","lot":"<lot>","mod_when":"<mod_when>","mod_who":1,"owner_id":1,"pack_id":1,"sku_code":"<sku_code>","status":"Pending","target_mode":"Existing","target_qty":1.5,"uom":"<uom>","version":1}],"needs_approval":false,"summary":"<summary>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#inventory_adjustment_post":{"post":{"operationId":"inventory_adjustment_post","summary":"Post the adjustment: set every line's stock to its target, all or nothing. Refused while an open Hard inventory count is counting any line's location (LOCATION_BEING_COUNTED); context.pairs names the pair a shift lead's supervisor_override_grant must carry, and its id goes in override_grant_id. A count's own variance adjustment needs none.","description":"Post the adjustment: set every line's stock to its target, all or nothing. Refused while an open Hard inventory count is counting any line's location (LOCATION_BEING_COUNTED); context.pairs names the pair a shift lead's supervisor_override_grant must carry, and its id goes in override_grant_id. A count's own variance adjustment needs none.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n**Versioned entities:** inventory_adjustment (id in data.adjustment_id, version in data.expected_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[{"entity":"inventory_adjustment","id_field":"adjustment_id","version_field":"expected_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"inventory_adjustment","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"inventory_adjustment_post"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"adjustment_id":{"format":"int64","type":"integer"},"expected_version":{"format":"int32","type":"integer"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"override_grant_id":{"default":null,"description":"A shift lead's grant (`supervisor_override_grant`) authorising this posting into a location an open Hard count is counting (owner's decision 2026-10-21 §6). The SAME single-use grant the move and the receipt doors redeem — not a second mechanism. Absent on an ordinary posting, and absent when the count's own accept posts.","format":"uuid","type":["string","null"]}},"required":["adjustment_id","expected_version"],"title":"PostInventoryAdjustment","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"inventory_adjustment_post","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"adjustment_id":1,"expected_version":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"A document with its lines, as every command answers.","properties":{"has_invalid_lines":{"description":"Whether any line was judged Invalid — a validation that refused. The command went through and the document is Draft; the screen shows the [`summary`] as a warning, not as a success.","type":"boolean"},"header":{"$ref":"#/components/schemas/InventoryAdjustment"},"lines":{"items":{"$ref":"#/components/schemas/InventoryAdjustmentDetail"},"type":"array"},"needs_approval":{"description":"Whether a reason the document uses asks for approval before posting.","type":"boolean"},"summary":{"description":"Where the document stands, in words — what the screen says after a command. A refused validation names the lines and why ([`summary`]).","type":"string"}},"required":["has_invalid_lines","header","lines","needs_approval","summary"],"title":"InventoryAdjustmentView","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"has_invalid_lines":false,"header":{"add_when":"<add_when>","add_who":1,"adjustment_number":"<adjustment_number>","id":1,"mod_when":"<mod_when>","mod_who":1,"reason_code":"<reason_code>","source_type":"<source_type>","status":"Draft","version":1},"lines":[{"add_when":"<add_when>","add_who":1,"id":1,"inventory_adjustment_id":1,"line_no":1,"location":"<location>","lot":"<lot>","mod_when":"<mod_when>","mod_who":1,"owner_id":1,"pack_id":1,"sku_code":"<sku_code>","status":"Pending","target_mode":"Existing","target_qty":1.5,"uom":"<uom>","version":1}],"needs_approval":false,"summary":"<summary>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#inventory_adjustment_reverse":{"post":{"operationId":"inventory_adjustment_reverse","summary":"Make a Draft that sets a posted adjustment's stock back (target = ledger before).","description":"Make a Draft that sets a posted adjustment's stock back (target = ledger before).\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"inventory_adjustment","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"inventory_adjustment_reverse"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"adjustment_id":{"description":"The posted document to reverse.","format":"int64","type":"integer"},"comment":{"description":"Why it is reversed. Optional here: the reversal's reason requires a comment, so validation refuses the reversal until its header says why — written on the new document's own header form.","type":["string","null"]},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"}},"required":["adjustment_id"],"title":"ReverseInventoryAdjustment","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"inventory_adjustment_reverse","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"adjustment_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"A document with its lines, as every command answers.","properties":{"has_invalid_lines":{"description":"Whether any line was judged Invalid — a validation that refused. The command went through and the document is Draft; the screen shows the [`summary`] as a warning, not as a success.","type":"boolean"},"header":{"$ref":"#/components/schemas/InventoryAdjustment"},"lines":{"items":{"$ref":"#/components/schemas/InventoryAdjustmentDetail"},"type":"array"},"needs_approval":{"description":"Whether a reason the document uses asks for approval before posting.","type":"boolean"},"summary":{"description":"Where the document stands, in words — what the screen says after a command. A refused validation names the lines and why ([`summary`]).","type":"string"}},"required":["has_invalid_lines","header","lines","needs_approval","summary"],"title":"InventoryAdjustmentView","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"has_invalid_lines":false,"header":{"add_when":"<add_when>","add_who":1,"adjustment_number":"<adjustment_number>","id":1,"mod_when":"<mod_when>","mod_who":1,"reason_code":"<reason_code>","source_type":"<source_type>","status":"Draft","version":1},"lines":[{"add_when":"<add_when>","add_who":1,"id":1,"inventory_adjustment_id":1,"line_no":1,"location":"<location>","lot":"<lot>","mod_when":"<mod_when>","mod_who":1,"owner_id":1,"pack_id":1,"sku_code":"<sku_code>","status":"Pending","target_mode":"Existing","target_qty":1.5,"uom":"<uom>","version":1}],"needs_approval":false,"summary":"<summary>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#inventory_adjustment_delete":{"post":{"operationId":"inventory_adjustment_delete","summary":"Delete an adjustment that was never posted, with its lines.","description":"Delete an adjustment that was never posted, with its lines.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n**Versioned entities:** inventory_adjustment (id in data.adjustment_id, version in data.expected_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[{"entity":"inventory_adjustment","id_field":"adjustment_id","version_field":"expected_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"inventory_adjustment","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"inventory_adjustment_delete"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"adjustment_id":{"format":"int64","type":"integer"},"expected_version":{"format":"int32","type":"integer"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"}},"required":["adjustment_id","expected_version"],"title":"DeleteInventoryAdjustment","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"inventory_adjustment_delete","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"adjustment_id":1,"expected_version":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"What was removed, for the answer.","properties":{"adjustment_number":{"type":"string"},"id":{"format":"int64","type":"integer"}},"required":["adjustment_number","id"],"title":"DeletedInventoryAdjustment","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"adjustment_number":"<adjustment_number>","id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#create_inventory_adjustment":{"post":{"operationId":"create_inventory_adjustment","summary":"Create a Draft inventory adjustment from its header form (reason, comment).","description":"Create a Draft inventory adjustment from its header form (reason, comment).\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog does not say whether this method needs an idempotency key.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"inventory_adjustment","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"create_inventory_adjustment"},"params":{"type":"object","properties":{"data":{"description":"What the header form sends on create.","properties":{"adjustment_number":{"default":null,"description":"What the new form showed: `generic_new` drew it from the counter.","type":["string","null"]},"comment":{"type":["string","null"]},"reason_code":{"type":"string"}},"required":["reason_code"],"title":"HeaderFormNew","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"create_inventory_adjustment","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"reason_code":"<reason_code>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"The document's header flat, with whether it needs approval — what a card form loads (`generic_rpc_form_load` stores the answer as the record, so the header's columns must sit at the top).","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"adjustment_number":{"type":"string"},"approved_at":{"default":null,"type":["string","null"]},"approved_by":{"format":"int64","type":["integer","null"]},"comment":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"lines_editable":{"description":"Whether lines may be added, changed or removed now — not posted, and not a reversal, whose lines are the original's set back.","type":"boolean"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"needs_approval":{"type":"boolean"},"postable":{"description":"Whether Post would be accepted now (validated, and approved when a reason asks) — the command's own rule, so Post greys exactly when the server would refuse it.","type":"boolean"},"posted_at":{"default":null,"type":["string","null"]},"posted_by":{"format":"int64","type":["integer","null"]},"reason_code":{"type":"string"},"reversal_of_adjustment_id":{"format":"int64","type":["integer","null"]},"reversal_of_number":{"description":"The document this one reverses, by number (the audit link, §18).","type":["string","null"]},"reversed_by_number":{"description":"The document that reverses this one, by number.","type":["string","null"]},"reversible":{"description":"Whether Reverse would be accepted now — the same rule the command applies, so the screen greys the button exactly when the server would refuse it.","type":"boolean"},"source_id":{"format":"int64","type":["integer","null"]},"source_type":{"type":"string"},"status":{"$ref":"#/components/schemas/InventoryAdjustmentStatus"},"validatable":{"description":"Whether Validate would be accepted now — a Draft or a Validated document; an approved one keeps its approval.","type":"boolean"},"validated_at":{"default":null,"type":["string","null"]},"validated_by":{"format":"int64","type":["integer","null"]},"version":{"format":"int32","type":"integer"}},"required":["add_when","add_who","adjustment_number","id","lines_editable","mod_when","mod_who","needs_approval","postable","reason_code","reversible","source_type","status","validatable","version"],"title":"InventoryAdjustmentCard","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"adjustment_number":"<adjustment_number>","id":1,"lines_editable":false,"mod_when":"<mod_when>","mod_who":1,"needs_approval":false,"postable":false,"reason_code":"<reason_code>","reversible":false,"source_type":"<source_type>","status":"Draft","validatable":false,"version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#update_inventory_adjustment":{"post":{"operationId":"update_inventory_adjustment","summary":"Save an adjustment's header form: reason and comment, on the version read.","description":"Save an adjustment's header form: reason and comment, on the version read.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n**Versioned entities:** inventory_adjustment (id in data.id, version in data.expected_version).\n\n\n**Notes**\n\n- The catalog does not say whether this method needs an idempotency key.\n- Send the current version of the row in `expected_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[{"entity":"inventory_adjustment","id_field":"id","version_field":"expected_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"inventory_adjustment","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"update_inventory_adjustment"},"params":{"type":"object","properties":{"meta":{"type":"object","description":"Control-plane envelope supplied by the platform."},"data":{"properties":{"data":{"description":"What the header form sends on save: only what changed.","properties":{"comment":{"type":["string","null"]},"reason_code":{"type":["string","null"]}},"title":"HeaderFormChange","type":"object"},"expected_version":{"format":"int32","type":"integer"},"id":{"format":"int64","type":"integer"}},"required":["id","expected_version","data"],"type":"object","description":"Versioned update payload."}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"update_inventory_adjustment","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"id":1,"expected_version":1,"data":{"comment":"<comment>","reason_code":"<reason_code>"}}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"The document's header flat, with whether it needs approval — what a card form loads (`generic_rpc_form_load` stores the answer as the record, so the header's columns must sit at the top).","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"adjustment_number":{"type":"string"},"approved_at":{"default":null,"type":["string","null"]},"approved_by":{"format":"int64","type":["integer","null"]},"comment":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"lines_editable":{"description":"Whether lines may be added, changed or removed now — not posted, and not a reversal, whose lines are the original's set back.","type":"boolean"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"needs_approval":{"type":"boolean"},"postable":{"description":"Whether Post would be accepted now (validated, and approved when a reason asks) — the command's own rule, so Post greys exactly when the server would refuse it.","type":"boolean"},"posted_at":{"default":null,"type":["string","null"]},"posted_by":{"format":"int64","type":["integer","null"]},"reason_code":{"type":"string"},"reversal_of_adjustment_id":{"format":"int64","type":["integer","null"]},"reversal_of_number":{"description":"The document this one reverses, by number (the audit link, §18).","type":["string","null"]},"reversed_by_number":{"description":"The document that reverses this one, by number.","type":["string","null"]},"reversible":{"description":"Whether Reverse would be accepted now — the same rule the command applies, so the screen greys the button exactly when the server would refuse it.","type":"boolean"},"source_id":{"format":"int64","type":["integer","null"]},"source_type":{"type":"string"},"status":{"$ref":"#/components/schemas/InventoryAdjustmentStatus"},"validatable":{"description":"Whether Validate would be accepted now — a Draft or a Validated document; an approved one keeps its approval.","type":"boolean"},"validated_at":{"default":null,"type":["string","null"]},"validated_by":{"format":"int64","type":["integer","null"]},"version":{"format":"int32","type":"integer"}},"required":["add_when","add_who","adjustment_number","id","lines_editable","mod_when","mod_who","needs_approval","postable","reason_code","reversible","source_type","status","validatable","version"],"title":"InventoryAdjustmentCard","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"adjustment_number":"<adjustment_number>","id":1,"lines_editable":false,"mod_when":"<mod_when>","mod_who":1,"needs_approval":false,"postable":false,"reason_code":"<reason_code>","reversible":false,"source_type":"<source_type>","status":"Draft","validatable":false,"version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#create_inventory_adjustment_line":{"post":{"operationId":"create_inventory_adjustment_line","summary":"Add a line from the line form: owner, SKU, lot, location, container picked or typed.","description":"Add a line from the line form: owner, SKU, lot, location, container picked or typed.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog does not say whether this method needs an idempotency key.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"inventory_adjustment","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"create_inventory_adjustment_line"},"params":{"type":"object","properties":{"data":{"description":"What the line form sends on create. The document comes from the parent record (`generic_new`'s parent FK); owner, SKU, lot, location and container are picked or typed.","properties":{"comment":{"type":["string","null"]},"container_code":{"type":["string","null"]},"inventory_adjustment_id":{"format":"int64","type":"integer"},"location":{"type":"string"},"lot":{"type":"string"},"owner_code":{"type":"string"},"reason_code":{"type":["string","null"]},"serials_in":{"default":null,"type":["string","null"]},"serials_out":{"default":null,"description":"Serials to write off and to add, one a line.","type":["string","null"]},"sku_code":{"type":"string"},"target_qty":{"default":null,"description":"Required, except on a line that names serials: its target follows from them (Appendix D).","format":"double","type":["number","null"]}},"required":["inventory_adjustment_id","location","lot","owner_code","sku_code"],"title":"LineFormNew","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"create_inventory_adjustment_line","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"inventory_adjustment_id":1,"location":"<location>","lot":"<lot>","owner_code":"<owner_code>","sku_code":"<sku_code>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"A line as its form shows it: the line flat, with the owner and the container by code — what the pickers hold.","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"comment":{"type":["string","null"]},"container_code":{"type":["string","null"]},"container_id":{"format":"int64","type":["integer","null"]},"error_code":{"type":["string","null"]},"error_message":{"type":["string","null"]},"error_spoken":{"description":"The same refusal as `{template, args}` (wms-app 107), said in the reader's language when the line is read."},"expected_qty":{"description":"What the identity held when the stock was observed — set only by an inventory count (wms-app 056). POST refuses the line when the stock no longer holds it: the observation is about THAT stock, and applying its target over later movements would erase them.","format":"double","type":["number","null"]},"id":{"format":"int64","type":"integer"},"inventory_adjustment_id":{"format":"int64","type":"integer"},"line_no":{"format":"int32","type":"integer"},"location":{"type":"string"},"lot":{"type":"string"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"owner_code":{"type":["string","null"]},"owner_id":{"format":"int64","type":"integer"},"pack_id":{"format":"int64","type":"integer"},"reason_code":{"type":["string","null"]},"serials_in":{"type":["string","null"]},"serials_out":{"description":"The serials the line writes off and adds, one a line (Appendix D).","type":["string","null"]},"sku_code":{"type":"string"},"status":{"$ref":"#/components/schemas/InventoryAdjustmentLineStatus"},"target_mode":{"$ref":"#/components/schemas/InventoryAdjustmentTargetMode"},"target_qty":{"format":"double","type":"number"},"transaction_log_code":{"type":["string","null"]},"uom":{"type":"string"},"version":{"format":"int32","type":"integer"}},"required":["add_when","add_who","id","inventory_adjustment_id","line_no","location","lot","mod_when","mod_who","owner_id","pack_id","sku_code","status","target_mode","target_qty","uom","version"],"title":"AdjustmentLineCard","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"id":1,"inventory_adjustment_id":1,"line_no":1,"location":"<location>","lot":"<lot>","mod_when":"<mod_when>","mod_who":1,"owner_id":1,"pack_id":1,"sku_code":"<sku_code>","status":"Pending","target_mode":"Existing","target_qty":1.5,"uom":"<uom>","version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#update_inventory_adjustment_line":{"post":{"operationId":"update_inventory_adjustment_line","summary":"Save a line form: target, reason, comment, on the line's version read.","description":"Save a line form: target, reason, comment, on the line's version read.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n**Versioned entities:** inventory_adjustment_detail (id in data.id, version in data.expected_version).\n\n\n**Notes**\n\n- The catalog does not say whether this method needs an idempotency key.\n- Send the current version of the row in `expected_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[{"entity":"inventory_adjustment_detail","id_field":"id","version_field":"expected_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"inventory_adjustment","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"update_inventory_adjustment_line"},"params":{"type":"object","properties":{"meta":{"type":"object","description":"Control-plane envelope supplied by the platform."},"data":{"properties":{"data":{"description":"What the line form sends on save: only what changed. The identity never changes (§5.2).","properties":{"comment":{"type":["string","null"]},"reason_code":{"type":["string","null"]},"serials_in":{"default":null,"type":["string","null"]},"serials_out":{"default":null,"type":["string","null"]},"target_qty":{"format":"double","type":["number","null"]}},"title":"LineFormChange","type":"object"},"expected_version":{"format":"int32","type":"integer"},"id":{"format":"int64","type":"integer"}},"required":["id","expected_version","data"],"type":"object","description":"Versioned update payload."}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"update_inventory_adjustment_line","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"id":1,"expected_version":1,"data":{"comment":"<comment>","reason_code":"<reason_code>","serials_in":"<serials_in>"}}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"A line as its form shows it: the line flat, with the owner and the container by code — what the pickers hold.","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"comment":{"type":["string","null"]},"container_code":{"type":["string","null"]},"container_id":{"format":"int64","type":["integer","null"]},"error_code":{"type":["string","null"]},"error_message":{"type":["string","null"]},"error_spoken":{"description":"The same refusal as `{template, args}` (wms-app 107), said in the reader's language when the line is read."},"expected_qty":{"description":"What the identity held when the stock was observed — set only by an inventory count (wms-app 056). POST refuses the line when the stock no longer holds it: the observation is about THAT stock, and applying its target over later movements would erase them.","format":"double","type":["number","null"]},"id":{"format":"int64","type":"integer"},"inventory_adjustment_id":{"format":"int64","type":"integer"},"line_no":{"format":"int32","type":"integer"},"location":{"type":"string"},"lot":{"type":"string"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"owner_code":{"type":["string","null"]},"owner_id":{"format":"int64","type":"integer"},"pack_id":{"format":"int64","type":"integer"},"reason_code":{"type":["string","null"]},"serials_in":{"type":["string","null"]},"serials_out":{"description":"The serials the line writes off and adds, one a line (Appendix D).","type":["string","null"]},"sku_code":{"type":"string"},"status":{"$ref":"#/components/schemas/InventoryAdjustmentLineStatus"},"target_mode":{"$ref":"#/components/schemas/InventoryAdjustmentTargetMode"},"target_qty":{"format":"double","type":"number"},"transaction_log_code":{"type":["string","null"]},"uom":{"type":"string"},"version":{"format":"int32","type":"integer"}},"required":["add_when","add_who","id","inventory_adjustment_id","line_no","location","lot","mod_when","mod_who","owner_id","pack_id","sku_code","status","target_mode","target_qty","uom","version"],"title":"AdjustmentLineCard","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"id":1,"inventory_adjustment_id":1,"line_no":1,"location":"<location>","lot":"<lot>","mod_when":"<mod_when>","mod_who":1,"owner_id":1,"pack_id":1,"sku_code":"<sku_code>","status":"Pending","target_mode":"Existing","target_qty":1.5,"uom":"<uom>","version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#inventory_adjustment_approve":{"post":{"operationId":"inventory_adjustment_approve","summary":"Approve a validated adjustment whose reason requires approval.","description":"Approve a validated adjustment whose reason requires approval.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n**Versioned entities:** inventory_adjustment (id in data.adjustment_id, version in data.expected_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[{"entity":"inventory_adjustment","id_field":"adjustment_id","version_field":"expected_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"inventory_adjustment","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"inventory_adjustment_approve"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"adjustment_id":{"format":"int64","type":"integer"},"expected_version":{"format":"int32","type":"integer"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"}},"required":["adjustment_id","expected_version"],"title":"ApproveInventoryAdjustment","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"inventory_adjustment_approve","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"adjustment_id":1,"expected_version":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"A document with its lines, as every command answers.","properties":{"has_invalid_lines":{"description":"Whether any line was judged Invalid — a validation that refused. The command went through and the document is Draft; the screen shows the [`summary`] as a warning, not as a success.","type":"boolean"},"header":{"$ref":"#/components/schemas/InventoryAdjustment"},"lines":{"items":{"$ref":"#/components/schemas/InventoryAdjustmentDetail"},"type":"array"},"needs_approval":{"description":"Whether a reason the document uses asks for approval before posting.","type":"boolean"},"summary":{"description":"Where the document stands, in words — what the screen says after a command. A refused validation names the lines and why ([`summary`]).","type":"string"}},"required":["has_invalid_lines","header","lines","needs_approval","summary"],"title":"InventoryAdjustmentView","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"has_invalid_lines":false,"header":{"add_when":"<add_when>","add_who":1,"adjustment_number":"<adjustment_number>","id":1,"mod_when":"<mod_when>","mod_who":1,"reason_code":"<reason_code>","source_type":"<source_type>","status":"Draft","version":1},"lines":[{"add_when":"<add_when>","add_who":1,"id":1,"inventory_adjustment_id":1,"line_no":1,"location":"<location>","lot":"<lot>","mod_when":"<mod_when>","mod_who":1,"owner_id":1,"pack_id":1,"sku_code":"<sku_code>","status":"Pending","target_mode":"Existing","target_qty":1.5,"uom":"<uom>","version":1}],"needs_approval":false,"summary":"<summary>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#inventory_adjust_reason_set_count":{"post":{"operationId":"inventory_adjust_reason_set_count","summary":"Set whether posting an adjustment with this reason counts the locations it changed.","description":"Set whether posting an adjustment with this reason counts the locations it changed.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"inventory_adjustment","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"inventory_adjust_reason_set_count"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"count_after_post":{"type":"boolean"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"reason_code":{"type":"string"}},"required":["count_after_post","reason_code"],"title":"SetReasonCountAfterPost","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"inventory_adjust_reason_set_count","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"count_after_post":false,"reason_code":"<reason_code>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"count_after_post":{"type":"boolean"},"reason_code":{"type":"string"}},"required":["count_after_post","reason_code"],"title":"ReasonCountAfterPostSet","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"count_after_post":false,"reason_code":"<reason_code>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#inventory_adjustment_get":{"post":{"operationId":"inventory_adjustment_get","summary":"Get one inventory adjustment with its lines.","description":"Get one inventory adjustment with its lines.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"inventory_adjustment","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"inventory_adjustment_get"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"inventory_adjustment_get","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"A document with its lines, as every command answers.","properties":{"has_invalid_lines":{"description":"Whether any line was judged Invalid — a validation that refused. The command went through and the document is Draft; the screen shows the [`summary`] as a warning, not as a success.","type":"boolean"},"header":{"$ref":"#/components/schemas/InventoryAdjustment"},"lines":{"items":{"$ref":"#/components/schemas/InventoryAdjustmentDetail"},"type":"array"},"needs_approval":{"description":"Whether a reason the document uses asks for approval before posting.","type":"boolean"},"summary":{"description":"Where the document stands, in words — what the screen says after a command. A refused validation names the lines and why ([`summary`]).","type":"string"}},"required":["has_invalid_lines","header","lines","needs_approval","summary"],"title":"InventoryAdjustmentView","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"has_invalid_lines":false,"header":{"add_when":"<add_when>","add_who":1,"adjustment_number":"<adjustment_number>","id":1,"mod_when":"<mod_when>","mod_who":1,"reason_code":"<reason_code>","source_type":"<source_type>","status":"Draft","version":1},"lines":[{"add_when":"<add_when>","add_who":1,"id":1,"inventory_adjustment_id":1,"line_no":1,"location":"<location>","lot":"<lot>","mod_when":"<mod_when>","mod_who":1,"owner_id":1,"pack_id":1,"sku_code":"<sku_code>","status":"Pending","target_mode":"Existing","target_qty":1.5,"uom":"<uom>","version":1}],"needs_approval":false,"summary":"<summary>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#inventory_adjustment_list":{"post":{"operationId":"inventory_adjustment_list","summary":"List inventory adjustments, filtered like any list (by status, reason, number).","description":"List inventory adjustments, filtered like any list (by status, reason, number).\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"inventory_adjustment","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"inventory_adjustment_list"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"inventory_adjustment_list"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/InventoryAdjustment"},"title":"Array_of_InventoryAdjustment","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"adjustment_number":"<adjustment_number>","id":1,"mod_when":"<mod_when>","mod_who":1,"reason_code":"<reason_code>","source_type":"<source_type>","status":"Draft","version":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#inventory_adjustment_list_lines":{"post":{"operationId":"inventory_adjustment_list_lines","summary":"List adjustment lines, filtered like any list (by adjustment, status, SKU).","description":"List adjustment lines, filtered like any list (by adjustment, status, SKU).\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"inventory_adjustment","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"inventory_adjustment_list_lines"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"inventory_adjustment_list_lines"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/InventoryAdjustmentDetail"},"title":"Array_of_InventoryAdjustmentDetail","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"id":1,"inventory_adjustment_id":1,"line_no":1,"location":"<location>","lot":"<lot>","mod_when":"<mod_when>","mod_who":1,"owner_id":1,"pack_id":1,"sku_code":"<sku_code>","status":"Pending","target_mode":"Existing","target_qty":1.5,"uom":"<uom>","version":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#inventory_adjustment_card_get":{"post":{"operationId":"inventory_adjustment_card_get","summary":"Get one inventory adjustment's header, flat, with whether it needs approval.","description":"Get one inventory adjustment's header, flat, with whether it needs approval.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"inventory_adjustment","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"inventory_adjustment_card_get"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"inventory_adjustment_card_get","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"The document's header flat, with whether it needs approval — what a card form loads (`generic_rpc_form_load` stores the answer as the record, so the header's columns must sit at the top).","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"adjustment_number":{"type":"string"},"approved_at":{"default":null,"type":["string","null"]},"approved_by":{"format":"int64","type":["integer","null"]},"comment":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"lines_editable":{"description":"Whether lines may be added, changed or removed now — not posted, and not a reversal, whose lines are the original's set back.","type":"boolean"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"needs_approval":{"type":"boolean"},"postable":{"description":"Whether Post would be accepted now (validated, and approved when a reason asks) — the command's own rule, so Post greys exactly when the server would refuse it.","type":"boolean"},"posted_at":{"default":null,"type":["string","null"]},"posted_by":{"format":"int64","type":["integer","null"]},"reason_code":{"type":"string"},"reversal_of_adjustment_id":{"format":"int64","type":["integer","null"]},"reversal_of_number":{"description":"The document this one reverses, by number (the audit link, §18).","type":["string","null"]},"reversed_by_number":{"description":"The document that reverses this one, by number.","type":["string","null"]},"reversible":{"description":"Whether Reverse would be accepted now — the same rule the command applies, so the screen greys the button exactly when the server would refuse it.","type":"boolean"},"source_id":{"format":"int64","type":["integer","null"]},"source_type":{"type":"string"},"status":{"$ref":"#/components/schemas/InventoryAdjustmentStatus"},"validatable":{"description":"Whether Validate would be accepted now — a Draft or a Validated document; an approved one keeps its approval.","type":"boolean"},"validated_at":{"default":null,"type":["string","null"]},"validated_by":{"format":"int64","type":["integer","null"]},"version":{"format":"int32","type":"integer"}},"required":["add_when","add_who","adjustment_number","id","lines_editable","mod_when","mod_who","needs_approval","postable","reason_code","reversible","source_type","status","validatable","version"],"title":"InventoryAdjustmentCard","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"adjustment_number":"<adjustment_number>","id":1,"lines_editable":false,"mod_when":"<mod_when>","mod_who":1,"needs_approval":false,"postable":false,"reason_code":"<reason_code>","reversible":false,"source_type":"<source_type>","status":"Draft","validatable":false,"version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#inventory_adjustment_line_preview_list":{"post":{"operationId":"inventory_adjustment_line_preview_list","summary":"List adjustment lines with the live current/effect forecast or the posted effect.","description":"List adjustment lines with the live current/effect forecast or the posted effect.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"inventory_adjustment","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"inventory_adjustment_line_preview_list"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"inventory_adjustment_line_preview_list"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/AdjustmentLinePreview"},"title":"Array_of_AdjustmentLinePreview","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"id":1,"inventory_adjustment_id":1,"line_no":1,"location":"<location>","lot":"<lot>","owner_id":1,"pack_id":1,"sku_code":"<sku_code>","status":"Pending","target_mode":"Existing","target_qty":1.5,"uom":"<uom>","version":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_inventory_adjustment_line":{"post":{"operationId":"get_inventory_adjustment_line","summary":"Get one adjustment line as its form shows it (owner and container by code).","description":"Get one adjustment line as its form shows it (owner and container by code).\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"inventory_adjustment","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_inventory_adjustment_line"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_inventory_adjustment_line","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"A line as its form shows it: the line flat, with the owner and the container by code — what the pickers hold.","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"comment":{"type":["string","null"]},"container_code":{"type":["string","null"]},"container_id":{"format":"int64","type":["integer","null"]},"error_code":{"type":["string","null"]},"error_message":{"type":["string","null"]},"error_spoken":{"description":"The same refusal as `{template, args}` (wms-app 107), said in the reader's language when the line is read."},"expected_qty":{"description":"What the identity held when the stock was observed — set only by an inventory count (wms-app 056). POST refuses the line when the stock no longer holds it: the observation is about THAT stock, and applying its target over later movements would erase them.","format":"double","type":["number","null"]},"id":{"format":"int64","type":"integer"},"inventory_adjustment_id":{"format":"int64","type":"integer"},"line_no":{"format":"int32","type":"integer"},"location":{"type":"string"},"lot":{"type":"string"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"owner_code":{"type":["string","null"]},"owner_id":{"format":"int64","type":"integer"},"pack_id":{"format":"int64","type":"integer"},"reason_code":{"type":["string","null"]},"serials_in":{"type":["string","null"]},"serials_out":{"description":"The serials the line writes off and adds, one a line (Appendix D).","type":["string","null"]},"sku_code":{"type":"string"},"status":{"$ref":"#/components/schemas/InventoryAdjustmentLineStatus"},"target_mode":{"$ref":"#/components/schemas/InventoryAdjustmentTargetMode"},"target_qty":{"format":"double","type":"number"},"transaction_log_code":{"type":["string","null"]},"uom":{"type":"string"},"version":{"format":"int32","type":"integer"}},"required":["add_when","add_who","id","inventory_adjustment_id","line_no","location","lot","mod_when","mod_who","owner_id","pack_id","sku_code","status","target_mode","target_qty","uom","version"],"title":"AdjustmentLineCard","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"id":1,"inventory_adjustment_id":1,"line_no":1,"location":"<location>","lot":"<lot>","mod_when":"<mod_when>","mod_who":1,"owner_id":1,"pack_id":1,"sku_code":"<sku_code>","status":"Pending","target_mode":"Existing","target_qty":1.5,"uom":"<uom>","version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#inventory_adjust_reason_list":{"post":{"operationId":"inventory_adjust_reason_list","summary":"List the inventory adjustment reasons with their policy, retired ones too (or the one an id names).","description":"List the inventory adjustment reasons with their policy, retired ones too (or the one an id names).\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"inventory_adjustment","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"inventory_adjust_reason_list"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"inventory_adjust_reason_list"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/AdjustReasonRow"},"title":"Array_of_AdjustReasonRow","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"active":false,"allow_negative":false,"allow_positive":false,"code":"<code>","count_after_post":false,"description":"<description>","id":1,"requires_approval":false,"requires_comment":false}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#inventory_count_task_take_next":{"post":{"operationId":"inventory_count_task_take_next","summary":"Give the counter their next location to count: in the work area named, or across the areas they may count in.","description":"Give the counter their next location to count: in the work area named, or across the areas they may count in.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"inventory_count","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"inventory_count_task_take_next"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"work_area_code":{"default":null,"description":"The work area scanned; blank or absent — the whole warehouse.","type":["string","null"]}},"title":"TakeNextCountLocation","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"inventory_count_task_take_next","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"work_area_code":"<work_area_code>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"One location's count, as the counter and the supervisor see it.","properties":{"count_mode":{"$ref":"#/components/schemas/InventoryCountMode"},"count_number":{"type":"string"},"count_only":{"description":"What the counter counts here, in words, when it is not the whole location — a count of the item (Appendix G): \"SKU A; lot L1\". No quantity: the count stays blind.","type":["string","null"]},"expected":{"description":"The stock the location is counted against — `None` while a blind count is being counted (spec §8, AC-03).","items":{"$ref":"#/components/schemas/InventoryCountSnapshot"},"type":["array","null"]},"observations":{"description":"What the counter recorded, voided rows included (history, spec §29).","items":{"$ref":"#/components/schemas/InventoryCountObservation"},"type":"array"},"results":{"description":"What completing the task found; empty until it is counted.","items":{"$ref":"#/components/schemas/InventoryCountResult"},"type":"array"},"stock_moved_under_count":{"description":"A shift lead let an operation move stock under this count while it was frozen (owner's decision 2026-10-21 §6, `inventory_count_disturbance`). The counter is told because their number is then in doubt — the point of recording the override at all. Always `false` for a `Soft` count, which freezes nothing and so is never overridden.","type":"boolean"},"system_stock":{"description":"What the system holds here now, for the counter of an `Informed` count's first attempt while it is counted (count spec §8); `None` otherwise. A soft count's movements since its snapshot included.","items":{"$ref":"#/components/schemas/SystemStockLine"},"type":["array","null"]},"task":{"$ref":"#/components/schemas/InventoryCountTask"}},"required":["count_mode","count_number","observations","results","stock_moved_under_count","task"],"title":"CountTaskView","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"count_mode":"Blind","count_number":"<count_number>","observations":[{"add_when":"<add_when>","add_who":1,"id":1,"inventory_count_task_id":1,"lot":"<lot>","observed_qty":1.5,"owner_id":1,"pack_id":1,"sku_code":"<sku_code>","uom":"<uom>"}],"results":[{"expected_qty":1.5,"id":1,"inventory_count_task_id":1,"lot":"<lot>","movement_qty":1.5,"observed_qty":1.5,"owner_id":1,"pack_id":1,"result_type":"Match","sku_code":"<sku_code>","uom":"<uom>"}],"stock_moved_under_count":false,"task":{"add_when":"<add_when>","add_who":1,"attempt_no":1,"empty_confirmed":false,"id":1,"inventory_count_id":1,"location":"<location>","mod_when":"<mod_when>","mod_who":1,"snapshot_at":"<snapshot_at>","status":"Open","version":1}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#inventory_count_task_at_location":{"post":{"operationId":"inventory_count_task_at_location","summary":"The counter is at the location given to them: scanning it starts (or resumes) its count.","description":"The counter is at the location given to them: scanning it starts (or resumes) its count.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"inventory_count","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"inventory_count_task_at_location"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"location":{"description":"The location scanned.","type":"string"}},"required":["location"],"title":"ConfirmCountLocation","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"inventory_count_task_at_location","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"location":"<location>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"One location's count, as the counter and the supervisor see it.","properties":{"count_mode":{"$ref":"#/components/schemas/InventoryCountMode"},"count_number":{"type":"string"},"count_only":{"description":"What the counter counts here, in words, when it is not the whole location — a count of the item (Appendix G): \"SKU A; lot L1\". No quantity: the count stays blind.","type":["string","null"]},"expected":{"description":"The stock the location is counted against — `None` while a blind count is being counted (spec §8, AC-03).","items":{"$ref":"#/components/schemas/InventoryCountSnapshot"},"type":["array","null"]},"observations":{"description":"What the counter recorded, voided rows included (history, spec §29).","items":{"$ref":"#/components/schemas/InventoryCountObservation"},"type":"array"},"results":{"description":"What completing the task found; empty until it is counted.","items":{"$ref":"#/components/schemas/InventoryCountResult"},"type":"array"},"stock_moved_under_count":{"description":"A shift lead let an operation move stock under this count while it was frozen (owner's decision 2026-10-21 §6, `inventory_count_disturbance`). The counter is told because their number is then in doubt — the point of recording the override at all. Always `false` for a `Soft` count, which freezes nothing and so is never overridden.","type":"boolean"},"system_stock":{"description":"What the system holds here now, for the counter of an `Informed` count's first attempt while it is counted (count spec §8); `None` otherwise. A soft count's movements since its snapshot included.","items":{"$ref":"#/components/schemas/SystemStockLine"},"type":["array","null"]},"task":{"$ref":"#/components/schemas/InventoryCountTask"}},"required":["count_mode","count_number","observations","results","stock_moved_under_count","task"],"title":"CountTaskView","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"count_mode":"Blind","count_number":"<count_number>","observations":[{"add_when":"<add_when>","add_who":1,"id":1,"inventory_count_task_id":1,"lot":"<lot>","observed_qty":1.5,"owner_id":1,"pack_id":1,"sku_code":"<sku_code>","uom":"<uom>"}],"results":[{"expected_qty":1.5,"id":1,"inventory_count_task_id":1,"lot":"<lot>","movement_qty":1.5,"observed_qty":1.5,"owner_id":1,"pack_id":1,"result_type":"Match","sku_code":"<sku_code>","uom":"<uom>"}],"stock_moved_under_count":false,"task":{"add_when":"<add_when>","add_who":1,"attempt_no":1,"empty_confirmed":false,"id":1,"inventory_count_id":1,"location":"<location>","mod_when":"<mod_when>","mod_who":1,"snapshot_at":"<snapshot_at>","status":"Open","version":1}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#inventory_count_task_leave":{"post":{"operationId":"inventory_count_task_leave","summary":"Leave the location being counted for later: it goes back to the pool.","description":"Leave the location being counted for later: it goes back to the pool.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"inventory_count","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"inventory_count_task_leave"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"task_id":{"format":"int64","type":"integer"}},"required":["task_id"],"title":"LeaveCountLocation","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"inventory_count_task_leave","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"task_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"The location left, in words.","properties":{"location":{"type":"string"},"message":{"type":"string"},"task_id":{"format":"int64","type":"integer"}},"required":["location","message","task_id"],"title":"CountLocationLeft","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"location":"<location>","message":"<message>","task_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#inventory_count_observe":{"post":{"operationId":"inventory_count_observe","summary":"Record stock found in the location being counted (SKU, lot, quantity).","description":"Record stock found in the location being counted (SKU, lot, quantity).\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"inventory_count","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"inventory_count_observe"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"description":"What the counter scanned. A SKU code, a lot and a quantity are enough on the floor: the owner is needed only when several owners stock the code, pack and unit default to the SKU's, a container is named by its LPN.","properties":{"container_code":{"default":null,"type":["string","null"]},"container_id":{"default":null,"description":"The container by id or by code (LPN); both empty = loose stock.","format":"int64","type":["integer","null"]},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"lot":{"type":"string"},"owner_code":{"default":null,"type":["string","null"]},"owner_id":{"default":null,"description":"The owner by id or by code; empty = the only owner of the SKU code.","format":"int64","type":["integer","null"]},"pack_id":{"default":null,"description":"Empty = the SKU's pack.","format":"int64","type":["integer","null"]},"qty":{"format":"double","type":"number"},"serials":{"default":[],"description":"The serials scanned — required for a serial-tracked SKU (then `qty` is their number), refused for any other.","items":{"type":"string"},"type":"array"},"sku_code":{"type":"string"},"task_id":{"format":"int64","type":"integer"},"uom":{"default":null,"description":"Empty = the SKU's default unit.","type":["string","null"]}},"required":["lot","qty","sku_code","task_id"],"title":"RecordCountObservation","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"inventory_count_observe","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"lot":"<lot>","qty":1.5,"sku_code":"<sku_code>","task_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"One location's count, as the counter and the supervisor see it.","properties":{"count_mode":{"$ref":"#/components/schemas/InventoryCountMode"},"count_number":{"type":"string"},"count_only":{"description":"What the counter counts here, in words, when it is not the whole location — a count of the item (Appendix G): \"SKU A; lot L1\". No quantity: the count stays blind.","type":["string","null"]},"expected":{"description":"The stock the location is counted against — `None` while a blind count is being counted (spec §8, AC-03).","items":{"$ref":"#/components/schemas/InventoryCountSnapshot"},"type":["array","null"]},"observations":{"description":"What the counter recorded, voided rows included (history, spec §29).","items":{"$ref":"#/components/schemas/InventoryCountObservation"},"type":"array"},"results":{"description":"What completing the task found; empty until it is counted.","items":{"$ref":"#/components/schemas/InventoryCountResult"},"type":"array"},"stock_moved_under_count":{"description":"A shift lead let an operation move stock under this count while it was frozen (owner's decision 2026-10-21 §6, `inventory_count_disturbance`). The counter is told because their number is then in doubt — the point of recording the override at all. Always `false` for a `Soft` count, which freezes nothing and so is never overridden.","type":"boolean"},"system_stock":{"description":"What the system holds here now, for the counter of an `Informed` count's first attempt while it is counted (count spec §8); `None` otherwise. A soft count's movements since its snapshot included.","items":{"$ref":"#/components/schemas/SystemStockLine"},"type":["array","null"]},"task":{"$ref":"#/components/schemas/InventoryCountTask"}},"required":["count_mode","count_number","observations","results","stock_moved_under_count","task"],"title":"CountTaskView","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"count_mode":"Blind","count_number":"<count_number>","observations":[{"add_when":"<add_when>","add_who":1,"id":1,"inventory_count_task_id":1,"lot":"<lot>","observed_qty":1.5,"owner_id":1,"pack_id":1,"sku_code":"<sku_code>","uom":"<uom>"}],"results":[{"expected_qty":1.5,"id":1,"inventory_count_task_id":1,"lot":"<lot>","movement_qty":1.5,"observed_qty":1.5,"owner_id":1,"pack_id":1,"result_type":"Match","sku_code":"<sku_code>","uom":"<uom>"}],"stock_moved_under_count":false,"task":{"add_when":"<add_when>","add_who":1,"attempt_no":1,"empty_confirmed":false,"id":1,"inventory_count_id":1,"location":"<location>","mod_when":"<mod_when>","mod_who":1,"snapshot_at":"<snapshot_at>","status":"Open","version":1}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#inventory_count_void_observation":{"post":{"operationId":"inventory_count_void_observation","summary":"Take back one recorded entry of the location being counted.","description":"Take back one recorded entry of the location being counted.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"inventory_count","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"inventory_count_void_observation"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"observation_id":{"format":"int64","type":"integer"},"task_id":{"format":"int64","type":"integer"}},"required":["observation_id","task_id"],"title":"VoidCountObservation","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"inventory_count_void_observation","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"observation_id":1,"task_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"One location's count, as the counter and the supervisor see it.","properties":{"count_mode":{"$ref":"#/components/schemas/InventoryCountMode"},"count_number":{"type":"string"},"count_only":{"description":"What the counter counts here, in words, when it is not the whole location — a count of the item (Appendix G): \"SKU A; lot L1\". No quantity: the count stays blind.","type":["string","null"]},"expected":{"description":"The stock the location is counted against — `None` while a blind count is being counted (spec §8, AC-03).","items":{"$ref":"#/components/schemas/InventoryCountSnapshot"},"type":["array","null"]},"observations":{"description":"What the counter recorded, voided rows included (history, spec §29).","items":{"$ref":"#/components/schemas/InventoryCountObservation"},"type":"array"},"results":{"description":"What completing the task found; empty until it is counted.","items":{"$ref":"#/components/schemas/InventoryCountResult"},"type":"array"},"stock_moved_under_count":{"description":"A shift lead let an operation move stock under this count while it was frozen (owner's decision 2026-10-21 §6, `inventory_count_disturbance`). The counter is told because their number is then in doubt — the point of recording the override at all. Always `false` for a `Soft` count, which freezes nothing and so is never overridden.","type":"boolean"},"system_stock":{"description":"What the system holds here now, for the counter of an `Informed` count's first attempt while it is counted (count spec §8); `None` otherwise. A soft count's movements since its snapshot included.","items":{"$ref":"#/components/schemas/SystemStockLine"},"type":["array","null"]},"task":{"$ref":"#/components/schemas/InventoryCountTask"}},"required":["count_mode","count_number","observations","results","stock_moved_under_count","task"],"title":"CountTaskView","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"count_mode":"Blind","count_number":"<count_number>","observations":[{"add_when":"<add_when>","add_who":1,"id":1,"inventory_count_task_id":1,"lot":"<lot>","observed_qty":1.5,"owner_id":1,"pack_id":1,"sku_code":"<sku_code>","uom":"<uom>"}],"results":[{"expected_qty":1.5,"id":1,"inventory_count_task_id":1,"lot":"<lot>","movement_qty":1.5,"observed_qty":1.5,"owner_id":1,"pack_id":1,"result_type":"Match","sku_code":"<sku_code>","uom":"<uom>"}],"stock_moved_under_count":false,"task":{"add_when":"<add_when>","add_who":1,"attempt_no":1,"empty_confirmed":false,"id":1,"inventory_count_id":1,"location":"<location>","mod_when":"<mod_when>","mod_who":1,"snapshot_at":"<snapshot_at>","status":"Open","version":1}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#inventory_count_confirm_empty":{"post":{"operationId":"inventory_count_confirm_empty","summary":"Confirm the location being counted holds nothing.","description":"Confirm the location being counted holds nothing.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"inventory_count","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"inventory_count_confirm_empty"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"task_id":{"format":"int64","type":"integer"}},"required":["task_id"],"title":"ConfirmCountLocationEmpty","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"inventory_count_confirm_empty","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"task_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"One location's count, as the counter and the supervisor see it.","properties":{"count_mode":{"$ref":"#/components/schemas/InventoryCountMode"},"count_number":{"type":"string"},"count_only":{"description":"What the counter counts here, in words, when it is not the whole location — a count of the item (Appendix G): \"SKU A; lot L1\". No quantity: the count stays blind.","type":["string","null"]},"expected":{"description":"The stock the location is counted against — `None` while a blind count is being counted (spec §8, AC-03).","items":{"$ref":"#/components/schemas/InventoryCountSnapshot"},"type":["array","null"]},"observations":{"description":"What the counter recorded, voided rows included (history, spec §29).","items":{"$ref":"#/components/schemas/InventoryCountObservation"},"type":"array"},"results":{"description":"What completing the task found; empty until it is counted.","items":{"$ref":"#/components/schemas/InventoryCountResult"},"type":"array"},"stock_moved_under_count":{"description":"A shift lead let an operation move stock under this count while it was frozen (owner's decision 2026-10-21 §6, `inventory_count_disturbance`). The counter is told because their number is then in doubt — the point of recording the override at all. Always `false` for a `Soft` count, which freezes nothing and so is never overridden.","type":"boolean"},"system_stock":{"description":"What the system holds here now, for the counter of an `Informed` count's first attempt while it is counted (count spec §8); `None` otherwise. A soft count's movements since its snapshot included.","items":{"$ref":"#/components/schemas/SystemStockLine"},"type":["array","null"]},"task":{"$ref":"#/components/schemas/InventoryCountTask"}},"required":["count_mode","count_number","observations","results","stock_moved_under_count","task"],"title":"CountTaskView","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"count_mode":"Blind","count_number":"<count_number>","observations":[{"add_when":"<add_when>","add_who":1,"id":1,"inventory_count_task_id":1,"lot":"<lot>","observed_qty":1.5,"owner_id":1,"pack_id":1,"sku_code":"<sku_code>","uom":"<uom>"}],"results":[{"expected_qty":1.5,"id":1,"inventory_count_task_id":1,"lot":"<lot>","movement_qty":1.5,"observed_qty":1.5,"owner_id":1,"pack_id":1,"result_type":"Match","sku_code":"<sku_code>","uom":"<uom>"}],"stock_moved_under_count":false,"task":{"add_when":"<add_when>","add_who":1,"attempt_no":1,"empty_confirmed":false,"id":1,"inventory_count_id":1,"location":"<location>","mod_when":"<mod_when>","mod_who":1,"snapshot_at":"<snapshot_at>","status":"Open","version":1}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#inventory_count_complete":{"post":{"operationId":"inventory_count_complete","summary":"Finish counting a location: compare with its snapshot; close it or leave a variance.","description":"Finish counting a location: compare with its snapshot; close it or leave a variance.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"inventory_count","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"inventory_count_complete"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"task_id":{"format":"int64","type":"integer"}},"required":["task_id"],"title":"CompleteCountTask","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"inventory_count_complete","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"task_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"One location's count, as the counter and the supervisor see it.","properties":{"count_mode":{"$ref":"#/components/schemas/InventoryCountMode"},"count_number":{"type":"string"},"count_only":{"description":"What the counter counts here, in words, when it is not the whole location — a count of the item (Appendix G): \"SKU A; lot L1\". No quantity: the count stays blind.","type":["string","null"]},"expected":{"description":"The stock the location is counted against — `None` while a blind count is being counted (spec §8, AC-03).","items":{"$ref":"#/components/schemas/InventoryCountSnapshot"},"type":["array","null"]},"observations":{"description":"What the counter recorded, voided rows included (history, spec §29).","items":{"$ref":"#/components/schemas/InventoryCountObservation"},"type":"array"},"results":{"description":"What completing the task found; empty until it is counted.","items":{"$ref":"#/components/schemas/InventoryCountResult"},"type":"array"},"stock_moved_under_count":{"description":"A shift lead let an operation move stock under this count while it was frozen (owner's decision 2026-10-21 §6, `inventory_count_disturbance`). The counter is told because their number is then in doubt — the point of recording the override at all. Always `false` for a `Soft` count, which freezes nothing and so is never overridden.","type":"boolean"},"system_stock":{"description":"What the system holds here now, for the counter of an `Informed` count's first attempt while it is counted (count spec §8); `None` otherwise. A soft count's movements since its snapshot included.","items":{"$ref":"#/components/schemas/SystemStockLine"},"type":["array","null"]},"task":{"$ref":"#/components/schemas/InventoryCountTask"}},"required":["count_mode","count_number","observations","results","stock_moved_under_count","task"],"title":"CountTaskView","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"count_mode":"Blind","count_number":"<count_number>","observations":[{"add_when":"<add_when>","add_who":1,"id":1,"inventory_count_task_id":1,"lot":"<lot>","observed_qty":1.5,"owner_id":1,"pack_id":1,"sku_code":"<sku_code>","uom":"<uom>"}],"results":[{"expected_qty":1.5,"id":1,"inventory_count_task_id":1,"lot":"<lot>","movement_qty":1.5,"observed_qty":1.5,"owner_id":1,"pack_id":1,"result_type":"Match","sku_code":"<sku_code>","uom":"<uom>"}],"stock_moved_under_count":false,"task":{"add_when":"<add_when>","add_who":1,"attempt_no":1,"empty_confirmed":false,"id":1,"inventory_count_id":1,"location":"<location>","mod_when":"<mod_when>","mod_who":1,"snapshot_at":"<snapshot_at>","status":"Open","version":1}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#location_confirm_empty":{"post":{"operationId":"location_confirm_empty","summary":"Answer whether a location is empty, where an operation asked: kept as evidence; an answer the stock contradicts asks for a count.","description":"Answer whether a location is empty, where an operation asked: kept as evidence; an answer the stock contradicts asks for a count.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"inventory_count","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"location_confirm_empty"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"empty":{"description":"`true` — the operator sees nothing there; `false` — stock is left.","type":"boolean"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"location":{"type":"string"},"source_id":{"default":null,"description":"The operation that asked: the pick for `PickCommit`, the move's first `transaction_log` row for `Move`.","format":"int64","type":["integer","null"]},"source_type":{"$ref":"#/components/schemas/EvidenceSource"}},"required":["empty","location","source_type"],"title":"ConfirmLocationEmpty","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"location_confirm_empty","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"empty":false,"location":"<location>","source_type":"PickCommit"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"What the answer amounted to.","properties":{"count_requested":{"description":"The answer and the stock disagree: the location will be counted.","type":"boolean"},"evidence_id":{"description":"The evidence kept; `None` when the answer said nothing worth keeping (\"not empty\" where the stock holds something).","format":"int64","type":["integer","null"]},"kind":{"anyOf":[{"$ref":"#/components/schemas/LocationEvidenceKind"},{"type":"null"}]},"location":{"type":"string"}},"required":["count_requested","location"],"title":"LocationEmptyAnswer","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"count_requested":false,"location":"<location>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#location_report_unexpected":{"post":{"operationId":"location_report_unexpected","summary":"Report stock the system does not show at a location: kept as evidence, and the location is counted.","description":"Report stock the system does not show at a location: kept as evidence, and the location is counted.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"inventory_count","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"location_report_unexpected"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"location":{"type":"string"},"lpn":{"default":null,"description":"The LPN the operator sees there, as scanned.","type":["string","null"]},"note":{"default":null,"description":"Anything else they want to say.","type":["string","null"]},"sku":{"default":null,"description":"The SKU the operator sees there.","type":["string","null"]}},"required":["location"],"title":"ReportUnexpectedStock","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"location_report_unexpected","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"location":"<location>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"What the report came to.","properties":{"count_requested":{"description":"Always true: a report always asks for the location to be counted.","type":"boolean"},"evidence_id":{"format":"int64","type":"integer"},"location":{"type":"string"},"system_qty":{"description":"What the stock held at the location when the report came.","format":"double","type":"number"}},"required":["count_requested","evidence_id","location","system_qty"],"title":"UnexpectedStockReport","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"count_requested":false,"evidence_id":1,"location":"<location>","system_qty":1.5}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#inventory_count_create":{"post":{"operationId":"inventory_count_create","summary":"Start a selective count of locations: freeze them and snapshot their stock.","description":"Start a selective count of locations: freeze them and snapshot their stock.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"inventory_count","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"inventory_count_create"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"comment":{"default":null,"type":["string","null"]},"count_mode":{"anyOf":[{"$ref":"#/components/schemas/InventoryCountMode"},{"type":"null"}],"default":null,"description":"`Blind` (default): the counter does not see the system quantity."},"count_number":{"default":null,"description":"The number the new form already showed (its counter ran at New, as for adjustments); `None` = take the next one now.","type":["string","null"]},"freeze_mode":{"anyOf":[{"$ref":"#/components/schemas/InventoryCountFreeze"},{"type":"null"}],"default":null,"description":"`Hard` (default): the locations are frozen while they are counted. `Soft`: stock keeps moving; the count expects the snapshot plus what moved after it (count spec Appendix F)."},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"locations":{"description":"The locations to count, by code. An entry may name several, separated by commas, semicolons or white space — what a person types into one field of a form.","items":{"type":"string"},"type":"array"},"max_recounts":{"default":null,"description":"How many times one location may be recounted (default 2, at most [`MAX_RECOUNTS_CEILING`]; 0 = never).","format":"int16","type":["integer","null"]},"recount_by_other_counter":{"default":null,"description":"A recount must be counted by somebody else (default `true`).","type":["boolean","null"]}},"required":["locations"],"title":"CreateInventoryCount","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"inventory_count_create","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"locations":["<locations>"]}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"A count with its tasks, as the count-level commands answer.","properties":{"header":{"$ref":"#/components/schemas/InventoryCount"},"summary":{"description":"Where the count stands, in words.","type":"string"},"tasks":{"items":{"$ref":"#/components/schemas/InventoryCountTask"},"type":"array"}},"required":["header","summary","tasks"],"title":"InventoryCountView","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"header":{"add_when":"<add_when>","add_who":1,"count_mode":"Blind","count_number":"<count_number>","count_type":"Full","freeze_mode":"Hard","id":1,"item_containers":[1],"item_lots":["<item_lots>"],"item_skus":["<item_skus>"],"max_recounts":1,"mod_when":"<mod_when>","mod_who":1,"recount_by_other_counter":false,"scope_mode":"LocationFull","source_type":"<source_type>","status":"Open","version":1},"summary":"<summary>","tasks":[{"add_when":"<add_when>","add_who":1,"attempt_no":1,"empty_confirmed":false,"id":1,"inventory_count_id":1,"location":"<location>","mod_when":"<mod_when>","mod_who":1,"snapshot_at":"<snapshot_at>","status":"Open","version":1}]}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#inventory_count_add_locations":{"post":{"operationId":"inventory_count_add_locations","summary":"Add locations to an open count — by code, or every countable one of zones: freeze and snapshot them.","description":"Add locations to an open count — by code, or every countable one of zones: freeze and snapshot them.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"inventory_count","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"inventory_count_add_locations"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"count_id":{"format":"int64","type":"integer"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"locations":{"default":[],"description":"Location codes; an entry may name several, separated by commas, semicolons or white space — what a picker of several values sends.","items":{"type":"string"},"type":"array"},"zones":{"default":[],"description":"Putaway zones, written the same way: every countable location of each.","items":{"type":"string"},"type":"array"}},"required":["count_id"],"title":"AddCountLocations","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"inventory_count_add_locations","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"count_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"What was added, and what was passed over.","properties":{"added":{"description":"The locations now counted, sorted.","items":{"type":"string"},"type":"array"},"count_id":{"format":"int64","type":"integer"},"count_number":{"type":"string"},"message":{"description":"The outcome, in words.","type":"string"},"skipped":{"description":"Locations of the zones left out (blocked, under another operation or counted elsewhere) and those this count already held, sorted.","items":{"type":"string"},"type":"array"}},"required":["added","count_id","count_number","message","skipped"],"title":"CountLocationsAdded","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"added":["<added>"],"count_id":1,"count_number":"<count_number>","message":"<message>","skipped":["<skipped>"]}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#inventory_count_remove_location":{"post":{"operationId":"inventory_count_remove_location","summary":"Take a location nobody counted off a count; it thaws.","description":"Take a location nobody counted off a count; it thaws.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n**Versioned entities:** inventory_count_task (id in data.task_id, version in data.expected_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[{"entity":"inventory_count_task","id_field":"task_id","version_field":"expected_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"inventory_count","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"inventory_count_remove_location"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"expected_version":{"format":"int32","type":"integer"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"task_id":{"format":"int64","type":"integer"}},"required":["expected_version","task_id"],"title":"RemoveCountLocation","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"inventory_count_remove_location","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"expected_version":1,"task_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"A count with its tasks, as the count-level commands answer.","properties":{"header":{"$ref":"#/components/schemas/InventoryCount"},"summary":{"description":"Where the count stands, in words.","type":"string"},"tasks":{"items":{"$ref":"#/components/schemas/InventoryCountTask"},"type":"array"}},"required":["header","summary","tasks"],"title":"InventoryCountView","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"header":{"add_when":"<add_when>","add_who":1,"count_mode":"Blind","count_number":"<count_number>","count_type":"Full","freeze_mode":"Hard","id":1,"item_containers":[1],"item_lots":["<item_lots>"],"item_skus":["<item_skus>"],"max_recounts":1,"mod_when":"<mod_when>","mod_who":1,"recount_by_other_counter":false,"scope_mode":"LocationFull","source_type":"<source_type>","status":"Open","version":1},"summary":"<summary>","tasks":[{"add_when":"<add_when>","add_who":1,"attempt_no":1,"empty_confirmed":false,"id":1,"inventory_count_id":1,"location":"<location>","mod_when":"<mod_when>","mod_who":1,"snapshot_at":"<snapshot_at>","status":"Open","version":1}]}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#inventory_count_accept":{"post":{"operationId":"inventory_count_accept","summary":"Accept a location's variance with its cause: post an adjustment to what was counted.","description":"Accept a location's variance with its cause: post an adjustment to what was counted.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n**Versioned entities:** inventory_count_task (id in data.task_id, version in data.expected_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[{"entity":"inventory_count_task","id_field":"task_id","version_field":"expected_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"inventory_count","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"inventory_count_accept"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"cause_code":{"default":null,"description":"Why the count differs: a code of the list `count_variance_cause` (ADR-093 D2, required from a person).","type":["string","null"]},"comment":{"default":null,"description":"What the supervisor adds to the cause.","type":["string","null"]},"expected_version":{"format":"int32","type":"integer"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"task_id":{"format":"int64","type":"integer"}},"required":["expected_version","task_id"],"title":"AcceptCountVariance","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"inventory_count_accept","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"expected_version":1,"task_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"One location's count, as the counter and the supervisor see it.","properties":{"count_mode":{"$ref":"#/components/schemas/InventoryCountMode"},"count_number":{"type":"string"},"count_only":{"description":"What the counter counts here, in words, when it is not the whole location — a count of the item (Appendix G): \"SKU A; lot L1\". No quantity: the count stays blind.","type":["string","null"]},"expected":{"description":"The stock the location is counted against — `None` while a blind count is being counted (spec §8, AC-03).","items":{"$ref":"#/components/schemas/InventoryCountSnapshot"},"type":["array","null"]},"observations":{"description":"What the counter recorded, voided rows included (history, spec §29).","items":{"$ref":"#/components/schemas/InventoryCountObservation"},"type":"array"},"results":{"description":"What completing the task found; empty until it is counted.","items":{"$ref":"#/components/schemas/InventoryCountResult"},"type":"array"},"stock_moved_under_count":{"description":"A shift lead let an operation move stock under this count while it was frozen (owner's decision 2026-10-21 §6, `inventory_count_disturbance`). The counter is told because their number is then in doubt — the point of recording the override at all. Always `false` for a `Soft` count, which freezes nothing and so is never overridden.","type":"boolean"},"system_stock":{"description":"What the system holds here now, for the counter of an `Informed` count's first attempt while it is counted (count spec §8); `None` otherwise. A soft count's movements since its snapshot included.","items":{"$ref":"#/components/schemas/SystemStockLine"},"type":["array","null"]},"task":{"$ref":"#/components/schemas/InventoryCountTask"}},"required":["count_mode","count_number","observations","results","stock_moved_under_count","task"],"title":"CountTaskView","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"count_mode":"Blind","count_number":"<count_number>","observations":[{"add_when":"<add_when>","add_who":1,"id":1,"inventory_count_task_id":1,"lot":"<lot>","observed_qty":1.5,"owner_id":1,"pack_id":1,"sku_code":"<sku_code>","uom":"<uom>"}],"results":[{"expected_qty":1.5,"id":1,"inventory_count_task_id":1,"lot":"<lot>","movement_qty":1.5,"observed_qty":1.5,"owner_id":1,"pack_id":1,"result_type":"Match","sku_code":"<sku_code>","uom":"<uom>"}],"stock_moved_under_count":false,"task":{"add_when":"<add_when>","add_who":1,"attempt_no":1,"empty_confirmed":false,"id":1,"inventory_count_id":1,"location":"<location>","mod_when":"<mod_when>","mod_who":1,"snapshot_at":"<snapshot_at>","status":"Open","version":1}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#inventory_count_recount":{"post":{"operationId":"inventory_count_recount","summary":"Have a location with a variance counted again, as a new attempt.","description":"Have a location with a variance counted again, as a new attempt.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n**Versioned entities:** inventory_count_task (id in data.task_id, version in data.expected_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[{"entity":"inventory_count_task","id_field":"task_id","version_field":"expected_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"inventory_count","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"inventory_count_recount"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"expected_version":{"format":"int32","type":"integer"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"task_id":{"format":"int64","type":"integer"}},"required":["expected_version","task_id"],"title":"RecountCountTask","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"inventory_count_recount","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"expected_version":1,"task_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"One location's count, as the counter and the supervisor see it.","properties":{"count_mode":{"$ref":"#/components/schemas/InventoryCountMode"},"count_number":{"type":"string"},"count_only":{"description":"What the counter counts here, in words, when it is not the whole location — a count of the item (Appendix G): \"SKU A; lot L1\". No quantity: the count stays blind.","type":["string","null"]},"expected":{"description":"The stock the location is counted against — `None` while a blind count is being counted (spec §8, AC-03).","items":{"$ref":"#/components/schemas/InventoryCountSnapshot"},"type":["array","null"]},"observations":{"description":"What the counter recorded, voided rows included (history, spec §29).","items":{"$ref":"#/components/schemas/InventoryCountObservation"},"type":"array"},"results":{"description":"What completing the task found; empty until it is counted.","items":{"$ref":"#/components/schemas/InventoryCountResult"},"type":"array"},"stock_moved_under_count":{"description":"A shift lead let an operation move stock under this count while it was frozen (owner's decision 2026-10-21 §6, `inventory_count_disturbance`). The counter is told because their number is then in doubt — the point of recording the override at all. Always `false` for a `Soft` count, which freezes nothing and so is never overridden.","type":"boolean"},"system_stock":{"description":"What the system holds here now, for the counter of an `Informed` count's first attempt while it is counted (count spec §8); `None` otherwise. A soft count's movements since its snapshot included.","items":{"$ref":"#/components/schemas/SystemStockLine"},"type":["array","null"]},"task":{"$ref":"#/components/schemas/InventoryCountTask"}},"required":["count_mode","count_number","observations","results","stock_moved_under_count","task"],"title":"CountTaskView","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"count_mode":"Blind","count_number":"<count_number>","observations":[{"add_when":"<add_when>","add_who":1,"id":1,"inventory_count_task_id":1,"lot":"<lot>","observed_qty":1.5,"owner_id":1,"pack_id":1,"sku_code":"<sku_code>","uom":"<uom>"}],"results":[{"expected_qty":1.5,"id":1,"inventory_count_task_id":1,"lot":"<lot>","movement_qty":1.5,"observed_qty":1.5,"owner_id":1,"pack_id":1,"result_type":"Match","sku_code":"<sku_code>","uom":"<uom>"}],"stock_moved_under_count":false,"task":{"add_when":"<add_when>","add_who":1,"attempt_no":1,"empty_confirmed":false,"id":1,"inventory_count_id":1,"location":"<location>","mod_when":"<mod_when>","mod_who":1,"snapshot_at":"<snapshot_at>","status":"Open","version":1}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#inventory_count_cancel":{"post":{"operationId":"inventory_count_cancel","summary":"Cancel a count: its live locations thaw, nothing is adjusted.","description":"Cancel a count: its live locations thaw, nothing is adjusted.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n**Versioned entities:** inventory_count (id in data.count_id, version in data.expected_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[{"entity":"inventory_count","id_field":"count_id","version_field":"expected_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"inventory_count","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"inventory_count_cancel"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"count_id":{"format":"int64","type":"integer"},"expected_version":{"format":"int32","type":"integer"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"}},"required":["count_id","expected_version"],"title":"CancelInventoryCount","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"inventory_count_cancel","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"count_id":1,"expected_version":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"A count with its tasks, as the count-level commands answer.","properties":{"header":{"$ref":"#/components/schemas/InventoryCount"},"summary":{"description":"Where the count stands, in words.","type":"string"},"tasks":{"items":{"$ref":"#/components/schemas/InventoryCountTask"},"type":"array"}},"required":["header","summary","tasks"],"title":"InventoryCountView","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"header":{"add_when":"<add_when>","add_who":1,"count_mode":"Blind","count_number":"<count_number>","count_type":"Full","freeze_mode":"Hard","id":1,"item_containers":[1],"item_lots":["<item_lots>"],"item_skus":["<item_skus>"],"max_recounts":1,"mod_when":"<mod_when>","mod_who":1,"recount_by_other_counter":false,"scope_mode":"LocationFull","source_type":"<source_type>","status":"Open","version":1},"summary":"<summary>","tasks":[{"add_when":"<add_when>","add_who":1,"attempt_no":1,"empty_confirmed":false,"id":1,"inventory_count_id":1,"location":"<location>","mod_when":"<mod_when>","mod_who":1,"snapshot_at":"<snapshot_at>","status":"Open","version":1}]}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#inventory_count_delete":{"post":{"operationId":"inventory_count_delete","summary":"Delete a count nothing was counted in; its locations thaw.","description":"Delete a count nothing was counted in; its locations thaw.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n**Versioned entities:** inventory_count (id in data.count_id, version in data.expected_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[{"entity":"inventory_count","id_field":"count_id","version_field":"expected_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"inventory_count","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"inventory_count_delete"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"count_id":{"format":"int64","type":"integer"},"expected_version":{"format":"int32","type":"integer"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"}},"required":["count_id","expected_version"],"title":"DeleteInventoryCount","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"inventory_count_delete","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"count_id":1,"expected_version":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"cancelled_at":{"default":null,"type":["string","null"]},"closed_at":{"default":null,"type":["string","null"]},"comment":{"type":["string","null"]},"count_mode":{"$ref":"#/components/schemas/InventoryCountMode"},"count_number":{"type":"string"},"count_type":{"$ref":"#/components/schemas/InventoryCountType"},"freeze_mode":{"$ref":"#/components/schemas/InventoryCountFreeze"},"id":{"format":"int64","type":"integer"},"item_containers":{"items":{"format":"int64","type":"integer"},"type":"array"},"item_lots":{"items":{"type":"string"},"type":"array"},"item_skus":{"description":"The count's item (Appendix G): an empty list is \"not named\".","items":{"type":"string"},"type":"array"},"max_recounts":{"description":"How many times one location may be recounted (attempts = 1 + this).","format":"int16","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"recount_by_other_counter":{"type":"boolean"},"scope_mode":{"$ref":"#/components/schemas/InventoryCountScope"},"source_id":{"format":"int64","type":["integer","null"]},"source_type":{"type":"string"},"status":{"$ref":"#/components/schemas/InventoryCountStatus"},"version":{"format":"int32","type":"integer"}},"required":["add_when","add_who","count_mode","count_number","count_type","freeze_mode","id","item_containers","item_lots","item_skus","max_recounts","mod_when","mod_who","recount_by_other_counter","scope_mode","source_type","status","version"],"title":"InventoryCount","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"add_when":"<add_when>","add_who":1,"count_mode":"Blind","count_number":"<count_number>","count_type":"Full","freeze_mode":"Hard","id":1,"item_containers":[1],"item_lots":["<item_lots>"],"item_skus":["<item_skus>"],"max_recounts":1,"mod_when":"<mod_when>","mod_who":1,"recount_by_other_counter":false,"scope_mode":"LocationFull","source_type":"<source_type>","status":"Open","version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#create_inventory_count":{"post":{"operationId":"create_inventory_count","summary":"Open a count from its header form: kind, mode, recounts, a comment — no location yet.","description":"Open a count from its header form: kind, mode, recounts, a comment — no location yet.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog does not say whether this method needs an idempotency key.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"inventory_count","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"create_inventory_count"},"params":{"type":"object","properties":{"data":{"description":"What the header form sends on save: the count's choices. Its locations are added afterwards, from the list below it (`AddCountLocations`).","properties":{"comment":{"default":null,"type":["string","null"]},"count_mode":{"anyOf":[{"$ref":"#/components/schemas/InventoryCountMode"},{"type":"null"}],"default":null,"description":"`Blind` (default) or `Informed`."},"count_number":{"default":null,"description":"What the new form showed: `generic_new` drew it from the counter.","type":["string","null"]},"count_type":{"anyOf":[{"$ref":"#/components/schemas/InventoryCountType"},{"type":"null"}],"default":null,"description":"`Selective` (default) or `Full`."},"freeze_mode":{"anyOf":[{"$ref":"#/components/schemas/InventoryCountFreeze"},{"type":"null"}],"default":null,"description":"`Hard` (default) or `Soft` (count spec Appendix F)."},"item_lots":{"default":null,"type":["string","null"]},"item_lpns":{"default":null,"type":["string","null"]},"item_skus":{"default":null,"description":"«Товары», «Партии», «LPN»: what a picker of several values sends — codes separated by commas.","type":["string","null"]},"max_recounts":{"default":null,"description":"How many times one location may be recounted; empty = the default.","format":"int16","type":["integer","null"]},"scope_mode":{"anyOf":[{"$ref":"#/components/schemas/InventoryCountScope"},{"type":"null"}],"default":null,"description":"«Охват»: `LocationFull` (default) or `IdentitySubset` (Appendix G)."}},"title":"CountFormNew","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"create_inventory_count","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"comment":"<comment>","count_mode":"Blind","count_number":"<count_number>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"A count flat, for a card form (`generic_rpc_form_load`).","properties":{"add_when":{"type":"string"},"cancelled_at":{"default":null,"type":["string","null"]},"closed_at":{"default":null,"type":["string","null"]},"comment":{"type":["string","null"]},"count_mode":{"$ref":"#/components/schemas/InventoryCountMode"},"count_number":{"type":"string"},"count_type":{"$ref":"#/components/schemas/InventoryCountType"},"freeze_mode":{"$ref":"#/components/schemas/InventoryCountFreeze"},"id":{"format":"int64","type":"integer"},"item_lots":{"type":"string"},"item_lpns":{"type":"string"},"item_skus":{"description":"The count's item, as the header form names it: codes, comma-separated (empty = not named).","type":"string"},"locations":{"description":"The counted locations, sorted, comma-separated.","type":"string"},"max_recounts":{"format":"int16","type":"integer"},"scope_mode":{"$ref":"#/components/schemas/InventoryCountScope"},"source_type":{"type":"string"},"status":{"$ref":"#/components/schemas/InventoryCountStatus"},"summary":{"description":"Where the count stands, in words.","type":"string"},"tasks_closed":{"format":"int32","type":"integer"},"tasks_open":{"format":"int32","type":"integer"},"tasks_variance":{"format":"int32","type":"integer"},"version":{"format":"int32","type":"integer"}},"required":["add_when","count_mode","count_number","count_type","freeze_mode","id","item_lots","item_lpns","item_skus","locations","max_recounts","scope_mode","source_type","status","summary","tasks_closed","tasks_open","tasks_variance","version"],"title":"InventoryCountCard","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","count_mode":"Blind","count_number":"<count_number>","count_type":"Full","freeze_mode":"Hard","id":1,"item_lots":"<item_lots>","item_lpns":"<item_lpns>","item_skus":"<item_skus>","locations":"<locations>","max_recounts":1,"scope_mode":"LocationFull","source_type":"<source_type>","status":"Open","summary":"<summary>","tasks_closed":1,"tasks_open":1,"tasks_variance":1,"version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#inventory_count_policy_create":{"post":{"operationId":"inventory_count_policy_create","summary":"Create a cycle-count policy: which locations, how often, how many a run.","description":"Create a cycle-count policy: which locations, how often, how many a run.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"inventory_count","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"inventory_count_policy_create"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"abc":{"default":null,"description":"`A`, `B` or `C`.","type":["string","null"]},"aisle":{"default":null,"type":["string","null"]},"basis":{"anyOf":[{"$ref":"#/components/schemas/InventoryCountPolicyBasis"},{"type":"null"}],"default":null,"description":"`Locations` (default) or `Items` (count spec Appendix H). Only the chosen basis' properties are part of the policy: the others are dropped."},"code":{"type":"string"},"count_mode":{"anyOf":[{"$ref":"#/components/schemas/InventoryCountMode"},{"type":"null"}],"default":null,"description":"`Blind` (default) or `Informed`."},"daily_limit":{"default":null,"description":"At most this many locations a run.","format":"int32","type":["integer","null"]},"description":{"default":null,"type":["string","null"]},"freeze_mode":{"anyOf":[{"$ref":"#/components/schemas/InventoryCountFreeze"},{"type":"null"}],"default":null,"description":"`Hard` (default) or `Soft` (count spec Appendix F)."},"frequency_days":{"default":null,"description":"Count a location every this many days.","format":"int32","type":["integer","null"]},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"is_active":{"default":null,"description":"Default `true`.","type":["boolean","null"]},"loc_type":{"default":null,"description":"A location type as `location.loc_type` spells it (`Case`, `Pick`, …).","type":["string","null"]},"max_recounts":{"default":null,"description":"Recounts per location in the counts it makes (default 2).","format":"int16","type":["integer","null"]},"putawayzone":{"default":null,"description":"Scope — at least one of the four.","type":["string","null"]},"sku_abc":{"default":null,"description":"`Items`: the SKUs' ABC class, `A`, `B` or `C`.","type":["string","null"]},"sku_group":{"default":null,"description":"`Items`: the SKUs' group.","type":["string","null"]},"trust_empty_confirmation":{"default":null,"description":"A location confirmed empty in passing counts as checked (count spec Appendix L.6). Default `false`; a policy over items keeps none.","type":["boolean","null"]}},"required":["code"],"title":"CreateCountPolicy","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"inventory_count_policy_create","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"code":"<code>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"abc":{"anyOf":[{"$ref":"#/components/schemas/AbcRotationSpeed"},{"type":"null"}]},"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"aisle":{"type":["string","null"]},"basis":{"$ref":"#/components/schemas/InventoryCountPolicyBasis"},"code":{"type":"string"},"count_mode":{"$ref":"#/components/schemas/InventoryCountMode"},"daily_limit":{"format":"int32","type":"integer"},"description":{"type":["string","null"]},"freeze_mode":{"allOf":[{"$ref":"#/components/schemas/InventoryCountFreeze"}],"description":"`Hard` freezes the locations the policy's counts count; `Soft` lets stock move (count spec Appendix F)."},"frequency_days":{"format":"int32","type":"integer"},"id":{"format":"int64","type":"integer"},"is_active":{"type":"boolean"},"last_run_on":{"type":["string","null"]},"loc_type":{"anyOf":[{"$ref":"#/components/schemas/LocType"},{"type":"null"}]},"max_recounts":{"format":"int16","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"putawayzone":{"type":["string","null"]},"sku_abc":{"anyOf":[{"$ref":"#/components/schemas/AbcRotationSpeed"},{"type":"null"}],"description":"`Items`: the SKUs of this ABC class (`sku.abc`)."},"sku_group":{"description":"`Items`: the SKUs of this group (`sku.sku_group`).","type":["string","null"]},"trust_empty_confirmation":{"description":"A location confirmed empty in passing counts as checked then (count spec Appendix L.6). Only a policy over locations reads it.","type":"boolean"},"version":{"format":"int32","type":"integer"}},"required":["add_when","add_who","basis","code","count_mode","daily_limit","freeze_mode","frequency_days","id","is_active","max_recounts","mod_when","mod_who","trust_empty_confirmation","version"],"title":"InventoryCountPolicy","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"add_when":"<add_when>","add_who":1,"basis":"Locations","code":"<code>","count_mode":"Blind","daily_limit":1,"freeze_mode":{},"frequency_days":1,"id":1,"is_active":false,"max_recounts":1,"mod_when":"<mod_when>","mod_who":1,"trust_empty_confirmation":false,"version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#inventory_count_policy_save":{"post":{"operationId":"inventory_count_policy_save","summary":"Change a cycle-count policy, on the version read.","description":"Change a cycle-count policy, on the version read.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n**Versioned entities:** inventory_count_policy (id in data.policy_id, version in data.expected_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[{"entity":"inventory_count_policy","id_field":"policy_id","version_field":"expected_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"inventory_count","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"inventory_count_policy_save"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"abc":{"default":null,"description":"`A`, `B` or `C`.","type":["string","null"]},"aisle":{"default":null,"type":["string","null"]},"basis":{"anyOf":[{"$ref":"#/components/schemas/InventoryCountPolicyBasis"},{"type":"null"}],"default":null,"description":"`Locations` (default) or `Items` (count spec Appendix H). Only the chosen basis' properties are part of the policy: the others are dropped."},"code":{"type":"string"},"count_mode":{"anyOf":[{"$ref":"#/components/schemas/InventoryCountMode"},{"type":"null"}],"default":null,"description":"`Blind` (default) or `Informed`."},"daily_limit":{"default":null,"description":"At most this many locations a run.","format":"int32","type":["integer","null"]},"description":{"default":null,"type":["string","null"]},"expected_version":{"format":"int32","type":"integer"},"freeze_mode":{"anyOf":[{"$ref":"#/components/schemas/InventoryCountFreeze"},{"type":"null"}],"default":null,"description":"`Hard` (default) or `Soft` (count spec Appendix F)."},"frequency_days":{"default":null,"description":"Count a location every this many days.","format":"int32","type":["integer","null"]},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"is_active":{"default":null,"description":"Default `true`.","type":["boolean","null"]},"loc_type":{"default":null,"description":"A location type as `location.loc_type` spells it (`Case`, `Pick`, …).","type":["string","null"]},"max_recounts":{"default":null,"description":"Recounts per location in the counts it makes (default 2).","format":"int16","type":["integer","null"]},"policy_id":{"format":"int64","type":"integer"},"putawayzone":{"default":null,"description":"Scope — at least one of the four.","type":["string","null"]},"sku_abc":{"default":null,"description":"`Items`: the SKUs' ABC class, `A`, `B` or `C`.","type":["string","null"]},"sku_group":{"default":null,"description":"`Items`: the SKUs' group.","type":["string","null"]},"trust_empty_confirmation":{"default":null,"description":"A location confirmed empty in passing counts as checked (count spec Appendix L.6). Default `false`; a policy over items keeps none.","type":["boolean","null"]}},"required":["code","expected_version","policy_id"],"title":"SaveCountPolicy","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"inventory_count_policy_save","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"code":"<code>","expected_version":1,"policy_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"abc":{"anyOf":[{"$ref":"#/components/schemas/AbcRotationSpeed"},{"type":"null"}]},"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"aisle":{"type":["string","null"]},"basis":{"$ref":"#/components/schemas/InventoryCountPolicyBasis"},"code":{"type":"string"},"count_mode":{"$ref":"#/components/schemas/InventoryCountMode"},"daily_limit":{"format":"int32","type":"integer"},"description":{"type":["string","null"]},"freeze_mode":{"allOf":[{"$ref":"#/components/schemas/InventoryCountFreeze"}],"description":"`Hard` freezes the locations the policy's counts count; `Soft` lets stock move (count spec Appendix F)."},"frequency_days":{"format":"int32","type":"integer"},"id":{"format":"int64","type":"integer"},"is_active":{"type":"boolean"},"last_run_on":{"type":["string","null"]},"loc_type":{"anyOf":[{"$ref":"#/components/schemas/LocType"},{"type":"null"}]},"max_recounts":{"format":"int16","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"putawayzone":{"type":["string","null"]},"sku_abc":{"anyOf":[{"$ref":"#/components/schemas/AbcRotationSpeed"},{"type":"null"}],"description":"`Items`: the SKUs of this ABC class (`sku.abc`)."},"sku_group":{"description":"`Items`: the SKUs of this group (`sku.sku_group`).","type":["string","null"]},"trust_empty_confirmation":{"description":"A location confirmed empty in passing counts as checked then (count spec Appendix L.6). Only a policy over locations reads it.","type":"boolean"},"version":{"format":"int32","type":"integer"}},"required":["add_when","add_who","basis","code","count_mode","daily_limit","freeze_mode","frequency_days","id","is_active","max_recounts","mod_when","mod_who","trust_empty_confirmation","version"],"title":"InventoryCountPolicy","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"add_when":"<add_when>","add_who":1,"basis":"Locations","code":"<code>","count_mode":"Blind","daily_limit":1,"freeze_mode":{},"frequency_days":1,"id":1,"is_active":false,"max_recounts":1,"mod_when":"<mod_when>","mod_who":1,"trust_empty_confirmation":false,"version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#inventory_count_policy_run":{"post":{"operationId":"inventory_count_policy_run","summary":"Run a cycle-count policy now: start a count of the locations it finds due.","description":"Run a cycle-count policy now: start a count of the locations it finds due.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"inventory_count","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"inventory_count_policy_run"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"policy_id":{"format":"int64","type":"integer"}},"required":["policy_id"],"title":"RunCountPolicy","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"inventory_count_policy_run","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"policy_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"What a run did.","properties":{"count":{"anyOf":[{"$ref":"#/components/schemas/InventoryCountView"},{"type":"null"}],"description":"The count it started; `None` when nothing was due (or the scheduler found the policy already run today)."},"message":{"description":"What happened, in words.","type":"string"},"policy":{"$ref":"#/components/schemas/InventoryCountPolicy"}},"required":["message","policy"],"title":"PolicyRun","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"message":"<message>","policy":{"add_when":"<add_when>","add_who":1,"basis":"Locations","code":"<code>","count_mode":"Blind","daily_limit":1,"freeze_mode":{},"frequency_days":1,"id":1,"is_active":false,"max_recounts":1,"mod_when":"<mod_when>","mod_who":1,"trust_empty_confirmation":false,"version":1}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#inventory_count_policy_delete":{"post":{"operationId":"inventory_count_policy_delete","summary":"Delete a cycle-count policy, on the version read; the counts it made stay.","description":"Delete a cycle-count policy, on the version read; the counts it made stay.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n**Versioned entities:** inventory_count_policy (id in data.policy_id, version in data.expected_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[{"entity":"inventory_count_policy","id_field":"policy_id","version_field":"expected_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"inventory_count","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"inventory_count_policy_delete"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"expected_version":{"format":"int32","type":"integer"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"policy_id":{"format":"int64","type":"integer"}},"required":["expected_version","policy_id"],"title":"DeleteCountPolicy","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"inventory_count_policy_delete","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"expected_version":1,"policy_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"abc":{"anyOf":[{"$ref":"#/components/schemas/AbcRotationSpeed"},{"type":"null"}]},"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"aisle":{"type":["string","null"]},"basis":{"$ref":"#/components/schemas/InventoryCountPolicyBasis"},"code":{"type":"string"},"count_mode":{"$ref":"#/components/schemas/InventoryCountMode"},"daily_limit":{"format":"int32","type":"integer"},"description":{"type":["string","null"]},"freeze_mode":{"allOf":[{"$ref":"#/components/schemas/InventoryCountFreeze"}],"description":"`Hard` freezes the locations the policy's counts count; `Soft` lets stock move (count spec Appendix F)."},"frequency_days":{"format":"int32","type":"integer"},"id":{"format":"int64","type":"integer"},"is_active":{"type":"boolean"},"last_run_on":{"type":["string","null"]},"loc_type":{"anyOf":[{"$ref":"#/components/schemas/LocType"},{"type":"null"}]},"max_recounts":{"format":"int16","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"putawayzone":{"type":["string","null"]},"sku_abc":{"anyOf":[{"$ref":"#/components/schemas/AbcRotationSpeed"},{"type":"null"}],"description":"`Items`: the SKUs of this ABC class (`sku.abc`)."},"sku_group":{"description":"`Items`: the SKUs of this group (`sku.sku_group`).","type":["string","null"]},"trust_empty_confirmation":{"description":"A location confirmed empty in passing counts as checked then (count spec Appendix L.6). Only a policy over locations reads it.","type":"boolean"},"version":{"format":"int32","type":"integer"}},"required":["add_when","add_who","basis","code","count_mode","daily_limit","freeze_mode","frequency_days","id","is_active","max_recounts","mod_when","mod_who","trust_empty_confirmation","version"],"title":"InventoryCountPolicy","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"add_when":"<add_when>","add_who":1,"basis":"Locations","code":"<code>","count_mode":"Blind","daily_limit":1,"freeze_mode":{},"frequency_days":1,"id":1,"is_active":false,"max_recounts":1,"mod_when":"<mod_when>","mod_who":1,"trust_empty_confirmation":false,"version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#create_inventory_count_policy":{"post":{"operationId":"create_inventory_count_policy","summary":"Create a cycle-count policy from its form.","description":"Create a cycle-count policy from its form.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog does not say whether this method needs an idempotency key.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"inventory_count","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"create_inventory_count_policy"},"params":{"type":"object","properties":{"data":{"properties":{"abc":{"default":null,"description":"`A`, `B` or `C`.","type":["string","null"]},"aisle":{"default":null,"type":["string","null"]},"basis":{"anyOf":[{"$ref":"#/components/schemas/InventoryCountPolicyBasis"},{"type":"null"}],"default":null,"description":"`Locations` (default) or `Items` (count spec Appendix H). Only the chosen basis' properties are part of the policy: the others are dropped."},"code":{"type":"string"},"count_mode":{"anyOf":[{"$ref":"#/components/schemas/InventoryCountMode"},{"type":"null"}],"default":null,"description":"`Blind` (default) or `Informed`."},"daily_limit":{"default":null,"description":"At most this many locations a run.","format":"int32","type":["integer","null"]},"description":{"default":null,"type":["string","null"]},"freeze_mode":{"anyOf":[{"$ref":"#/components/schemas/InventoryCountFreeze"},{"type":"null"}],"default":null,"description":"`Hard` (default) or `Soft` (count spec Appendix F)."},"frequency_days":{"default":null,"description":"Count a location every this many days.","format":"int32","type":["integer","null"]},"is_active":{"default":null,"description":"Default `true`.","type":["boolean","null"]},"loc_type":{"default":null,"description":"A location type as `location.loc_type` spells it (`Case`, `Pick`, …).","type":["string","null"]},"max_recounts":{"default":null,"description":"Recounts per location in the counts it makes (default 2).","format":"int16","type":["integer","null"]},"putawayzone":{"default":null,"description":"Scope — at least one of the four.","type":["string","null"]},"sku_abc":{"default":null,"description":"`Items`: the SKUs' ABC class, `A`, `B` or `C`.","type":["string","null"]},"sku_group":{"default":null,"description":"`Items`: the SKUs' group.","type":["string","null"]},"trust_empty_confirmation":{"default":null,"description":"A location confirmed empty in passing counts as checked (count spec Appendix L.6). Default `false`; a policy over items keeps none.","type":["boolean","null"]}},"required":["code"],"title":"CountPolicyForm","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"create_inventory_count_policy","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"code":"<code>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"abc":{"anyOf":[{"$ref":"#/components/schemas/AbcRotationSpeed"},{"type":"null"}]},"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"aisle":{"type":["string","null"]},"basis":{"$ref":"#/components/schemas/InventoryCountPolicyBasis"},"code":{"type":"string"},"count_mode":{"$ref":"#/components/schemas/InventoryCountMode"},"daily_limit":{"format":"int32","type":"integer"},"description":{"type":["string","null"]},"freeze_mode":{"allOf":[{"$ref":"#/components/schemas/InventoryCountFreeze"}],"description":"`Hard` freezes the locations the policy's counts count; `Soft` lets stock move (count spec Appendix F)."},"frequency_days":{"format":"int32","type":"integer"},"id":{"format":"int64","type":"integer"},"is_active":{"type":"boolean"},"last_run_on":{"type":["string","null"]},"loc_type":{"anyOf":[{"$ref":"#/components/schemas/LocType"},{"type":"null"}]},"max_recounts":{"format":"int16","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"putawayzone":{"type":["string","null"]},"sku_abc":{"anyOf":[{"$ref":"#/components/schemas/AbcRotationSpeed"},{"type":"null"}],"description":"`Items`: the SKUs of this ABC class (`sku.abc`)."},"sku_group":{"description":"`Items`: the SKUs of this group (`sku.sku_group`).","type":["string","null"]},"trust_empty_confirmation":{"description":"A location confirmed empty in passing counts as checked then (count spec Appendix L.6). Only a policy over locations reads it.","type":"boolean"},"version":{"format":"int32","type":"integer"}},"required":["add_when","add_who","basis","code","count_mode","daily_limit","freeze_mode","frequency_days","id","is_active","max_recounts","mod_when","mod_who","trust_empty_confirmation","version"],"title":"InventoryCountPolicy","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"basis":"Locations","code":"<code>","count_mode":"Blind","daily_limit":1,"freeze_mode":{},"frequency_days":1,"id":1,"is_active":false,"max_recounts":1,"mod_when":"<mod_when>","mod_who":1,"trust_empty_confirmation":false,"version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#update_inventory_count_policy":{"post":{"operationId":"update_inventory_count_policy","summary":"Save a cycle-count policy's form, on the version read.","description":"Save a cycle-count policy's form, on the version read.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n**Versioned entities:** inventory_count_policy (id in data.id, version in data.expected_version).\n\n\n**Notes**\n\n- The catalog does not say whether this method needs an idempotency key.\n- Send the current version of the row in `expected_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[{"entity":"inventory_count_policy","id_field":"id","version_field":"expected_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"inventory_count","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"update_inventory_count_policy"},"params":{"type":"object","properties":{"meta":{"type":"object","description":"Control-plane envelope supplied by the platform."},"data":{"properties":{"data":{"description":"What a saved form changed — `generic_save` sends only the fields the person touched. Absent = unchanged; `null` (or empty text) = cleared.","properties":{"abc":{"default":null,"type":["string","null"]},"aisle":{"default":null,"type":["string","null"]},"basis":{"anyOf":[{"anyOf":[{"$ref":"#/components/schemas/InventoryCountPolicyBasis"},{"type":"null"}]},{"type":"null"}],"default":null},"code":{"default":null,"type":["string","null"]},"count_mode":{"anyOf":[{"anyOf":[{"$ref":"#/components/schemas/InventoryCountMode"},{"type":"null"}]},{"type":"null"}],"default":null},"daily_limit":{"default":null,"format":"int32","type":["integer","null"]},"description":{"default":null,"type":["string","null"]},"freeze_mode":{"anyOf":[{"anyOf":[{"$ref":"#/components/schemas/InventoryCountFreeze"},{"type":"null"}]},{"type":"null"}],"default":null},"frequency_days":{"default":null,"format":"int32","type":["integer","null"]},"is_active":{"default":null,"type":["boolean","null"]},"loc_type":{"default":null,"type":["string","null"]},"max_recounts":{"default":null,"format":"int16","type":["integer","null"]},"putawayzone":{"default":null,"type":["string","null"]},"sku_abc":{"default":null,"type":["string","null"]},"sku_group":{"default":null,"type":["string","null"]},"trust_empty_confirmation":{"default":null,"type":["boolean","null"]}},"title":"CountPolicyChange","type":"object"},"expected_version":{"format":"int32","type":"integer"},"id":{"format":"int64","type":"integer"}},"required":["id","expected_version","data"],"type":"object","description":"Versioned update payload."}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"update_inventory_count_policy","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"id":1,"expected_version":1,"data":{"abc":"<abc>","aisle":"<aisle>","basis":"Locations"}}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"abc":{"anyOf":[{"$ref":"#/components/schemas/AbcRotationSpeed"},{"type":"null"}]},"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"aisle":{"type":["string","null"]},"basis":{"$ref":"#/components/schemas/InventoryCountPolicyBasis"},"code":{"type":"string"},"count_mode":{"$ref":"#/components/schemas/InventoryCountMode"},"daily_limit":{"format":"int32","type":"integer"},"description":{"type":["string","null"]},"freeze_mode":{"allOf":[{"$ref":"#/components/schemas/InventoryCountFreeze"}],"description":"`Hard` freezes the locations the policy's counts count; `Soft` lets stock move (count spec Appendix F)."},"frequency_days":{"format":"int32","type":"integer"},"id":{"format":"int64","type":"integer"},"is_active":{"type":"boolean"},"last_run_on":{"type":["string","null"]},"loc_type":{"anyOf":[{"$ref":"#/components/schemas/LocType"},{"type":"null"}]},"max_recounts":{"format":"int16","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"putawayzone":{"type":["string","null"]},"sku_abc":{"anyOf":[{"$ref":"#/components/schemas/AbcRotationSpeed"},{"type":"null"}],"description":"`Items`: the SKUs of this ABC class (`sku.abc`)."},"sku_group":{"description":"`Items`: the SKUs of this group (`sku.sku_group`).","type":["string","null"]},"trust_empty_confirmation":{"description":"A location confirmed empty in passing counts as checked then (count spec Appendix L.6). Only a policy over locations reads it.","type":"boolean"},"version":{"format":"int32","type":"integer"}},"required":["add_when","add_who","basis","code","count_mode","daily_limit","freeze_mode","frequency_days","id","is_active","max_recounts","mod_when","mod_who","trust_empty_confirmation","version"],"title":"InventoryCountPolicy","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"basis":"Locations","code":"<code>","count_mode":"Blind","daily_limit":1,"freeze_mode":{},"frequency_days":1,"id":1,"is_active":false,"max_recounts":1,"mod_when":"<mod_when>","mod_who":1,"trust_empty_confirmation":false,"version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#update_inventory_count_tolerance":{"post":{"operationId":"update_inventory_count_tolerance","summary":"Count variance tolerances: save a class's card, on the version read.","description":"Count variance tolerances: save a class's card, on the version read.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n**Versioned entities:** inventory_count_tolerance (id in data.id, version in data.expected_version).\n\n\n**Notes**\n\n- The catalog does not say whether this method needs an idempotency key.\n- Send the current version of the row in `expected_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[{"entity":"inventory_count_tolerance","id_field":"id","version_field":"expected_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"inventory_count","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"update_inventory_count_tolerance"},"params":{"type":"object","properties":{"meta":{"type":"object","description":"Control-plane envelope supplied by the platform."},"data":{"properties":{"data":{"description":"What a saved card changed — `generic_save` sends only the fields the person touched. Absent = unchanged; `null` = cleared (the rule no longer applies).","properties":{"approval_value":{"default":null,"format":"double","type":["number","null"]},"auto_pct":{"default":null,"format":"double","type":["number","null"]},"auto_qty":{"default":null,"format":"double","type":["number","null"]},"auto_value":{"default":null,"format":"double","type":["number","null"]}},"title":"ToleranceChange","type":"object"},"expected_version":{"format":"int32","type":"integer"},"id":{"format":"int64","type":"integer"}},"required":["id","expected_version","data"],"type":"object","description":"Versioned update payload."}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"update_inventory_count_tolerance","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"id":1,"expected_version":1,"data":{"approval_value":1.5,"auto_pct":1.5,"auto_qty":1.5}}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"One ABC class's tolerance. Every rule is optional: `None` does not apply.","properties":{"abc":{"$ref":"#/components/schemas/AbcRotationSpeed"},"approval_value":{"description":"A task's variance worth more than this is accepted only with `inventory_count.accept_large_variance`.","format":"double","type":["number","null"]},"auto_pct":{"description":"…and by at most this percent of what was expected…","format":"double","type":["number","null"]},"auto_qty":{"description":"Accepted on its own when the line differs by at most this many units…","format":"double","type":["number","null"]},"auto_value":{"description":"…and its value is at most this.","format":"double","type":["number","null"]},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"version":{"format":"int32","type":"integer"}},"required":["abc","id","mod_when","mod_who","version"],"title":"InventoryCountTolerance","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"abc":"A","id":1,"mod_when":"<mod_when>","mod_who":1,"version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#inventory_count_task_get":{"post":{"operationId":"inventory_count_task_get","summary":"One location's count; a blind count hides the system quantity until counted.","description":"One location's count; a blind count hides the system quantity until counted.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"inventory_count","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"inventory_count_task_get"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"inventory_count_task_get","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"One location's count, as the counter and the supervisor see it.","properties":{"count_mode":{"$ref":"#/components/schemas/InventoryCountMode"},"count_number":{"type":"string"},"count_only":{"description":"What the counter counts here, in words, when it is not the whole location — a count of the item (Appendix G): \"SKU A; lot L1\". No quantity: the count stays blind.","type":["string","null"]},"expected":{"description":"The stock the location is counted against — `None` while a blind count is being counted (spec §8, AC-03).","items":{"$ref":"#/components/schemas/InventoryCountSnapshot"},"type":["array","null"]},"observations":{"description":"What the counter recorded, voided rows included (history, spec §29).","items":{"$ref":"#/components/schemas/InventoryCountObservation"},"type":"array"},"results":{"description":"What completing the task found; empty until it is counted.","items":{"$ref":"#/components/schemas/InventoryCountResult"},"type":"array"},"stock_moved_under_count":{"description":"A shift lead let an operation move stock under this count while it was frozen (owner's decision 2026-10-21 §6, `inventory_count_disturbance`). The counter is told because their number is then in doubt — the point of recording the override at all. Always `false` for a `Soft` count, which freezes nothing and so is never overridden.","type":"boolean"},"system_stock":{"description":"What the system holds here now, for the counter of an `Informed` count's first attempt while it is counted (count spec §8); `None` otherwise. A soft count's movements since its snapshot included.","items":{"$ref":"#/components/schemas/SystemStockLine"},"type":["array","null"]},"task":{"$ref":"#/components/schemas/InventoryCountTask"}},"required":["count_mode","count_number","observations","results","stock_moved_under_count","task"],"title":"CountTaskView","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"count_mode":"Blind","count_number":"<count_number>","observations":[{"add_when":"<add_when>","add_who":1,"id":1,"inventory_count_task_id":1,"lot":"<lot>","observed_qty":1.5,"owner_id":1,"pack_id":1,"sku_code":"<sku_code>","uom":"<uom>"}],"results":[{"expected_qty":1.5,"id":1,"inventory_count_task_id":1,"lot":"<lot>","movement_qty":1.5,"observed_qty":1.5,"owner_id":1,"pack_id":1,"result_type":"Match","sku_code":"<sku_code>","uom":"<uom>"}],"stock_moved_under_count":false,"task":{"add_when":"<add_when>","add_who":1,"attempt_no":1,"empty_confirmed":false,"id":1,"inventory_count_id":1,"location":"<location>","mod_when":"<mod_when>","mod_who":1,"snapshot_at":"<snapshot_at>","status":"Open","version":1}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#inventory_count_get":{"post":{"operationId":"inventory_count_get","summary":"Get one inventory count with its tasks.","description":"Get one inventory count with its tasks.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"inventory_count","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"inventory_count_get"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"inventory_count_get","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"A count with its tasks, as the count-level commands answer.","properties":{"header":{"$ref":"#/components/schemas/InventoryCount"},"summary":{"description":"Where the count stands, in words.","type":"string"},"tasks":{"items":{"$ref":"#/components/schemas/InventoryCountTask"},"type":"array"}},"required":["header","summary","tasks"],"title":"InventoryCountView","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"header":{"add_when":"<add_when>","add_who":1,"count_mode":"Blind","count_number":"<count_number>","count_type":"Full","freeze_mode":"Hard","id":1,"item_containers":[1],"item_lots":["<item_lots>"],"item_skus":["<item_skus>"],"max_recounts":1,"mod_when":"<mod_when>","mod_who":1,"recount_by_other_counter":false,"scope_mode":"LocationFull","source_type":"<source_type>","status":"Open","version":1},"summary":"<summary>","tasks":[{"add_when":"<add_when>","add_who":1,"attempt_no":1,"empty_confirmed":false,"id":1,"inventory_count_id":1,"location":"<location>","mod_when":"<mod_when>","mod_who":1,"snapshot_at":"<snapshot_at>","status":"Open","version":1}]}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#inventory_count_list":{"post":{"operationId":"inventory_count_list","summary":"List inventory counts, filtered like any list (by status, number).","description":"List inventory counts, filtered like any list (by status, number).\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"inventory_count","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"inventory_count_list"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"inventory_count_list"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/InventoryCount"},"title":"Array_of_InventoryCount","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"count_mode":"Blind","count_number":"<count_number>","count_type":"Full","freeze_mode":"Hard","id":1,"item_containers":[1],"item_lots":["<item_lots>"],"item_skus":["<item_skus>"],"max_recounts":1,"mod_when":"<mod_when>","mod_who":1,"recount_by_other_counter":false,"scope_mode":"LocationFull","source_type":"<source_type>","status":"Open","version":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#inventory_count_list_tasks":{"post":{"operationId":"inventory_count_list_tasks","summary":"List count tasks with what each count found (by count, location, status).","description":"List count tasks with what each count found (by count, location, status).\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"inventory_count","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"inventory_count_list_tasks"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"inventory_count_list_tasks"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/CountTaskRow"},"title":"Array_of_CountTaskRow","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"attempt_no":1,"differences":1,"empty_confirmed":false,"id":1,"inventory_count_id":1,"location":"<location>","mod_when":"<mod_when>","mod_who":1,"recount_allowed":false,"snapshot_at":"<snapshot_at>","status":"Open","version":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#inventory_count_card_get":{"post":{"operationId":"inventory_count_card_get","summary":"Get one inventory count flat, with its locations and where its tasks stand.","description":"Get one inventory count flat, with its locations and where its tasks stand.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"inventory_count","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"inventory_count_card_get"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"inventory_count_card_get","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"A count flat, for a card form (`generic_rpc_form_load`).","properties":{"add_when":{"type":"string"},"cancelled_at":{"default":null,"type":["string","null"]},"closed_at":{"default":null,"type":["string","null"]},"comment":{"type":["string","null"]},"count_mode":{"$ref":"#/components/schemas/InventoryCountMode"},"count_number":{"type":"string"},"count_type":{"$ref":"#/components/schemas/InventoryCountType"},"freeze_mode":{"$ref":"#/components/schemas/InventoryCountFreeze"},"id":{"format":"int64","type":"integer"},"item_lots":{"type":"string"},"item_lpns":{"type":"string"},"item_skus":{"description":"The count's item, as the header form names it: codes, comma-separated (empty = not named).","type":"string"},"locations":{"description":"The counted locations, sorted, comma-separated.","type":"string"},"max_recounts":{"format":"int16","type":"integer"},"scope_mode":{"$ref":"#/components/schemas/InventoryCountScope"},"source_type":{"type":"string"},"status":{"$ref":"#/components/schemas/InventoryCountStatus"},"summary":{"description":"Where the count stands, in words.","type":"string"},"tasks_closed":{"format":"int32","type":"integer"},"tasks_open":{"format":"int32","type":"integer"},"tasks_variance":{"format":"int32","type":"integer"},"version":{"format":"int32","type":"integer"}},"required":["add_when","count_mode","count_number","count_type","freeze_mode","id","item_lots","item_lpns","item_skus","locations","max_recounts","scope_mode","source_type","status","summary","tasks_closed","tasks_open","tasks_variance","version"],"title":"InventoryCountCard","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","count_mode":"Blind","count_number":"<count_number>","count_type":"Full","freeze_mode":"Hard","id":1,"item_lots":"<item_lots>","item_lpns":"<item_lpns>","item_skus":"<item_skus>","locations":"<locations>","max_recounts":1,"scope_mode":"LocationFull","source_type":"<source_type>","status":"Open","summary":"<summary>","tasks_closed":1,"tasks_open":1,"tasks_variance":1,"version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#inventory_count_location_results":{"post":{"operationId":"inventory_count_location_results","summary":"Every result line of a counted location — all attempts: lot and its attributes, LPN, expected, counted, difference, adjustment.","description":"Every result line of a counted location — all attempts: lot and its attributes, LPN, expected, counted, difference, adjustment.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"inventory_count","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"inventory_count_location_results"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"inventory_count_location_results"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/CountResultLine"},"title":"Array_of_CountResultLine","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"attempt_no":1,"difference":1.5,"expected_qty":1.5,"id":1,"location":"<location>","lot":"<lot>","movement_qty":1.5,"observed_qty":1.5,"pack_id":1,"result_type":"<result_type>","sku_code":"<sku_code>","task_id":1,"task_status":"<task_status>","uom":"<uom>"}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#inventory_count_location_serials":{"post":{"operationId":"inventory_count_location_serials","summary":"Every serial a count of the location judged — all attempts: serial, SKU, lot, LPN, outcome (Found, Missing, Relocated, Registered), where the system held it.","description":"Every serial a count of the location judged — all attempts: serial, SKU, lot, LPN, outcome (Found, Missing, Relocated, Registered), where the system held it.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"inventory_count","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"inventory_count_location_serials"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"inventory_count_location_serials"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/CountSerialLine"},"title":"Array_of_CountSerialLine","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"attempt_no":1,"id":1,"lot":"<lot>","outcome":"<outcome>","serial_number":"<serial_number>","sku_code":"<sku_code>","task_id":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#inventory_count_task_card_get":{"post":{"operationId":"inventory_count_task_card_get","summary":"Get one count task flat: location, attempt, status, how many lines differ, whether a recount is allowed.","description":"Get one count task flat: location, attempt, status, how many lines differ, whether a recount is allowed.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"inventory_count","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"inventory_count_task_card_get"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"inventory_count_task_card_get","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"A task as the supervisor's grid and the location card show it: the task, how many identities its count found different, and whether it may be counted again. What differs is not squeezed into a line of text — the card lists it line by line ([`count_location_results`], spec §32 v0.3).","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"adjustment_id":{"format":"int64","type":["integer","null"]},"attempt_no":{"format":"int32","type":"integer"},"auto_accepted":{"default":false,"type":"boolean"},"counted_at":{"default":null,"type":["string","null"]},"counted_by":{"format":"int64","type":["integer","null"]},"decided_at":{"default":null,"type":["string","null"]},"decided_by":{"format":"int64","type":["integer","null"]},"differences":{"description":"Identities that did not match; 0 until the task is counted.","format":"int32","type":"integer"},"empty_confirmed":{"type":"boolean"},"id":{"format":"int64","type":"integer"},"inventory_count_id":{"format":"int64","type":"integer"},"location":{"type":"string"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"recount_allowed":{"description":"Whether the count's `max_recounts` still lets this location be counted again — what greys «Пересчитать» before the server refuses.","type":"boolean"},"recount_of_task_id":{"format":"int64","type":["integer","null"]},"snapshot_at":{"type":"string"},"status":{"$ref":"#/components/schemas/InventoryCountTaskStatus"},"variance_cause":{"default":null,"description":"ADR-093 (wms-app 132): why the accepted variance happened — a code of the `count_variance_cause` list — with what the supervisor added, and whether the accept was the system's own within tolerance.","type":["string","null"]},"variance_comment":{"default":null,"type":["string","null"]},"version":{"format":"int32","type":"integer"}},"required":["add_when","add_who","attempt_no","differences","empty_confirmed","id","inventory_count_id","location","mod_when","mod_who","recount_allowed","snapshot_at","status","version"],"title":"CountTaskRow","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"attempt_no":1,"differences":1,"empty_confirmed":false,"id":1,"inventory_count_id":1,"location":"<location>","mod_when":"<mod_when>","mod_who":1,"recount_allowed":false,"snapshot_at":"<snapshot_at>","status":"Open","version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#inventory_count_policy_get":{"post":{"operationId":"inventory_count_policy_get","summary":"Get one cycle-count policy, flat, as its card loads it.","description":"Get one cycle-count policy, flat, as its card loads it.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"inventory_count","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"inventory_count_policy_get"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"inventory_count_policy_get","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"One policy, as its card loads it: the policy flat, and that it is saved — what greys Delete and Run Now on a policy the form has not saved yet (wms-meta-ui 098; a card outside a shell has no parent record to ask).","properties":{"abc":{"anyOf":[{"$ref":"#/components/schemas/AbcRotationSpeed"},{"type":"null"}]},"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"aisle":{"type":["string","null"]},"basis":{"$ref":"#/components/schemas/InventoryCountPolicyBasis"},"code":{"type":"string"},"count_mode":{"$ref":"#/components/schemas/InventoryCountMode"},"daily_limit":{"format":"int32","type":"integer"},"description":{"type":["string","null"]},"freeze_mode":{"allOf":[{"$ref":"#/components/schemas/InventoryCountFreeze"}],"description":"`Hard` freezes the locations the policy's counts count; `Soft` lets stock move (count spec Appendix F)."},"frequency_days":{"format":"int32","type":"integer"},"id":{"format":"int64","type":"integer"},"is_active":{"type":"boolean"},"last_run_on":{"type":["string","null"]},"loc_type":{"anyOf":[{"$ref":"#/components/schemas/LocType"},{"type":"null"}]},"max_recounts":{"format":"int16","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"putawayzone":{"type":["string","null"]},"saved":{"description":"Always `true` on a read: only a saved policy can be read.","type":"boolean"},"sku_abc":{"anyOf":[{"$ref":"#/components/schemas/AbcRotationSpeed"},{"type":"null"}],"description":"`Items`: the SKUs of this ABC class (`sku.abc`)."},"sku_group":{"description":"`Items`: the SKUs of this group (`sku.sku_group`).","type":["string","null"]},"trust_empty_confirmation":{"description":"A location confirmed empty in passing counts as checked then (count spec Appendix L.6). Only a policy over locations reads it.","type":"boolean"},"version":{"format":"int32","type":"integer"}},"required":["add_when","add_who","basis","code","count_mode","daily_limit","freeze_mode","frequency_days","id","is_active","max_recounts","mod_when","mod_who","saved","trust_empty_confirmation","version"],"title":"CountPolicyCard","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"basis":"Locations","code":"<code>","count_mode":"Blind","daily_limit":1,"freeze_mode":{},"frequency_days":1,"id":1,"is_active":false,"max_recounts":1,"mod_when":"<mod_when>","mod_who":1,"saved":false,"trust_empty_confirmation":false,"version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#inventory_count_policy_list":{"post":{"operationId":"inventory_count_policy_list","summary":"List cycle-count policies (by code, active).","description":"List cycle-count policies (by code, active).\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"inventory_count","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"inventory_count_policy_list"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"inventory_count_policy_list"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/InventoryCountPolicy"},"title":"Array_of_InventoryCountPolicy","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"basis":"Locations","code":"<code>","count_mode":"Blind","daily_limit":1,"freeze_mode":{},"frequency_days":1,"id":1,"is_active":false,"max_recounts":1,"mod_when":"<mod_when>","mod_who":1,"trust_empty_confirmation":false,"version":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#inventory_count_tolerance_get":{"post":{"operationId":"inventory_count_tolerance_get","summary":"Count variance tolerances: one class's, as its card loads it.","description":"Count variance tolerances: one class's, as its card loads it.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"inventory_count","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"inventory_count_tolerance_get"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"inventory_count_tolerance_get","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"One ABC class's tolerance. Every rule is optional: `None` does not apply.","properties":{"abc":{"$ref":"#/components/schemas/AbcRotationSpeed"},"approval_value":{"description":"A task's variance worth more than this is accepted only with `inventory_count.accept_large_variance`.","format":"double","type":["number","null"]},"auto_pct":{"description":"…and by at most this percent of what was expected…","format":"double","type":["number","null"]},"auto_qty":{"description":"Accepted on its own when the line differs by at most this many units…","format":"double","type":["number","null"]},"auto_value":{"description":"…and its value is at most this.","format":"double","type":["number","null"]},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"version":{"format":"int32","type":"integer"}},"required":["abc","id","mod_when","mod_who","version"],"title":"InventoryCountTolerance","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"abc":"A","id":1,"mod_when":"<mod_when>","mod_who":1,"version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#inventory_count_tolerance_list":{"post":{"operationId":"inventory_count_tolerance_list","summary":"Count variance tolerances: every SKU ABC class's, A to C.","description":"Count variance tolerances: every SKU ABC class's, A to C.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"inventory_count","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"inventory_count_tolerance_list"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"inventory_count_tolerance_list"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/InventoryCountTolerance"},"title":"Array_of_InventoryCountTolerance","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"abc":"A","id":1,"mod_when":"<mod_when>","mod_who":1,"version":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#location_checks":{"post":{"operationId":"location_checks","summary":"Every check of a location, the latest first: its counts and every answer to \"is it empty?\" — when, who, what it came to, which operation asked.","description":"Every check of a location, the latest first: its counts and every answer to \"is it empty?\" — when, who, what it came to, which operation asked.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"inventory_count","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"location_checks"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"location_checks"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/LocationCheck"},"title":"Array_of_LocationCheck","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"check_kind":"<check_kind>","checked_at":"<checked_at>","id":"<id>","location":"<location>","source":"<source>"}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#lot_transfer_create":{"post":{"operationId":"lot_transfer_create","summary":"Create a Draft lot transfer (its number is drawn unless one is given).","description":"Create a Draft lot transfer (its number is drawn unless one is given).\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"lot_transfer","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"lot_transfer_create"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"comment":{"type":["string","null"]},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"transfer_number":{"default":null,"description":"The number the new form already showed (its counter ran at New, as for receipts and orders); `None` = take the next one now.","type":["string","null"]}},"title":"CreateLotTransfer","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"lot_transfer_create","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"comment":"<comment>","transfer_number":"<transfer_number>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"A document with its lines, as every command answers.","properties":{"header":{"$ref":"#/components/schemas/LotTransfer"},"lines":{"items":{"$ref":"#/components/schemas/LotTransferDetail"},"type":"array"},"summary":{"description":"Where the document stands, in words — what the screen says after a command.","type":"string"}},"required":["header","lines","summary"],"title":"LotTransferView","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"header":{"add_when":"<add_when>","add_who":1,"id":1,"mod_when":"<mod_when>","mod_who":1,"status":"Draft","transfer_number":"<transfer_number>","version":1},"lines":[{"add_when":"<add_when>","add_who":1,"from_lot":"<from_lot>","id":1,"line_no":1,"location":"<location>","lot_policy_id":1,"lot_transfer_id":1,"mod_when":"<mod_when>","mod_who":1,"owner_id":1,"pack_id":1,"qty":1.5,"sku_code":"<sku_code>","status":"Pending","uom":"<uom>","version":1}],"summary":"<summary>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#lot_transfer_update_header":{"post":{"operationId":"lot_transfer_update_header","summary":"Change a Draft lot transfer's comment, on the header version read.","description":"Change a Draft lot transfer's comment, on the header version read.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n**Versioned entities:** lot_transfer (id in data.transfer_id, version in data.expected_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[{"entity":"lot_transfer","id_field":"transfer_id","version_field":"expected_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"lot_transfer","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"lot_transfer_update_header"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"comment":{"description":"`None` = unchanged; blank text clears it.","type":["string","null"]},"expected_version":{"format":"int32","type":"integer"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"transfer_id":{"format":"int64","type":"integer"}},"required":["expected_version","transfer_id"],"title":"UpdateLotTransferHeader","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"lot_transfer_update_header","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"expected_version":1,"transfer_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"A document with its lines, as every command answers.","properties":{"header":{"$ref":"#/components/schemas/LotTransfer"},"lines":{"items":{"$ref":"#/components/schemas/LotTransferDetail"},"type":"array"},"summary":{"description":"Where the document stands, in words — what the screen says after a command.","type":"string"}},"required":["header","lines","summary"],"title":"LotTransferView","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"header":{"add_when":"<add_when>","add_who":1,"id":1,"mod_when":"<mod_when>","mod_who":1,"status":"Draft","transfer_number":"<transfer_number>","version":1},"lines":[{"add_when":"<add_when>","add_who":1,"from_lot":"<from_lot>","id":1,"line_no":1,"location":"<location>","lot_policy_id":1,"lot_transfer_id":1,"mod_when":"<mod_when>","mod_who":1,"owner_id":1,"pack_id":1,"qty":1.5,"sku_code":"<sku_code>","status":"Pending","uom":"<uom>","version":1}],"summary":"<summary>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#lot_transfer_add_line":{"post":{"operationId":"lot_transfer_add_line","summary":"Add a line for a stock row (default: everything free of it), with its serials if tracked.","description":"Add a line for a stock row (default: everything free of it), with its serials if tracked.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"lot_transfer","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"lot_transfer_add_line"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"balance_id":{"description":"The stock row, as the balances screen shows it.","format":"int64","type":"integer"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"qty":{"default":null,"description":"`None` = everything that is free of the row.","format":"double","type":["number","null"]},"serials":{"default":null,"description":"A serial-tracked stock's serials, when a part of it is taken. They ride with the line so that a line is never added without the serials the form named.","items":{"type":"string"},"type":["array","null"]},"transfer_id":{"format":"int64","type":"integer"}},"required":["balance_id","transfer_id"],"title":"AddLotTransferLine","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"lot_transfer_add_line","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"balance_id":1,"transfer_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"A document with its lines, as every command answers.","properties":{"header":{"$ref":"#/components/schemas/LotTransfer"},"lines":{"items":{"$ref":"#/components/schemas/LotTransferDetail"},"type":"array"},"summary":{"description":"Where the document stands, in words — what the screen says after a command.","type":"string"}},"required":["header","lines","summary"],"title":"LotTransferView","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"header":{"add_when":"<add_when>","add_who":1,"id":1,"mod_when":"<mod_when>","mod_who":1,"status":"Draft","transfer_number":"<transfer_number>","version":1},"lines":[{"add_when":"<add_when>","add_who":1,"from_lot":"<from_lot>","id":1,"line_no":1,"location":"<location>","lot_policy_id":1,"lot_transfer_id":1,"mod_when":"<mod_when>","mod_who":1,"owner_id":1,"pack_id":1,"qty":1.5,"sku_code":"<sku_code>","status":"Pending","uom":"<uom>","version":1}],"summary":"<summary>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#lot_transfer_update_line":{"post":{"operationId":"lot_transfer_update_line","summary":"Change one line's quantity (and serials), on the line version read.","description":"Change one line's quantity (and serials), on the line version read.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n**Versioned entities:** lot_transfer_detail (id in data.line_id, version in data.expected_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[{"entity":"lot_transfer_detail","id_field":"line_id","version_field":"expected_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"lot_transfer","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"lot_transfer_update_line"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"expected_version":{"format":"int32","type":"integer"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"line_id":{"format":"int64","type":"integer"},"qty":{"format":"double","type":"number"},"serials":{"default":null,"description":"A serial-tracked stock's serials, named again as a whole; `None` keeps the ones the line names, an empty list names none.","items":{"type":"string"},"type":["array","null"]}},"required":["expected_version","line_id","qty"],"title":"UpdateLotTransferLine","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"lot_transfer_update_line","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"expected_version":1,"line_id":1,"qty":1.5}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"A document with its lines, as every command answers.","properties":{"header":{"$ref":"#/components/schemas/LotTransfer"},"lines":{"items":{"$ref":"#/components/schemas/LotTransferDetail"},"type":"array"},"summary":{"description":"Where the document stands, in words — what the screen says after a command.","type":"string"}},"required":["header","lines","summary"],"title":"LotTransferView","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"header":{"add_when":"<add_when>","add_who":1,"id":1,"mod_when":"<mod_when>","mod_who":1,"status":"Draft","transfer_number":"<transfer_number>","version":1},"lines":[{"add_when":"<add_when>","add_who":1,"from_lot":"<from_lot>","id":1,"line_no":1,"location":"<location>","lot_policy_id":1,"lot_transfer_id":1,"mod_when":"<mod_when>","mod_who":1,"owner_id":1,"pack_id":1,"qty":1.5,"sku_code":"<sku_code>","status":"Pending","uom":"<uom>","version":1}],"summary":"<summary>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#lot_transfer_set_line_attributes":{"post":{"operationId":"lot_transfer_set_line_attributes","summary":"Set the lot attributes a line's stock is given, on the line version read.","description":"Set the lot attributes a line's stock is given, on the line version read.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n**Versioned entities:** lot_transfer_detail (id in data.line_id, version in data.expected_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[{"entity":"lot_transfer_detail","id_field":"line_id","version_field":"expected_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"lot_transfer","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"lot_transfer_set_line_attributes"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"expected_version":{"format":"int32","type":"integer"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"line_id":{"format":"int64","type":"integer"},"values":{"additionalProperties":{"type":["string","null"]},"description":"Attribute code to its new \"to\" value; blank or `None` clears it.","type":"object"}},"required":["expected_version","line_id","values"],"title":"SetLotTransferLineAttributes","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"lot_transfer_set_line_attributes","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"expected_version":1,"line_id":1,"values":{}}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"The line's version after the change, for the grid's next edit.","properties":{"line_id":{"format":"int64","type":"integer"},"new_version":{"format":"int32","type":"integer"}},"required":["line_id","new_version"],"title":"LineAttributesSet","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"line_id":1,"new_version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#lot_transfer_remove_line":{"post":{"operationId":"lot_transfer_remove_line","summary":"Remove one line from a Draft lot transfer, on the line version read.","description":"Remove one line from a Draft lot transfer, on the line version read.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n**Versioned entities:** lot_transfer_detail (id in data.line_id, version in data.expected_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[{"entity":"lot_transfer_detail","id_field":"line_id","version_field":"expected_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"lot_transfer","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"lot_transfer_remove_line"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"expected_version":{"format":"int32","type":"integer"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"line_id":{"format":"int64","type":"integer"}},"required":["expected_version","line_id"],"title":"RemoveLotTransferLine","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"lot_transfer_remove_line","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"expected_version":1,"line_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"A document with its lines, as every command answers.","properties":{"header":{"$ref":"#/components/schemas/LotTransfer"},"lines":{"items":{"$ref":"#/components/schemas/LotTransferDetail"},"type":"array"},"summary":{"description":"Where the document stands, in words — what the screen says after a command.","type":"string"}},"required":["header","lines","summary"],"title":"LotTransferView","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"header":{"add_when":"<add_when>","add_who":1,"id":1,"mod_when":"<mod_when>","mod_who":1,"status":"Draft","transfer_number":"<transfer_number>","version":1},"lines":[{"add_when":"<add_when>","add_who":1,"from_lot":"<from_lot>","id":1,"line_no":1,"location":"<location>","lot_policy_id":1,"lot_transfer_id":1,"mod_when":"<mod_when>","mod_who":1,"owner_id":1,"pack_id":1,"qty":1.5,"sku_code":"<sku_code>","status":"Pending","uom":"<uom>","version":1}],"summary":"<summary>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#lot_transfer_post":{"post":{"operationId":"lot_transfer_post","summary":"Post the transfer: move every line's stock into its new lot, all or nothing.","description":"Post the transfer: move every line's stock into its new lot, all or nothing.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n**Versioned entities:** lot_transfer (id in data.transfer_id, version in data.expected_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[{"entity":"lot_transfer","id_field":"transfer_id","version_field":"expected_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"lot_transfer","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"lot_transfer_post"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"expected_version":{"format":"int32","type":"integer"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"override_grant_id":{"default":null,"description":"A shift lead's grant (`supervisor_override_grant`) authorising this posting into a location an open Hard count is counting (owner's decision 2026-10-21 §6, defect Д-2). The SAME single-use grant the move and the adjustment redeem — overridable like them, because a lot transfer is ordinary warehouse work with no second door of its own that a count pair could slip past.","format":"uuid","type":["string","null"]},"transfer_id":{"format":"int64","type":"integer"}},"required":["expected_version","transfer_id"],"title":"PostLotTransfer","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"lot_transfer_post","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"expected_version":1,"transfer_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"A document with its lines, as every command answers.","properties":{"header":{"$ref":"#/components/schemas/LotTransfer"},"lines":{"items":{"$ref":"#/components/schemas/LotTransferDetail"},"type":"array"},"summary":{"description":"Where the document stands, in words — what the screen says after a command.","type":"string"}},"required":["header","lines","summary"],"title":"LotTransferView","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"header":{"add_when":"<add_when>","add_who":1,"id":1,"mod_when":"<mod_when>","mod_who":1,"status":"Draft","transfer_number":"<transfer_number>","version":1},"lines":[{"add_when":"<add_when>","add_who":1,"from_lot":"<from_lot>","id":1,"line_no":1,"location":"<location>","lot_policy_id":1,"lot_transfer_id":1,"mod_when":"<mod_when>","mod_who":1,"owner_id":1,"pack_id":1,"qty":1.5,"sku_code":"<sku_code>","status":"Pending","uom":"<uom>","version":1}],"summary":"<summary>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#lot_transfer_delete":{"post":{"operationId":"lot_transfer_delete","summary":"Delete a lot transfer that was never posted, with its lines.","description":"Delete a lot transfer that was never posted, with its lines.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n**Versioned entities:** lot_transfer (id in data.transfer_id, version in data.expected_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[{"entity":"lot_transfer","id_field":"transfer_id","version_field":"expected_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"lot_transfer","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"lot_transfer_delete"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"expected_version":{"format":"int32","type":"integer"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"transfer_id":{"format":"int64","type":"integer"}},"required":["expected_version","transfer_id"],"title":"DeleteLotTransfer","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"lot_transfer_delete","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"expected_version":1,"transfer_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"What was removed, for the answer.","properties":{"transfer_id":{"format":"int64","type":"integer"},"transfer_number":{"type":"string"}},"required":["transfer_id","transfer_number"],"title":"DeletedLotTransfer","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"transfer_id":1,"transfer_number":"<transfer_number>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#create_lot_transfer":{"post":{"operationId":"create_lot_transfer","summary":"Create a Draft lot transfer from its header form (number as New drew it, comment).","description":"Create a Draft lot transfer from its header form (number as New drew it, comment).\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog does not say whether this method needs an idempotency key.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"lot_transfer","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"create_lot_transfer"},"params":{"type":"object","properties":{"data":{"description":"What the header form sends on create.","properties":{"comment":{"type":["string","null"]},"transfer_number":{"default":null,"description":"What the new form showed: `generic_new` drew it from the counter.","type":["string","null"]}},"title":"HeaderFormNew","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"create_lot_transfer","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"comment":"<comment>","transfer_number":"<transfer_number>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"The document's header flat, with what the screen greys buttons by — what a card form loads (`generic_rpc_form_load` stores the answer as the record, so the header's columns must sit at the top).","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"comment":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"line_count":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"postable":{"description":"Whether Post would be accepted now — a Draft with at least one line, the command's own rule, so Post greys exactly when the server would refuse it.","type":"boolean"},"posted_at":{"default":null,"type":["string","null"]},"posted_by":{"format":"int64","type":["integer","null"]},"status":{"$ref":"#/components/schemas/LotTransferStatus"},"transfer_number":{"type":"string"},"version":{"format":"int32","type":"integer"}},"required":["add_when","add_who","id","line_count","mod_when","mod_who","postable","status","transfer_number","version"],"title":"LotTransferCard","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"id":1,"line_count":1,"mod_when":"<mod_when>","mod_who":1,"postable":false,"status":"Draft","transfer_number":"<transfer_number>","version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#update_lot_transfer":{"post":{"operationId":"update_lot_transfer","summary":"Save a lot transfer's header form: the comment, on the version read.","description":"Save a lot transfer's header form: the comment, on the version read.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n**Versioned entities:** lot_transfer (id in data.id, version in data.expected_version).\n\n\n**Notes**\n\n- The catalog does not say whether this method needs an idempotency key.\n- Send the current version of the row in `expected_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[{"entity":"lot_transfer","id_field":"id","version_field":"expected_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"lot_transfer","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"update_lot_transfer"},"params":{"type":"object","properties":{"meta":{"type":"object","description":"Control-plane envelope supplied by the platform."},"data":{"properties":{"data":{"description":"What the header form sends on save: only what changed.","properties":{"comment":{"type":["string","null"]}},"title":"HeaderFormChange","type":"object"},"expected_version":{"format":"int32","type":"integer"},"id":{"format":"int64","type":"integer"}},"required":["id","expected_version","data"],"type":"object","description":"Versioned update payload."}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"update_lot_transfer","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"id":1,"expected_version":1,"data":{"comment":"<comment>"}}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"The document's header flat, with what the screen greys buttons by — what a card form loads (`generic_rpc_form_load` stores the answer as the record, so the header's columns must sit at the top).","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"comment":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"line_count":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"postable":{"description":"Whether Post would be accepted now — a Draft with at least one line, the command's own rule, so Post greys exactly when the server would refuse it.","type":"boolean"},"posted_at":{"default":null,"type":["string","null"]},"posted_by":{"format":"int64","type":["integer","null"]},"status":{"$ref":"#/components/schemas/LotTransferStatus"},"transfer_number":{"type":"string"},"version":{"format":"int32","type":"integer"}},"required":["add_when","add_who","id","line_count","mod_when","mod_who","postable","status","transfer_number","version"],"title":"LotTransferCard","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"id":1,"line_count":1,"mod_when":"<mod_when>","mod_who":1,"postable":false,"status":"Draft","transfer_number":"<transfer_number>","version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#create_lot_transfer_line":{"post":{"operationId":"create_lot_transfer_line","summary":"Add a line from the line form: the document and the stock row picked, a quantity, serials.","description":"Add a line from the line form: the document and the stock row picked, a quantity, serials.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog does not say whether this method needs an idempotency key.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"lot_transfer","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"create_lot_transfer_line"},"params":{"type":"object","properties":{"data":{"description":"What the line form sends on create. The document comes from the parent record (`generic_new`'s parent FK); the stock row is picked.","properties":{"balance_id":{"format":"int64","type":"integer"},"lot_transfer_id":{"format":"int64","type":"integer"},"qty":{"default":null,"description":"Empty = everything that is free of the row.","format":"double","type":["number","null"]},"serials":{"default":null,"description":"A serial-tracked stock's serials, one a line.","type":["string","null"]}},"required":["balance_id","lot_transfer_id"],"title":"LineFormNew","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"create_lot_transfer_line","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"balance_id":1,"lot_transfer_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"A line as its form shows it: the line flat, the owner and the container by code, how much of its stock is free now, and the serials it names.","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"available":{"description":"What is free of the line's stock right now — the line may ask for up to it; 0 when the stock row is gone.","format":"double","type":"number"},"container_id":{"format":"int64","type":["integer","null"]},"editable":{"description":"Whether the line's quantity and serials may still change — the line is `Pending`, i.e. its document is a Draft (Post moves every line to `Posted`). The card greys both fields on it (spec §8: after Post everything is read-only).","type":"boolean"},"from_lot":{"type":"string"},"id":{"format":"int64","type":"integer"},"line_no":{"format":"int32","type":"integer"},"location":{"type":"string"},"lot_policy_id":{"description":"The SKU's lot policy when the line was added; POST refuses the line when the policy is another one now.","format":"int64","type":"integer"},"lot_transfer_id":{"format":"int64","type":"integer"},"lpn":{"type":["string","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"owner_code":{"type":["string","null"]},"owner_id":{"format":"int64","type":"integer"},"pack_id":{"format":"int64","type":"integer"},"qty":{"format":"double","type":"number"},"serials":{"description":"The serials the line names, one a line.","type":["string","null"]},"sku_code":{"type":"string"},"status":{"$ref":"#/components/schemas/LotTransferLineStatus"},"to_lot":{"type":["string","null"]},"to_lot_created":{"type":["boolean","null"]},"transaction_log_code":{"type":["string","null"]},"uom":{"type":"string"},"version":{"format":"int32","type":"integer"}},"required":["add_when","add_who","available","editable","from_lot","id","line_no","location","lot_policy_id","lot_transfer_id","mod_when","mod_who","owner_id","pack_id","qty","sku_code","status","uom","version"],"title":"LotTransferLineCard","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"available":1.5,"editable":false,"from_lot":"<from_lot>","id":1,"line_no":1,"location":"<location>","lot_policy_id":1,"lot_transfer_id":1,"mod_when":"<mod_when>","mod_who":1,"owner_id":1,"pack_id":1,"qty":1.5,"sku_code":"<sku_code>","status":"Pending","uom":"<uom>","version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#update_lot_transfer_line":{"post":{"operationId":"update_lot_transfer_line","summary":"Save a line form: quantity and serials, on the line's version read.","description":"Save a line form: quantity and serials, on the line's version read.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n**Versioned entities:** lot_transfer_detail (id in data.id, version in data.expected_version).\n\n\n**Notes**\n\n- The catalog does not say whether this method needs an idempotency key.\n- Send the current version of the row in `expected_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[{"entity":"lot_transfer_detail","id_field":"id","version_field":"expected_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"lot_transfer","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"update_lot_transfer_line"},"params":{"type":"object","properties":{"meta":{"type":"object","description":"Control-plane envelope supplied by the platform."},"data":{"properties":{"data":{"description":"What the line form sends on save: only what changed. The stock never changes: remove the line and add another.","properties":{"qty":{"format":"double","type":["number","null"]},"serials":{"default":null,"type":["string","null"]}},"title":"LineFormChange","type":"object"},"expected_version":{"format":"int32","type":"integer"},"id":{"format":"int64","type":"integer"}},"required":["id","expected_version","data"],"type":"object","description":"Versioned update payload."}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"update_lot_transfer_line","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"id":1,"expected_version":1,"data":{"qty":1.5,"serials":"<serials>"}}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"A line as its form shows it: the line flat, the owner and the container by code, how much of its stock is free now, and the serials it names.","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"available":{"description":"What is free of the line's stock right now — the line may ask for up to it; 0 when the stock row is gone.","format":"double","type":"number"},"container_id":{"format":"int64","type":["integer","null"]},"editable":{"description":"Whether the line's quantity and serials may still change — the line is `Pending`, i.e. its document is a Draft (Post moves every line to `Posted`). The card greys both fields on it (spec §8: after Post everything is read-only).","type":"boolean"},"from_lot":{"type":"string"},"id":{"format":"int64","type":"integer"},"line_no":{"format":"int32","type":"integer"},"location":{"type":"string"},"lot_policy_id":{"description":"The SKU's lot policy when the line was added; POST refuses the line when the policy is another one now.","format":"int64","type":"integer"},"lot_transfer_id":{"format":"int64","type":"integer"},"lpn":{"type":["string","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"owner_code":{"type":["string","null"]},"owner_id":{"format":"int64","type":"integer"},"pack_id":{"format":"int64","type":"integer"},"qty":{"format":"double","type":"number"},"serials":{"description":"The serials the line names, one a line.","type":["string","null"]},"sku_code":{"type":"string"},"status":{"$ref":"#/components/schemas/LotTransferLineStatus"},"to_lot":{"type":["string","null"]},"to_lot_created":{"type":["boolean","null"]},"transaction_log_code":{"type":["string","null"]},"uom":{"type":"string"},"version":{"format":"int32","type":"integer"}},"required":["add_when","add_who","available","editable","from_lot","id","line_no","location","lot_policy_id","lot_transfer_id","mod_when","mod_who","owner_id","pack_id","qty","sku_code","status","uom","version"],"title":"LotTransferLineCard","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"available":1.5,"editable":false,"from_lot":"<from_lot>","id":1,"line_no":1,"location":"<location>","lot_policy_id":1,"lot_transfer_id":1,"mod_when":"<mod_when>","mod_who":1,"owner_id":1,"pack_id":1,"qty":1.5,"sku_code":"<sku_code>","status":"Pending","uom":"<uom>","version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#lot_transfer_list":{"post":{"operationId":"lot_transfer_list","summary":"List lot transfers with the poster's name, filtered and sorted like any list (by status, number, poster).","description":"List lot transfers with the poster's name, filtered and sorted like any list (by status, number, poster).\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"lot_transfer","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"lot_transfer_list"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"lot_transfer_list"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/LotTransferListRow"},"title":"Array_of_LotTransferListRow","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"id":1,"mod_when":"<mod_when>","mod_who":1,"status":"Draft","transfer_number":"<transfer_number>","version":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#lot_transfer_card_get":{"post":{"operationId":"lot_transfer_card_get","summary":"Get one lot transfer's header, flat, with its line count and whether Post is accepted.","description":"Get one lot transfer's header, flat, with its line count and whether Post is accepted.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"lot_transfer","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"lot_transfer_card_get"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"lot_transfer_card_get","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"The document's header flat, with what the screen greys buttons by — what a card form loads (`generic_rpc_form_load` stores the answer as the record, so the header's columns must sit at the top).","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"comment":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"line_count":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"postable":{"description":"Whether Post would be accepted now — a Draft with at least one line, the command's own rule, so Post greys exactly when the server would refuse it.","type":"boolean"},"posted_at":{"default":null,"type":["string","null"]},"posted_by":{"format":"int64","type":["integer","null"]},"status":{"$ref":"#/components/schemas/LotTransferStatus"},"transfer_number":{"type":"string"},"version":{"format":"int32","type":"integer"}},"required":["add_when","add_who","id","line_count","mod_when","mod_who","postable","status","transfer_number","version"],"title":"LotTransferCard","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"id":1,"line_count":1,"mod_when":"<mod_when>","mod_who":1,"postable":false,"status":"Draft","transfer_number":"<transfer_number>","version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#lot_transfer_line_list":{"post":{"operationId":"lot_transfer_line_list","summary":"List lot transfer lines with the owner, container and SKU names, filtered and sorted like any list (by document, LPN, owner).","description":"List lot transfer lines with the owner, container and SKU names, filtered and sorted like any list (by document, LPN, owner).\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"lot_transfer","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"lot_transfer_line_list"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"lot_transfer_line_list"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/LotTransferLineRow"},"title":"Array_of_LotTransferLineRow","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"from_lot":"<from_lot>","id":1,"line_no":1,"location":"<location>","lot_policy_id":1,"lot_transfer_id":1,"mod_when":"<mod_when>","mod_who":1,"owner_id":1,"pack_id":1,"qty":1.5,"sku_code":"<sku_code>","status":"Pending","uom":"<uom>","version":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_lot_transfer_line":{"post":{"operationId":"get_lot_transfer_line","summary":"Get one lot transfer line as its form shows it (owner and container by code, quantity free now, serials).","description":"Get one lot transfer line as its form shows it (owner and container by code, quantity free now, serials).\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"lot_transfer","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_lot_transfer_line"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_lot_transfer_line","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"A line as its form shows it: the line flat, the owner and the container by code, how much of its stock is free now, and the serials it names.","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"available":{"description":"What is free of the line's stock right now — the line may ask for up to it; 0 when the stock row is gone.","format":"double","type":"number"},"container_id":{"format":"int64","type":["integer","null"]},"editable":{"description":"Whether the line's quantity and serials may still change — the line is `Pending`, i.e. its document is a Draft (Post moves every line to `Posted`). The card greys both fields on it (spec §8: after Post everything is read-only).","type":"boolean"},"from_lot":{"type":"string"},"id":{"format":"int64","type":"integer"},"line_no":{"format":"int32","type":"integer"},"location":{"type":"string"},"lot_policy_id":{"description":"The SKU's lot policy when the line was added; POST refuses the line when the policy is another one now.","format":"int64","type":"integer"},"lot_transfer_id":{"format":"int64","type":"integer"},"lpn":{"type":["string","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"owner_code":{"type":["string","null"]},"owner_id":{"format":"int64","type":"integer"},"pack_id":{"format":"int64","type":"integer"},"qty":{"format":"double","type":"number"},"serials":{"description":"The serials the line names, one a line.","type":["string","null"]},"sku_code":{"type":"string"},"status":{"$ref":"#/components/schemas/LotTransferLineStatus"},"to_lot":{"type":["string","null"]},"to_lot_created":{"type":["boolean","null"]},"transaction_log_code":{"type":["string","null"]},"uom":{"type":"string"},"version":{"format":"int32","type":"integer"}},"required":["add_when","add_who","available","editable","from_lot","id","line_no","location","lot_policy_id","lot_transfer_id","mod_when","mod_who","owner_id","pack_id","qty","sku_code","status","uom","version"],"title":"LotTransferLineCard","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"available":1.5,"editable":false,"from_lot":"<from_lot>","id":1,"line_no":1,"location":"<location>","lot_policy_id":1,"lot_transfer_id":1,"mod_when":"<mod_when>","mod_who":1,"owner_id":1,"pack_id":1,"qty":1.5,"sku_code":"<sku_code>","status":"Pending","uom":"<uom>","version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#lot_transfer_line_attribute_list":{"post":{"operationId":"lot_transfer_line_attribute_list","summary":"List the lot attributes lines give their stock, filtered by line, with the grid key and line version.","description":"List the lot attributes lines give their stock, filtered by line, with the grid key and line version.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"lot_transfer","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"lot_transfer_line_attribute_list"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"lot_transfer_line_attribute_list"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/LotTransferAttributeRow"},"title":"Array_of_LotTransferAttributeRow","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"attribute_code":"<attribute_code>","detail_id":1,"id":1,"line_status":"Pending","line_version":1,"pk":"<pk>","required":false,"sort_order":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#lot_create_by_attributes":{"post":{"operationId":"lot_create_by_attributes","summary":"A lot of these attributes, made as the SKU's lot policy says: the matching one or a new one (reuse), always a new one (per receipt, per receive event).","description":"A lot of these attributes, made as the SKU's lot policy says: the matching one or a new one (reuse), always a new one (per receipt, per receive event).\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"lot_by_attributes","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"lot_create_by_attributes"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"description":"[`create_new_lot_by_attrs`] as a command: stateless (the person creates the lot whatever he saw before — it is what is in his hand), keyed for replay.","properties":{"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"lot_attributes":{"additionalProperties":{"type":"string"},"default":{},"type":"object"},"owner_code":{"default":null,"type":["string","null"]},"sku_code":{"type":"string"}},"required":["sku_code"],"title":"CreateLotByAttributes","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"lot_create_by_attributes","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"sku_code":"<sku_code>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"The lot the attributes name, and whether this call made it.","properties":{"created":{"description":"`false` when, under a «reuse matching lot» policy, a lot with exactly these attributes already existed — it is returned instead of a second.","type":"boolean"},"lot":{"type":"string"},"owner_id":{"format":"int64","type":"integer"},"sku_code":{"type":"string"}},"required":["created","lot","owner_id","sku_code"],"title":"NewLot","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"created":false,"lot":"<lot>","owner_id":1,"sku_code":"<sku_code>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#lot_attribute_template":{"post":{"operationId":"lot_attribute_template","summary":"What a SKU's lot policy asks for: prompts to search a lot by and to create one with.","description":"What a SKU's lot policy asks for: prompts to search a lot by and to create one with.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"lot_by_attributes","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"lot_attribute_template"},"params":{"type":"object","properties":{"data":{"description":"A SKU, and its owner when the code is several owners'.","properties":{"owner_code":{"default":null,"type":["string","null"]},"sku_code":{"type":"string"}},"required":["sku_code"],"title":"LotSkuInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"lot_attribute_template","params":{"data":{"sku_code":"<sku_code>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"The SKU's lot-policy prompts, twice: to SEARCH by (nothing required — a person types what he can read) and to CREATE with (required as the policy says).","properties":{"ask_receipt":{"description":"Whether the search asks the receipt number on the label: only under a «one lot per receipt» / «one lot per receive event» policy, where lots of the same attributes are many by design and the receipt is what tells them apart. Under «reuse matching lot» the attributes do.","type":"boolean"},"create_prompts":{"items":{"$ref":"#/components/schemas/LotPrompt"},"type":"array"},"owner_id":{"format":"int64","type":"integer"},"search_prompts":{"items":{"$ref":"#/components/schemas/LotPrompt"},"type":"array"},"sku_code":{"type":"string"}},"required":["ask_receipt","create_prompts","owner_id","search_prompts","sku_code"],"title":"LotAttributeTemplate","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"ask_receipt":false,"create_prompts":[{"attrib_code":"<attrib_code>","required":false,"show":false}],"owner_id":1,"search_prompts":[{"attrib_code":"<attrib_code>","required":false,"show":false}],"sku_code":"<sku_code>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#lot_search_by_attributes":{"post":{"operationId":"lot_search_by_attributes","summary":"A SKU's lots matching the attributes and the receipt given, each with its receipts (no quantities); creates nothing.","description":"A SKU's lots matching the attributes and the receipt given, each with its receipts (no quantities); creates nothing.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"lot_by_attributes","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"lot_search_by_attributes"},"params":{"type":"object","properties":{"data":{"description":"A SKU and what a person could read off the goods: the lot's attributes, and the receipt number its label carries.","properties":{"lot_attributes":{"additionalProperties":{"type":"string"},"default":{},"type":"object"},"owner_code":{"default":null,"type":["string","null"]},"receipt_number":{"default":null,"type":["string","null"]},"sku_code":{"type":"string"}},"required":["sku_code"],"title":"LotSearchInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"lot_search_by_attributes","params":{"data":{"sku_code":"<sku_code>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/LotFound"},"title":"Array_of_LotFound","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"attributes":{},"label":"<label>","lot":"<lot>","other_receipts":1,"owner_id":1,"sku_code":"<sku_code>"}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#barcode_scan_parse":{"post":{"operationId":"barcode_scan_parse","summary":"Read one scan with the auto-detected barcode formats: the format that claimed it and its normalized values (GTIN, LPN, serial, internal lot, location, lot attributes). A scan no format claims has none; one a format claims and cannot read is refused BARCODE_UNREADABLE.","description":"Read one scan with the auto-detected barcode formats: the format that claimed it and its normalized values (GTIN, LPN, serial, internal lot, location, lot attributes). A scan no format claims has none; one a format claims and cannot read is refused BARCODE_UNREADABLE.\n\n**Category:** `query`. Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["inventory"],"x-quark-category":"query","x-quark-category-declared":true,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"barcode_scan","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"barcode_scan_parse"},"params":{"type":"object","properties":{"data":{"description":"The scan as the terminal holds it: AIM symbology prefix and GS separators included.","properties":{"raw":{"type":"string"}},"required":["raw"],"title":"ScanToRead","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"barcode_scan_parse","params":{"data":{"raw":"<raw>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"What one scan says: the format that claimed it and its values, in the order of `ScanElement` (LPN, GTIN, internal lot, serial, location, then lot attributes by code).","properties":{"format":{"description":"The claiming format's name; `None` for a scan no format claims.","type":["string","null"]},"plain":{"description":"A scan no format claims: its code, trimmed and without the AIM symbology identifier a scanner may send for every label (`]E0` + EAN-13 is the EAN-13). `None` for a scan a format read.","type":["string","null"]},"values":{"items":{"$ref":"#/components/schemas/ScanValue"},"type":"array"}},"required":["values"],"title":"ScanReading","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"values":[{"element":"<element>","value":"<value>"}]}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#load_get":{"post":{"operationId":"load_get","summary":"Read current Load, transport, static manifest and membership from one snapshot.","description":"Read current Load, transport, static manifest and membership from one snapshot.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"loading","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"load_get"},"params":{"type":"object","properties":{"data":{"properties":{"load_id":{"format":"int64","type":"integer"}},"required":["load_id"],"title":"LoadIdInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"load_get","params":{"data":{"load_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"load":{"$ref":"#/components/schemas/OutboundLoad"},"loaded":{"items":{"$ref":"#/components/schemas/LoadUnitFact"},"type":"array"},"loaded_count":{"format":"uint","minimum":0,"type":"integer"},"manifest":{"items":{"$ref":"#/components/schemas/LoadManifestUnit"},"type":"array"},"remaining_count":{"format":"uint","minimum":0,"type":"integer"},"required_count":{"format":"uint","minimum":0,"type":"integer"},"transport":{"$ref":"#/components/schemas/TransportUnit"}},"required":["load","loaded","loaded_count","manifest","remaining_count","required_count","transport"],"title":"LoadDetails","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"load":{"code":"<code>","dispatch_id":1,"frozen_plan_version":1,"id":1,"last_actual_sequence":1,"load_plan_id":1,"opened_at":"<opened_at>","opened_by":1,"require_staged":false,"sequence_policy":"ReverseStop","status":"Open","transport_confirmed":false,"transport_external_ref":"<transport_external_ref>","transport_unit_id":1,"version":1},"loaded":[{"actual_sequence":1,"content_snapshot":null,"id":1,"load_id":1,"loaded_at":"<loaded_at>","loaded_by":1,"outbound_flow_unit_id":1,"result":null,"root_code":"<root_code>","root_container_id":1,"stop_id":1}],"loaded_count":1,"manifest":[{"assignment_version":1,"container_ids":null,"load_id":1,"outbound_flow_unit_id":1,"planned_sequence":1,"root_code":"<root_code>","root_container_id":1,"stop_id":1,"stop_sequence":1,"unit_version":1}],"remaining_count":1,"required_count":1,"transport":{"active":false,"external_ref":"<external_ref>","id":1,"kind":"Truck","version":1}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#load_lookup":{"post":{"operationId":"load_lookup","summary":"Look up an exact Load label without changing progress or stock.","description":"Look up an exact Load label without changing progress or stock.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"loading","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"load_lookup"},"params":{"type":"object","properties":{"data":{"properties":{"load_code":{"type":"string"}},"required":["load_code"],"title":"LoadCodeInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"load_lookup","params":{"data":{"load_code":"<load_code>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"load":{"$ref":"#/components/schemas/OutboundLoad"},"loaded":{"items":{"$ref":"#/components/schemas/LoadUnitFact"},"type":"array"},"loaded_count":{"format":"uint","minimum":0,"type":"integer"},"manifest":{"items":{"$ref":"#/components/schemas/LoadManifestUnit"},"type":"array"},"remaining_count":{"format":"uint","minimum":0,"type":"integer"},"required_count":{"format":"uint","minimum":0,"type":"integer"},"transport":{"$ref":"#/components/schemas/TransportUnit"}},"required":["load","loaded","loaded_count","manifest","remaining_count","required_count","transport"],"title":"LoadDetails","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"load":{"code":"<code>","dispatch_id":1,"frozen_plan_version":1,"id":1,"last_actual_sequence":1,"load_plan_id":1,"opened_at":"<opened_at>","opened_by":1,"require_staged":false,"sequence_policy":"ReverseStop","status":"Open","transport_confirmed":false,"transport_external_ref":"<transport_external_ref>","transport_unit_id":1,"version":1},"loaded":[{"actual_sequence":1,"content_snapshot":null,"id":1,"load_id":1,"loaded_at":"<loaded_at>","loaded_by":1,"outbound_flow_unit_id":1,"result":null,"root_code":"<root_code>","root_container_id":1,"stop_id":1}],"loaded_count":1,"manifest":[{"assignment_version":1,"container_ids":null,"load_id":1,"outbound_flow_unit_id":1,"planned_sequence":1,"root_code":"<root_code>","root_container_id":1,"stop_id":1,"stop_sequence":1,"unit_version":1}],"remaining_count":1,"required_count":1,"transport":{"active":false,"external_ref":"<external_ref>","id":1,"kind":"Truck","version":1}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#load_unit_review":{"post":{"operationId":"load_unit_review","summary":"Validate a scanned physical root and show its card; no Loading commitment.","description":"Validate a scanned physical root and show its card; no Loading commitment.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"loading","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"load_unit_review"},"params":{"type":"object","properties":{"data":{"properties":{"load_id":{"format":"int64","type":"integer"},"scanned_root_code":{"type":"string"}},"required":["load_id","scanned_root_code"],"title":"LoadUnitScanInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"load_unit_review","params":{"data":{"load_id":1,"scanned_root_code":"<scanned_root_code>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"current_location":{"type":"string"},"load":{"$ref":"#/components/schemas/OutboundLoad"},"next_actual_sequence":{"format":"int32","type":"integer"},"qty":{"format":"double","type":"number"},"serial_count":{"format":"uint","minimum":0,"type":"integer"},"unit":{"$ref":"#/components/schemas/LoadManifestUnit"}},"required":["current_location","load","next_actual_sequence","qty","serial_count","unit"],"title":"LoadUnitReview","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"current_location":"<current_location>","load":{"code":"<code>","dispatch_id":1,"frozen_plan_version":1,"id":1,"last_actual_sequence":1,"load_plan_id":1,"opened_at":"<opened_at>","opened_by":1,"require_staged":false,"sequence_policy":"ReverseStop","status":"Open","transport_confirmed":false,"transport_external_ref":"<transport_external_ref>","transport_unit_id":1,"version":1},"next_actual_sequence":1,"qty":1.5,"serial_count":1,"unit":{"assignment_version":1,"container_ids":null,"load_id":1,"outbound_flow_unit_id":1,"planned_sequence":1,"root_code":"<root_code>","root_container_id":1,"stop_id":1,"stop_sequence":1,"unit_version":1}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#load_header_get":{"post":{"operationId":"load_header_get","summary":"Read a flat Load header and its version without advancing physical loading or shipment.","description":"Read a flat Load header and its version without advancing physical loading or shipment.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"loading","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"load_header_get"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"load_header_get","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"active_stop_id":{"format":"int64","type":["integer","null"]},"code":{"type":"string"},"completed_at":{"default":null,"type":["string","null"]},"dispatch_id":{"format":"int64","type":"integer"},"door_location_code":{"type":["string","null"]},"frozen_plan_version":{"format":"int32","type":"integer"},"id":{"format":"int64","type":"integer"},"last_actual_sequence":{"format":"int32","type":"integer"},"load_plan_id":{"format":"int64","type":"integer"},"opened_at":{"type":"string"},"opened_by":{"format":"int64","type":"integer"},"require_staged":{"type":"boolean"},"sequence_policy":{"$ref":"#/components/schemas/LoadingSequencePolicy"},"shipped_at":{"default":null,"type":["string","null"]},"started_at":{"default":null,"type":["string","null"]},"status":{"$ref":"#/components/schemas/LoadStatus"},"transport_confirmed":{"type":"boolean"},"transport_external_ref":{"type":"string"},"transport_unit_id":{"format":"int64","type":"integer"},"version":{"format":"int32","type":"integer"}},"required":["code","dispatch_id","frozen_plan_version","id","last_actual_sequence","load_plan_id","opened_at","opened_by","require_staged","sequence_policy","status","transport_confirmed","transport_external_ref","transport_unit_id","version"],"title":"OutboundLoad","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"code":"<code>","dispatch_id":1,"frozen_plan_version":1,"id":1,"last_actual_sequence":1,"load_plan_id":1,"opened_at":"<opened_at>","opened_by":1,"require_staged":false,"sequence_policy":"ReverseStop","status":"Open","transport_confirmed":false,"transport_external_ref":"<transport_external_ref>","transport_unit_id":1,"version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#load_header_list":{"post":{"operationId":"load_header_list","summary":"Filter and page Load headers; no claims, loading facts or Goods Issue.","description":"Filter and page Load headers; no claims, loading facts or Goods Issue.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"loading","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"load_header_list"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"load_header_list"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/OutboundLoad"},"title":"Array_of_OutboundLoad","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"code":"<code>","dispatch_id":1,"frozen_plan_version":1,"id":1,"last_actual_sequence":1,"load_plan_id":1,"opened_at":"<opened_at>","opened_by":1,"require_staged":false,"sequence_policy":"ReverseStop","status":"Open","transport_confirmed":false,"transport_external_ref":"<transport_external_ref>","transport_unit_id":1,"version":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#transport_unit_get":{"post":{"operationId":"transport_unit_get","summary":"Read a transport resource card without changing or claiming it.","description":"Read a transport resource card without changing or claiming it.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"loading","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"transport_unit_get"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"transport_unit_get","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"active":{"type":"boolean"},"carrier_id":{"format":"int64","type":["integer","null"]},"external_ref":{"type":"string"},"id":{"format":"int64","type":"integer"},"kind":{"$ref":"#/components/schemas/TransportUnitKind"},"plate":{"type":["string","null"]},"version":{"format":"int32","type":"integer"}},"required":["active","external_ref","id","kind","version"],"title":"TransportUnit","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"active":false,"external_ref":"<external_ref>","id":1,"kind":"Truck","version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#transport_unit_list":{"post":{"operationId":"transport_unit_list","summary":"List transport resources with ordinary list filtering and pagination; no loading claims.","description":"List transport resources with ordinary list filtering and pagination; no loading claims.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"loading","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"transport_unit_list"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"transport_unit_list"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/TransportUnit"},"title":"Array_of_TransportUnit","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"active":false,"external_ref":"<external_ref>","id":1,"kind":"Truck","version":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#transport_unit_register":{"post":{"operationId":"transport_unit_register","summary":"Register a transport resource, never a warehouse container.","description":"Register a transport resource, never a warehouse container.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"loading","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"transport_unit_register"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"carrier_id":{"format":"int64","type":["integer","null"]},"external_ref":{"type":"string"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"kind":{"$ref":"#/components/schemas/TransportUnitKind"},"plate":{"type":["string","null"]}},"required":["external_ref","kind"],"title":"RegisterTransportUnit","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"transport_unit_register","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"external_ref":"<external_ref>","kind":"Truck"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"active":{"type":"boolean"},"carrier_id":{"format":"int64","type":["integer","null"]},"external_ref":{"type":"string"},"id":{"format":"int64","type":"integer"},"kind":{"$ref":"#/components/schemas/TransportUnitKind"},"plate":{"type":["string","null"]},"version":{"format":"int32","type":"integer"}},"required":["active","external_ref","id","kind","version"],"title":"TransportUnit","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"active":false,"external_ref":"<external_ref>","id":1,"kind":"Truck","version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#load_open":{"post":{"operationId":"load_open","summary":"Open Load from a reviewed Frozen plan and registered transport.","description":"Open Load from a reviewed Frozen plan and registered transport.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n**Versioned entities:** load_plan (id in data.load_plan_id, version in data.expected_plan_version); transport_unit (id in data.transport_unit_id, version in data.expected_transport_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_plan_version`, `expected_transport_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[{"entity":"load_plan","id_field":"load_plan_id","version_field":"expected_plan_version"},{"entity":"transport_unit","id_field":"transport_unit_id","version_field":"expected_transport_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"loading","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"load_open"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"expected_plan_version":{"format":"int32","type":"integer"},"expected_transport_version":{"format":"int32","type":"integer"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"load_plan_id":{"format":"int64","type":"integer"},"transport_unit_id":{"format":"int64","type":"integer"}},"required":["expected_plan_version","expected_transport_version","load_plan_id","transport_unit_id"],"title":"OpenLoad","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"load_open","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"expected_plan_version":1,"expected_transport_version":1,"load_plan_id":1,"transport_unit_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"active_stop_id":{"format":"int64","type":["integer","null"]},"code":{"type":"string"},"completed_at":{"default":null,"type":["string","null"]},"dispatch_id":{"format":"int64","type":"integer"},"door_location_code":{"type":["string","null"]},"frozen_plan_version":{"format":"int32","type":"integer"},"id":{"format":"int64","type":"integer"},"last_actual_sequence":{"format":"int32","type":"integer"},"load_plan_id":{"format":"int64","type":"integer"},"opened_at":{"type":"string"},"opened_by":{"format":"int64","type":"integer"},"require_staged":{"type":"boolean"},"sequence_policy":{"$ref":"#/components/schemas/LoadingSequencePolicy"},"shipped_at":{"default":null,"type":["string","null"]},"started_at":{"default":null,"type":["string","null"]},"status":{"$ref":"#/components/schemas/LoadStatus"},"transport_confirmed":{"type":"boolean"},"transport_external_ref":{"type":"string"},"transport_unit_id":{"format":"int64","type":"integer"},"version":{"format":"int32","type":"integer"}},"required":["code","dispatch_id","frozen_plan_version","id","last_actual_sequence","load_plan_id","opened_at","opened_by","require_staged","sequence_policy","status","transport_confirmed","transport_external_ref","transport_unit_id","version"],"title":"OutboundLoad","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"code":"<code>","dispatch_id":1,"frozen_plan_version":1,"id":1,"last_actual_sequence":1,"load_plan_id":1,"opened_at":"<opened_at>","opened_by":1,"require_staged":false,"sequence_policy":"ReverseStop","status":"Open","transport_confirmed":false,"transport_external_ref":"<transport_external_ref>","transport_unit_id":1,"version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#load_unit_remove":{"post":{"operationId":"load_unit_remove","summary":"Controlled physical unload acknowledgment with required scan/reason; preserve history and stock.","description":"Controlled physical unload acknowledgment with required scan/reason; preserve history and stock.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n**Versioned entities:** outbound_load (id in data.load_id, version in data.expected_load_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_load_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[{"entity":"outbound_load","id_field":"load_id","version_field":"expected_load_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"loading","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"load_unit_remove"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"expected_load_version":{"format":"int32","type":"integer"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"load_id":{"format":"int64","type":"integer"},"outbound_flow_unit_id":{"format":"int64","type":"integer"},"reason":{"type":"string"},"scanned_root_code":{"type":"string"}},"required":["expected_load_version","load_id","outbound_flow_unit_id","reason","scanned_root_code"],"title":"RemoveLoadUnit","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"load_unit_remove","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"expected_load_version":1,"load_id":1,"outbound_flow_unit_id":1,"reason":"<reason>","scanned_root_code":"<scanned_root_code>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"active_stop_id":{"format":"int64","type":["integer","null"]},"code":{"type":"string"},"completed_at":{"default":null,"type":["string","null"]},"dispatch_id":{"format":"int64","type":"integer"},"door_location_code":{"type":["string","null"]},"frozen_plan_version":{"format":"int32","type":"integer"},"id":{"format":"int64","type":"integer"},"last_actual_sequence":{"format":"int32","type":"integer"},"load_plan_id":{"format":"int64","type":"integer"},"opened_at":{"type":"string"},"opened_by":{"format":"int64","type":"integer"},"require_staged":{"type":"boolean"},"sequence_policy":{"$ref":"#/components/schemas/LoadingSequencePolicy"},"shipped_at":{"default":null,"type":["string","null"]},"started_at":{"default":null,"type":["string","null"]},"status":{"$ref":"#/components/schemas/LoadStatus"},"transport_confirmed":{"type":"boolean"},"transport_external_ref":{"type":"string"},"transport_unit_id":{"format":"int64","type":"integer"},"version":{"format":"int32","type":"integer"}},"required":["code","dispatch_id","frozen_plan_version","id","last_actual_sequence","load_plan_id","opened_at","opened_by","require_staged","sequence_policy","status","transport_confirmed","transport_external_ref","transport_unit_id","version"],"title":"OutboundLoad","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"code":"<code>","dispatch_id":1,"frozen_plan_version":1,"id":1,"last_actual_sequence":1,"load_plan_id":1,"opened_at":"<opened_at>","opened_by":1,"require_staged":false,"sequence_policy":"ReverseStop","status":"Open","transport_confirmed":false,"transport_external_ref":"<transport_external_ref>","transport_unit_id":1,"version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#load_cancel":{"post":{"operationId":"load_cancel","summary":"Cancel an empty not-shipped Load after all physical units were explicitly unloaded.","description":"Cancel an empty not-shipped Load after all physical units were explicitly unloaded.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n**Versioned entities:** outbound_load (id in data.load_id, version in data.expected_load_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_load_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[{"entity":"outbound_load","id_field":"load_id","version_field":"expected_load_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"loading","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"load_cancel"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"expected_load_version":{"format":"int32","type":"integer"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"load_id":{"format":"int64","type":"integer"},"reason":{"type":"string"}},"required":["expected_load_version","load_id","reason"],"title":"CancelLoad","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"load_cancel","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"expected_load_version":1,"load_id":1,"reason":"<reason>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"active_stop_id":{"format":"int64","type":["integer","null"]},"code":{"type":"string"},"completed_at":{"default":null,"type":["string","null"]},"dispatch_id":{"format":"int64","type":"integer"},"door_location_code":{"type":["string","null"]},"frozen_plan_version":{"format":"int32","type":"integer"},"id":{"format":"int64","type":"integer"},"last_actual_sequence":{"format":"int32","type":"integer"},"load_plan_id":{"format":"int64","type":"integer"},"opened_at":{"type":"string"},"opened_by":{"format":"int64","type":"integer"},"require_staged":{"type":"boolean"},"sequence_policy":{"$ref":"#/components/schemas/LoadingSequencePolicy"},"shipped_at":{"default":null,"type":["string","null"]},"started_at":{"default":null,"type":["string","null"]},"status":{"$ref":"#/components/schemas/LoadStatus"},"transport_confirmed":{"type":"boolean"},"transport_external_ref":{"type":"string"},"transport_unit_id":{"format":"int64","type":"integer"},"version":{"format":"int32","type":"integer"}},"required":["code","dispatch_id","frozen_plan_version","id","last_actual_sequence","load_plan_id","opened_at","opened_by","require_staged","sequence_policy","status","transport_confirmed","transport_external_ref","transport_unit_id","version"],"title":"OutboundLoad","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"code":"<code>","dispatch_id":1,"frozen_plan_version":1,"id":1,"last_actual_sequence":1,"load_plan_id":1,"opened_at":"<opened_at>","opened_by":1,"require_staged":false,"sequence_policy":"ReverseStop","status":"Open","transport_confirmed":false,"transport_external_ref":"<transport_external_ref>","transport_unit_id":1,"version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#load_start":{"post":{"operationId":"load_start","summary":"Confirm the reviewed Load's exact transport before loading units.","description":"Confirm the reviewed Load's exact transport before loading units.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n**Versioned entities:** outbound_load (id in data.load_id, version in data.expected_load_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_load_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[{"entity":"outbound_load","id_field":"load_id","version_field":"expected_load_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"loading","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"load_start"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"expected_load_version":{"format":"int32","type":"integer"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"load_id":{"format":"int64","type":"integer"},"scanned_transport_ref":{"type":"string"}},"required":["expected_load_version","load_id","scanned_transport_ref"],"title":"StartLoad","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"load_start","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"expected_load_version":1,"load_id":1,"scanned_transport_ref":"<scanned_transport_ref>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"active_stop_id":{"format":"int64","type":["integer","null"]},"code":{"type":"string"},"completed_at":{"default":null,"type":["string","null"]},"dispatch_id":{"format":"int64","type":"integer"},"door_location_code":{"type":["string","null"]},"frozen_plan_version":{"format":"int32","type":"integer"},"id":{"format":"int64","type":"integer"},"last_actual_sequence":{"format":"int32","type":"integer"},"load_plan_id":{"format":"int64","type":"integer"},"opened_at":{"type":"string"},"opened_by":{"format":"int64","type":"integer"},"require_staged":{"type":"boolean"},"sequence_policy":{"$ref":"#/components/schemas/LoadingSequencePolicy"},"shipped_at":{"default":null,"type":["string","null"]},"started_at":{"default":null,"type":["string","null"]},"status":{"$ref":"#/components/schemas/LoadStatus"},"transport_confirmed":{"type":"boolean"},"transport_external_ref":{"type":"string"},"transport_unit_id":{"format":"int64","type":"integer"},"version":{"format":"int32","type":"integer"}},"required":["code","dispatch_id","frozen_plan_version","id","last_actual_sequence","load_plan_id","opened_at","opened_by","require_staged","sequence_policy","status","transport_confirmed","transport_external_ref","transport_unit_id","version"],"title":"OutboundLoad","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"code":"<code>","dispatch_id":1,"frozen_plan_version":1,"id":1,"last_actual_sequence":1,"load_plan_id":1,"opened_at":"<opened_at>","opened_by":1,"require_staged":false,"sequence_policy":"ReverseStop","status":"Open","transport_confirmed":false,"transport_external_ref":"<transport_external_ref>","transport_unit_id":1,"version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#load_unit_confirm":{"post":{"operationId":"load_unit_confirm","summary":"Confirm the scanned reviewed unit against current sequence/content; Loaded is not Shipped.","description":"Confirm the scanned reviewed unit against current sequence/content; Loaded is not Shipped.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n**Versioned entities:** outbound_load (id in data.load_id, version in data.expected_load_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_load_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[{"entity":"outbound_load","id_field":"load_id","version_field":"expected_load_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"loading","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"load_unit_confirm"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"expected_load_version":{"format":"int32","type":"integer"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"load_id":{"format":"int64","type":"integer"},"outbound_flow_unit_id":{"format":"int64","type":"integer"},"scanned_root_code":{"type":"string"}},"required":["expected_load_version","load_id","outbound_flow_unit_id","scanned_root_code"],"title":"ConfirmLoadUnit","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"load_unit_confirm","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"expected_load_version":1,"load_id":1,"outbound_flow_unit_id":1,"scanned_root_code":"<scanned_root_code>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"fact":{"$ref":"#/components/schemas/LoadUnitFact"},"load":{"$ref":"#/components/schemas/OutboundLoad"}},"required":["fact","load"],"title":"ConfirmLoadUnitResult","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"fact":{"actual_sequence":1,"content_snapshot":null,"id":1,"load_id":1,"loaded_at":"<loaded_at>","loaded_by":1,"outbound_flow_unit_id":1,"result":null,"root_code":"<root_code>","root_container_id":1,"stop_id":1},"load":{"code":"<code>","dispatch_id":1,"frozen_plan_version":1,"id":1,"last_actual_sequence":1,"load_plan_id":1,"opened_at":"<opened_at>","opened_by":1,"require_staged":false,"sequence_policy":"ReverseStop","status":"Open","transport_confirmed":false,"transport_external_ref":"<transport_external_ref>","transport_unit_id":1,"version":1}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#load_complete":{"post":{"operationId":"load_complete","summary":"Complete all required units only after rechecking their immutable content.","description":"Complete all required units only after rechecking their immutable content.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n**Versioned entities:** outbound_load (id in data.load_id, version in data.expected_load_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_load_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[{"entity":"outbound_load","id_field":"load_id","version_field":"expected_load_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"loading","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"load_complete"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"expected_load_version":{"format":"int32","type":"integer"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"load_id":{"format":"int64","type":"integer"}},"required":["expected_load_version","load_id"],"title":"CompleteLoad","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"load_complete","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"expected_load_version":1,"load_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"active_stop_id":{"format":"int64","type":["integer","null"]},"code":{"type":"string"},"completed_at":{"default":null,"type":["string","null"]},"dispatch_id":{"format":"int64","type":"integer"},"door_location_code":{"type":["string","null"]},"frozen_plan_version":{"format":"int32","type":"integer"},"id":{"format":"int64","type":"integer"},"last_actual_sequence":{"format":"int32","type":"integer"},"load_plan_id":{"format":"int64","type":"integer"},"opened_at":{"type":"string"},"opened_by":{"format":"int64","type":"integer"},"require_staged":{"type":"boolean"},"sequence_policy":{"$ref":"#/components/schemas/LoadingSequencePolicy"},"shipped_at":{"default":null,"type":["string","null"]},"started_at":{"default":null,"type":["string","null"]},"status":{"$ref":"#/components/schemas/LoadStatus"},"transport_confirmed":{"type":"boolean"},"transport_external_ref":{"type":"string"},"transport_unit_id":{"format":"int64","type":"integer"},"version":{"format":"int32","type":"integer"}},"required":["code","dispatch_id","frozen_plan_version","id","last_actual_sequence","load_plan_id","opened_at","opened_by","require_staged","sequence_policy","status","transport_confirmed","transport_external_ref","transport_unit_id","version"],"title":"OutboundLoad","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"code":"<code>","dispatch_id":1,"frozen_plan_version":1,"id":1,"last_actual_sequence":1,"load_plan_id":1,"opened_at":"<opened_at>","opened_by":1,"require_staged":false,"sequence_policy":"ReverseStop","status":"Open","transport_confirmed":false,"transport_external_ref":"<transport_external_ref>","transport_unit_id":1,"version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#confirm_shipment":{"post":{"operationId":"confirm_shipment","summary":"Irreversible complete-Load Goods Issue: atomic stock, serials, Orders, Load and Dispatch.","description":"Irreversible complete-Load Goods Issue: atomic stock, serials, Orders, Load and Dispatch.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n**Versioned entities:** outbound_load (id in data.load_id, version in data.expected_load_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_load_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[{"entity":"outbound_load","id_field":"load_id","version_field":"expected_load_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"loading","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"confirm_shipment"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"expected_load_version":{"format":"int32","type":"integer"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"load_id":{"format":"int64","type":"integer"}},"required":["expected_load_version","load_id"],"title":"ConfirmShipment","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"confirm_shipment","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"expected_load_version":1,"load_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"already_committed":{"type":"boolean"},"load":{"$ref":"#/components/schemas/OutboundLoad"},"orders":{"items":{"$ref":"#/components/schemas/ShipShipmentOrderResult"},"type":"array"}},"required":["already_committed","load","orders"],"title":"ConfirmShipmentResult","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"already_committed":false,"load":{"code":"<code>","dispatch_id":1,"frozen_plan_version":1,"id":1,"last_actual_sequence":1,"load_plan_id":1,"opened_at":"<opened_at>","opened_by":1,"require_staged":false,"sequence_policy":"ReverseStop","status":"Open","transport_confirmed":false,"transport_external_ref":"<transport_external_ref>","transport_unit_id":1,"version":1},"orders":[{"already_committed":false,"close_summary":null,"goods_issue_id":1,"journal_ids":[1],"new_version":1,"order_id":1,"serial_ids":[1],"shipped_quantities":[[]]}]}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#load_plan_get":{"post":{"operationId":"load_plan_get","summary":"Get stop groups and current physical planning members (not load authorization).","description":"Get stop groups and current physical planning members (not load authorization).\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"load_plan","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"load_plan_get"},"params":{"type":"object","properties":{"data":{"properties":{"load_plan_id":{"format":"int64","type":"integer"}},"required":["load_plan_id"],"title":"LoadPlanIdInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"load_plan_get","params":{"data":{"load_plan_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"entries":{"items":{"$ref":"#/components/schemas/LoadPlanUnitEntry"},"type":"array"},"groups":{"items":{"$ref":"#/components/schemas/LoadPlanGroup"},"type":"array"},"plan":{"$ref":"#/components/schemas/LoadPlan"},"unplanned_units":{"items":{"$ref":"#/components/schemas/LoadPlanUnit"},"type":"array"}},"required":["entries","groups","plan","unplanned_units"],"title":"LoadPlanDetails","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"entries":[{"entry":{"dispatch_id":1,"load_plan_id":1,"outbound_flow_unit_id":1,"sequence":1,"stop_id":1,"unit_assignment_version":1},"matches_assignment":false}],"groups":[{"stop":{"add_when":"<add_when>","add_who":1,"destination_ref":"<destination_ref>","dispatch_id":1,"id":1,"mod_when":"<mod_when>","mod_who":1,"sequence":1,"stop_type":"<stop_type>"},"units":[{"assignment":null,"nested_units":null,"packing_open":null,"unit":null}]}],"plan":{"add_when":"<add_when>","add_who":1,"code":"<code>","dispatch_id":1,"id":1,"mod_when":"<mod_when>","mod_who":1,"mode":"StopBased","sequence_policy":"ReverseStop","status":"Draft","version":1},"unplanned_units":[{"assignment":{"add_when":"<add_when>","add_who":1,"dispatch_id":1,"id":1,"mod_when":"<mod_when>","mod_who":1,"outbound_flow_unit_id":1,"source_order_intent_id":1,"status":null,"stop_id":1,"version":1},"nested_units":false,"packing_open":false,"unit":{"add_when":"<add_when>","add_who":1,"completed_normal_capabilities":[],"created_at":"<created_at>","id":1,"mod_when":"<mod_when>","mod_who":1,"next_capability":null,"status":null,"subject_container_id":1,"subject_kind":null,"version":1}}]}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#load_plan_header_get":{"post":{"operationId":"load_plan_header_get","summary":"Read a flat Load Plan header and its seen version without advancing it.","description":"Read a flat Load Plan header and its seen version without advancing it.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"load_plan","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"load_plan_header_get"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"load_plan_header_get","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"dispatch_id":{"format":"int64","type":"integer"},"frozen_at":{"default":null,"type":["string","null"]},"generated_at":{"default":null,"type":["string","null"]},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"mode":{"$ref":"#/components/schemas/LoadPlanMode"},"sequence_policy":{"$ref":"#/components/schemas/LoadingSequencePolicy"},"status":{"$ref":"#/components/schemas/LoadPlanStatus"},"version":{"format":"int32","type":"integer"}},"required":["add_when","add_who","code","dispatch_id","id","mod_when","mod_who","mode","sequence_policy","status","version"],"title":"LoadPlan","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","dispatch_id":1,"id":1,"mod_when":"<mod_when>","mod_who":1,"mode":"StopBased","sequence_policy":"ReverseStop","status":"Draft","version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#load_plan_header_list":{"post":{"operationId":"load_plan_header_list","summary":"Filter and page Load Plan headers; no membership or physical execution change.","description":"Filter and page Load Plan headers; no membership or physical execution change.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"load_plan","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"load_plan_header_list"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"load_plan_header_list"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/LoadPlan"},"title":"Array_of_LoadPlan","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"code":"<code>","dispatch_id":1,"id":1,"mod_when":"<mod_when>","mod_who":1,"mode":"StopBased","sequence_policy":"ReverseStop","status":"Draft","version":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#load_plan_create":{"post":{"operationId":"load_plan_create","summary":"Create a working Load Plan (Explicit policy selects ExplicitUnit mode).","description":"Create a working Load Plan (Explicit policy selects ExplicitUnit mode).\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"load_plan","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"load_plan_create"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"code":{"default":null,"description":"Reserved by the New form through `get_next_key`. API callers that do not open the form keep working: the command uses the same key service.","type":["string","null"]},"dispatch_id":{"format":"int64","type":"integer"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"sequence_policy":{"$ref":"#/components/schemas/LoadingSequencePolicy"}},"required":["dispatch_id","sequence_policy"],"title":"CreateLoadPlan","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"load_plan_create","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"dispatch_id":1,"sequence_policy":"ReverseStop"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"plan":{"$ref":"#/components/schemas/LoadPlan"}},"required":["plan"],"title":"LoadPlanMutationResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"plan":{"add_when":"<add_when>","add_who":1,"code":"<code>","dispatch_id":1,"id":1,"mod_when":"<mod_when>","mod_who":1,"mode":"StopBased","sequence_policy":"ReverseStop","status":"Draft","version":1}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#load_plan_generate":{"post":{"operationId":"load_plan_generate","summary":"Generate stop groups on a Planned Dispatch; explicit units remain manually selected.","description":"Generate stop groups on a Planned Dispatch; explicit units remain manually selected.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n**Versioned entities:** load_plan (id in data.load_plan_id, version in data.expected_plan_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_plan_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[{"entity":"load_plan","id_field":"load_plan_id","version_field":"expected_plan_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"load_plan","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"load_plan_generate"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"expected_plan_version":{"format":"int32","type":"integer"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"load_plan_id":{"format":"int64","type":"integer"}},"required":["expected_plan_version","load_plan_id"],"title":"GenerateLoadPlan","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"load_plan_generate","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"expected_plan_version":1,"load_plan_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"plan":{"$ref":"#/components/schemas/LoadPlan"}},"required":["plan"],"title":"LoadPlanMutationResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"plan":{"add_when":"<add_when>","add_who":1,"code":"<code>","dispatch_id":1,"id":1,"mod_when":"<mod_when>","mod_who":1,"mode":"StopBased","sequence_policy":"ReverseStop","status":"Draft","version":1}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#load_plan_add_unit":{"post":{"operationId":"load_plan_add_unit","summary":"Add a current root from the seen unit and transport cards to an ExplicitUnit plan.","description":"Add a current root from the seen unit and transport cards to an ExplicitUnit plan.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n**Versioned entities:** load_plan (id in data.load_plan_id, version in data.expected_plan_version); outbound_flow_unit (id in data.outbound_flow_unit_id, version in data.expected_unit_version); outbound_unit_assignment (id in data.outbound_flow_unit_id, version in data.expected_assignment_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_plan_version`, `expected_unit_version`, `expected_assignment_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[{"entity":"load_plan","id_field":"load_plan_id","version_field":"expected_plan_version"},{"entity":"outbound_flow_unit","id_field":"outbound_flow_unit_id","version_field":"expected_unit_version"},{"entity":"outbound_unit_assignment","id_field":"outbound_flow_unit_id","version_field":"expected_assignment_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"load_plan","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"load_plan_add_unit"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"expected_assignment_version":{"format":"int32","type":"integer"},"expected_plan_version":{"format":"int32","type":"integer"},"expected_unit_version":{"format":"int32","type":"integer"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"load_plan_id":{"format":"int64","type":"integer"},"outbound_flow_unit_id":{"format":"int64","type":"integer"}},"required":["expected_assignment_version","expected_plan_version","expected_unit_version","load_plan_id","outbound_flow_unit_id"],"title":"AddLoadPlanUnit","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"load_plan_add_unit","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"expected_assignment_version":1,"expected_plan_version":1,"expected_unit_version":1,"load_plan_id":1,"outbound_flow_unit_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"plan":{"$ref":"#/components/schemas/LoadPlan"}},"required":["plan"],"title":"LoadPlanMutationResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"plan":{"add_when":"<add_when>","add_who":1,"code":"<code>","dispatch_id":1,"id":1,"mod_when":"<mod_when>","mod_who":1,"mode":"StopBased","sequence_policy":"ReverseStop","status":"Draft","version":1}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#load_plan_remove_unit":{"post":{"operationId":"load_plan_remove_unit","summary":"Remove an explicit planning member, without touching stock.","description":"Remove an explicit planning member, without touching stock.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n**Versioned entities:** load_plan (id in data.load_plan_id, version in data.expected_plan_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_plan_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[{"entity":"load_plan","id_field":"load_plan_id","version_field":"expected_plan_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"load_plan","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"load_plan_remove_unit"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"expected_plan_version":{"format":"int32","type":"integer"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"load_plan_id":{"format":"int64","type":"integer"},"outbound_flow_unit_id":{"format":"int64","type":"integer"}},"required":["expected_plan_version","load_plan_id","outbound_flow_unit_id"],"title":"RemoveLoadPlanUnit","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"load_plan_remove_unit","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"expected_plan_version":1,"load_plan_id":1,"outbound_flow_unit_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"plan":{"$ref":"#/components/schemas/LoadPlan"}},"required":["plan"],"title":"LoadPlanMutationResult","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"plan":{"add_when":"<add_when>","add_who":1,"code":"<code>","dispatch_id":1,"id":1,"mod_when":"<mod_when>","mod_who":1,"mode":"StopBased","sequence_policy":"ReverseStop","status":"Draft","version":1}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#load_plan_resequence":{"post":{"operationId":"load_plan_resequence","summary":"Replace the complete explicit unit order.","description":"Replace the complete explicit unit order.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n**Versioned entities:** load_plan (id in data.load_plan_id, version in data.expected_plan_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_plan_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[{"entity":"load_plan","id_field":"load_plan_id","version_field":"expected_plan_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"load_plan","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"load_plan_resequence"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"expected_plan_version":{"format":"int32","type":"integer"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"load_plan_id":{"format":"int64","type":"integer"},"ordered_unit_ids":{"items":{"format":"int64","type":"integer"},"type":"array"}},"required":["expected_plan_version","load_plan_id","ordered_unit_ids"],"title":"ResequenceLoadPlan","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"load_plan_resequence","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"expected_plan_version":1,"load_plan_id":1,"ordered_unit_ids":[1]}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"plan":{"$ref":"#/components/schemas/LoadPlan"}},"required":["plan"],"title":"LoadPlanMutationResult","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"plan":{"add_when":"<add_when>","add_who":1,"code":"<code>","dispatch_id":1,"id":1,"mod_when":"<mod_when>","mod_who":1,"mode":"StopBased","sequence_policy":"ReverseStop","status":"Draft","version":1}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#load_plan_set_position":{"post":{"operationId":"load_plan_set_position","summary":"Set an intended transport position, or explicitly clear it with null.","description":"Set an intended transport position, or explicitly clear it with null.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n**Versioned entities:** load_plan (id in data.load_plan_id, version in data.expected_plan_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_plan_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[{"entity":"load_plan","id_field":"load_plan_id","version_field":"expected_plan_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"load_plan","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"load_plan_set_position"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"expected_plan_version":{"format":"int32","type":"integer"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"load_plan_id":{"format":"int64","type":"integer"},"outbound_flow_unit_id":{"format":"int64","type":"integer"},"position":{"description":"Explicit null clears; omission is not an instruction to clear.","type":["string","null"]}},"required":["expected_plan_version","load_plan_id","outbound_flow_unit_id","position"],"title":"SetLoadPlanPosition","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"load_plan_set_position","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"expected_plan_version":1,"load_plan_id":1,"outbound_flow_unit_id":1,"position":"<position>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"plan":{"$ref":"#/components/schemas/LoadPlan"}},"required":["plan"],"title":"LoadPlanMutationResult","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"plan":{"add_when":"<add_when>","add_who":1,"code":"<code>","dispatch_id":1,"id":1,"mod_when":"<mod_when>","mod_who":1,"mode":"StopBased","sequence_policy":"ReverseStop","status":"Draft","version":1}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#load_plan_freeze":{"post":{"operationId":"load_plan_freeze","summary":"Freeze the reviewed complete unit set with per-unit/assignment version echoes; not Load authorization.","description":"Freeze the reviewed complete unit set with per-unit/assignment version echoes; not Load authorization.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n**Versioned entities:** load_plan (id in data.load_plan_id, version in data.expected_plan_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_plan_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[{"entity":"load_plan","id_field":"load_plan_id","version_field":"expected_plan_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"load_plan","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"load_plan_freeze"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"expected_plan_version":{"format":"int32","type":"integer"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"load_plan_id":{"format":"int64","type":"integer"},"units":{"items":{"$ref":"#/components/schemas/LoadPlanUnitExpectation"},"type":"array"}},"required":["expected_plan_version","load_plan_id","units"],"title":"FreezeLoadPlan","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"load_plan_freeze","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"expected_plan_version":1,"load_plan_id":1,"units":[{"expected_assignment_version":1,"expected_unit_version":1,"outbound_flow_unit_id":1}]}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"plan":{"$ref":"#/components/schemas/LoadPlan"}},"required":["plan"],"title":"LoadPlanMutationResult","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"plan":{"add_when":"<add_when>","add_who":1,"code":"<code>","dispatch_id":1,"id":1,"mod_when":"<mod_when>","mod_who":1,"mode":"StopBased","sequence_policy":"ReverseStop","status":"Draft","version":1}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#load_plan_reopen":{"post":{"operationId":"load_plan_reopen","summary":"Supervisor pre-Load replan with mandatory audited reason.","description":"Supervisor pre-Load replan with mandatory audited reason.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, SUPERVISOR. An administrator can change the grants.\n\n**Versioned entities:** load_plan (id in data.load_plan_id, version in data.expected_plan_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_plan_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","SUPERVISOR"],"x-quark-versioned-entities":[{"entity":"load_plan","id_field":"load_plan_id","version_field":"expected_plan_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"load_plan","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"load_plan_reopen"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"expected_plan_version":{"format":"int32","type":"integer"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"load_plan_id":{"format":"int64","type":"integer"},"reason":{"type":"string"}},"required":["expected_plan_version","load_plan_id","reason"],"title":"ReopenLoadPlan","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"load_plan_reopen","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"expected_plan_version":1,"load_plan_id":1,"reason":"<reason>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"plan":{"$ref":"#/components/schemas/LoadPlan"}},"required":["plan"],"title":"LoadPlanMutationResult","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"plan":{"add_when":"<add_when>","add_who":1,"code":"<code>","dispatch_id":1,"id":1,"mod_when":"<mod_when>","mod_who":1,"mode":"StopBased","sequence_policy":"ReverseStop","status":"Draft","version":1}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#stage_unit_get":{"post":{"operationId":"stage_unit_get","summary":"Read unit transport, Stage card, physical source and execution fact in one snapshot.","description":"Read unit transport, Stage card, physical source and execution fact in one snapshot.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"staging","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"stage_unit_get"},"params":{"type":"object","properties":{"data":{"properties":{"outbound_flow_unit_id":{"format":"int64","type":"integer"}},"required":["outbound_flow_unit_id"],"title":"StageUnitInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"stage_unit_get","params":{"data":{"outbound_flow_unit_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"assignment":{"anyOf":[{"$ref":"#/components/schemas/StageAssignment"},{"type":"null"}]},"assignment_matches_transport":{"default":false,"description":"The card pins the actual transport intent, not merely its Dispatch id. S1b ledger replies predate this projection; absence must not break replay.","type":"boolean"},"assignment_version":{"description":"Zero denotes absence; echo this Stage entity, not Dispatch-wide OCC.","format":"int32","type":"integer"},"container_code":{"type":["string","null"]},"container_status":{"anyOf":[{"$ref":"#/components/schemas/ContainerStatus"},{"type":"null"}]},"current_location":{"type":["string","null"]},"dispatch_code":{"type":["string","null"]},"dispatch_status":{"anyOf":[{"$ref":"#/components/schemas/DispatchStatus"},{"type":"null"}]},"execution":{"anyOf":[{"$ref":"#/components/schemas/StageExecution"},{"type":"null"}]},"is_current_root":{"type":"boolean"},"nested_units":{"type":"boolean"},"packing_open":{"type":"boolean"},"stage_committed":{"default":false,"description":"Historical commitment remains authoritative even when an old/faulty writer made the current transport generation disagree with its proof.","type":"boolean"},"stop_sequence":{"format":"int32","type":["integer","null"]},"transport_assignment":{"anyOf":[{"$ref":"#/components/schemas/OutboundUnitAssignment"},{"type":"null"}]},"unit":{"$ref":"#/components/schemas/OutboundFlowUnit"}},"required":["assignment_version","is_current_root","nested_units","packing_open","unit"],"title":"StageUnitState","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"assignment_version":1,"is_current_root":false,"nested_units":false,"packing_open":false,"unit":{"add_when":"<add_when>","add_who":1,"completed_normal_capabilities":["Pack"],"created_at":"<created_at>","id":1,"mod_when":"<mod_when>","mod_who":1,"next_capability":"Pack","status":"Pending","subject_container_id":1,"subject_kind":{},"version":1}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#stage_unit_lookup":{"post":{"operationId":"stage_unit_lookup","summary":"Find the exact live Stage root by container label, without changing assignment or stock.","description":"Find the exact live Stage root by container label, without changing assignment or stock.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"staging","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"stage_unit_lookup"},"params":{"type":"object","properties":{"data":{"properties":{"container_code":{"type":"string"}},"required":["container_code"],"title":"StageUnitLabelInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"stage_unit_lookup","params":{"data":{"container_code":"<container_code>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"assignment":{"anyOf":[{"$ref":"#/components/schemas/StageAssignment"},{"type":"null"}]},"assignment_matches_transport":{"default":false,"description":"The card pins the actual transport intent, not merely its Dispatch id. S1b ledger replies predate this projection; absence must not break replay.","type":"boolean"},"assignment_version":{"description":"Zero denotes absence; echo this Stage entity, not Dispatch-wide OCC.","format":"int32","type":"integer"},"container_code":{"type":["string","null"]},"container_status":{"anyOf":[{"$ref":"#/components/schemas/ContainerStatus"},{"type":"null"}]},"current_location":{"type":["string","null"]},"dispatch_code":{"type":["string","null"]},"dispatch_status":{"anyOf":[{"$ref":"#/components/schemas/DispatchStatus"},{"type":"null"}]},"execution":{"anyOf":[{"$ref":"#/components/schemas/StageExecution"},{"type":"null"}]},"is_current_root":{"type":"boolean"},"nested_units":{"type":"boolean"},"packing_open":{"type":"boolean"},"stage_committed":{"default":false,"description":"Historical commitment remains authoritative even when an old/faulty writer made the current transport generation disagree with its proof.","type":"boolean"},"stop_sequence":{"format":"int32","type":["integer","null"]},"transport_assignment":{"anyOf":[{"$ref":"#/components/schemas/OutboundUnitAssignment"},{"type":"null"}]},"unit":{"$ref":"#/components/schemas/OutboundFlowUnit"}},"required":["assignment_version","is_current_root","nested_units","packing_open","unit"],"title":"StageUnitState","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"assignment_version":1,"is_current_root":false,"nested_units":false,"packing_open":false,"unit":{"add_when":"<add_when>","add_who":1,"completed_normal_capabilities":["Pack"],"created_at":"<created_at>","id":1,"mod_when":"<mod_when>","mod_who":1,"next_capability":"Pack","status":"Pending","subject_container_id":1,"subject_kind":{},"version":1}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#stage_unit_assign":{"post":{"operationId":"stage_unit_assign","summary":"Assign a ready physical root to an exact Stage without moving stock.","description":"Assign a ready physical root to an exact Stage without moving stock.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n**Versioned entities:** outbound_stage_assignment (id in data.outbound_flow_unit_id, version in data.expected_stage_version); outbound_unit_assignment (id in data.outbound_flow_unit_id, version in data.expected_assignment_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_stage_version`, `expected_assignment_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[{"entity":"outbound_stage_assignment","id_field":"outbound_flow_unit_id","version_field":"expected_stage_version"},{"entity":"outbound_unit_assignment","id_field":"outbound_flow_unit_id","version_field":"expected_assignment_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"staging","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"stage_unit_assign"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"expected_assignment_version":{"format":"int32","type":"integer"},"expected_stage_version":{"format":"int32","type":"integer"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"outbound_flow_unit_id":{"format":"int64","type":"integer"},"stage_location_code":{"type":"string"}},"required":["expected_assignment_version","expected_stage_version","outbound_flow_unit_id","stage_location_code"],"title":"AssignStageUnit","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"stage_unit_assign","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"expected_assignment_version":1,"expected_stage_version":1,"outbound_flow_unit_id":1,"stage_location_code":"<stage_location_code>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"assignment":{"anyOf":[{"$ref":"#/components/schemas/StageAssignment"},{"type":"null"}]},"assignment_matches_transport":{"default":false,"description":"The card pins the actual transport intent, not merely its Dispatch id. S1b ledger replies predate this projection; absence must not break replay.","type":"boolean"},"assignment_version":{"description":"Zero denotes absence; echo this Stage entity, not Dispatch-wide OCC.","format":"int32","type":"integer"},"container_code":{"type":["string","null"]},"container_status":{"anyOf":[{"$ref":"#/components/schemas/ContainerStatus"},{"type":"null"}]},"current_location":{"type":["string","null"]},"dispatch_code":{"type":["string","null"]},"dispatch_status":{"anyOf":[{"$ref":"#/components/schemas/DispatchStatus"},{"type":"null"}]},"execution":{"anyOf":[{"$ref":"#/components/schemas/StageExecution"},{"type":"null"}]},"is_current_root":{"type":"boolean"},"nested_units":{"type":"boolean"},"packing_open":{"type":"boolean"},"stage_committed":{"default":false,"description":"Historical commitment remains authoritative even when an old/faulty writer made the current transport generation disagree with its proof.","type":"boolean"},"stop_sequence":{"format":"int32","type":["integer","null"]},"transport_assignment":{"anyOf":[{"$ref":"#/components/schemas/OutboundUnitAssignment"},{"type":"null"}]},"unit":{"$ref":"#/components/schemas/OutboundFlowUnit"}},"required":["assignment_version","is_current_root","nested_units","packing_open","unit"],"title":"StageUnitState","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"assignment_version":1,"is_current_root":false,"nested_units":false,"packing_open":false,"unit":{"add_when":"<add_when>","add_who":1,"completed_normal_capabilities":["Pack"],"created_at":"<created_at>","id":1,"mod_when":"<mod_when>","mod_who":1,"next_capability":"Pack","status":"Pending","subject_container_id":1,"subject_kind":{},"version":1}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#stage_unit_confirm":{"post":{"operationId":"stage_unit_confirm","summary":"Confirm the assigned Stage and expected source, moving the entire picked root atomically.","description":"Confirm the assigned Stage and expected source, moving the entire picked root atomically.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n**Versioned entities:** outbound_stage_assignment (id in data.outbound_flow_unit_id, version in data.expected_stage_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_stage_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[{"entity":"outbound_stage_assignment","id_field":"outbound_flow_unit_id","version_field":"expected_stage_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"staging","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"stage_unit_confirm"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"description":"Directed execution based on the Stage card, not an unsolicited inventory observation: another assignment/source changes the operator's decision.","properties":{"expected_from_location":{"type":"string"},"expected_stage_version":{"format":"int32","type":"integer"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"outbound_flow_unit_id":{"format":"int64","type":"integer"},"scanned_stage_location_code":{"type":"string"}},"required":["expected_from_location","expected_stage_version","outbound_flow_unit_id","scanned_stage_location_code"],"title":"ConfirmStageUnit","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"stage_unit_confirm","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"expected_from_location":"<expected_from_location>","expected_stage_version":1,"outbound_flow_unit_id":1,"scanned_stage_location_code":"<scanned_stage_location_code>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"assignment":{"anyOf":[{"$ref":"#/components/schemas/StageAssignment"},{"type":"null"}]},"assignment_matches_transport":{"default":false,"description":"The card pins the actual transport intent, not merely its Dispatch id. S1b ledger replies predate this projection; absence must not break replay.","type":"boolean"},"assignment_version":{"description":"Zero denotes absence; echo this Stage entity, not Dispatch-wide OCC.","format":"int32","type":"integer"},"container_code":{"type":["string","null"]},"container_status":{"anyOf":[{"$ref":"#/components/schemas/ContainerStatus"},{"type":"null"}]},"current_location":{"type":["string","null"]},"dispatch_code":{"type":["string","null"]},"dispatch_status":{"anyOf":[{"$ref":"#/components/schemas/DispatchStatus"},{"type":"null"}]},"execution":{"anyOf":[{"$ref":"#/components/schemas/StageExecution"},{"type":"null"}]},"is_current_root":{"type":"boolean"},"nested_units":{"type":"boolean"},"packing_open":{"type":"boolean"},"stage_committed":{"default":false,"description":"Historical commitment remains authoritative even when an old/faulty writer made the current transport generation disagree with its proof.","type":"boolean"},"stop_sequence":{"format":"int32","type":["integer","null"]},"transport_assignment":{"anyOf":[{"$ref":"#/components/schemas/OutboundUnitAssignment"},{"type":"null"}]},"unit":{"$ref":"#/components/schemas/OutboundFlowUnit"}},"required":["assignment_version","is_current_root","nested_units","packing_open","unit"],"title":"StageUnitState","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"assignment_version":1,"is_current_root":false,"nested_units":false,"packing_open":false,"unit":{"add_when":"<add_when>","add_who":1,"completed_normal_capabilities":["Pack"],"created_at":"<created_at>","id":1,"mod_when":"<mod_when>","mod_who":1,"next_capability":"Pack","status":"Pending","subject_container_id":1,"subject_kind":{},"version":1}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#stage_unit_transfer":{"post":{"operationId":"stage_unit_transfer","summary":"Transfer an intact staged remainder from a completed trip to the current Planned Dispatch, preserving evidence and physical stock.","description":"Transfer an intact staged remainder from a completed trip to the current Planned Dispatch, preserving evidence and physical stock.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n**Versioned entities:** outbound_stage_assignment (id in data.outbound_flow_unit_id, version in data.expected_stage_version); outbound_unit_assignment (id in data.outbound_flow_unit_id, version in data.expected_assignment_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_stage_version`, `expected_assignment_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[{"entity":"outbound_stage_assignment","id_field":"outbound_flow_unit_id","version_field":"expected_stage_version"},{"entity":"outbound_unit_assignment","id_field":"outbound_flow_unit_id","version_field":"expected_assignment_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"staging","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"stage_unit_transfer"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"description":"Both mutable cards and the immutable evidence/target the supervisor saw. No physical destination is accepted: this operation retains the same Stage.","properties":{"expected_assignment_version":{"format":"int32","type":"integer"},"expected_execution_id":{"format":"int64","type":"integer"},"expected_order_intent_id":{"format":"int64","type":"integer"},"expected_stage_version":{"format":"int32","type":"integer"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"outbound_flow_unit_id":{"format":"int64","type":"integer"},"reason":{"type":"string"}},"required":["expected_assignment_version","expected_execution_id","expected_order_intent_id","expected_stage_version","outbound_flow_unit_id","reason"],"title":"TransferStagedUnit","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"stage_unit_transfer","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"expected_assignment_version":1,"expected_execution_id":1,"expected_order_intent_id":1,"expected_stage_version":1,"outbound_flow_unit_id":1,"reason":"<reason>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"assignment":{"$ref":"#/components/schemas/OutboundUnitAssignment"},"stage":{"$ref":"#/components/schemas/StageUnitState"}},"required":["assignment","stage"],"title":"StageTransferResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"assignment":{"add_when":"<add_when>","add_who":1,"dispatch_id":1,"id":1,"mod_when":"<mod_when>","mod_who":1,"outbound_flow_unit_id":1,"source_order_intent_id":1,"status":"Assigned","stop_id":1,"version":1},"stage":{"assignment_version":1,"is_current_root":false,"nested_units":false,"packing_open":false,"unit":{"add_when":"<add_when>","add_who":1,"completed_normal_capabilities":[],"created_at":"<created_at>","id":1,"mod_when":"<mod_when>","mod_who":1,"next_capability":null,"status":null,"subject_container_id":1,"subject_kind":{},"version":1}}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#create_allocation_policy":{"post":{"operationId":"create_allocation_policy","summary":"Create an allocation policy whose steps are owned by the allocation pipeline.","description":"Create an allocation policy whose steps are owned by the allocation pipeline.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog does not say whether this method needs an idempotency key.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"allocation_policy","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"create_allocation_policy"},"params":{"type":"object","properties":{"data":{"additionalProperties":false,"description":"Authoring contract: every new policy is a draft. `active` is deliberately absent; publication is a separate validated command.","properties":{"allow_overallocation":{"type":["boolean","null"]},"code":{"type":"string"},"descr":{"type":["string","null"]},"name":{"type":["string","null"]},"speed_pick_by_uom":{"type":["boolean","null"]},"strict_lot_rotation":{"type":["boolean","null"]}},"required":["code"],"title":"AllocationPolicyCreate","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"create_allocation_policy","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"code":"<code>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"active":{"type":"boolean"},"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"allow_overallocation":{"type":"boolean"},"code":{"type":"string"},"descr":{"type":"string"},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"name":{"type":["string","null"]},"published_at":{"default":null,"type":["string","null"]},"retired_at":{"default":null,"type":["string","null"]},"speed_pick_by_uom":{"type":"boolean"},"strict_lot_rotation":{"type":"boolean"},"version":{"description":"Optimistic lock (migration 344). Absent from `ForUpdate` — a caller must never write it; it moves only through [`AllocationPolicyBmc::bump_version_checked`].","format":"int32","type":"integer"}},"required":["active","add_when","add_who","allow_overallocation","code","descr","id","mod_when","mod_who","speed_pick_by_uom","strict_lot_rotation","version"],"title":"AllocationPolicy","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"active":false,"add_when":"<add_when>","add_who":1,"allow_overallocation":false,"code":"<code>","descr":"<descr>","id":1,"mod_when":"<mod_when>","mod_who":1,"speed_pick_by_uom":false,"strict_lot_rotation":false,"version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_allocation_policy":{"post":{"operationId":"get_allocation_policy","summary":"Get a allocation_policy by ID — CRUD.","description":"Get a allocation_policy by ID — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"allocation_policy","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_allocation_policy"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_allocation_policy","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"active":{"type":"boolean"},"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"allow_overallocation":{"type":"boolean"},"code":{"type":"string"},"descr":{"type":"string"},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"name":{"type":["string","null"]},"published_at":{"default":null,"type":["string","null"]},"retired_at":{"default":null,"type":["string","null"]},"speed_pick_by_uom":{"type":"boolean"},"strict_lot_rotation":{"type":"boolean"},"version":{"description":"Optimistic lock (migration 344). Absent from `ForUpdate` — a caller must never write it; it moves only through [`AllocationPolicyBmc::bump_version_checked`].","format":"int32","type":"integer"}},"required":["active","add_when","add_who","allow_overallocation","code","descr","id","mod_when","mod_who","speed_pick_by_uom","strict_lot_rotation","version"],"title":"AllocationPolicy","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"active":false,"add_when":"<add_when>","add_who":1,"allow_overallocation":false,"code":"<code>","descr":"<descr>","id":1,"mod_when":"<mod_when>","mod_who":1,"speed_pick_by_uom":false,"strict_lot_rotation":false,"version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_allocation_policy":{"post":{"operationId":"list_allocation_policy","summary":"List allocation_policy — CRUD.","description":"List allocation_policy — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"allocation_policy","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_allocation_policy"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_allocation_policy"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/AllocationPolicy"},"title":"Array_of_AllocationPolicy","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"active":false,"add_when":"<add_when>","add_who":1,"allow_overallocation":false,"code":"<code>","descr":"<descr>","id":1,"mod_when":"<mod_when>","mod_who":1,"speed_pick_by_uom":false,"strict_lot_rotation":false,"version":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#update_allocation_policy":{"post":{"operationId":"update_allocation_policy","summary":"Update an allocation policy header without overwriting a newer edit.","description":"Update an allocation policy header without overwriting a newer edit.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n**Versioned entities:** allocation_policy (id in data.id, version in data.expected_version).\n\n\n**Notes**\n\n- The catalog does not say whether this method needs an idempotency key.\n- Send the current version of the row in `expected_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[{"entity":"allocation_policy","id_field":"id","version_field":"expected_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"allocation_policy","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"update_allocation_policy"},"params":{"type":"object","properties":{"meta":{"type":"object","description":"Control-plane envelope supplied by the platform."},"data":{"properties":{"data":{"additionalProperties":false,"description":"Editable allocation-policy header fields.\n\n`code` is intentionally absent: it identifies the policy and is immutable after create. `name` keeps the three PATCH states because SQL NULL is a real value here; non-nullable fields reject JSON null.","properties":{"allow_overallocation":{"type":"boolean"},"descr":{"type":"string"},"name":{"type":["string","null"]},"speed_pick_by_uom":{"type":"boolean"},"strict_lot_rotation":{"type":"boolean"}},"title":"AllocationPolicyHeaderUpdate","type":"object"},"expected_version":{"format":"int32","type":"integer"},"id":{"format":"int64","type":"integer"}},"required":["id","expected_version","data"],"type":"object","description":"Versioned update payload."}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"update_allocation_policy","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"id":1,"expected_version":1,"data":{"allow_overallocation":false,"descr":"<descr>","name":"<name>"}}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"active":{"type":"boolean"},"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"allow_overallocation":{"type":"boolean"},"code":{"type":"string"},"descr":{"type":"string"},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"name":{"type":["string","null"]},"published_at":{"default":null,"type":["string","null"]},"retired_at":{"default":null,"type":["string","null"]},"speed_pick_by_uom":{"type":"boolean"},"strict_lot_rotation":{"type":"boolean"},"version":{"description":"Optimistic lock (migration 344). Absent from `ForUpdate` — a caller must never write it; it moves only through [`AllocationPolicyBmc::bump_version_checked`].","format":"int32","type":"integer"}},"required":["active","add_when","add_who","allow_overallocation","code","descr","id","mod_when","mod_who","speed_pick_by_uom","strict_lot_rotation","version"],"title":"AllocationPolicy","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"active":false,"add_when":"<add_when>","add_who":1,"allow_overallocation":false,"code":"<code>","descr":"<descr>","id":1,"mod_when":"<mod_when>","mod_who":1,"speed_pick_by_uom":false,"strict_lot_rotation":false,"version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_allocation_policy":{"post":{"operationId":"delete_allocation_policy","summary":"Delete an unreferenced allocation policy and all of its owned steps.","description":"Delete an unreferenced allocation policy and all of its owned steps.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog does not say whether this method needs an idempotency key.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"allocation_policy","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_allocation_policy"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_allocation_policy","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"active":{"type":"boolean"},"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"allow_overallocation":{"type":"boolean"},"code":{"type":"string"},"descr":{"type":"string"},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"name":{"type":["string","null"]},"published_at":{"default":null,"type":["string","null"]},"retired_at":{"default":null,"type":["string","null"]},"speed_pick_by_uom":{"type":"boolean"},"strict_lot_rotation":{"type":"boolean"},"version":{"description":"Optimistic lock (migration 344). Absent from `ForUpdate` — a caller must never write it; it moves only through [`AllocationPolicyBmc::bump_version_checked`].","format":"int32","type":"integer"}},"required":["active","add_when","add_who","allow_overallocation","code","descr","id","mod_when","mod_who","speed_pick_by_uom","strict_lot_rotation","version"],"title":"AllocationPolicy","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"active":false,"add_when":"<add_when>","add_who":1,"allow_overallocation":false,"code":"<code>","descr":"<descr>","id":1,"mod_when":"<mod_when>","mod_who":1,"speed_pick_by_uom":false,"strict_lot_rotation":false,"version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_many_allocation_policy":{"post":{"operationId":"delete_many_allocation_policy","summary":"Delete unreferenced allocation policies and their owned steps.","description":"Delete unreferenced allocation policies and their owned steps.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog does not say whether this method needs an idempotency key.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"allocation_policy","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_many_allocation_policy"},"params":{"type":"object","properties":{"ids":{"items":{"format":"int64","type":"integer"},"type":"array","description":"Record IDs"}},"required":["ids"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_many_allocation_policy","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"ids":[1]}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"uint64","minimum":0,"title":"uint64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_allocation_policy":{"post":{"operationId":"count_allocation_policy","summary":"Count allocation_policy — CRUD.","description":"Count allocation_policy — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"allocation_policy","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_allocation_policy"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_allocation_policy"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_allocation_policy_detail":{"post":{"operationId":"get_allocation_policy_detail","summary":"Get a allocation_policy_detail by ID — CRUD.","description":"Get a allocation_policy_detail by ID — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"allocation_policy","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_allocation_policy_detail"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_allocation_policy_detail","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"A rule row of an allocation policy — migration 266's `sequence`/`active` plus the eight-column predicate (`allocation_type` … `qty_fit_rule`) and the four-deep `sort_1..sort_4` ordering. `sequence` is the execution order, never `rule_num`: `rule_num` is varchar(5) and sorts lexicographically ('10' before '2'), the same reasoning as `PutawayPolicyDetail::sequence` vs `step_num`.\n\n`Deserialize` mirrors `PutawayPolicyDetail`'s own derive, and for the same reason (see that struct's doc): the allocation step page in `web-ui-server` has no warehouse database of its own and reads this row back over `get_allocation_policy_detail`/`list_allocation_policy_detail`, needing the eight predicate axes and the four sort ranks as TYPES — not as strings it would otherwise have to re-parse from a generic `serde_json::Value`.","properties":{"active":{"type":"boolean"},"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"allocation_policy_id":{"format":"int64","type":"integer"},"allocation_type":{"$ref":"#/components/schemas/AllocationType"},"id":{"format":"int64","type":"integer"},"location_abc":{"anyOf":[{"$ref":"#/components/schemas/AbcRotationSpeed"},{"type":"null"}]},"location_category":{"anyOf":[{"$ref":"#/components/schemas/LocCategory"},{"type":"null"}]},"location_type":{"anyOf":[{"$ref":"#/components/schemas/LocType"},{"type":"null"}]},"lpn_quantity_rule":{"$ref":"#/components/schemas/LpnQtyRule"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"one_pick_per_uom_location":{"type":"boolean"},"putawayzone":{"type":["string","null"]},"qty_fit_rule":{"anyOf":[{"$ref":"#/components/schemas/QtyFit"},{"type":"null"}]},"rule_num":{"type":"string"},"sequence":{"format":"int32","type":"integer"},"sort_1":{"$ref":"#/components/schemas/AllocSort"},"sort_2":{"anyOf":[{"$ref":"#/components/schemas/AllocSort"},{"type":"null"}]},"sort_3":{"anyOf":[{"$ref":"#/components/schemas/AllocSort"},{"type":"null"}]},"sort_4":{"anyOf":[{"$ref":"#/components/schemas/AllocSort"},{"type":"null"}]},"uom_code":{"type":"string"},"version":{"description":"Optimistic lock (migration 344). Absent from `ForUpdate` — a caller must never write it; it moves only through [`AllocationPolicyDetailBmc::update_checked`], which bumps it in the same statement as the write.","format":"int32","type":"integer"}},"required":["active","add_when","add_who","allocation_policy_id","allocation_type","id","lpn_quantity_rule","mod_when","mod_who","one_pick_per_uom_location","rule_num","sequence","sort_1","uom_code","version"],"title":"AllocationPolicyDetail","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"active":false,"add_when":"<add_when>","add_who":1,"allocation_policy_id":1,"allocation_type":"Firm","id":1,"lpn_quantity_rule":"Any","mod_when":"<mod_when>","mod_who":1,"one_pick_per_uom_location":false,"rule_num":"<rule_num>","sequence":1,"sort_1":"LotRotation","uom_code":"<uom_code>","version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_allocation_policy_detail":{"post":{"operationId":"list_allocation_policy_detail","summary":"List allocation_policy_detail — CRUD.","description":"List allocation_policy_detail — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"allocation_policy","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_allocation_policy_detail"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_allocation_policy_detail"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/AllocationPolicyDetail"},"title":"Array_of_AllocationPolicyDetail","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"active":false,"add_when":"<add_when>","add_who":1,"allocation_policy_id":1,"allocation_type":"Firm","id":1,"lpn_quantity_rule":"Any","mod_when":"<mod_when>","mod_who":1,"one_pick_per_uom_location":false,"rule_num":"<rule_num>","sequence":1,"sort_1":"LotRotation","uom_code":"<uom_code>","version":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_allocation_policy_detail":{"post":{"operationId":"count_allocation_policy_detail","summary":"Count allocation_policy_detail — CRUD.","description":"Count allocation_policy_detail — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"allocation_policy","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_allocation_policy_detail"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_allocation_policy_detail"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#allocation_pipeline_view":{"post":{"operationId":"allocation_pipeline_view","summary":"Read one allocation policy's step pipeline — its readback, its skip reasons and its closed steps — optionally narrated over the drafts the editor is holding.","description":"Read one allocation policy's step pipeline — its readback, its skip reasons and its closed steps — optionally narrated over the drafts the editor is holding.\n\n**Category:** `query`. Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":true,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"allocation_policy","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"allocation_pipeline_view"},"params":{"type":"object","properties":{"drafts":{"default":null,"items":{"$ref":"#/components/schemas/StepDraft_677145"},"type":["array","null"]},"id":{"format":"int64","type":"integer"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"allocation_pipeline_view","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"One allocation policy's pipeline, with everything the card draws beside each step.","properties":{"lifecycle":{"allOf":[{"$ref":"#/components/schemas/AllocationPolicyLifecycle"}],"description":"Drives editor affordances: only `Draft` accepts header/step writes."},"next_rule_num":{"description":"What the system will call the next step the operator adds. Shown on the \"+ Add step\" affordance BEFORE the add, which is why it is here and not only in the add command's answer.","type":"string"},"policy_code":{"type":"string"},"policy_id":{"format":"int64","type":"integer"},"policy_version":{"description":"The policy's own optimistic lock — what a reorder must echo back.","format":"int32","type":"integer"},"steps":{"description":"Every step of the policy, switched-off ones included, in execution order (`sequence`, never `rule_num` — that is `varchar(5)` and sorts '10' before '2').","items":{"$ref":"#/components/schemas/PipelineStep"},"type":"array"}},"required":["lifecycle","next_rule_num","policy_code","policy_id","policy_version","steps"],"title":"PipelineView","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"lifecycle":{},"next_rule_num":"<next_rule_num>","policy_code":"<policy_code>","policy_id":1,"policy_version":1,"steps":[{"active":false,"clauses":[{"runs":null,"text":null,"topic":null}],"fields":{"allocation_type":null,"lpn_quantity_rule":null,"one_pick_per_uom_location":false,"sort_1":null,"uom_code":"<uom_code>"},"id":1,"never_reserves":[{"runs":null,"text":null,"topic":null}],"rule_num":"<rule_num>","sequence":1,"skip_reasons":[{"runs":null,"text":null,"topic":null}],"version":1}]}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#allocation_policy_validate":{"post":{"operationId":"allocation_policy_validate","summary":"Validate an allocation-policy draft and return every publication blocker.","description":"Validate an allocation-policy draft and return every publication blocker.\n\n**Category:** `query`. Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":true,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"allocation_policy","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"allocation_policy_validate"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"allocation_policy_validate","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"issues":{"items":{"$ref":"#/components/schemas/PolicyValidationIssue"},"type":"array"},"valid":{"type":"boolean"}},"required":["issues","valid"],"title":"PolicyValidationReport","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"issues":[{"code":"<code>","message":"<message>"}],"valid":false}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#allocation_steps_save":{"post":{"operationId":"allocation_steps_save","summary":"Write every edited step of one allocation policy, each against its own version.","description":"Write every edited step of one allocation policy, each against its own version.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n**Versioned entities:** allocation_policy_detail (id in data.steps[].step_id, version in data.steps[].expected_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `steps[].expected_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[{"entity":"allocation_policy_detail","id_field":"steps[].step_id","version_field":"steps[].expected_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"allocation_policy","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"allocation_steps_save"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","description":"Resolved at the RPC boundary from `params.meta` when the wire did not put it here — see [`IdempotencyKey::unset`] for why the default is a sentinel and never a fresh random key.","format":"uuid","type":"string"},"policy_id":{"format":"int64","type":"integer"},"steps":{"items":{"$ref":"#/components/schemas/StepEdit"},"type":"array"}},"required":["policy_id","steps"],"title":"SaveAllocationSteps","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"allocation_steps_save","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"policy_id":1,"steps":[{"expected_version":1,"fields":null,"step_id":1}]}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"versions":{"items":{"$ref":"#/components/schemas/StepVersion"},"type":"array"}},"required":["versions"],"title":"SaveAllocationStepsResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"versions":[{"step_id":1,"version":1}]}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#allocation_step_add":{"post":{"operationId":"allocation_step_add","summary":"Add an empty step at the end of one allocation policy's pipeline; the system numbers it.","description":"Add an empty step at the end of one allocation policy's pipeline; the system numbers it.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"allocation_policy","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"allocation_step_add"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"policy_id":{"format":"int64","type":"integer"}},"required":["policy_id"],"title":"AddAllocationStep","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"allocation_step_add","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"policy_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"rule_num":{"description":"What the system called it — the label the operator now reads on the card, which is why the caller gets it back rather than guessing.","type":"string"},"step_id":{"format":"int64","type":"integer"}},"required":["rule_num","step_id"],"title":"AddAllocationStepResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"rule_num":"<rule_num>","step_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#allocation_step_delete":{"post":{"operationId":"allocation_step_delete","summary":"Delete one allocation step, against the version it was read at.","description":"Delete one allocation step, against the version it was read at.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n**Versioned entities:** allocation_policy_detail (id in data.step_id, version in data.expected_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[{"entity":"allocation_policy_detail","id_field":"step_id","version_field":"expected_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"allocation_policy","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"allocation_step_delete"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"expected_version":{"format":"int32","type":"integer"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"step_id":{"format":"int64","type":"integer"}},"required":["expected_version","step_id"],"title":"DeleteAllocationStep","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"allocation_step_delete","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"expected_version":1,"step_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"step_id":{"format":"int64","type":"integer"}},"required":["step_id"],"title":"DeleteAllocationStepResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"step_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#allocation_steps_reorder":{"post":{"operationId":"allocation_steps_reorder","summary":"Reorder one allocation policy's steps, against the policy's version.","description":"Reorder one allocation policy's steps, against the policy's version.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n**Versioned entities:** allocation_policy (id in data.policy_id, version in data.expected_policy_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_policy_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[{"entity":"allocation_policy","id_field":"policy_id","version_field":"expected_policy_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"allocation_policy","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"allocation_steps_reorder"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"expected_policy_version":{"format":"int32","type":"integer"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"policy_id":{"format":"int64","type":"integer"},"step_ids":{"description":"Every step of the policy, in the order the screen now shows them. A permutation of the pipeline — [`AllocationPolicyDetailBmc::pipeline_order`] refuses anything else.","items":{"format":"int64","type":"integer"},"type":"array"}},"required":["expected_policy_version","policy_id","step_ids"],"title":"ReorderAllocationSteps","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"allocation_steps_reorder","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"expected_policy_version":1,"policy_id":1,"step_ids":[1]}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"new_policy_version":{"format":"int32","type":"integer"}},"required":["new_policy_version"],"title":"ReorderAllocationStepsResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"new_policy_version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#allocation_policy_publish":{"post":{"operationId":"allocation_policy_publish","summary":"Publish a valid allocation-policy draft and make it executable.","description":"Publish a valid allocation-policy draft and make it executable.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n**Versioned entities:** allocation_policy (id in data.policy_id, version in data.expected_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[{"entity":"allocation_policy","id_field":"policy_id","version_field":"expected_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"allocation_policy","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"allocation_policy_publish"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"expected_version":{"format":"int32","type":"integer"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"policy_id":{"format":"int64","type":"integer"}},"required":["expected_version","policy_id"],"title":"PublishAllocationPolicy","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"allocation_policy_publish","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"expected_version":1,"policy_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"new_version":{"format":"int32","type":"integer"},"policy_id":{"format":"int64","type":"integer"}},"required":["new_version","policy_id"],"title":"PublishAllocationPolicyResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"new_version":1,"policy_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#allocation_policy_deactivate":{"post":{"operationId":"allocation_policy_deactivate","summary":"Retire a published allocation policy without making it editable again.","description":"Retire a published allocation policy without making it editable again.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n**Versioned entities:** allocation_policy (id in data.policy_id, version in data.expected_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[{"entity":"allocation_policy","id_field":"policy_id","version_field":"expected_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"allocation_policy","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"allocation_policy_deactivate"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"expected_version":{"format":"int32","type":"integer"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"policy_id":{"format":"int64","type":"integer"}},"required":["expected_version","policy_id"],"title":"DeactivateAllocationPolicy","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"allocation_policy_deactivate","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"expected_version":1,"policy_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"new_version":{"format":"int32","type":"integer"},"policy_id":{"format":"int64","type":"integer"}},"required":["new_version","policy_id"],"title":"DeactivateAllocationPolicyResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"new_version":1,"policy_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#allocation_policy_clone":{"post":{"operationId":"allocation_policy_clone","summary":"Clone any allocation policy and all its steps into a new draft.","description":"Clone any allocation policy and all its steps into a new draft.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"allocation_policy","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"allocation_policy_clone"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"new_code":{"type":"string"},"source_policy_id":{"format":"int64","type":"integer"}},"required":["new_code","source_policy_id"],"title":"CloneAllocationPolicy","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"allocation_policy_clone","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"new_code":"<new_code>","source_policy_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"policy_id":{"format":"int64","type":"integer"}},"required":["policy_id"],"title":"CloneAllocationPolicyResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"policy_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#create_replenishment_policy":{"post":{"operationId":"create_replenishment_policy","summary":"Create a new replenishment_policy — CRUD.","description":"Create a new replenishment_policy — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"UNIQUE_VIOLATION or INVALID_DATA","when":"The code already exists, or a value breaks a rule."}],"x-quark-module":"replenishment_policy","x-quark-operation":"create","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"create_replenishment_policy"},"params":{"type":"object","properties":{"data":{"properties":{"code":{"type":"string"}},"required":["code"],"title":"ReplenishmentPolicyForCreate","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"create_replenishment_policy","params":{"data":{"code":"<code>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"empty_is_urgent":{"type":"boolean"},"id":{"format":"int64","type":"integer"},"important_reserved_pct":{"format":"double","type":"number"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"urgent_reserved_pct":{"format":"double","type":"number"},"version":{"format":"int32","type":"integer"}},"required":["add_when","add_who","code","empty_is_urgent","id","important_reserved_pct","mod_when","mod_who","urgent_reserved_pct","version"],"title":"ReplenishmentPolicy","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","empty_is_urgent":false,"id":1,"important_reserved_pct":1.5,"mod_when":"<mod_when>","mod_who":1,"urgent_reserved_pct":1.5,"version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#replenishment_policy_save":{"post":{"operationId":"replenishment_policy_save","summary":"Replenishment policy: save its urgency rule, on the version read.","description":"Replenishment policy: save its urgency rule, on the version read.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n**Versioned entities:** replenishment_policy (id in data.id, version in data.expected_version).\n\n\n**Notes**\n\n- The catalog does not say whether this method needs an idempotency key.\n- Send the current version of the row in `expected_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[{"entity":"replenishment_policy","id_field":"id","version_field":"expected_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"replenishment_policy","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"replenishment_policy_save"},"params":{"type":"object","properties":{"meta":{"type":"object","description":"Control-plane envelope supplied by the platform."},"data":{"properties":{"data":{"description":"What a saved card changed — `generic_save` sends only the fields the person touched. Absent = unchanged; a share sent empty is refused, not kept: the person cleared it, and keeping the old value would decide for them.","properties":{"empty_is_urgent":{"default":null,"type":["boolean","null"]},"important_reserved_pct":{"default":null,"format":"double","type":["number","null"]},"urgent_reserved_pct":{"default":null,"format":"double","type":["number","null"]}},"title":"UrgencyRuleChange","type":"object"},"expected_version":{"format":"int32","type":"integer"},"id":{"format":"int64","type":"integer"}},"required":["id","expected_version","data"],"type":"object","description":"Versioned update payload."}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"replenishment_policy_save","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"id":1,"expected_version":1,"data":{"empty_is_urgent":false,"important_reserved_pct":1.5,"urgent_reserved_pct":1.5}}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"empty_is_urgent":{"type":"boolean"},"id":{"format":"int64","type":"integer"},"important_reserved_pct":{"format":"double","type":"number"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"urgent_reserved_pct":{"format":"double","type":"number"},"version":{"format":"int32","type":"integer"}},"required":["add_when","add_who","code","empty_is_urgent","id","important_reserved_pct","mod_when","mod_who","urgent_reserved_pct","version"],"title":"ReplenishmentPolicy","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","empty_is_urgent":false,"id":1,"important_reserved_pct":1.5,"mod_when":"<mod_when>","mod_who":1,"urgent_reserved_pct":1.5,"version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_replenishment_policy":{"post":{"operationId":"get_replenishment_policy","summary":"Get a replenishment_policy by ID — CRUD.","description":"Get a replenishment_policy by ID — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"replenishment_policy","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_replenishment_policy"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_replenishment_policy","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"empty_is_urgent":{"type":"boolean"},"id":{"format":"int64","type":"integer"},"important_reserved_pct":{"format":"double","type":"number"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"urgent_reserved_pct":{"format":"double","type":"number"},"version":{"format":"int32","type":"integer"}},"required":["add_when","add_who","code","empty_is_urgent","id","important_reserved_pct","mod_when","mod_who","urgent_reserved_pct","version"],"title":"ReplenishmentPolicy","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","empty_is_urgent":false,"id":1,"important_reserved_pct":1.5,"mod_when":"<mod_when>","mod_who":1,"urgent_reserved_pct":1.5,"version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_replenishment_policy":{"post":{"operationId":"list_replenishment_policy","summary":"List replenishment_policy — CRUD.","description":"List replenishment_policy — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"replenishment_policy","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_replenishment_policy"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_replenishment_policy"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/ReplenishmentPolicy"},"title":"Array_of_ReplenishmentPolicy","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"code":"<code>","empty_is_urgent":false,"id":1,"important_reserved_pct":1.5,"mod_when":"<mod_when>","mod_who":1,"urgent_reserved_pct":1.5,"version":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_replenishment_policy":{"post":{"operationId":"delete_replenishment_policy","summary":"Delete a replenishment_policy by ID — CRUD.","description":"Delete a replenishment_policy by ID — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"DEPENDENT_DATA_EXIST","when":"Other rows still use this row."}],"x-quark-module":"replenishment_policy","x-quark-operation":"delete","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_replenishment_policy"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_replenishment_policy","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"empty_is_urgent":{"type":"boolean"},"id":{"format":"int64","type":"integer"},"important_reserved_pct":{"format":"double","type":"number"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"urgent_reserved_pct":{"format":"double","type":"number"},"version":{"format":"int32","type":"integer"}},"required":["add_when","add_who","code","empty_is_urgent","id","important_reserved_pct","mod_when","mod_who","urgent_reserved_pct","version"],"title":"ReplenishmentPolicy","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","empty_is_urgent":false,"id":1,"important_reserved_pct":1.5,"mod_when":"<mod_when>","mod_who":1,"urgent_reserved_pct":1.5,"version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_many_replenishment_policy":{"post":{"operationId":"delete_many_replenishment_policy","summary":"Delete multiple replenishment_policy by IDs — CRUD.","description":"Delete multiple replenishment_policy by IDs — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"DEPENDENT_DATA_EXIST","when":"Other rows still use this row."}],"x-quark-module":"replenishment_policy","x-quark-operation":"delete","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_many_replenishment_policy"},"params":{"type":"object","properties":{"ids":{"items":{"format":"int64","type":"integer"},"type":"array","description":"Record IDs"}},"required":["ids"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_many_replenishment_policy","params":{"ids":[1]}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"uint64","minimum":0,"title":"uint64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_replenishment_policy":{"post":{"operationId":"count_replenishment_policy","summary":"Count replenishment_policy — CRUD.","description":"Count replenishment_policy — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"replenishment_policy","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_replenishment_policy"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_replenishment_policy"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_replenishment_policy_detail":{"post":{"operationId":"get_replenishment_policy_detail","summary":"Get a replenishment_policy_detail by ID — CRUD.","description":"Get a replenishment_policy_detail by ID — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"replenishment_policy","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_replenishment_policy_detail"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_replenishment_policy_detail","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"replenishment_policy_id":{"format":"int64","type":"integer"},"step_num":{"type":"string"}},"required":["add_when","add_who","id","mod_when","mod_who","replenishment_policy_id","step_num"],"title":"ReplenishmentPolicyDetail","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"id":1,"mod_when":"<mod_when>","mod_who":1,"replenishment_policy_id":1,"step_num":"<step_num>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_replenishment_policy_detail":{"post":{"operationId":"list_replenishment_policy_detail","summary":"List replenishment_policy_detail — CRUD.","description":"List replenishment_policy_detail — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"replenishment_policy","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_replenishment_policy_detail"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_replenishment_policy_detail"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/ReplenishmentPolicyDetail"},"title":"Array_of_ReplenishmentPolicyDetail","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"id":1,"mod_when":"<mod_when>","mod_who":1,"replenishment_policy_id":1,"step_num":"<step_num>"}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_replenishment_policy_detail":{"post":{"operationId":"count_replenishment_policy_detail","summary":"Count replenishment_policy_detail — CRUD.","description":"Count replenishment_policy_detail — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"replenishment_policy","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_replenishment_policy_detail"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_replenishment_policy_detail"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_cartonization_policy":{"post":{"operationId":"get_cartonization_policy","summary":"Get a cartonization_policy by ID — CRUD.","description":"Get a cartonization_policy by ID — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"cartonization_policy","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_cartonization_policy"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_cartonization_policy","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"active":{"type":"boolean"},"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"algorithm":{"$ref":"#/components/schemas/CartonizationAlgorithm"},"code":{"type":"string"},"descr":{"type":"string"},"id":{"format":"int64","type":"integer"},"iterations_per_unit_sq":{"format":"int32","type":"integer"},"max_candidates":{"format":"int32","type":"integer"},"max_iterations_cap":{"format":"int32","type":"integer"},"min_iterations":{"format":"int32","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"name":{"type":["string","null"]},"objective":{"$ref":"#/components/schemas/CartonizationObjective"},"on_no_carton_candidates":{"$ref":"#/components/schemas/CartonizationExceptionAction"},"on_no_carton_fits":{"$ref":"#/components/schemas/CartonizationExceptionAction"},"on_no_dimensions":{"$ref":"#/components/schemas/CartonizationExceptionAction"},"on_no_weight":{"$ref":"#/components/schemas/CartonizationExceptionAction"},"on_split_prevented":{"$ref":"#/components/schemas/CartonizationExceptionAction"},"on_weight_exceeded":{"$ref":"#/components/schemas/CartonizationExceptionAction"},"solver":{"$ref":"#/components/schemas/CartonizationSolver"},"split_rule":{"$ref":"#/components/schemas/PickSplitRule"},"version":{"description":"Generation of the complete header + carton set.","format":"int32","type":"integer"}},"required":["active","add_when","add_who","algorithm","code","descr","id","iterations_per_unit_sq","max_candidates","max_iterations_cap","min_iterations","mod_when","mod_who","objective","on_no_carton_candidates","on_no_carton_fits","on_no_dimensions","on_no_weight","on_split_prevented","on_weight_exceeded","solver","split_rule","version"],"title":"CartonizationPolicy","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"active":false,"add_when":"<add_when>","add_who":1,"algorithm":"ExtremePoints","code":"<code>","descr":"<descr>","id":1,"iterations_per_unit_sq":1,"max_candidates":1,"max_iterations_cap":1,"min_iterations":1,"mod_when":"<mod_when>","mod_who":1,"objective":"MinUnusedVolume","on_no_carton_candidates":"ShipAsIs","on_no_carton_fits":"ShipAsIs","on_no_dimensions":"ShipAsIs","on_no_weight":"ShipAsIs","on_split_prevented":"ShipAsIs","on_weight_exceeded":"ShipAsIs","solver":"BinPacking3d","split_rule":"Allow","version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_cartonization_policy":{"post":{"operationId":"list_cartonization_policy","summary":"List cartonization_policy — CRUD.","description":"List cartonization_policy — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"cartonization_policy","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_cartonization_policy"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_cartonization_policy"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/CartonizationPolicy"},"title":"Array_of_CartonizationPolicy","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"active":false,"add_when":"<add_when>","add_who":1,"algorithm":"ExtremePoints","code":"<code>","descr":"<descr>","id":1,"iterations_per_unit_sq":1,"max_candidates":1,"max_iterations_cap":1,"min_iterations":1,"mod_when":"<mod_when>","mod_who":1,"objective":"MinUnusedVolume","on_no_carton_candidates":"ShipAsIs","on_no_carton_fits":"ShipAsIs","on_no_dimensions":"ShipAsIs","on_no_weight":"ShipAsIs","on_split_prevented":"ShipAsIs","on_weight_exceeded":"ShipAsIs","solver":"BinPacking3d","split_rule":"Allow","version":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_cartonization_policy":{"post":{"operationId":"delete_cartonization_policy","summary":"Delete an unreferenced cartonization policy and all of its owned cartons.","description":"Delete an unreferenced cartonization policy and all of its owned cartons.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog does not say whether this method needs an idempotency key.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"cartonization_policy","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_cartonization_policy"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_cartonization_policy","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"active":{"type":"boolean"},"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"algorithm":{"$ref":"#/components/schemas/CartonizationAlgorithm"},"code":{"type":"string"},"descr":{"type":"string"},"id":{"format":"int64","type":"integer"},"iterations_per_unit_sq":{"format":"int32","type":"integer"},"max_candidates":{"format":"int32","type":"integer"},"max_iterations_cap":{"format":"int32","type":"integer"},"min_iterations":{"format":"int32","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"name":{"type":["string","null"]},"objective":{"$ref":"#/components/schemas/CartonizationObjective"},"on_no_carton_candidates":{"$ref":"#/components/schemas/CartonizationExceptionAction"},"on_no_carton_fits":{"$ref":"#/components/schemas/CartonizationExceptionAction"},"on_no_dimensions":{"$ref":"#/components/schemas/CartonizationExceptionAction"},"on_no_weight":{"$ref":"#/components/schemas/CartonizationExceptionAction"},"on_split_prevented":{"$ref":"#/components/schemas/CartonizationExceptionAction"},"on_weight_exceeded":{"$ref":"#/components/schemas/CartonizationExceptionAction"},"solver":{"$ref":"#/components/schemas/CartonizationSolver"},"split_rule":{"$ref":"#/components/schemas/PickSplitRule"},"version":{"description":"Generation of the complete header + carton set.","format":"int32","type":"integer"}},"required":["active","add_when","add_who","algorithm","code","descr","id","iterations_per_unit_sq","max_candidates","max_iterations_cap","min_iterations","mod_when","mod_who","objective","on_no_carton_candidates","on_no_carton_fits","on_no_dimensions","on_no_weight","on_split_prevented","on_weight_exceeded","solver","split_rule","version"],"title":"CartonizationPolicy","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"active":false,"add_when":"<add_when>","add_who":1,"algorithm":"ExtremePoints","code":"<code>","descr":"<descr>","id":1,"iterations_per_unit_sq":1,"max_candidates":1,"max_iterations_cap":1,"min_iterations":1,"mod_when":"<mod_when>","mod_who":1,"objective":"MinUnusedVolume","on_no_carton_candidates":"ShipAsIs","on_no_carton_fits":"ShipAsIs","on_no_dimensions":"ShipAsIs","on_no_weight":"ShipAsIs","on_split_prevented":"ShipAsIs","on_weight_exceeded":"ShipAsIs","solver":"BinPacking3d","split_rule":"Allow","version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_many_cartonization_policy":{"post":{"operationId":"delete_many_cartonization_policy","summary":"Delete unreferenced cartonization policies and all of their owned cartons.","description":"Delete unreferenced cartonization policies and all of their owned cartons.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog does not say whether this method needs an idempotency key.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"cartonization_policy","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_many_cartonization_policy"},"params":{"type":"object","properties":{"ids":{"items":{"format":"int64","type":"integer"},"type":"array","description":"Record IDs"}},"required":["ids"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_many_cartonization_policy","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"ids":[1]}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"uint64","minimum":0,"title":"uint64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_cartonization_policy":{"post":{"operationId":"count_cartonization_policy","summary":"Count cartonization_policy — CRUD.","description":"Count cartonization_policy — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"cartonization_policy","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_cartonization_policy"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_cartonization_policy"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_cartonization_policy_detail":{"post":{"operationId":"get_cartonization_policy_detail","summary":"Get a cartonization_policy_detail by ID — CRUD.","description":"Get a cartonization_policy_detail by ID — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"cartonization_policy","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_cartonization_policy_detail"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_cartonization_policy_detail","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"active":{"type":"boolean"},"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"cartonization_policy_id":{"format":"int64","type":"integer"},"descr":{"type":"string"},"handling_unit_type_id":{"description":"Тип тары, который этот кандидат планирует (`enterprise.handling_unit_type.id`, срез 7 отбора). `None` — любая подходящая по размеру коробка. Без FK: ссылки в enterprise держит сервис (wms-app 041).","format":"int64","type":["integer","null"]},"id":{"format":"int64","type":"integer"},"inner_height":{"format":"double","type":"number"},"inner_length":{"description":"ВНУТРЕННИЕ габариты: солвер укладывает внутрь. Ноль — «неизвестно», и такая строка не может быть активной.","format":"double","type":"number"},"inner_width":{"format":"double","type":"number"},"max_gross_weight":{"description":"Предел перевозчика на коробку ЦЕЛИКОМ, вместе с её тарой. Ноль — предела нет.","format":"double","type":"number"},"max_units":{"description":"Предел по числу вложенных единиц. Ноль — предела нет.","format":"int32","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"sequence":{"description":"Порядок рассмотрения солвером. Не уникален; ничью доопределяет `id`.","format":"int32","type":"integer"},"step_num":{"description":"Код коробки-кандидата: `BOX-S`, `BOX-M`. Уникален в пределах политики.","type":"string"},"tare_weight":{"description":"Вес пустой коробки. Ноль — «тара не учтена», допустимо только когда предела брутто нет вовсе.","format":"double","type":"number"}},"required":["active","add_when","add_who","cartonization_policy_id","descr","id","inner_height","inner_length","inner_width","max_gross_weight","max_units","mod_when","mod_who","sequence","step_num","tare_weight"],"title":"CartonizationPolicyDetail","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"active":false,"add_when":"<add_when>","add_who":1,"cartonization_policy_id":1,"descr":"<descr>","id":1,"inner_height":1.5,"inner_length":1.5,"inner_width":1.5,"max_gross_weight":1.5,"max_units":1,"mod_when":"<mod_when>","mod_who":1,"sequence":1,"step_num":"<step_num>","tare_weight":1.5}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_cartonization_policy_detail":{"post":{"operationId":"list_cartonization_policy_detail","summary":"List cartonization_policy_detail — CRUD.","description":"List cartonization_policy_detail — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"cartonization_policy","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_cartonization_policy_detail"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_cartonization_policy_detail"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/CartonizationPolicyDetail"},"title":"Array_of_CartonizationPolicyDetail","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"active":false,"add_when":"<add_when>","add_who":1,"cartonization_policy_id":1,"descr":"<descr>","id":1,"inner_height":1.5,"inner_length":1.5,"inner_width":1.5,"max_gross_weight":1.5,"max_units":1,"mod_when":"<mod_when>","mod_who":1,"sequence":1,"step_num":"<step_num>","tare_weight":1.5}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_cartonization_policy_detail":{"post":{"operationId":"count_cartonization_policy_detail","summary":"Count cartonization_policy_detail — CRUD.","description":"Count cartonization_policy_detail — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"cartonization_policy","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_cartonization_policy_detail"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_cartonization_policy_detail"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_cartonization_policy_detail_form":{"post":{"operationId":"get_cartonization_policy_detail_form","summary":"Get one carton candidate with its policy aggregate version.","description":"Get one carton candidate with its policy aggregate version.\n\n**Category:** `query`. Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":true,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"cartonization_policy","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_cartonization_policy_detail_form"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_cartonization_policy_detail_form","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"active":{"type":"boolean"},"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"cartonization_policy_id":{"format":"int64","type":"integer"},"descr":{"type":"string"},"handling_unit_type_id":{"description":"Тип тары, который этот кандидат планирует (`enterprise.handling_unit_type.id`, срез 7 отбора). `None` — любая подходящая по размеру коробка. Без FK: ссылки в enterprise держит сервис (wms-app 041).","format":"int64","type":["integer","null"]},"id":{"format":"int64","type":"integer"},"inner_height":{"format":"double","type":"number"},"inner_length":{"description":"ВНУТРЕННИЕ габариты: солвер укладывает внутрь. Ноль — «неизвестно», и такая строка не может быть активной.","format":"double","type":"number"},"inner_width":{"format":"double","type":"number"},"max_gross_weight":{"description":"Предел перевозчика на коробку ЦЕЛИКОМ, вместе с её тарой. Ноль — предела нет.","format":"double","type":"number"},"max_units":{"description":"Предел по числу вложенных единиц. Ноль — предела нет.","format":"int32","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"sequence":{"description":"Порядок рассмотрения солвером. Не уникален; ничью доопределяет `id`.","format":"int32","type":"integer"},"step_num":{"description":"Код коробки-кандидата: `BOX-S`, `BOX-M`. Уникален в пределах политики.","type":"string"},"tare_weight":{"description":"Вес пустой коробки. Ноль — «тара не учтена», допустимо только когда предела брутто нет вовсе.","format":"double","type":"number"},"version":{"description":"Version of the aggregate root read with this carton.","format":"int32","type":"integer"}},"required":["active","add_when","add_who","cartonization_policy_id","descr","id","inner_height","inner_length","inner_width","max_gross_weight","max_units","mod_when","mod_who","sequence","step_num","tare_weight","version"],"title":"CartonizationPolicyDetailFormView","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"active":false,"add_when":"<add_when>","add_who":1,"cartonization_policy_id":1,"descr":"<descr>","id":1,"inner_height":1.5,"inner_length":1.5,"inner_width":1.5,"max_gross_weight":1.5,"max_units":1,"mod_when":"<mod_when>","mod_who":1,"sequence":1,"step_num":"<step_num>","tare_weight":1.5,"version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#cartonization_policy_view":{"post":{"operationId":"cartonization_policy_view","summary":"Read the complete cartonization policy in solver order.","description":"Read the complete cartonization policy in solver order.\n\n**Category:** `query`. Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":true,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"cartonization_policy","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"cartonization_policy_view"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"cartonization_policy_view","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"cartons":{"description":"Solver order. The array order, not a caller-supplied number, is the editable ordering contract.","items":{"$ref":"#/components/schemas/CartonizationPolicyDetail"},"type":"array"},"policy":{"$ref":"#/components/schemas/CartonizationPolicy"}},"required":["cartons","policy"],"title":"CartonizationPolicyAggregateView","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"cartons":[{"active":false,"add_when":"<add_when>","add_who":1,"cartonization_policy_id":1,"descr":"<descr>","id":1,"inner_height":1.5,"inner_length":1.5,"inner_width":1.5,"max_gross_weight":1.5,"max_units":1,"mod_when":"<mod_when>","mod_who":1,"sequence":1,"step_num":"<step_num>","tare_weight":1.5}],"policy":{"active":false,"add_when":"<add_when>","add_who":1,"algorithm":"ExtremePoints","code":"<code>","descr":"<descr>","id":1,"iterations_per_unit_sq":1,"max_candidates":1,"max_iterations_cap":1,"min_iterations":1,"mod_when":"<mod_when>","mod_who":1,"objective":"MinUnusedVolume","on_no_carton_candidates":"ShipAsIs","on_no_carton_fits":"ShipAsIs","on_no_dimensions":"ShipAsIs","on_no_weight":"ShipAsIs","on_split_prevented":"ShipAsIs","on_weight_exceeded":"ShipAsIs","solver":"BinPacking3d","split_rule":"Allow","version":1}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#cartonization_policy_template":{"post":{"operationId":"cartonization_policy_template","summary":"The draft a new cartonization policy starts from.","description":"The draft a new cartonization policy starts from.\n\n**Category:** `query`. Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":true,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"cartonization_policy","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"cartonization_policy_template"},"params":{"type":"object","properties":{"data":{"additionalProperties":false,"description":"Nothing: a new-cartonization policy template depends on no argument.","title":"CartonizationPolicyTemplateInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"cartonization_policy_template","params":{"data":{}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"additionalProperties":false,"properties":{"cartons":{"description":"The vector order becomes `sequence = 10, 20, ...` on save.","items":{"$ref":"#/components/schemas/CartonizationCartonDraft"},"type":"array"},"policy":{"$ref":"#/components/schemas/CartonizationPolicyRootDraft"}},"required":["cartons","policy"],"title":"CartonizationPolicyAggregateDraft","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"cartons":[{"active":false,"code":"<code>","descr":"<descr>","inner_height":1.5,"inner_length":1.5,"inner_width":1.5,"max_gross_weight":1.5,"max_units":1,"tare_weight":1.5}],"policy":{"active":false,"algorithm":"ExtremePoints","descr":"<descr>","iterations_per_unit_sq":1,"max_candidates":1,"max_iterations_cap":1,"min_iterations":1,"objective":"MinUnusedVolume","on_no_carton_candidates":"ShipAsIs","on_no_carton_fits":"ShipAsIs","on_no_dimensions":"ShipAsIs","on_no_weight":"ShipAsIs","on_split_prevented":"ShipAsIs","on_weight_exceeded":"ShipAsIs","solver":"BinPacking3d","split_rule":"Allow"}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#cartonization_policy_create":{"post":{"operationId":"cartonization_policy_create","summary":"Create a cartonization policy and its ordered cartons atomically.","description":"Create a cartonization policy and its ordered cartons atomically.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog does not say whether this method needs an idempotency key.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"cartonization_policy","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"cartonization_policy_create"},"params":{"type":"object","properties":{"data":{"additionalProperties":false,"properties":{"code":{"type":"string"},"data":{"$ref":"#/components/schemas/CartonizationPolicyAggregateDraft"}},"required":["code","data"],"title":"CartonizationPolicyAggregateForCreate","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"cartonization_policy_create","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"code":"<code>","data":{"cartons":[{"active":false,"code":"<code>","descr":"<descr>","inner_height":1.5,"inner_length":1.5,"inner_width":1.5,"max_gross_weight":1.5,"max_units":1,"tare_weight":1.5}],"policy":{"active":false,"algorithm":"ExtremePoints","descr":"<descr>","iterations_per_unit_sq":1,"max_candidates":1,"max_iterations_cap":1,"min_iterations":1,"objective":null,"on_no_carton_candidates":null,"on_no_carton_fits":null,"on_no_dimensions":null,"on_no_weight":null,"on_split_prevented":null,"on_weight_exceeded":null,"solver":"BinPacking3d","split_rule":null}}}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"cartons":{"description":"Solver order. The array order, not a caller-supplied number, is the editable ordering contract.","items":{"$ref":"#/components/schemas/CartonizationPolicyDetail"},"type":"array"},"policy":{"$ref":"#/components/schemas/CartonizationPolicy"}},"required":["cartons","policy"],"title":"CartonizationPolicyAggregateView","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"cartons":[{"active":false,"add_when":"<add_when>","add_who":1,"cartonization_policy_id":1,"descr":"<descr>","id":1,"inner_height":1.5,"inner_length":1.5,"inner_width":1.5,"max_gross_weight":1.5,"max_units":1,"mod_when":"<mod_when>","mod_who":1,"sequence":1,"step_num":"<step_num>","tare_weight":1.5}],"policy":{"active":false,"add_when":"<add_when>","add_who":1,"algorithm":"ExtremePoints","code":"<code>","descr":"<descr>","id":1,"iterations_per_unit_sq":1,"max_candidates":1,"max_iterations_cap":1,"min_iterations":1,"mod_when":"<mod_when>","mod_who":1,"objective":"MinUnusedVolume","on_no_carton_candidates":"ShipAsIs","on_no_carton_fits":"ShipAsIs","on_no_dimensions":"ShipAsIs","on_no_weight":"ShipAsIs","on_split_prevented":"ShipAsIs","on_weight_exceeded":"ShipAsIs","solver":"BinPacking3d","split_rule":"Allow","version":1}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#cartonization_policy_save":{"post":{"operationId":"cartonization_policy_save","summary":"Replace a cartonization policy and its ordered cartons atomically.","description":"Replace a cartonization policy and its ordered cartons atomically.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n**Versioned entities:** cartonization_policy (id in data.id, version in data.expected_version).\n\n\n**Notes**\n\n- The catalog does not say whether this method needs an idempotency key.\n- Send the current version of the row in `expected_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[{"entity":"cartonization_policy","id_field":"id","version_field":"expected_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"cartonization_policy","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"cartonization_policy_save"},"params":{"type":"object","properties":{"meta":{"type":"object","description":"Control-plane envelope supplied by the platform."},"data":{"properties":{"data":{"additionalProperties":false,"properties":{"cartons":{"description":"The vector order becomes `sequence = 10, 20, ...` on save.","items":{"$ref":"#/components/schemas/CartonizationCartonDraft"},"type":"array"},"policy":{"$ref":"#/components/schemas/CartonizationPolicyRootDraft"}},"required":["cartons","policy"],"title":"CartonizationPolicyAggregateDraft","type":"object"},"expected_version":{"format":"int32","type":"integer"},"id":{"format":"int64","type":"integer"}},"required":["id","expected_version","data"],"type":"object","description":"Versioned update payload."}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"cartonization_policy_save","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"id":1,"expected_version":1,"data":{"cartons":[{"active":false,"code":"<code>","descr":"<descr>","inner_height":1.5,"inner_length":1.5,"inner_width":1.5,"max_gross_weight":1.5,"max_units":1,"tare_weight":1.5}],"policy":{"active":false,"algorithm":"ExtremePoints","descr":"<descr>","iterations_per_unit_sq":1,"max_candidates":1,"max_iterations_cap":1,"min_iterations":1,"objective":"MinUnusedVolume","on_no_carton_candidates":"ShipAsIs","on_no_carton_fits":"ShipAsIs","on_no_dimensions":"ShipAsIs","on_no_weight":"ShipAsIs","on_split_prevented":"ShipAsIs","on_weight_exceeded":"ShipAsIs","solver":"BinPacking3d","split_rule":"Allow"}}}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"cartons":{"description":"Solver order. The array order, not a caller-supplied number, is the editable ordering contract.","items":{"$ref":"#/components/schemas/CartonizationPolicyDetail"},"type":"array"},"policy":{"$ref":"#/components/schemas/CartonizationPolicy"}},"required":["cartons","policy"],"title":"CartonizationPolicyAggregateView","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"cartons":[{"active":false,"add_when":"<add_when>","add_who":1,"cartonization_policy_id":1,"descr":"<descr>","id":1,"inner_height":1.5,"inner_length":1.5,"inner_width":1.5,"max_gross_weight":1.5,"max_units":1,"mod_when":"<mod_when>","mod_who":1,"sequence":1,"step_num":"<step_num>","tare_weight":1.5}],"policy":{"active":false,"add_when":"<add_when>","add_who":1,"algorithm":"ExtremePoints","code":"<code>","descr":"<descr>","id":1,"iterations_per_unit_sq":1,"max_candidates":1,"max_iterations_cap":1,"min_iterations":1,"mod_when":"<mod_when>","mod_who":1,"objective":"MinUnusedVolume","on_no_carton_candidates":"ShipAsIs","on_no_carton_fits":"ShipAsIs","on_no_dimensions":"ShipAsIs","on_no_weight":"ShipAsIs","on_split_prevented":"ShipAsIs","on_weight_exceeded":"ShipAsIs","solver":"BinPacking3d","split_rule":"Allow","version":1}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#create_cartonization_policy_form":{"post":{"operationId":"create_cartonization_policy_form","summary":"Create a cartonization policy from the metadata form.","description":"Create a cartonization policy from the metadata form.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog does not say whether this method needs an idempotency key.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"cartonization_policy","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"create_cartonization_policy_form"},"params":{"type":"object","properties":{"data":{"properties":{"active":{"type":["boolean","null"]},"algorithm":{"anyOf":[{"$ref":"#/components/schemas/CartonizationAlgorithm"},{"type":"null"}]},"code":{"type":"string"},"descr":{"type":["string","null"]},"iterations_per_unit_sq":{"format":"int32","type":["integer","null"]},"max_candidates":{"format":"int32","type":["integer","null"]},"max_iterations_cap":{"format":"int32","type":["integer","null"]},"min_iterations":{"format":"int32","type":["integer","null"]},"name":{"type":["string","null"]},"objective":{"anyOf":[{"$ref":"#/components/schemas/CartonizationObjective"},{"type":"null"}]},"on_no_carton_candidates":{"anyOf":[{"$ref":"#/components/schemas/CartonizationExceptionAction"},{"type":"null"}]},"on_no_carton_fits":{"anyOf":[{"$ref":"#/components/schemas/CartonizationExceptionAction"},{"type":"null"}]},"on_no_dimensions":{"anyOf":[{"$ref":"#/components/schemas/CartonizationExceptionAction"},{"type":"null"}]},"on_no_weight":{"anyOf":[{"$ref":"#/components/schemas/CartonizationExceptionAction"},{"type":"null"}]},"on_split_prevented":{"anyOf":[{"$ref":"#/components/schemas/CartonizationExceptionAction"},{"type":"null"}]},"on_weight_exceeded":{"anyOf":[{"$ref":"#/components/schemas/CartonizationExceptionAction"},{"type":"null"}]},"solver":{"anyOf":[{"$ref":"#/components/schemas/CartonizationSolver"},{"type":"null"}]},"split_rule":{"anyOf":[{"$ref":"#/components/schemas/PickSplitRule"},{"type":"null"}]}},"required":["code"],"title":"CartonizationPolicyForCreate","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"create_cartonization_policy_form","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"code":"<code>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"active":{"type":"boolean"},"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"algorithm":{"$ref":"#/components/schemas/CartonizationAlgorithm"},"code":{"type":"string"},"descr":{"type":"string"},"id":{"format":"int64","type":"integer"},"iterations_per_unit_sq":{"format":"int32","type":"integer"},"max_candidates":{"format":"int32","type":"integer"},"max_iterations_cap":{"format":"int32","type":"integer"},"min_iterations":{"format":"int32","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"name":{"type":["string","null"]},"objective":{"$ref":"#/components/schemas/CartonizationObjective"},"on_no_carton_candidates":{"$ref":"#/components/schemas/CartonizationExceptionAction"},"on_no_carton_fits":{"$ref":"#/components/schemas/CartonizationExceptionAction"},"on_no_dimensions":{"$ref":"#/components/schemas/CartonizationExceptionAction"},"on_no_weight":{"$ref":"#/components/schemas/CartonizationExceptionAction"},"on_split_prevented":{"$ref":"#/components/schemas/CartonizationExceptionAction"},"on_weight_exceeded":{"$ref":"#/components/schemas/CartonizationExceptionAction"},"solver":{"$ref":"#/components/schemas/CartonizationSolver"},"split_rule":{"$ref":"#/components/schemas/PickSplitRule"},"version":{"description":"Generation of the complete header + carton set.","format":"int32","type":"integer"}},"required":["active","add_when","add_who","algorithm","code","descr","id","iterations_per_unit_sq","max_candidates","max_iterations_cap","min_iterations","mod_when","mod_who","objective","on_no_carton_candidates","on_no_carton_fits","on_no_dimensions","on_no_weight","on_split_prevented","on_weight_exceeded","solver","split_rule","version"],"title":"CartonizationPolicy","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"active":false,"add_when":"<add_when>","add_who":1,"algorithm":"ExtremePoints","code":"<code>","descr":"<descr>","id":1,"iterations_per_unit_sq":1,"max_candidates":1,"max_iterations_cap":1,"min_iterations":1,"mod_when":"<mod_when>","mod_who":1,"objective":"MinUnusedVolume","on_no_carton_candidates":"ShipAsIs","on_no_carton_fits":"ShipAsIs","on_no_dimensions":"ShipAsIs","on_no_weight":"ShipAsIs","on_split_prevented":"ShipAsIs","on_weight_exceeded":"ShipAsIs","solver":"BinPacking3d","split_rule":"Allow","version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#update_cartonization_policy_form":{"post":{"operationId":"update_cartonization_policy_form","summary":"Update cartonization policy header fields from the metadata form.","description":"Update cartonization policy header fields from the metadata form.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n**Versioned entities:** cartonization_policy (id in data.id, version in data.expected_version).\n\n\n**Notes**\n\n- The catalog does not say whether this method needs an idempotency key.\n- Send the current version of the row in `expected_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[{"entity":"cartonization_policy","id_field":"id","version_field":"expected_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"cartonization_policy","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"update_cartonization_policy_form"},"params":{"type":"object","properties":{"meta":{"type":"object","description":"Control-plane envelope supplied by the platform."},"data":{"properties":{"data":{"properties":{"active":{"type":["boolean","null"]},"algorithm":{"anyOf":[{"$ref":"#/components/schemas/CartonizationAlgorithm"},{"type":"null"}]},"code":{"type":["string","null"]},"descr":{"type":["string","null"]},"iterations_per_unit_sq":{"format":"int32","type":["integer","null"]},"max_candidates":{"format":"int32","type":["integer","null"]},"max_iterations_cap":{"format":"int32","type":["integer","null"]},"min_iterations":{"format":"int32","type":["integer","null"]},"name":{"type":["string","null"]},"objective":{"anyOf":[{"$ref":"#/components/schemas/CartonizationObjective"},{"type":"null"}]},"on_no_carton_candidates":{"anyOf":[{"$ref":"#/components/schemas/CartonizationExceptionAction"},{"type":"null"}]},"on_no_carton_fits":{"anyOf":[{"$ref":"#/components/schemas/CartonizationExceptionAction"},{"type":"null"}]},"on_no_dimensions":{"anyOf":[{"$ref":"#/components/schemas/CartonizationExceptionAction"},{"type":"null"}]},"on_no_weight":{"anyOf":[{"$ref":"#/components/schemas/CartonizationExceptionAction"},{"type":"null"}]},"on_split_prevented":{"anyOf":[{"$ref":"#/components/schemas/CartonizationExceptionAction"},{"type":"null"}]},"on_weight_exceeded":{"anyOf":[{"$ref":"#/components/schemas/CartonizationExceptionAction"},{"type":"null"}]},"solver":{"anyOf":[{"$ref":"#/components/schemas/CartonizationSolver"},{"type":"null"}]},"split_rule":{"anyOf":[{"$ref":"#/components/schemas/PickSplitRule"},{"type":"null"}]}},"title":"CartonizationPolicyForUpdate","type":"object"},"expected_version":{"format":"int32","type":"integer"},"id":{"format":"int64","type":"integer"}},"required":["id","expected_version","data"],"type":"object","description":"Versioned update payload."}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"update_cartonization_policy_form","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"id":1,"expected_version":1,"data":{"active":false,"algorithm":"ExtremePoints","code":"<code>"}}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"active":{"type":"boolean"},"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"algorithm":{"$ref":"#/components/schemas/CartonizationAlgorithm"},"code":{"type":"string"},"descr":{"type":"string"},"id":{"format":"int64","type":"integer"},"iterations_per_unit_sq":{"format":"int32","type":"integer"},"max_candidates":{"format":"int32","type":"integer"},"max_iterations_cap":{"format":"int32","type":"integer"},"min_iterations":{"format":"int32","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"name":{"type":["string","null"]},"objective":{"$ref":"#/components/schemas/CartonizationObjective"},"on_no_carton_candidates":{"$ref":"#/components/schemas/CartonizationExceptionAction"},"on_no_carton_fits":{"$ref":"#/components/schemas/CartonizationExceptionAction"},"on_no_dimensions":{"$ref":"#/components/schemas/CartonizationExceptionAction"},"on_no_weight":{"$ref":"#/components/schemas/CartonizationExceptionAction"},"on_split_prevented":{"$ref":"#/components/schemas/CartonizationExceptionAction"},"on_weight_exceeded":{"$ref":"#/components/schemas/CartonizationExceptionAction"},"solver":{"$ref":"#/components/schemas/CartonizationSolver"},"split_rule":{"$ref":"#/components/schemas/PickSplitRule"},"version":{"description":"Generation of the complete header + carton set.","format":"int32","type":"integer"}},"required":["active","add_when","add_who","algorithm","code","descr","id","iterations_per_unit_sq","max_candidates","max_iterations_cap","min_iterations","mod_when","mod_who","objective","on_no_carton_candidates","on_no_carton_fits","on_no_dimensions","on_no_weight","on_split_prevented","on_weight_exceeded","solver","split_rule","version"],"title":"CartonizationPolicy","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"active":false,"add_when":"<add_when>","add_who":1,"algorithm":"ExtremePoints","code":"<code>","descr":"<descr>","id":1,"iterations_per_unit_sq":1,"max_candidates":1,"max_iterations_cap":1,"min_iterations":1,"mod_when":"<mod_when>","mod_who":1,"objective":"MinUnusedVolume","on_no_carton_candidates":"ShipAsIs","on_no_carton_fits":"ShipAsIs","on_no_dimensions":"ShipAsIs","on_no_weight":"ShipAsIs","on_split_prevented":"ShipAsIs","on_weight_exceeded":"ShipAsIs","solver":"BinPacking3d","split_rule":"Allow","version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#create_cartonization_policy_detail_form":{"post":{"operationId":"create_cartonization_policy_detail_form","summary":"Add one carton candidate through the metadata detail form.","description":"Add one carton candidate through the metadata detail form.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog does not say whether this method needs an idempotency key.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"cartonization_policy","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"create_cartonization_policy_detail_form"},"params":{"type":"object","properties":{"data":{"properties":{"active":{"type":["boolean","null"]},"cartonization_policy_id":{"format":"int64","type":"integer"},"descr":{"type":["string","null"]},"handling_unit_type_id":{"format":"int64","type":["integer","null"]},"inner_height":{"format":"double","type":["number","null"]},"inner_length":{"format":"double","type":["number","null"]},"inner_width":{"format":"double","type":["number","null"]},"max_gross_weight":{"format":"double","type":["number","null"]},"max_units":{"format":"int32","type":["integer","null"]},"sequence":{"format":"int32","type":["integer","null"]},"step_num":{"type":"string"},"tare_weight":{"format":"double","type":["number","null"]}},"required":["cartonization_policy_id","step_num"],"title":"CartonizationPolicyDetailForCreate","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"create_cartonization_policy_detail_form","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"cartonization_policy_id":1,"step_num":"<step_num>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"active":{"type":"boolean"},"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"cartonization_policy_id":{"format":"int64","type":"integer"},"descr":{"type":"string"},"handling_unit_type_id":{"description":"Тип тары, который этот кандидат планирует (`enterprise.handling_unit_type.id`, срез 7 отбора). `None` — любая подходящая по размеру коробка. Без FK: ссылки в enterprise держит сервис (wms-app 041).","format":"int64","type":["integer","null"]},"id":{"format":"int64","type":"integer"},"inner_height":{"format":"double","type":"number"},"inner_length":{"description":"ВНУТРЕННИЕ габариты: солвер укладывает внутрь. Ноль — «неизвестно», и такая строка не может быть активной.","format":"double","type":"number"},"inner_width":{"format":"double","type":"number"},"max_gross_weight":{"description":"Предел перевозчика на коробку ЦЕЛИКОМ, вместе с её тарой. Ноль — предела нет.","format":"double","type":"number"},"max_units":{"description":"Предел по числу вложенных единиц. Ноль — предела нет.","format":"int32","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"sequence":{"description":"Порядок рассмотрения солвером. Не уникален; ничью доопределяет `id`.","format":"int32","type":"integer"},"step_num":{"description":"Код коробки-кандидата: `BOX-S`, `BOX-M`. Уникален в пределах политики.","type":"string"},"tare_weight":{"description":"Вес пустой коробки. Ноль — «тара не учтена», допустимо только когда предела брутто нет вовсе.","format":"double","type":"number"},"version":{"description":"Version of the aggregate root read with this carton.","format":"int32","type":"integer"}},"required":["active","add_when","add_who","cartonization_policy_id","descr","id","inner_height","inner_length","inner_width","max_gross_weight","max_units","mod_when","mod_who","sequence","step_num","tare_weight","version"],"title":"CartonizationPolicyDetailFormView","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"active":false,"add_when":"<add_when>","add_who":1,"cartonization_policy_id":1,"descr":"<descr>","id":1,"inner_height":1.5,"inner_length":1.5,"inner_width":1.5,"max_gross_weight":1.5,"max_units":1,"mod_when":"<mod_when>","mod_who":1,"sequence":1,"step_num":"<step_num>","tare_weight":1.5,"version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#update_cartonization_policy_detail_form":{"post":{"operationId":"update_cartonization_policy_detail_form","summary":"Update one carton candidate through the metadata detail form.","description":"Update one carton candidate through the metadata detail form.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n**Versioned entities:** cartonization_policy (id in data.id, version in data.expected_version).\n\n\n**Notes**\n\n- The catalog does not say whether this method needs an idempotency key.\n- Send the current version of the row in `expected_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[{"entity":"cartonization_policy","id_field":"id","version_field":"expected_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"cartonization_policy","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"update_cartonization_policy_detail_form"},"params":{"type":"object","properties":{"meta":{"type":"object","description":"Control-plane envelope supplied by the platform."},"data":{"properties":{"data":{"properties":{"active":{"type":["boolean","null"]},"descr":{"type":["string","null"]},"handling_unit_type_id":{"format":"int64","type":["integer","null"]},"inner_height":{"format":"double","type":["number","null"]},"inner_length":{"format":"double","type":["number","null"]},"inner_width":{"format":"double","type":["number","null"]},"max_gross_weight":{"format":"double","type":["number","null"]},"max_units":{"format":"int32","type":["integer","null"]},"sequence":{"format":"int32","type":["integer","null"]},"step_num":{"type":["string","null"]},"tare_weight":{"format":"double","type":["number","null"]}},"title":"CartonizationPolicyDetailForUpdate","type":"object"},"expected_version":{"format":"int32","type":"integer"},"id":{"format":"int64","type":"integer"}},"required":["id","expected_version","data"],"type":"object","description":"Versioned update payload."}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"update_cartonization_policy_detail_form","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"id":1,"expected_version":1,"data":{"active":false,"descr":"<descr>","handling_unit_type_id":1}}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"active":{"type":"boolean"},"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"cartonization_policy_id":{"format":"int64","type":"integer"},"descr":{"type":"string"},"handling_unit_type_id":{"description":"Тип тары, который этот кандидат планирует (`enterprise.handling_unit_type.id`, срез 7 отбора). `None` — любая подходящая по размеру коробка. Без FK: ссылки в enterprise держит сервис (wms-app 041).","format":"int64","type":["integer","null"]},"id":{"format":"int64","type":"integer"},"inner_height":{"format":"double","type":"number"},"inner_length":{"description":"ВНУТРЕННИЕ габариты: солвер укладывает внутрь. Ноль — «неизвестно», и такая строка не может быть активной.","format":"double","type":"number"},"inner_width":{"format":"double","type":"number"},"max_gross_weight":{"description":"Предел перевозчика на коробку ЦЕЛИКОМ, вместе с её тарой. Ноль — предела нет.","format":"double","type":"number"},"max_units":{"description":"Предел по числу вложенных единиц. Ноль — предела нет.","format":"int32","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"sequence":{"description":"Порядок рассмотрения солвером. Не уникален; ничью доопределяет `id`.","format":"int32","type":"integer"},"step_num":{"description":"Код коробки-кандидата: `BOX-S`, `BOX-M`. Уникален в пределах политики.","type":"string"},"tare_weight":{"description":"Вес пустой коробки. Ноль — «тара не учтена», допустимо только когда предела брутто нет вовсе.","format":"double","type":"number"},"version":{"description":"Version of the aggregate root read with this carton.","format":"int32","type":"integer"}},"required":["active","add_when","add_who","cartonization_policy_id","descr","id","inner_height","inner_length","inner_width","max_gross_weight","max_units","mod_when","mod_who","sequence","step_num","tare_weight","version"],"title":"CartonizationPolicyDetailFormView","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"active":false,"add_when":"<add_when>","add_who":1,"cartonization_policy_id":1,"descr":"<descr>","id":1,"inner_height":1.5,"inner_length":1.5,"inner_width":1.5,"max_gross_weight":1.5,"max_units":1,"mod_when":"<mod_when>","mod_who":1,"sequence":1,"step_num":"<step_num>","tare_weight":1.5,"version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_cartonization_policy_detail_form":{"post":{"operationId":"delete_cartonization_policy_detail_form","summary":"Delete one carton candidate through the metadata detail form.","description":"Delete one carton candidate through the metadata detail form.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog does not say whether this method needs an idempotency key.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"cartonization_policy","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_cartonization_policy_detail_form"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_cartonization_policy_detail_form","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"active":{"type":"boolean"},"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"cartonization_policy_id":{"format":"int64","type":"integer"},"descr":{"type":"string"},"handling_unit_type_id":{"description":"Тип тары, который этот кандидат планирует (`enterprise.handling_unit_type.id`, срез 7 отбора). `None` — любая подходящая по размеру коробка. Без FK: ссылки в enterprise держит сервис (wms-app 041).","format":"int64","type":["integer","null"]},"id":{"format":"int64","type":"integer"},"inner_height":{"format":"double","type":"number"},"inner_length":{"description":"ВНУТРЕННИЕ габариты: солвер укладывает внутрь. Ноль — «неизвестно», и такая строка не может быть активной.","format":"double","type":"number"},"inner_width":{"format":"double","type":"number"},"max_gross_weight":{"description":"Предел перевозчика на коробку ЦЕЛИКОМ, вместе с её тарой. Ноль — предела нет.","format":"double","type":"number"},"max_units":{"description":"Предел по числу вложенных единиц. Ноль — предела нет.","format":"int32","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"sequence":{"description":"Порядок рассмотрения солвером. Не уникален; ничью доопределяет `id`.","format":"int32","type":"integer"},"step_num":{"description":"Код коробки-кандидата: `BOX-S`, `BOX-M`. Уникален в пределах политики.","type":"string"},"tare_weight":{"description":"Вес пустой коробки. Ноль — «тара не учтена», допустимо только когда предела брутто нет вовсе.","format":"double","type":"number"}},"required":["active","add_when","add_who","cartonization_policy_id","descr","id","inner_height","inner_length","inner_width","max_gross_weight","max_units","mod_when","mod_who","sequence","step_num","tare_weight"],"title":"CartonizationPolicyDetail","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"active":false,"add_when":"<add_when>","add_who":1,"cartonization_policy_id":1,"descr":"<descr>","id":1,"inner_height":1.5,"inner_length":1.5,"inner_width":1.5,"max_gross_weight":1.5,"max_units":1,"mod_when":"<mod_when>","mod_who":1,"sequence":1,"step_num":"<step_num>","tare_weight":1.5}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_many_cartonization_policy_detail_form":{"post":{"operationId":"delete_many_cartonization_policy_detail_form","summary":"Delete selected carton candidates through the metadata list.","description":"Delete selected carton candidates through the metadata list.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog does not say whether this method needs an idempotency key.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"cartonization_policy","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_many_cartonization_policy_detail_form"},"params":{"type":"object","properties":{"ids":{"items":{"format":"int64","type":"integer"},"type":"array","description":"Record IDs"}},"required":["ids"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_many_cartonization_policy_detail_form","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"ids":[1]}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"uint64","minimum":0,"title":"uint64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#wave_get":{"post":{"operationId":"wave_get","summary":"Get a Wave with members and progress.","description":"Get a Wave with members and progress.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"wave","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"wave_get"},"params":{"type":"object","properties":{"data":{"properties":{"wave_id":{"format":"int64","type":"integer"}},"required":["wave_id"],"title":"WaveIdInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"wave_get","params":{"data":{"wave_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"members":{"items":{"$ref":"#/components/schemas/WaveOrder"},"type":"array"},"progress":{"$ref":"#/components/schemas/WaveProgress"},"wave":{"$ref":"#/components/schemas/Wave"}},"required":["members","progress","wave"],"title":"WaveDetails","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"members":[{"add_when":"<add_when>","add_who":1,"attempt_count":1,"id":1,"mod_when":"<mod_when>","mod_who":1,"order_id":1,"release_generation":1,"status":"Draft","wave_id":1}],"progress":{"blocked":1,"draft":1,"failed":1,"pending":1,"processing":1,"released":1,"skipped":1},"wave":{"add_when":"<add_when>","add_who":1,"code":"<code>","id":1,"mod_when":"<mod_when>","mod_who":1,"release_generation":1,"status":"Draft","version":1}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#wave_list":{"post":{"operationId":"wave_list","summary":"List Waves.","description":"List Waves.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"wave","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"wave_list"},"params":{"type":"object","properties":{"data":{"properties":{"limit":{"default":50,"format":"int64","type":"integer"},"offset":{"default":0,"format":"int64","type":"integer"}},"title":"WaveListInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"wave_list","params":{"data":{"limit":50,"offset":0}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/Wave"},"title":"Array_of_Wave","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"code":"<code>","id":1,"mod_when":"<mod_when>","mod_who":1,"release_generation":1,"status":"Draft","version":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#wave_header_get":{"post":{"operationId":"wave_header_get","summary":"Read a flat Wave header without advancing it.","description":"Read a flat Wave header without advancing it.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"wave","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"wave_header_get"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"wave_header_get","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"cancelled_at":{"default":null,"type":["string","null"]},"code":{"type":"string"},"completed_at":{"default":null,"type":["string","null"]},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"planned_at":{"default":null,"type":["string","null"]},"policy_id":{"format":"int64","type":["integer","null"]},"policy_run_id":{"format":"int64","type":["integer","null"]},"release_generation":{"format":"int32","type":"integer"},"release_requested_by":{"format":"int64","type":["integer","null"]},"released_at":{"default":null,"type":["string","null"]},"station_location":{"description":"The distribution station (a `Sort` location) the wave is released onto; `None` = no station (wms-app 095, R-4).","type":["string","null"]},"status":{"$ref":"#/components/schemas/WaveStatus"},"version":{"format":"int32","type":"integer"}},"required":["add_when","add_who","code","id","mod_when","mod_who","release_generation","status","version"],"title":"Wave","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","id":1,"mod_when":"<mod_when>","mod_who":1,"release_generation":1,"status":"Draft","version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#wave_header_list":{"post":{"operationId":"wave_header_list","summary":"Filter and page Wave headers without release or membership changes.","description":"Filter and page Wave headers without release or membership changes.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"wave","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"wave_header_list"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"wave_header_list"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/Wave"},"title":"Array_of_Wave","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"code":"<code>","id":1,"mod_when":"<mod_when>","mod_who":1,"release_generation":1,"status":"Draft","version":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#wave_preview":{"post":{"operationId":"wave_preview","summary":"Preview release eligibility for every Wave order. Writes nothing.","description":"Preview release eligibility for every Wave order. Writes nothing.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"wave","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"wave_preview"},"params":{"type":"object","properties":{"data":{"properties":{"wave_id":{"format":"int64","type":"integer"}},"required":["wave_id"],"title":"WaveIdInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"wave_preview","params":{"data":{"wave_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"blocked":{"format":"int64","type":"integer"},"orders":{"items":{"$ref":"#/components/schemas/WaveOrderPreview"},"type":"array"},"ready":{"format":"int64","type":"integer"},"wave":{"$ref":"#/components/schemas/Wave"}},"required":["blocked","orders","ready","wave"],"title":"WavePreview","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"blocked":1,"orders":[{"member":{"add_when":"<add_when>","add_who":1,"attempt_count":1,"id":1,"mod_when":"<mod_when>","mod_who":1,"order_id":1,"release_generation":1,"status":null,"wave_id":1},"validation":{"errors":[],"ok":false,"warnings":[]}}],"ready":1,"wave":{"add_when":"<add_when>","add_who":1,"code":"<code>","id":1,"mod_when":"<mod_when>","mod_who":1,"release_generation":1,"status":"Draft","version":1}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#wave_policy_get":{"post":{"operationId":"wave_policy_get","summary":"Get a Wave policy.","description":"Get a Wave policy.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"wave","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"wave_policy_get"},"params":{"type":"object","properties":{"data":{"properties":{"policy_id":{"format":"int64","type":"integer"}},"required":["policy_id"],"title":"WavePolicyIdInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"wave_policy_get","params":{"data":{"policy_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"auto_release":{"type":"boolean"},"carrier_id":{"format":"int64","type":["integer","null"]},"code":{"type":"string"},"description":{"type":["string","null"]},"eligible_statuses":{"items":{"type":"string"},"type":"array"},"group_by_carrier":{"type":"boolean"},"group_by_owner":{"type":"boolean"},"group_by_requested_ship_date":{"type":"boolean"},"id":{"format":"int64","type":"integer"},"include_undated":{"type":"boolean"},"is_active":{"type":"boolean"},"last_scheduled_at":{"default":null,"type":["string","null"]},"max_lines":{"format":"int32","type":["integer","null"]},"max_orders":{"format":"int32","type":"integer"},"max_waves_per_run":{"format":"int32","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"next_run_at":{"default":null,"type":["string","null"]},"owner_id":{"format":"int64","type":["integer","null"]},"priority_from":{"format":"int16","type":["integer","null"]},"priority_to":{"format":"int16","type":["integer","null"]},"requested_ship_days_ahead":{"format":"int32","type":["integer","null"]},"schedule_interval_minutes":{"format":"int32","type":["integer","null"]},"schedule_starts_at":{"default":null,"type":["string","null"]},"station_location":{"description":"The distribution station every wave this policy builds names (R-4); `None` = no station.","type":["string","null"]},"version":{"format":"int32","type":"integer"}},"required":["add_when","add_who","auto_release","code","eligible_statuses","group_by_carrier","group_by_owner","group_by_requested_ship_date","id","include_undated","is_active","max_orders","max_waves_per_run","mod_when","mod_who","version"],"title":"WavePolicy","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"auto_release":false,"code":"<code>","eligible_statuses":["<eligible_statuses>"],"group_by_carrier":false,"group_by_owner":false,"group_by_requested_ship_date":false,"id":1,"include_undated":false,"is_active":false,"max_orders":1,"max_waves_per_run":1,"mod_when":"<mod_when>","mod_who":1,"version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#wave_policy_list":{"post":{"operationId":"wave_policy_list","summary":"List Wave policies.","description":"List Wave policies.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"wave","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"wave_policy_list"},"params":{"type":"object","properties":{"data":{"properties":{"limit":{"default":50,"format":"int64","type":"integer"},"offset":{"default":0,"format":"int64","type":"integer"}},"title":"WaveListInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"wave_policy_list","params":{"data":{"limit":50,"offset":0}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/WavePolicy"},"title":"Array_of_WavePolicy","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"auto_release":false,"code":"<code>","eligible_statuses":["<eligible_statuses>"],"group_by_carrier":false,"group_by_owner":false,"group_by_requested_ship_date":false,"id":1,"include_undated":false,"is_active":false,"max_orders":1,"max_waves_per_run":1,"mod_when":"<mod_when>","mod_who":1,"version":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#wave_policy_preview":{"post":{"operationId":"wave_policy_preview","summary":"Preview the Draft Waves a policy would build. Writes nothing.","description":"Preview the Draft Waves a policy would build. Writes nothing.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"wave","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"wave_policy_preview"},"params":{"type":"object","properties":{"data":{"properties":{"policy_id":{"format":"int64","type":"integer"}},"required":["policy_id"],"title":"WavePolicyIdInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"wave_policy_preview","params":{"data":{"policy_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"batches":{"items":{"$ref":"#/components/schemas/WavePolicyBatch"},"type":"array"},"candidate_count":{"format":"int32","type":"integer"},"exclusions":{"items":{"$ref":"#/components/schemas/WavePolicyExclusion"},"type":"array"},"policy":{"$ref":"#/components/schemas/WavePolicy"},"selected_order_count":{"format":"int32","type":"integer"}},"required":["batches","candidate_count","exclusions","policy","selected_order_count"],"title":"WavePolicyPreview","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"batches":[{"group":{},"line_count":1,"order_count":1,"orders":[{"line_count":null,"order_id":null,"order_number":null,"order_version":null,"owner_id":null,"priority":null,"status":null}]}],"candidate_count":1,"exclusions":[{"order":{"line_count":1,"order_id":1,"order_number":"<order_number>","order_version":1,"owner_id":1,"priority":1,"status":null},"reason":"<reason>"}],"policy":{"add_when":"<add_when>","add_who":1,"auto_release":false,"code":"<code>","eligible_statuses":["<eligible_statuses>"],"group_by_carrier":false,"group_by_owner":false,"group_by_requested_ship_date":false,"id":1,"include_undated":false,"is_active":false,"max_orders":1,"max_waves_per_run":1,"mod_when":"<mod_when>","mod_who":1,"version":1},"selected_order_count":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#wave_create":{"post":{"operationId":"wave_create","summary":"Create a manual Wave.","description":"Create a manual Wave.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"wave","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"wave_create"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"code":{"type":"string"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"}},"required":["code"],"title":"CreateWave","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"wave_create","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"code":"<code>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"wave":{"$ref":"#/components/schemas/Wave"}},"required":["wave"],"title":"WaveMutationResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"wave":{"add_when":"<add_when>","add_who":1,"code":"<code>","id":1,"mod_when":"<mod_when>","mod_who":1,"release_generation":1,"status":"Draft","version":1}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#wave_add_order":{"post":{"operationId":"wave_add_order","summary":"Add an Order to a Draft Wave.","description":"Add an Order to a Draft Wave.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n**Versioned entities:** wave (id in data.wave_id, version in data.expected_wave_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_wave_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[{"entity":"wave","id_field":"wave_id","version_field":"expected_wave_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"wave","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"wave_add_order"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"expected_wave_version":{"format":"int32","type":"integer"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"order_id":{"format":"int64","type":"integer"},"priority":{"format":"int16","type":["integer","null"]},"sequence":{"format":"int32","type":["integer","null"]},"wave_id":{"format":"int64","type":"integer"}},"required":["expected_wave_version","order_id","wave_id"],"title":"AddOrderToWave","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"wave_add_order","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"expected_wave_version":1,"order_id":1,"wave_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"wave":{"$ref":"#/components/schemas/Wave"}},"required":["wave"],"title":"WaveMutationResult","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"wave":{"add_when":"<add_when>","add_who":1,"code":"<code>","id":1,"mod_when":"<mod_when>","mod_who":1,"release_generation":1,"status":"Draft","version":1}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#wave_remove_order":{"post":{"operationId":"wave_remove_order","summary":"Remove an Order from a Draft Wave.","description":"Remove an Order from a Draft Wave.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n**Versioned entities:** wave (id in data.wave_id, version in data.expected_wave_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_wave_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[{"entity":"wave","id_field":"wave_id","version_field":"expected_wave_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"wave","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"wave_remove_order"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"expected_wave_version":{"format":"int32","type":"integer"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"order_id":{"format":"int64","type":"integer"},"wave_id":{"format":"int64","type":"integer"}},"required":["expected_wave_version","order_id","wave_id"],"title":"RemoveOrderFromWave","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"wave_remove_order","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"expected_wave_version":1,"order_id":1,"wave_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"wave":{"$ref":"#/components/schemas/Wave"}},"required":["wave"],"title":"WaveMutationResult","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"wave":{"add_when":"<add_when>","add_who":1,"code":"<code>","id":1,"mod_when":"<mod_when>","mod_who":1,"release_generation":1,"status":"Draft","version":1}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#wave_cancel":{"post":{"operationId":"wave_cancel","summary":"Cancel a Wave before release starts.","description":"Cancel a Wave before release starts.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n**Versioned entities:** wave (id in data.wave_id, version in data.expected_wave_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_wave_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[{"entity":"wave","id_field":"wave_id","version_field":"expected_wave_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"wave","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"wave_cancel"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"expected_wave_version":{"format":"int32","type":"integer"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"wave_id":{"format":"int64","type":"integer"}},"required":["expected_wave_version","wave_id"],"title":"CancelWave","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"wave_cancel","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"expected_wave_version":1,"wave_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"wave":{"$ref":"#/components/schemas/Wave"}},"required":["wave"],"title":"WaveMutationResult","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"wave":{"add_when":"<add_when>","add_who":1,"code":"<code>","id":1,"mod_when":"<mod_when>","mod_who":1,"release_generation":1,"status":"Draft","version":1}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#wave_release":{"post":{"operationId":"wave_release","summary":"Freeze and enqueue a Wave for release.","description":"Freeze and enqueue a Wave for release.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n**Versioned entities:** wave (id in data.wave_id, version in data.expected_wave_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_wave_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[{"entity":"wave","id_field":"wave_id","version_field":"expected_wave_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"wave","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"wave_release"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"expected_wave_version":{"format":"int32","type":"integer"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"wave_id":{"format":"int64","type":"integer"}},"required":["expected_wave_version","wave_id"],"title":"ReleaseWave","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"wave_release","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"expected_wave_version":1,"wave_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"progress":{"$ref":"#/components/schemas/WaveProgress"},"wave":{"$ref":"#/components/schemas/Wave"}},"required":["progress","wave"],"title":"WaveReleaseResult","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"progress":{"blocked":1,"draft":1,"failed":1,"pending":1,"processing":1,"released":1,"skipped":1},"wave":{"add_when":"<add_when>","add_who":1,"code":"<code>","id":1,"mod_when":"<mod_when>","mod_who":1,"release_generation":1,"status":"Draft","version":1}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#wave_retry_blocked":{"post":{"operationId":"wave_retry_blocked","summary":"Retry only blocked or failed Wave orders.","description":"Retry only blocked or failed Wave orders.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n**Versioned entities:** wave (id in data.wave_id, version in data.expected_wave_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_wave_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[{"entity":"wave","id_field":"wave_id","version_field":"expected_wave_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"wave","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"wave_retry_blocked"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"expected_wave_version":{"format":"int32","type":"integer"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"wave_id":{"format":"int64","type":"integer"}},"required":["expected_wave_version","wave_id"],"title":"RetryWaveRelease","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"wave_retry_blocked","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"expected_wave_version":1,"wave_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"progress":{"$ref":"#/components/schemas/WaveProgress"},"wave":{"$ref":"#/components/schemas/Wave"}},"required":["progress","wave"],"title":"WaveReleaseResult","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"progress":{"blocked":1,"draft":1,"failed":1,"pending":1,"processing":1,"released":1,"skipped":1},"wave":{"add_when":"<add_when>","add_who":1,"code":"<code>","id":1,"mod_when":"<mod_when>","mod_who":1,"release_generation":1,"status":"Draft","version":1}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#wave_set_station":{"post":{"operationId":"wave_set_station","summary":"Name or clear the distribution station of a Draft Wave.","description":"Name or clear the distribution station of a Draft Wave.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n**Versioned entities:** wave (id in data.wave_id, version in data.expected_wave_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_wave_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[{"entity":"wave","id_field":"wave_id","version_field":"expected_wave_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"wave","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"wave_set_station"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"description":"Name the distribution station a Draft wave is released onto, or clear it (station distribution R-4). `stateful_command` on the wave's version: the supervisor chooses the station for the orders they see in the wave.","properties":{"expected_wave_version":{"format":"int32","type":"integer"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"station_location":{"description":"A `Sort` location with positions; `None` clears the station.","type":["string","null"]},"wave_id":{"format":"int64","type":"integer"}},"required":["expected_wave_version","wave_id"],"title":"SetWaveStation","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"wave_set_station","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"expected_wave_version":1,"wave_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"wave":{"$ref":"#/components/schemas/Wave"}},"required":["wave"],"title":"WaveMutationResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"wave":{"add_when":"<add_when>","add_who":1,"code":"<code>","id":1,"mod_when":"<mod_when>","mod_who":1,"release_generation":1,"status":"Draft","version":1}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#wave_policy_create":{"post":{"operationId":"wave_policy_create","summary":"Create a Wave policy.","description":"Create a Wave policy.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"wave","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"wave_policy_create"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"policy":{"$ref":"#/components/schemas/WavePolicyForWrite"}},"required":["policy"],"title":"CreateWavePolicy","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"wave_policy_create","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"policy":{"code":"<code>","eligible_statuses":["<eligible_statuses>"],"group_by_carrier":false,"group_by_owner":false,"group_by_requested_ship_date":false,"include_undated":false,"is_active":false,"max_orders":1,"max_waves_per_run":1}}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"policy":{"$ref":"#/components/schemas/WavePolicy"}},"required":["policy"],"title":"WavePolicyMutationResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"policy":{"add_when":"<add_when>","add_who":1,"auto_release":false,"code":"<code>","eligible_statuses":["<eligible_statuses>"],"group_by_carrier":false,"group_by_owner":false,"group_by_requested_ship_date":false,"id":1,"include_undated":false,"is_active":false,"max_orders":1,"max_waves_per_run":1,"mod_when":"<mod_when>","mod_who":1,"version":1}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#wave_policy_save":{"post":{"operationId":"wave_policy_save","summary":"Save a versioned Wave policy.","description":"Save a versioned Wave policy.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n**Versioned entities:** wave_policy (id in data.policy_id, version in data.expected_policy_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_policy_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[{"entity":"wave_policy","id_field":"policy_id","version_field":"expected_policy_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"wave","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"wave_policy_save"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"expected_policy_version":{"format":"int32","type":"integer"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"policy":{"$ref":"#/components/schemas/WavePolicyForWrite"},"policy_id":{"format":"int64","type":"integer"}},"required":["expected_policy_version","policy","policy_id"],"title":"SaveWavePolicy","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"wave_policy_save","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"expected_policy_version":1,"policy":{"code":"<code>","eligible_statuses":["<eligible_statuses>"],"group_by_carrier":false,"group_by_owner":false,"group_by_requested_ship_date":false,"include_undated":false,"is_active":false,"max_orders":1,"max_waves_per_run":1},"policy_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"policy":{"$ref":"#/components/schemas/WavePolicy"}},"required":["policy"],"title":"WavePolicyMutationResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"policy":{"add_when":"<add_when>","add_who":1,"auto_release":false,"code":"<code>","eligible_statuses":["<eligible_statuses>"],"group_by_carrier":false,"group_by_owner":false,"group_by_requested_ship_date":false,"id":1,"include_undated":false,"is_active":false,"max_orders":1,"max_waves_per_run":1,"mod_when":"<mod_when>","mod_who":1,"version":1}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#wave_policy_build":{"post":{"operationId":"wave_policy_build","summary":"Build bounded Draft Waves from a versioned Wave policy.","description":"Build bounded Draft Waves from a versioned Wave policy.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n**Versioned entities:** wave_policy (id in data.policy_id, version in data.expected_policy_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_policy_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[{"entity":"wave_policy","id_field":"policy_id","version_field":"expected_policy_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"wave","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"wave_policy_build"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"expected_policy_version":{"format":"int32","type":"integer"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"policy_id":{"format":"int64","type":"integer"}},"required":["expected_policy_version","policy_id"],"title":"BuildWavePolicy","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"wave_policy_build","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"expected_policy_version":1,"policy_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"exclusions":{"items":{"$ref":"#/components/schemas/WavePolicyExclusion"},"type":"array"},"policy":{"$ref":"#/components/schemas/WavePolicy"},"run":{"$ref":"#/components/schemas/WavePolicyRun"},"waves":{"items":{"$ref":"#/components/schemas/Wave"},"type":"array"}},"required":["exclusions","policy","run","waves"],"title":"WavePolicyBuildResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"exclusions":[{"order":{"line_count":1,"order_id":1,"order_number":"<order_number>","order_version":1,"owner_id":1,"priority":1,"status":null},"reason":"<reason>"}],"policy":{"add_when":"<add_when>","add_who":1,"auto_release":false,"code":"<code>","eligible_statuses":["<eligible_statuses>"],"group_by_carrier":false,"group_by_owner":false,"group_by_requested_ship_date":false,"id":1,"include_undated":false,"is_active":false,"max_orders":1,"max_waves_per_run":1,"mod_when":"<mod_when>","mod_who":1,"version":1},"run":{"add_who":1,"candidate_count":1,"excluded_order_count":1,"id":1,"outcome":{},"policy_id":1,"selected_order_count":1,"started_at":"<started_at>","wave_count":1},"waves":[{"add_when":"<add_when>","add_who":1,"code":"<code>","id":1,"mod_when":"<mod_when>","mod_who":1,"release_generation":1,"status":"Draft","version":1}]}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#dispatch_get":{"post":{"operationId":"dispatch_get","summary":"Get Dispatch stops, Order intent and physical unit assignments.","description":"Get Dispatch stops, Order intent and physical unit assignments.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"dispatch","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"dispatch_get"},"params":{"type":"object","properties":{"data":{"properties":{"dispatch_id":{"format":"int64","type":"integer"}},"required":["dispatch_id"],"title":"DispatchIdInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"dispatch_get","params":{"data":{"dispatch_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"dispatch":{"$ref":"#/components/schemas/Dispatch"},"orders":{"items":{"$ref":"#/components/schemas/DispatchOrder"},"type":"array"},"stops":{"items":{"$ref":"#/components/schemas/DispatchStop"},"type":"array"},"units":{"description":"Includes historical subjects; only `is_current_root` candidates can proceed to future Stage/Load validation.","items":{"$ref":"#/components/schemas/OutboundUnitAssignmentView"},"type":"array"}},"required":["dispatch","orders","stops","units"],"title":"DispatchDetails","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"dispatch":{"add_when":"<add_when>","add_who":1,"code":"<code>","id":1,"mod_when":"<mod_when>","mod_who":1,"status":"Draft","version":1},"orders":[{"add_when":"<add_when>","add_who":1,"dispatch_id":1,"id":1,"mod_when":"<mod_when>","mod_who":1,"order_id":1,"stop_id":1}],"stops":[{"add_when":"<add_when>","add_who":1,"destination_ref":"<destination_ref>","dispatch_id":1,"id":1,"mod_when":"<mod_when>","mod_who":1,"sequence":1,"stop_type":"<stop_type>"}],"units":[{"assignment":{"add_when":"<add_when>","add_who":1,"dispatch_id":1,"id":1,"mod_when":"<mod_when>","mod_who":1,"outbound_flow_unit_id":1,"source_order_intent_id":1,"status":null,"stop_id":1,"version":1},"flow_status":"Pending","is_current_root":false,"subject_container_id":1}]}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#dispatch_list":{"post":{"operationId":"dispatch_list","summary":"List Dispatches.","description":"List Dispatches.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"dispatch","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"dispatch_list"},"params":{"type":"object","properties":{"data":{"properties":{"limit":{"default":50,"format":"int64","type":"integer"},"offset":{"default":0,"format":"int64","type":"integer"}},"title":"DispatchListInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"dispatch_list","params":{"data":{"limit":50,"offset":0}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/Dispatch"},"title":"Array_of_Dispatch","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"code":"<code>","id":1,"mod_when":"<mod_when>","mod_who":1,"status":"Draft","version":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#dispatch_header_get":{"post":{"operationId":"dispatch_header_get","summary":"Read a flat Dispatch header and its current version, without claiming work.","description":"Read a flat Dispatch header and its current version, without claiming work.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"dispatch","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"dispatch_header_get"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"dispatch_header_get","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"cancelled_at":{"default":null,"type":["string","null"]},"carrier_id":{"format":"int64","type":["integer","null"]},"code":{"type":"string"},"door_location_id":{"format":"int64","type":["integer","null"]},"external_ref":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"planned_at":{"default":null,"type":["string","null"]},"planned_departure_at":{"default":null,"type":["string","null"]},"route_editable":{"description":"Advisory display gate; commands repeat it under the complete lock set.","type":"boolean"},"status":{"$ref":"#/components/schemas/DispatchStatus"},"version":{"format":"int32","type":"integer"}},"required":["add_when","add_who","code","id","mod_when","mod_who","route_editable","status","version"],"title":"DispatchPlanningHeader","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","id":1,"mod_when":"<mod_when>","mod_who":1,"route_editable":false,"status":"Draft","version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#dispatch_header_list":{"post":{"operationId":"dispatch_header_list","summary":"Filter and page Dispatch headers for planning.","description":"Filter and page Dispatch headers for planning.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"dispatch","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"dispatch_header_list"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"dispatch_header_list"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/Dispatch"},"title":"Array_of_Dispatch","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"code":"<code>","id":1,"mod_when":"<mod_when>","mod_who":1,"status":"Draft","version":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#dispatch_stop_list":{"post":{"operationId":"dispatch_stop_list","summary":"Filter and page ordered Dispatch stops, without changing their sequence.","description":"Filter and page ordered Dispatch stops, without changing their sequence.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"dispatch","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"dispatch_stop_list"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"dispatch_stop_list"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/DispatchStop"},"title":"Array_of_DispatchStop","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"destination_ref":"<destination_ref>","dispatch_id":1,"id":1,"mod_when":"<mod_when>","mod_who":1,"sequence":1,"stop_type":"<stop_type>"}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#dispatch_order_list":{"post":{"operationId":"dispatch_order_list","summary":"Filter and page current Order transport intent; removed history is excluded.","description":"Filter and page current Order transport intent; removed history is excluded.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"dispatch","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"dispatch_order_list"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"dispatch_order_list"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/DispatchOrder"},"title":"Array_of_DispatchOrder","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"dispatch_id":1,"id":1,"mod_when":"<mod_when>","mod_who":1,"order_id":1,"stop_id":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#dispatch_create":{"post":{"operationId":"dispatch_create","summary":"Create a manual Dispatch.","description":"Create a manual Dispatch.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"dispatch","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"dispatch_create"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"carrier_id":{"format":"int64","type":["integer","null"]},"code":{"type":"string"},"door_location_id":{"format":"int64","type":["integer","null"]},"external_ref":{"type":["string","null"]},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"planned_departure_at":{"default":null,"type":["string","null"]}},"required":["code"],"title":"CreateDispatch","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"dispatch_create","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"code":"<code>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"dispatch":{"$ref":"#/components/schemas/Dispatch"}},"required":["dispatch"],"title":"DispatchMutationResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"dispatch":{"add_when":"<add_when>","add_who":1,"code":"<code>","id":1,"mod_when":"<mod_when>","mod_who":1,"status":"Draft","version":1}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#dispatch_add_order":{"post":{"operationId":"dispatch_add_order","summary":"Add active Order planning intent to a Draft Dispatch.","description":"Add active Order planning intent to a Draft Dispatch.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n**Versioned entities:** dispatch (id in data.dispatch_id, version in data.expected_dispatch_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_dispatch_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[{"entity":"dispatch","id_field":"dispatch_id","version_field":"expected_dispatch_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"dispatch","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"dispatch_add_order"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"dispatch_id":{"format":"int64","type":"integer"},"expected_dispatch_version":{"format":"int32","type":"integer"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"lane_ref":{"type":["string","null"]},"order_id":{"format":"int64","type":"integer"},"preferred_stage_location_id":{"format":"int64","type":["integer","null"]},"stop_id":{"format":"int64","type":"integer"}},"required":["dispatch_id","expected_dispatch_version","order_id","stop_id"],"title":"AssignOrderToDispatch","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"dispatch_add_order","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"dispatch_id":1,"expected_dispatch_version":1,"order_id":1,"stop_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"dispatch":{"$ref":"#/components/schemas/Dispatch"}},"required":["dispatch"],"title":"DispatchMutationResult","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"dispatch":{"add_when":"<add_when>","add_who":1,"code":"<code>","id":1,"mod_when":"<mod_when>","mod_who":1,"status":"Draft","version":1}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#dispatch_remove_order":{"post":{"operationId":"dispatch_remove_order","summary":"Remove active Order planning intent from a Draft Dispatch.","description":"Remove active Order planning intent from a Draft Dispatch.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n**Versioned entities:** dispatch (id in data.dispatch_id, version in data.expected_dispatch_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_dispatch_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[{"entity":"dispatch","id_field":"dispatch_id","version_field":"expected_dispatch_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"dispatch","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"dispatch_remove_order"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"dispatch_id":{"format":"int64","type":"integer"},"expected_dispatch_version":{"format":"int32","type":"integer"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"order_id":{"format":"int64","type":"integer"}},"required":["dispatch_id","expected_dispatch_version","order_id"],"title":"RemoveOrderFromDispatch","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"dispatch_remove_order","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"dispatch_id":1,"expected_dispatch_version":1,"order_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"dispatch":{"$ref":"#/components/schemas/Dispatch"}},"required":["dispatch"],"title":"DispatchMutationResult","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"dispatch":{"add_when":"<add_when>","add_who":1,"code":"<code>","id":1,"mod_when":"<mod_when>","mod_who":1,"status":"Draft","version":1}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#dispatch_stop_add":{"post":{"operationId":"dispatch_stop_add","summary":"Add an ordered delivery stop to a Draft Dispatch.","description":"Add an ordered delivery stop to a Draft Dispatch.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n**Versioned entities:** dispatch (id in data.dispatch_id, version in data.expected_dispatch_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_dispatch_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[{"entity":"dispatch","id_field":"dispatch_id","version_field":"expected_dispatch_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"dispatch","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"dispatch_stop_add"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"destination_ref":{"type":"string"},"dispatch_id":{"format":"int64","type":"integer"},"expected_dispatch_version":{"format":"int32","type":"integer"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"planned_arrival_at":{"default":null,"type":["string","null"]},"planned_departure_at":{"default":null,"type":["string","null"]},"sequence":{"format":"int32","type":"integer"}},"required":["destination_ref","dispatch_id","expected_dispatch_version","sequence"],"title":"AddDispatchStop","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"dispatch_stop_add","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"destination_ref":"<destination_ref>","dispatch_id":1,"expected_dispatch_version":1,"sequence":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"dispatch":{"$ref":"#/components/schemas/Dispatch"},"stop":{"$ref":"#/components/schemas/DispatchStop"}},"required":["dispatch","stop"],"title":"DispatchStopResult","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"dispatch":{"add_when":"<add_when>","add_who":1,"code":"<code>","id":1,"mod_when":"<mod_when>","mod_who":1,"status":"Draft","version":1},"stop":{"add_when":"<add_when>","add_who":1,"destination_ref":"<destination_ref>","dispatch_id":1,"id":1,"mod_when":"<mod_when>","mod_who":1,"sequence":1,"stop_type":"<stop_type>"}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#dispatch_stop_update":{"post":{"operationId":"dispatch_stop_update","summary":"Edit a delivery stop on a Draft Dispatch.","description":"Edit a delivery stop on a Draft Dispatch.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n**Versioned entities:** dispatch (id in data.dispatch_id, version in data.expected_dispatch_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_dispatch_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[{"entity":"dispatch","id_field":"dispatch_id","version_field":"expected_dispatch_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"dispatch","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"dispatch_stop_update"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"destination_ref":{"type":"string"},"dispatch_id":{"format":"int64","type":"integer"},"expected_dispatch_version":{"format":"int32","type":"integer"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"planned_arrival_at":{"default":null,"type":["string","null"]},"planned_departure_at":{"default":null,"type":["string","null"]},"stop_id":{"format":"int64","type":"integer"}},"required":["destination_ref","dispatch_id","expected_dispatch_version","stop_id"],"title":"UpdateDispatchStop","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"dispatch_stop_update","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"destination_ref":"<destination_ref>","dispatch_id":1,"expected_dispatch_version":1,"stop_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"dispatch":{"$ref":"#/components/schemas/Dispatch"},"stop":{"$ref":"#/components/schemas/DispatchStop"}},"required":["dispatch","stop"],"title":"DispatchStopResult","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"dispatch":{"add_when":"<add_when>","add_who":1,"code":"<code>","id":1,"mod_when":"<mod_when>","mod_who":1,"status":"Draft","version":1},"stop":{"add_when":"<add_when>","add_who":1,"destination_ref":"<destination_ref>","dispatch_id":1,"id":1,"mod_when":"<mod_when>","mod_who":1,"sequence":1,"stop_type":"<stop_type>"}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#dispatch_stop_resequence":{"post":{"operationId":"dispatch_stop_resequence","summary":"Replace the complete stop order of a Draft Dispatch and audit it.","description":"Replace the complete stop order of a Draft Dispatch and audit it.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n**Versioned entities:** dispatch (id in data.dispatch_id, version in data.expected_dispatch_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_dispatch_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[{"entity":"dispatch","id_field":"dispatch_id","version_field":"expected_dispatch_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"dispatch","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"dispatch_stop_resequence"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"dispatch_id":{"format":"int64","type":"integer"},"expected_dispatch_version":{"format":"int32","type":"integer"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"ordered_stop_ids":{"description":"The complete stop id permutation. Stored sequences become 10, 20, …","items":{"format":"int64","type":"integer"},"type":"array"},"reason":{"type":["string","null"]}},"required":["dispatch_id","expected_dispatch_version","ordered_stop_ids"],"title":"ResequenceDispatchStops","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"dispatch_stop_resequence","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"dispatch_id":1,"expected_dispatch_version":1,"ordered_stop_ids":[1]}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"dispatch":{"$ref":"#/components/schemas/Dispatch"},"stops":{"items":{"$ref":"#/components/schemas/DispatchStop"},"type":"array"}},"required":["dispatch","stops"],"title":"ResequenceDispatchStopsResult","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"dispatch":{"add_when":"<add_when>","add_who":1,"code":"<code>","id":1,"mod_when":"<mod_when>","mod_who":1,"status":"Draft","version":1},"stops":[{"add_when":"<add_when>","add_who":1,"destination_ref":"<destination_ref>","dispatch_id":1,"id":1,"mod_when":"<mod_when>","mod_who":1,"sequence":1,"stop_type":"<stop_type>"}]}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#dispatch_plan":{"post":{"operationId":"dispatch_plan","summary":"Freeze a manually prepared Dispatch as Planned.","description":"Freeze a manually prepared Dispatch as Planned.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n**Versioned entities:** dispatch (id in data.dispatch_id, version in data.expected_dispatch_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_dispatch_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[{"entity":"dispatch","id_field":"dispatch_id","version_field":"expected_dispatch_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"dispatch","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"dispatch_plan"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"dispatch_id":{"format":"int64","type":"integer"},"expected_dispatch_version":{"format":"int32","type":"integer"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"}},"required":["dispatch_id","expected_dispatch_version"],"title":"PlanDispatch","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"dispatch_plan","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"dispatch_id":1,"expected_dispatch_version":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"dispatch":{"$ref":"#/components/schemas/Dispatch"}},"required":["dispatch"],"title":"DispatchMutationResult","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"dispatch":{"add_when":"<add_when>","add_who":1,"code":"<code>","id":1,"mod_when":"<mod_when>","mod_who":1,"status":"Draft","version":1}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#outbound_unit_assignment_get":{"post":{"operationId":"outbound_unit_assignment_get","summary":"Get unit transport intent, current Order plan and explicit change history.","description":"Get unit transport intent, current Order plan and explicit change history.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"outbound_unit_assignment","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"outbound_unit_assignment_get"},"params":{"type":"object","properties":{"data":{"properties":{"outbound_flow_unit_id":{"format":"int64","type":"integer"}},"required":["outbound_flow_unit_id"],"title":"UnitIdInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"outbound_unit_assignment_get","params":{"data":{"outbound_flow_unit_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"history":{"description":"Explicit changes only; initial automatic provenance is in assignment.","items":{"$ref":"#/components/schemas/OutboundUnitAssignmentChange"},"type":"array"},"presentation":{"allOf":[{"$ref":"#/components/schemas/UnitAssignmentPresentation"}],"default":{"container_code":null,"current_dispatch_code":null,"current_location":null,"current_stop_sequence":null,"order_number":null,"target_dispatch_code":null,"target_dispatch_status":null,"target_stop_sequence":null},"description":"Readable facts from the SAME snapshot as assignment/intent, never a second container/Dispatch read that could describe a different plan."},"staged_remainder":{"anyOf":[{"$ref":"#/components/schemas/StagedRemainderReview"},{"type":"null"}],"default":null},"state":{"$ref":"#/components/schemas/UnitAssignmentState"}},"required":["history","state"],"title":"UnitAssignmentDetails","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"history":[{"after_assignment":null,"assignment_version":1,"changed_at":"<changed_at>","changed_by":1,"id":1,"outbound_flow_unit_id":1,"reason":"<reason>"}],"state":{"assignment_version":1,"is_current_root":false,"nested_units":false,"packing_open":false,"stage_committed":false,"unit":{"add_when":"<add_when>","add_who":1,"completed_normal_capabilities":[],"created_at":"<created_at>","id":1,"mod_when":"<mod_when>","mod_who":1,"next_capability":null,"status":null,"subject_container_id":1,"subject_kind":{},"version":1}}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#outbound_unit_assign":{"post":{"operationId":"outbound_unit_assign","summary":"Assign an unassigned physical root from the confirmed current Order plan (version 0).","description":"Assign an unassigned physical root from the confirmed current Order plan (version 0).\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n**Versioned entities:** outbound_unit_assignment (id in data.outbound_flow_unit_id, version in data.expected_assignment_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_assignment_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[{"entity":"outbound_unit_assignment","id_field":"outbound_flow_unit_id","version_field":"expected_assignment_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"outbound_unit_assignment","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"outbound_unit_assign"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"expected_assignment_version":{"format":"int32","type":"integer"},"expected_order_intent_id":{"format":"int64","type":"integer"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"outbound_flow_unit_id":{"format":"int64","type":"integer"},"reason":{"type":"string"}},"required":["expected_assignment_version","expected_order_intent_id","outbound_flow_unit_id","reason"],"title":"AssignOutboundUnit","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"outbound_unit_assign","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"expected_assignment_version":1,"expected_order_intent_id":1,"outbound_flow_unit_id":1,"reason":"<reason>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"assignment":{"$ref":"#/components/schemas/OutboundUnitAssignment"}},"required":["assignment"],"title":"UnitAssignmentResult","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"assignment":{"add_when":"<add_when>","add_who":1,"dispatch_id":1,"id":1,"mod_when":"<mod_when>","mod_who":1,"outbound_flow_unit_id":1,"source_order_intent_id":1,"status":"Assigned","stop_id":1,"version":1}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#outbound_unit_reassign":{"post":{"operationId":"outbound_unit_reassign","summary":"Explicitly align an assigned physical root with its confirmed current Order plan; no stock movement.","description":"Explicitly align an assigned physical root with its confirmed current Order plan; no stock movement.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n**Versioned entities:** outbound_unit_assignment (id in data.outbound_flow_unit_id, version in data.expected_assignment_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_assignment_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[{"entity":"outbound_unit_assignment","id_field":"outbound_flow_unit_id","version_field":"expected_assignment_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"outbound_unit_assignment","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"outbound_unit_reassign"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"expected_assignment_version":{"format":"int32","type":"integer"},"expected_order_intent_id":{"format":"int64","type":"integer"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"outbound_flow_unit_id":{"format":"int64","type":"integer"},"reason":{"type":"string"}},"required":["expected_assignment_version","expected_order_intent_id","outbound_flow_unit_id","reason"],"title":"ReassignOutboundUnit","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"outbound_unit_reassign","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"expected_assignment_version":1,"expected_order_intent_id":1,"outbound_flow_unit_id":1,"reason":"<reason>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"assignment":{"$ref":"#/components/schemas/OutboundUnitAssignment"}},"required":["assignment"],"title":"UnitAssignmentResult","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"assignment":{"add_when":"<add_when>","add_who":1,"dispatch_id":1,"id":1,"mod_when":"<mod_when>","mod_who":1,"outbound_flow_unit_id":1,"source_order_intent_id":1,"status":"Assigned","stop_id":1,"version":1}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_shipment_order":{"post":{"operationId":"get_shipment_order","summary":"Get a shipment order","description":"Get a shipment order\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"shipment_order","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_shipment_order"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_shipment_order","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"cancel_reason":{"type":["string","null"]},"cancelled_at":{"default":null,"type":["string","null"]},"carrier_id":{"format":"int64","type":["integer","null"]},"close_summary":true,"closed_at":{"default":null,"type":["string","null"]},"external_id":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"notes":{"type":["string","null"]},"order_date":{"type":"string"},"order_number":{"type":"string"},"order_type_id":{"format":"int64","type":"integer"},"owner_id":{"format":"int64","type":"integer"},"priority":{"format":"int16","type":"integer"},"released_at":{"default":null,"type":["string","null"]},"requested_ship_date":{"type":["string","null"]},"ship_to_id":{"format":"int64","type":"integer"},"ship_to_snapshot":{"description":"The ship-to address as frozen at release. Subscribers and documents must read THIS, not a live `owner_address` lookup, or editing a customer rewrites what an already-released order promised."},"source":{"$ref":"#/components/schemas/OrderSource"},"status":{"$ref":"#/components/schemas/OrderStatus"},"version":{"description":"Per-row OCC version, independent of `shipment_order_line.version`. Two operators editing two different lines must not collide on the header (ADR-072 §5).","format":"int32","type":"integer"}},"required":["id","order_date","order_number","order_type_id","owner_id","priority","ship_to_id","source","status","version"],"title":"ShipmentOrder","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"id":1,"order_date":"<order_date>","order_number":"<order_number>","order_type_id":1,"owner_id":1,"priority":1,"ship_to_id":1,"source":"Ui","status":"New","version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_shipment_order":{"post":{"operationId":"list_shipment_order","summary":"List shipment orders (filtered)","description":"List shipment orders (filtered)\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"shipment_order","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_shipment_order"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_shipment_order"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/ShipmentOrder"},"title":"Array_of_ShipmentOrder","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"id":1,"order_date":"<order_date>","order_number":"<order_number>","order_type_id":1,"owner_id":1,"priority":1,"ship_to_id":1,"source":"Ui","status":"New","version":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_shipment_order":{"post":{"operationId":"count_shipment_order","summary":"Count shipment orders","description":"Count shipment orders\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"shipment_order","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_shipment_order"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_shipment_order"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_shipment_order_line":{"post":{"operationId":"get_shipment_order_line","summary":"Get a shipment order line","description":"Get a shipment order line\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"shipment_order","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_shipment_order_line"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_shipment_order_line","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"allocation_policy_id":{"description":"Frozen allocation-policy identity. Nullable during expand/backfill; new-runtime writes become mandatory only in the contract migration.","format":"int64","type":["integer","null"]},"allocation_policy_version":{"format":"int32","type":["integer","null"]},"cancel_reason":{"type":["string","null"]},"external_line_no":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"line_no":{"format":"int32","type":"integer"},"order_id":{"format":"int64","type":"integer"},"owner_id":{"format":"int64","type":"integer"},"pack_id":{"format":"int64","type":"integer"},"pack_requested":{"description":"`true`: the customer ordered `pack_id`, and the line is reserved only from stock of that pack. `false`: `pack_id` is the SKU's pack, put there because the order named none, and stock of any pack of the SKU is a candidate.","type":"boolean"},"pick_instruction":{"description":"One-off pick instruction for this line, from the ERP (wms-app 044): shown on its picks and acknowledged before a pick commits (RF `PICKINS`).","type":["string","null"]},"qty_allocated":{"description":"Always 0 in Phase 1 — written by allocation in Phase 2.","format":"double","type":"number"},"qty_cancelled":{"format":"double","type":"number"},"qty_ordered":{"description":"All five counters are in BASE units.","format":"double","type":"number"},"qty_picked":{"description":"Always 0 in Phase 1 — written by picking in Phase 3.","format":"double","type":"number"},"qty_shipped":{"description":"Always 0 in Phase 1 — written by shipping in Phase 3.","format":"double","type":"number"},"sku_code":{"type":"string"},"status":{"$ref":"#/components/schemas/OrderLineStatus"},"uom":{"type":"string"},"uom_factor":{"description":"`pack_item.base_qty` snapshot taken when the line was created. Stored — unlike on `receipt_detail` — so a later `pack_item` edit cannot rewrite what a historical line meant.","format":"double","type":"number"},"version":{"description":"Per-line OCC, independent of the header's version.","format":"int32","type":"integer"}},"required":["id","line_no","order_id","owner_id","pack_id","pack_requested","qty_allocated","qty_cancelled","qty_ordered","qty_picked","qty_shipped","sku_code","status","uom","uom_factor","version"],"title":"ShipmentOrderLine","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"id":1,"line_no":1,"order_id":1,"owner_id":1,"pack_id":1,"pack_requested":false,"qty_allocated":1.5,"qty_cancelled":1.5,"qty_ordered":1.5,"qty_picked":1.5,"qty_shipped":1.5,"sku_code":"<sku_code>","status":"NotAllocated","uom":"<uom>","uom_factor":1.5,"version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_shipment_order_line":{"post":{"operationId":"list_shipment_order_line","summary":"List shipment order lines (filtered)","description":"List shipment order lines (filtered)\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"shipment_order","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_shipment_order_line"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_shipment_order_line"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/ShipmentOrderLine"},"title":"Array_of_ShipmentOrderLine","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"id":1,"line_no":1,"order_id":1,"owner_id":1,"pack_id":1,"pack_requested":false,"qty_allocated":1.5,"qty_cancelled":1.5,"qty_ordered":1.5,"qty_picked":1.5,"qty_shipped":1.5,"sku_code":"<sku_code>","status":"NotAllocated","uom":"<uom>","uom_factor":1.5,"version":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_shipment_order_line":{"post":{"operationId":"count_shipment_order_line","summary":"Count shipment order lines","description":"Count shipment order lines\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"shipment_order","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_shipment_order_line"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_shipment_order_line"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_order_type":{"post":{"operationId":"get_order_type","summary":"Get an order type","description":"Get an order type\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"shipment_order","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_order_type"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_order_type","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"active":{"type":"boolean"},"allows_partial_ship":{"description":"Read by Phase 3 shipping. Here because a boolean on a type table has a KNOWN shape and only a missing consumer (ADR-072 §1).","type":"boolean"},"code":{"type":"string"},"id":{"format":"int64","type":"integer"},"name":{"type":"string"},"requires_release":{"type":"boolean"}},"required":["active","allows_partial_ship","code","id","name","requires_release"],"title":"OrderType","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"active":false,"allows_partial_ship":false,"code":"<code>","id":1,"name":"<name>","requires_release":false}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_order_type":{"post":{"operationId":"list_order_type","summary":"List order types (filtered)","description":"List order types (filtered)\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"shipment_order","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_order_type"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_order_type"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/OrderType"},"title":"Array_of_OrderType","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"active":false,"allows_partial_ship":false,"code":"<code>","id":1,"name":"<name>","requires_release":false}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_order_type":{"post":{"operationId":"count_order_type","summary":"Count order types","description":"Count order types\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"shipment_order","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_order_type"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_order_type"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#find_shipment_order_by_number":{"post":{"operationId":"find_shipment_order_by_number","summary":"Find a shipment order by order_number","description":"Find a shipment order by order_number\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"shipment_order","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"find_shipment_order_by_number"},"params":{"type":"object","properties":{"data":{"properties":{"number":{"description":"`shipment_order.order_number` — UNIQUE per warehouse schema.","type":"string"}},"required":["number"],"title":"FindOrderByNumberInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"find_shipment_order_by_number","params":{"data":{"number":"<number>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"anyOf":[{"$ref":"#/components/schemas/ShipmentOrder"},{"type":"null"}],"title":"Nullable_ShipmentOrder"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"id":1,"order_date":"<order_date>","order_number":"<order_number>","order_type_id":1,"owner_id":1,"priority":1,"ship_to_id":1,"source":"Ui","status":"New","version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_shipment_order_full":{"post":{"operationId":"get_shipment_order_full","summary":"Get a shipment order with its lines","description":"Get a shipment order with its lines\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"shipment_order","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_shipment_order_full"},"params":{"type":"object","properties":{"data":{"properties":{"order_id":{"format":"int64","type":"integer"}},"required":["order_id"],"title":"OrderIdInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_shipment_order_full","params":{"data":{"order_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"title":"AnyValue"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":null}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_shipment_order_line_lot_requirements":{"post":{"operationId":"get_shipment_order_line_lot_requirements","summary":"Get one shipment Order line's expected lot requirements","description":"Get one shipment Order line's expected lot requirements\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"shipment_order","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_shipment_order_line_lot_requirements"},"params":{"type":"object","properties":{"data":{"properties":{"line_id":{"format":"int64","type":"integer"}},"required":["line_id"],"title":"OrderLineIdInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_shipment_order_line_lot_requirements","params":{"data":{"line_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"anyOf":[{"$ref":"#/components/schemas/ShipmentOrderLineLotRequirement"},{"type":"null"}],"title":"Nullable_ShipmentOrderLineLotRequirement"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"attributes":[{"attribute_code":"<attribute_code>","attribute_value":"<attribute_value>","id":1,"order_line_id":1}],"order_line_id":1,"requirement_version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#shipment_order_fulfilment_list":{"post":{"operationId":"shipment_order_fulfilment_list","summary":"Current Order fulfilment by line, including unreserved demand; all quantities in base units.","description":"Current Order fulfilment by line, including unreserved demand; all quantities in base units.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"shipment_order","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"shipment_order_fulfilment_list"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"shipment_order_fulfilment_list"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/ShipmentFulfilmentLine"},"title":"Array_of_ShipmentFulfilmentLine","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"id":1,"line_no":1,"order_id":1,"owner_id":1,"qty_cancelled":1.5,"qty_ordered":1.5,"qty_picked":1.5,"qty_remaining":1.5,"qty_shipped":1.5,"sku_code":"<sku_code>","status":"<status>"}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#shipment_order_shipment_history":{"post":{"operationId":"shipment_order_shipment_history","summary":"Immutable Goods Issue deltas by Order line; read only, no shipment retry or stock movement.","description":"Immutable Goods Issue deltas by Order line; read only, no shipment retry or stock movement.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"shipment_order","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"shipment_order_shipment_history"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"shipment_order_shipment_history"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/ShipmentHistoryLine"},"title":"Array_of_ShipmentHistoryLine","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"goods_issue_id":1,"id":"<id>","line_no":1,"order_id":1,"order_line_id":1,"qty":1.5,"shipped_at":"<shipped_at>","shipped_by":1,"sku_code":"<sku_code>"}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#shipment_order_validate":{"post":{"operationId":"shipment_order_validate","summary":"Dry-run the release checks. Writes nothing.","description":"Dry-run the release checks. Writes nothing.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"shipment_order_commands","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"shipment_order_validate"},"params":{"type":"object","properties":{"data":{"properties":{"order_id":{"format":"int64","type":"integer"}},"required":["order_id"],"title":"OrderIdInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"shipment_order_validate","params":{"data":{"order_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"errors":{"items":{"$ref":"#/components/schemas/ValidationIssue"},"type":"array"},"ok":{"type":"boolean"},"warnings":{"description":"Not blocking. A ship date in the past is worth saying out loud and not worth refusing — back-dated orders are a real thing.","items":{"$ref":"#/components/schemas/ValidationIssue"},"type":"array"}},"required":["errors","ok","warnings"],"title":"ValidationReport","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"errors":[{"field":"<field>","message":"<message>"}],"ok":false,"warnings":[{"field":"<field>","message":"<message>"}]}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#shipment_order_create":{"post":{"operationId":"shipment_order_create","summary":"Create a draft shipment order with its lines.","description":"Create a draft shipment order with its lines.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"shipment_order_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"shipment_order_create"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"carrier_id":{"format":"int64","type":["integer","null"]},"external_id":{"type":["string","null"]},"idempotency_key":{"format":"uuid","type":"string"},"lines":{"description":"May be empty: a draft is allowed to exist before its first line does. `release` is where \"at least one line\" is enforced.","items":{"$ref":"#/components/schemas/NewOrderLine"},"type":"array"},"notes":{"type":["string","null"]},"order_number":{"default":null,"description":"A number already drawn from the `shipment_order` counter.\n\nThe screen reserves one when it opens the form so the operator can see it while typing; leave it out and the command draws its own. Not a way to choose a number — `UNIQUE (order_number)` refuses an invented one.","type":["string","null"]},"order_type_code":{"type":"string"},"owner_id":{"format":"int64","type":"integer"},"priority":{"format":"int16","type":["integer","null"]},"requested_ship_date":{"default":null,"type":["string","null"]},"ship_to_id":{"format":"int64","type":"integer"},"source":{"$ref":"#/components/schemas/OrderSource"}},"required":["idempotency_key","lines","order_type_code","owner_id","ship_to_id","source"],"title":"CreateShipmentOrder","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"shipment_order_create","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"lines":[{"qty":1.5,"sku_code":"<sku_code>","uom":"<uom>"}],"order_type_code":"<order_type_code>","owner_id":1,"ship_to_id":1,"source":"Ui"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"line_ids":{"items":{"format":"int64","type":"integer"},"type":"array"},"order_id":{"format":"int64","type":"integer"},"order_number":{"type":"string"},"version":{"format":"int32","type":"integer"}},"required":["line_ids","order_id","order_number","version"],"title":"CreateShipmentOrderResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"line_ids":[1],"order_id":1,"order_number":"<order_number>","version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#shipment_order_update":{"post":{"operationId":"shipment_order_update","summary":"Edit a shipment order's header fields.","description":"Edit a shipment order's header fields.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n**Versioned entities:** shipment_order (id in data.order_id, version in data.expected_order_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_order_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[{"entity":"shipment_order","id_field":"order_id","version_field":"expected_order_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"shipment_order_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"shipment_order_update"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"carrier_id":{"format":"int64","type":["integer","null"]},"expected_order_version":{"format":"int32","type":"integer"},"external_id":{"type":["string","null"]},"idempotency_key":{"format":"uuid","type":"string"},"notes":{"type":["string","null"]},"order_id":{"format":"int64","type":"integer"},"order_type_code":{"type":["string","null"]},"priority":{"format":"int16","type":["integer","null"]},"requested_ship_date":{"default":null,"type":["string","null"]},"ship_to_id":{"format":"int64","type":["integer","null"]}},"required":["expected_order_version","idempotency_key","order_id"],"title":"UpdateShipmentOrder","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"shipment_order_update","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"expected_order_version":1,"order_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"new_version":{"format":"int32","type":"integer"},"order_id":{"format":"int64","type":"integer"}},"required":["new_version","order_id"],"title":"UpdateShipmentOrderResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"new_version":1,"order_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#shipment_order_release":{"post":{"operationId":"shipment_order_release","summary":"Release a draft order (full validation, freezes the ship-to address).","description":"Release a draft order (full validation, freezes the ship-to address).\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n**Versioned entities:** shipment_order (id in data.order_id, version in data.expected_order_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_order_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[{"entity":"shipment_order","id_field":"order_id","version_field":"expected_order_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"shipment_order_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"shipment_order_release"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"expected_order_version":{"format":"int32","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"},"order_id":{"format":"int64","type":"integer"}},"required":["expected_order_version","idempotency_key","order_id"],"title":"ReleaseShipmentOrder","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"shipment_order_release","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"expected_order_version":1,"order_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"auto_allocation":{"anyOf":[{"$ref":"#/components/schemas/AllocateShipmentOrderResult"},{"type":"null"}],"description":"What release's own allocation half did — `allocated`/`short` report the pass that ran in this same transaction. Release ALWAYS attempts it now (spec §8.2), so this is `None` only when the attempt itself FAILED — see `auto_allocation_error`. Kept as an `Option` under its original name so existing callers keep deserializing unchanged."},"auto_allocation_error":{"description":"`Some` when the allocation half failed (review round 1) — a misconfigured policy is the expected case, but any error `allocate_order_lines` returns lands here. `release` still succeeds when this is set: see the module doc (\"A failed allocation pass does not fail the release\"). Exactly one of this and `auto_allocation` is always `Some`.","type":["string","null"]},"new_version":{"format":"int32","type":"integer"},"order_id":{"format":"int64","type":"integer"},"order_number":{"type":"string"},"ship_to_snapshot":true,"status":{"allOf":[{"$ref":"#/components/schemas/OrderStatus"}],"description":"The header status AS DERIVED at the end of this command's own transaction — `Released` when the allocation half covered every live line, `PartiallyReleased` when it did not (spec §2.2). The screen patches its copy of the order from this instead of assuming the launch always lands on the full form (§6.3's stale-status bug)."}},"required":["new_version","order_id","order_number","ship_to_snapshot","status"],"title":"ReleaseShipmentOrderResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"new_version":1,"order_id":1,"order_number":"<order_number>","ship_to_snapshot":null,"status":{}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#shipment_order_cancel":{"post":{"operationId":"shipment_order_cancel","summary":"Cancel an order (refused once anything is picked).","description":"Cancel an order (refused once anything is picked).\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n**Versioned entities:** shipment_order (id in data.order_id, version in data.expected_order_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_order_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[{"entity":"shipment_order","id_field":"order_id","version_field":"expected_order_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"shipment_order_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"shipment_order_cancel"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"cancel_reason":{"description":"Required. The reason is the record of WHY a customer promise was dropped, and an empty one makes the audit trail useless.","type":"string"},"expected_order_version":{"format":"int32","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"},"order_id":{"format":"int64","type":"integer"}},"required":["cancel_reason","expected_order_version","idempotency_key","order_id"],"title":"CancelShipmentOrder","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"shipment_order_cancel","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"cancel_reason":"<cancel_reason>","expected_order_version":1,"order_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"new_version":{"format":"int32","type":"integer"},"order_id":{"format":"int64","type":"integer"}},"required":["new_version","order_id"],"title":"CancelShipmentOrderResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"new_version":1,"order_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#shipment_order_close":{"post":{"operationId":"shipment_order_close","summary":"Close a released order once every line is terminal.","description":"Close a released order once every line is terminal.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n**Versioned entities:** shipment_order (id in data.order_id, version in data.expected_order_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_order_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[{"entity":"shipment_order","id_field":"order_id","version_field":"expected_order_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"shipment_order_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"shipment_order_close"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"expected_order_version":{"format":"int32","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"},"order_id":{"format":"int64","type":"integer"}},"required":["expected_order_version","idempotency_key","order_id"],"title":"CloseShipmentOrder","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"shipment_order_close","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"expected_order_version":1,"order_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"close_summary":{"description":"Returned so the caller does not need a follow-up read to show what the order finished as."},"new_version":{"format":"int32","type":"integer"},"order_id":{"format":"int64","type":"integer"}},"required":["close_summary","new_version","order_id"],"title":"CloseShipmentOrderResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"close_summary":null,"new_version":1,"order_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#shipment_order_ship":{"post":{"operationId":"shipment_order_ship","summary":"Ship a fully picked order: atomic Goods Issue, serials, counters, close and outbox.","description":"Ship a fully picked order: atomic Goods Issue, serials, counters, close and outbox.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n**Versioned entities:** shipment_order (id in data.order_id, version in data.expected_order_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_order_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[{"entity":"shipment_order","id_field":"order_id","version_field":"expected_order_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"shipment_order_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"shipment_order_ship"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"expected_order_version":{"format":"int32","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"},"order_id":{"format":"int64","type":"integer"}},"required":["expected_order_version","idempotency_key","order_id"],"title":"ShipShipmentOrder","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"shipment_order_ship","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"expected_order_version":1,"order_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"already_committed":{"type":"boolean"},"close_summary":true,"goods_issue_id":{"format":"int64","type":"integer"},"journal_ids":{"items":{"format":"int64","type":"integer"},"type":"array"},"new_version":{"format":"int32","type":"integer"},"order_closed":{"default":true,"type":"boolean"},"order_id":{"format":"int64","type":"integer"},"remaining_quantities":{"default":[],"items":{"items":[{"format":"int64","type":"integer"},{"format":"double","type":"number"}],"maxItems":2,"minItems":2,"type":"array"},"type":"array"},"serial_ids":{"items":{"format":"int64","type":"integer"},"type":"array"},"shipped_quantities":{"items":{"items":[{"format":"int64","type":"integer"},{"format":"double","type":"number"}],"maxItems":2,"minItems":2,"type":"array"},"type":"array"}},"required":["already_committed","close_summary","goods_issue_id","journal_ids","new_version","order_id","serial_ids","shipped_quantities"],"title":"ShipShipmentOrderResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"already_committed":false,"close_summary":null,"goods_issue_id":1,"journal_ids":[1],"new_version":1,"order_id":1,"serial_ids":[1],"shipped_quantities":[[]]}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#shipment_order_allocate_preview":{"post":{"operationId":"shipment_order_allocate_preview","summary":"Preview what allocation would do for this order. Writes nothing.","description":"Preview what allocation would do for this order. Writes nothing.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"shipment_order_commands","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"shipment_order_allocate_preview"},"params":{"type":"object","properties":{"data":{"description":"Dry-run allocation: runs the exact plan `shipment_order_allocate` would, writes nothing. Shaped like `shipment_order_validate` above, not like the commands below — it reads, computes, and never reaches `execute_with_meta`.","properties":{"detail":{"allOf":[{"$ref":"#/components/schemas/AllocationTraceDetail"}],"default":"summary","description":"Defaults to the cheap path for all existing clients."},"order_id":{"format":"int64","type":"integer"}},"required":["order_id"],"title":"AllocationPreviewInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"shipment_order_allocate_preview","params":{"data":{"order_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"What [`preview_allocate_order`] returns. Deliberately its OWN type, not [`AllocateShipmentOrderResult`] with `new_version`/`picks` left empty — a preview never reserves anything, so it has no version to echo and no `pick_detail` ids to report; a shared type would carry two fields whose only value here is \"always empty,\" which is not a description of what this command returns, it is a description of what it does NOT do.","properties":{"advisory":{"description":"Preview is observational and can be stale immediately after the read.","type":"boolean"},"allocated":{"format":"double","type":"number"},"blocked_by_dropped_step":{"description":"Sum of `lines[].blocked_by_dropped_step` — see that field's own doc.","format":"double","type":"number"},"detail":{"$ref":"#/components/schemas/AllocationTraceDetail"},"lines":{"items":{"$ref":"#/components/schemas/LineAllocationPreview"},"type":"array"},"order_id":{"format":"int64","type":"integer"},"order_number":{"type":"string"},"order_status":{"allOf":[{"$ref":"#/components/schemas/OrderStatus"}],"description":"Carried through so a caller previewing an unlaunched order (see below) can tell the rungs apart without a second round trip."},"short":{"format":"double","type":"number"}},"required":["advisory","allocated","blocked_by_dropped_step","detail","lines","order_id","order_number","order_status","short"],"title":"AllocationPreview","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"advisory":false,"allocated":1.5,"blocked_by_dropped_step":1.5,"detail":"summary","lines":[{"allocated":1.5,"blocked_by_dropped_step":1.5,"line_no":1,"need":1.5,"positions":[{"allocation_policy_detail_id":null,"allocation_policy_detail_version":null,"allocation_policy_id":null,"allocation_policy_version":null,"balance_id":null,"location":null,"lot":null,"qty":null,"uom":null}],"short":1.5,"sku_code":"<sku_code>","steps":[{"candidate_count":null,"input_need":null,"remainder":null,"rule_num":null,"selected_qty":null,"sequence":null,"step_id":null,"step_version":null,"uom":null,"verdict":null}],"uom":"<uom>"}],"order_id":1,"order_number":"<order_number>","order_status":{},"short":1.5}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#shipment_order_allocate":{"post":{"operationId":"shipment_order_allocate","summary":"Allocate a released order's open lines against available stock.","description":"Allocate a released order's open lines against available stock.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n**Versioned entities:** shipment_order (id in data.order_id, version in data.expected_order_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_order_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[{"entity":"shipment_order","id_field":"order_id","version_field":"expected_order_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"shipment_order_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"shipment_order_allocate"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"expected_order_version":{"format":"int32","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"},"order_id":{"format":"int64","type":"integer"}},"required":["expected_order_version","idempotency_key","order_id"],"title":"AllocateShipmentOrder","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"shipment_order_allocate","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"expected_order_version":1,"order_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"allocated":{"format":"double","type":"number"},"blocked_by_dropped_step":{"description":"Sum, across every line, of [`crate::allocation::LineAllocationPlan::blocked_by_dropped_step`] — base units `short` includes that were never searched for at all, because the only step of some line's policy naming that UOM rung failed to parse (round-2 review finding: without this, a broken policy step and a genuinely empty warehouse produced the identical `short` number). Zero on the common path.","format":"double","type":"number"},"cartonization":{"anyOf":[{"$ref":"#/components/schemas/WrittenPlan"},{"type":"null"}],"default":null,"description":"Что посчитала картонизация: номер плана и сколько в нём коробок, размещений и неразмещённого. `None`, когда считать было нечего или когда заказ уже запущен.\n\n`default`, чтобы сохранённый идемпотентный повтор, записанный до появления поля, продолжал разбираться."},"cartonization_error":{"default":null,"description":"`Some`, когда картонизация не удалась. Резервирование при этом УСПЕШНО: план — подсказка складу, а не условие отгрузки. Но молчать нельзя — иначе экран покажет успех, а склад обнаружит отсутствие коробок в момент отбора.","type":["string","null"]},"contention_deferred":{"default":0,"description":"Quantity deferred because another transaction held the inventory lock. Default preserves idempotent results stored by older builds.","format":"double","type":"number"},"dispatched_tasks":{"default":[],"description":"Tasks THIS pass handed out — one per live pick of the order that had none yet (see the dispatch comment in [`allocate_order_lines`]). Empty before launch: a pre-launch Allocate reserves, it does not dispatch.\n\nThe screen's toast reads it. A second Release on a `PartiallyReleased` order reserves nothing new — `allocated 0, short 0` — and its whole point is the tasks, which the toast could not name while the generator's answer was thrown away here (owner, 2026-09-12). `default`, so an idempotent replay stored before the field existed still deserializes.","items":{"format":"int64","type":"integer"},"type":"array"},"new_version":{"format":"int32","type":"integer"},"order_id":{"format":"int64","type":"integer"},"order_number":{"type":"string"},"picks":{"items":{"format":"int64","type":"integer"},"type":"array"},"short":{"description":"Quantity that could not be reserved because the eligible stock did not exist (as opposed to being temporarily locked).","format":"double","type":"number"},"status":{"allOf":[{"$ref":"#/components/schemas/OrderStatus"}],"description":"The header status AS DERIVED after the pass — `Allocated` / `PartiallyAllocated` before launch, `Released` / `PartiallyReleased` on a launched order (release's own nested pass runs after `released_at` is already written, so it reads the same ladder). The screen patches its copy of the order from this (spec §6.3)."}},"required":["allocated","blocked_by_dropped_step","new_version","order_id","order_number","picks","short","status"],"title":"AllocateShipmentOrderResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"allocated":1.5,"blocked_by_dropped_step":1.5,"new_version":1,"order_id":1,"order_number":"<order_number>","picks":[1],"short":1.5,"status":{}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#shipment_order_cancel_allocation":{"post":{"operationId":"shipment_order_cancel_allocation","summary":"Release every reservation on the order; the picks are deleted.","description":"Release every reservation on the order; the picks are deleted.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n**Versioned entities:** shipment_order (id in data.order_id, version in data.expected_order_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_order_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[{"entity":"shipment_order","id_field":"order_id","version_field":"expected_order_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"shipment_order_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"shipment_order_cancel_allocation"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"expected_order_version":{"format":"int32","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"},"order_id":{"format":"int64","type":"integer"}},"required":["expected_order_version","idempotency_key","order_id"],"title":"CancelOrderAllocation","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"shipment_order_cancel_allocation","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"expected_order_version":1,"order_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"launch_cleared":{"description":"True when the release pass cleared EVERY reservation and the launch marker (`released_at`) was reset — the order is back in its unlaunched life and a later Release launches it again.","type":"boolean"},"lines_affected":{"format":"int32","type":"integer"},"new_version":{"description":"The header version AFTER this command: bumped when the command wrote the header (a full clear resets `released_at` — a user write, so OCC moves), otherwise an echo of what was already there. Either way the screen patches its copy from this and the next command's check stays honest.","format":"int32","type":"integer"},"order_id":{"format":"int64","type":"integer"},"order_number":{"type":"string"},"released":{"format":"double","type":"number"},"skipped_in_work":{"description":"Picks left untouched because they are in work (MVP stub: a task holds them). The toast tells the operator how much of the order is still out on the floor.","format":"int64","type":"integer"},"status":{"allOf":[{"$ref":"#/components/schemas/OrderStatus"}],"description":"The header status AS DERIVED after the release pass — `New` when the launch marker was cleared (full un-reservation, owner decision 2026-08-24), `PartiallyReleased` when in-work picks kept the order launched (spec §2.2/§2.3). The screen patches its copy of the order from this (spec §6.3)."}},"required":["launch_cleared","lines_affected","new_version","order_id","order_number","released","skipped_in_work","status"],"title":"CancelOrderAllocationResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"launch_cleared":false,"lines_affected":1,"new_version":1,"order_id":1,"order_number":"<order_number>","released":1.5,"skipped_in_work":1,"status":{}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#pick_detail_delete":{"post":{"operationId":"pick_detail_delete","summary":"Delete one reservation (pick) from an order, releasing its qty.","description":"Delete one reservation (pick) from an order, releasing its qty.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"shipment_order_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"pick_detail_delete"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"idempotency_key":{"format":"uuid","type":"string"},"order_id":{"format":"int64","type":"integer"},"pick_detail_id":{"format":"int64","type":"integer"}},"required":["idempotency_key","order_id","pick_detail_id"],"title":"DeletePickDetail","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"pick_detail_delete","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"order_id":1,"pick_detail_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"line_id":{"format":"int64","type":"integer"},"line_status":{"allOf":[{"$ref":"#/components/schemas/OrderLineStatus"}],"description":"The affected LINE's stored status after the same derivation — the shape [`CancelLineQtyResult::line_status`] already reports for the other line-touching command family.\n\n[`CancelLineQtyResult::line_status`]: crate::service::order_line::CancelLineQtyResult"},"new_version":{"description":"Echo of the header version that was already there — this command never writes the header row (releases touch LINES and `pick_detail`), same contract as `CancelOrderAllocationResult::new_version`.","format":"int32","type":"integer"},"order_id":{"format":"int64","type":"integer"},"order_status":{"allOf":[{"$ref":"#/components/schemas/OrderStatus"}],"description":"The header status AS DERIVED after the release, in this command's own transaction — same contract as [`CancelOrderAllocationResult::status`] (`cancel_allocation.rs`): the screen patches its copy of the order from this (spec §6.3) instead of keeping whatever it showed before. A delete can move the header (a fully-`Released` order loses a pick → `PartiallyReleased`), and a result that stayed silent about it left the header box stale until a full reopen — the owner's live find, 2026-08-24.\n\n[`CancelOrderAllocationResult::status`]: super::CancelOrderAllocationResult"},"released_qty":{"format":"double","type":"number"}},"required":["line_id","line_status","new_version","order_id","order_status","released_qty"],"title":"DeletePickDetailResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"line_id":1,"line_status":{},"new_version":1,"order_id":1,"order_status":{},"released_qty":1.5}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#shipment_order_line_upsert":{"post":{"operationId":"shipment_order_line_upsert","summary":"Add or edit a draft order's line.","description":"Add or edit a draft order's line.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n**Versioned entities:** shipment_order_line (id in data.line_id, version in data.expected_line_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_line_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[{"entity":"shipment_order_line","id_field":"line_id","version_field":"expected_line_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"shipment_order_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"shipment_order_line_upsert"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"expected_line_version":{"description":"Required when `line_id` is present. Absent on an insert, because a row that does not exist has no version to conflict with.","format":"int32","type":["integer","null"]},"external_line_no":{"type":["string","null"]},"idempotency_key":{"format":"uuid","type":"string"},"line_id":{"description":"Absent inserts a new line; present edits that one.","format":"int64","type":["integer","null"]},"order_id":{"format":"int64","type":"integer"},"pack_id":{"description":"The pack the customer ordered: the line is then reserved only from stock of it. Absent: the line takes the SKU's pack and is reserved from stock of any pack of the SKU. Absent from the wire when empty, so the idempotency hash of a request without it is what it always was.","format":"int64","type":["integer","null"]},"pick_instruction":{"description":"One-off pick instruction for this line (wms-app 044). On an edit, an absent value leaves the stored one; an empty string clears it. Absent from the wire when empty, so the idempotency hash of a request without it is what it always was.","type":["string","null"]},"qty":{"description":"Quantity in BASE units.","format":"double","type":"number"},"sku_code":{"type":"string"},"uom":{"type":"string"}},"required":["idempotency_key","order_id","qty","sku_code","uom"],"title":"UpsertOrderLine","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"shipment_order_line_upsert","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"order_id":1,"qty":1.5,"sku_code":"<sku_code>","uom":"<uom>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"line_id":{"format":"int64","type":"integer"},"line_no":{"format":"int32","type":"integer"},"new_version":{"format":"int32","type":"integer"}},"required":["line_id","line_no","new_version"],"title":"UpsertOrderLineResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"line_id":1,"line_no":1,"new_version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#shipment_order_line_remove":{"post":{"operationId":"shipment_order_line_remove","summary":"Delete a line from a draft order.","description":"Delete a line from a draft order.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n**Versioned entities:** shipment_order_line (id in data.line_id, version in data.expected_line_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_line_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[{"entity":"shipment_order_line","id_field":"line_id","version_field":"expected_line_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"shipment_order_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"shipment_order_line_remove"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"expected_line_version":{"format":"int32","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"},"line_id":{"format":"int64","type":"integer"},"order_id":{"format":"int64","type":"integer"}},"required":["expected_line_version","idempotency_key","line_id","order_id"],"title":"RemoveOrderLine","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"shipment_order_line_remove","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"expected_line_version":1,"line_id":1,"order_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"line_id":{"format":"int64","type":"integer"},"removed":{"type":"boolean"}},"required":["line_id","removed"],"title":"RemoveOrderLineResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"line_id":1,"removed":false}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#shipment_order_line_set_lot_requirements":{"post":{"operationId":"shipment_order_line_set_lot_requirements","summary":"Replace a draft Order line's expected lot and lot-attribute values.","description":"Replace a draft Order line's expected lot and lot-attribute values.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n**Versioned entities:** shipment_order_line (id in data.line_id, version in data.expected_line_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_line_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[{"entity":"shipment_order_line","id_field":"line_id","version_field":"expected_line_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"shipment_order_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"shipment_order_line_set_lot_requirements"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"attributes":{"default":[],"description":"Complete replacement set. An empty set means no per-attribute limit.","items":{"$ref":"#/components/schemas/ExpectedShipmentLotAttributeInput"},"type":"array"},"expected_line_version":{"format":"int32","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"},"line_id":{"format":"int64","type":"integer"},"order_id":{"format":"int64","type":"integer"},"required_lot":{"description":"Exact customer-requested lot. Empty or absent removes this constraint.","type":["string","null"]}},"required":["expected_line_version","idempotency_key","line_id","order_id"],"title":"SetOrderLineLotRequirements","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"shipment_order_line_set_lot_requirements","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"expected_line_version":1,"line_id":1,"order_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"line_id":{"format":"int64","type":"integer"},"new_version":{"format":"int32","type":"integer"},"requirements":{"anyOf":[{"$ref":"#/components/schemas/ShipmentOrderLineLotRequirement"},{"type":"null"}]}},"required":["line_id","new_version"],"title":"SetOrderLineLotRequirementsResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"line_id":1,"new_version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#shipment_order_line_cancel_qty":{"post":{"operationId":"shipment_order_line_cancel_qty","summary":"Cancel part or all of a line's quantity, with a reason.","description":"Cancel part or all of a line's quantity, with a reason.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n**Versioned entities:** shipment_order_line (id in data.line_id, version in data.expected_line_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_line_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[{"entity":"shipment_order_line","id_field":"line_id","version_field":"expected_line_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"shipment_order_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"shipment_order_line_cancel_qty"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"expected_line_version":{"format":"int32","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"},"line_id":{"format":"int64","type":"integer"},"order_id":{"format":"int64","type":"integer"},"qty":{"description":"Base units to cancel. Additive — two calls of 3 cancel 6.","format":"double","type":"number"},"reason":{"type":"string"}},"required":["expected_line_version","idempotency_key","line_id","order_id","qty","reason"],"title":"CancelLineQty","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"shipment_order_line_cancel_qty","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"expected_line_version":1,"line_id":1,"order_id":1,"qty":1.5,"reason":"<reason>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"line_id":{"format":"int64","type":"integer"},"line_status":{"$ref":"#/components/schemas/OrderLineStatus"},"new_version":{"format":"int32","type":"integer"},"qty_cancelled":{"format":"double","type":"number"},"qty_open":{"format":"double","type":"number"}},"required":["line_id","line_status","new_version","qty_cancelled","qty_open"],"title":"CancelLineQtyResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"line_id":1,"line_status":"NotAllocated","new_version":1,"qty_cancelled":1.5,"qty_open":1.5}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#shipment_order_line_adjust_qty":{"post":{"operationId":"shipment_order_line_adjust_qty","summary":"Set a line's ordered quantity (supervisor lane; works on reserved lines).","description":"Set a line's ordered quantity (supervisor lane; works on reserved lines).\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n**Versioned entities:** shipment_order_line (id in data.line_id, version in data.expected_line_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_line_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[{"entity":"shipment_order_line","id_field":"line_id","version_field":"expected_line_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"shipment_order_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"shipment_order_line_adjust_qty"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"expected_line_version":{"format":"int32","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"},"line_id":{"format":"int64","type":"integer"},"order_id":{"format":"int64","type":"integer"},"qty_ordered":{"description":"The new `qty_ordered`, in BASE units — absolute, not a delta.","format":"double","type":"number"}},"required":["expected_line_version","idempotency_key","line_id","order_id","qty_ordered"],"title":"AdjustOrderLineQty","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"shipment_order_line_adjust_qty","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"expected_line_version":1,"line_id":1,"order_id":1,"qty_ordered":1.5}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"line_id":{"format":"int64","type":"integer"},"line_status":{"allOf":[{"$ref":"#/components/schemas/OrderLineStatus"}],"description":"The line's status AS STORED after the in-transaction recompute — the adjustment is usually made exactly to move this (Allocated → PartiallyAllocated on a raise), so the caller gets it without a follow-up read."},"new_version":{"format":"int32","type":"integer"},"qty_ordered":{"format":"double","type":"number"}},"required":["line_id","line_status","new_version","qty_ordered"],"title":"AdjustOrderLineQtyResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"line_id":1,"line_status":{},"new_version":1,"qty_ordered":1.5}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#container_restructure":{"post":{"operationId":"container_restructure","summary":"Re-parent a container or detach it (validates hierarchy).","description":"Re-parent a container or detach it (validates hierarchy).\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"container_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"container_restructure"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"container_id":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"},"new_parent_id":{"description":"`None` detaches the container (makes it root).","format":"int64","type":["integer","null"]}},"required":["container_id","idempotency_key"],"title":"RestructureContainer","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"container_restructure","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"container_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"container_id":{"format":"int64","type":"integer"},"new_parent_id":{"format":"int64","type":["integer","null"]},"previous_parent_id":{"format":"int64","type":["integer","null"]}},"required":["container_id"],"title":"RestructureContainerResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"container_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#container_dispose":{"post":{"operationId":"container_dispose","summary":"Dispose a container (force=true cascades through children).","description":"Dispose a container (force=true cascades through children).\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"container_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"container_dispose"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"container_id":{"format":"int64","type":"integer"},"force":{"description":"When `true`, recursively dispose all descendants.","type":"boolean"},"idempotency_key":{"format":"uuid","type":"string"},"reason":{"type":["string","null"]}},"required":["container_id","force","idempotency_key"],"title":"DisposeContainer","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"container_dispose","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"container_id":1,"force":false}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"children_disposed":{"format":"uint64","minimum":0,"type":"integer"},"container_id":{"format":"int64","type":"integer"}},"required":["children_disposed","container_id"],"title":"DisposeContainerResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"children_disposed":1,"container_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#container_repack":{"post":{"operationId":"container_repack","summary":"Repack inventory from one container into another (drains source).","description":"Repack inventory from one container into another (drains source).\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"container_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"container_repack"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"idempotency_key":{"format":"uuid","type":"string"},"items":{"description":"When empty, repack ALL inventory from source to target.","items":{"$ref":"#/components/schemas/RepackItem"},"type":"array"},"owner_id":{"format":"int64","type":"integer"},"source_container_id":{"format":"int64","type":"integer"},"target_spec":{"$ref":"#/components/schemas/TargetContainerSpec"}},"required":["idempotency_key","items","owner_id","source_container_id","target_spec"],"title":"RepackContainer","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"container_repack","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"items":[{"qty":1.5,"sku_code":"<sku_code>"}],"owner_id":1,"source_container_id":1,"target_spec":"None"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"items_moved":{"items":{"$ref":"#/components/schemas/RepackItemDelta"},"type":"array"},"source_container_id":{"format":"int64","type":"integer"},"source_now_empty":{"type":"boolean"},"target_container_id":{"format":"int64","type":"integer"}},"required":["items_moved","source_container_id","source_now_empty","target_container_id"],"title":"RepackContainerResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"items_moved":[{"qty":1.5,"sku_code":"<sku_code>"}],"source_container_id":1,"source_now_empty":false,"target_container_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#pick_dispatch_next":{"post":{"operationId":"pick_dispatch_next","summary":"Assign the next executable Pick using fixed dispatch phases.","description":"Assign the next executable Pick using fixed dispatch phases.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"pick_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"pick_dispatch_next"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"current_location":{"default":null,"type":["string","null"]},"current_zone":{"default":null,"type":["string","null"]},"equipment_profile_code":{"description":"The equipment kind chosen for the shift; it becomes the operator's profile. Only with `work_area_code`. Absent (and no `on_foot`) — the operator's current profile.","type":["string","null"]},"idempotency_key":{"format":"uuid","type":"string"},"on_foot":{"description":"The operator works on foot this shift: their profile is cleared (`NULL` = excludes no zone, no lift limit) and the area's default policy applies. Only with `work_area_code`, never with `equipment_profile_code`. Absent from the payload when false.","type":"boolean"},"work_area_code":{"description":"The area the operator names (scanned or typed) on the RF entry \"Отбор по участку\": the policy comes from it, and a new task only from its zones. Absent on the old entry.","type":["string","null"]},"work_area_id":{"default":null,"format":"int64","type":["integer","null"]}},"required":["idempotency_key"],"title":"DispatchNextPick","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"pick_dispatch_next","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"assignment":{"anyOf":[{"$ref":"#/components/schemas/AssignmentDispatch"},{"type":"null"}],"description":"Carrier work instead of a single task. ABSENT (not `null`) on every discrete answer, so the discrete wire is exactly what it was."},"diagnostics":{"items":{"$ref":"#/components/schemas/DispatchDiagnostic"},"type":"array"},"drop_to_close":{"anyOf":[{"$ref":"#/components/schemas/OpenPickDropView"},{"type":"null"}],"description":"The caller's open pick pallet WITH goods, when the answer is not a discrete task that goes onto it — another order's task, a task of its order going to another location than the pallet (owner cross-review 2026-10-06, D-2), no work, or carrier work: the RF closes it first (spec §4.5, PICK13). ABSENT when `None`, so every other answer serializes exactly as before."},"work":{"anyOf":[{"$ref":"#/components/schemas/PickDispatchWork"},{"type":"null"}]}},"required":["diagnostics"],"title":"DispatchNextPickResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"diagnostics":[{"code":"<code>","phase":"Assigned"}]}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#pick_drop_open":{"post":{"operationId":"pick_drop_open","summary":"Open the operator's pick pallet (a scanned DRP label) for the task's order in INTRANSIT.","description":"Open the operator's pick pallet (a scanned DRP label) for the task's order in INTRANSIT.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"pick_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"pick_drop_open"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"description":"Wire command. A physical fact (\"this label is on the pallet in my hands\"), so it carries no entity version: the lease is checked and renewed, and the answer carries the task's new version.","properties":{"drop_code":{"description":"The scanned DRP label.","type":"string"},"idempotency_key":{"format":"uuid","type":"string"},"task_id":{"format":"int64","type":"integer"},"work_area_code":{"description":"The area the operator named on the RF entry \"Отбор по участку\" (`globals.pka_area_code`): the pallet opens under that area's policy when the task is its work. Absent on the old entry — DISCRETE.","type":["string","null"]}},"required":["drop_code","idempotency_key","task_id"],"title":"OpenPickDrop","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"pick_drop_open","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"drop_code":"<drop_code>","task_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"already_open":{"description":"The caller's open pallet of this order, scanned again: nothing was written.","type":"boolean"},"created":{"description":"No container had the label: a new pallet was made.","type":"boolean"},"drop_code":{"type":"string"},"drop_id":{"description":"The pallet's CONTAINER id — what a commit names as its `drop_id`.","format":"int64","type":"integer"},"order_id":{"format":"int64","type":"integer"},"released_drop_code":{"description":"The label of the caller's empty open pallet let go on the way.","type":["string","null"]},"task_version":{"description":"The task after the lease renewal: the RF stores it for its next stateful confirmation.","format":"int32","type":"integer"}},"required":["already_open","created","drop_code","drop_id","order_id","task_version"],"title":"OpenPickDropResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"already_open":false,"created":false,"drop_code":"<drop_code>","drop_id":1,"order_id":1,"task_version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#pick_drop_close":{"post":{"operationId":"pick_drop_close","summary":"Close a pick pallet: its whole tree moves from INTRANSIT into its frozen destination location.","description":"Close a pick pallet: its whole tree moves from INTRANSIT into its frozen destination location.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"pick_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"pick_drop_close"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"description":"Wire command. A physical fact (\"this pallet is done and stands here\"), so it carries no entity version.","properties":{"drop_code":{"description":"The scanned DRP label of the pallet.","type":"string"},"idempotency_key":{"format":"uuid","type":"string"},"location_code":{"default":"","description":"The scanned location: the pallet's frozen destination. Not needed — and ignored — for an empty pallet, which F2 lets go (ruling D12): absent reads as empty, and a loaded pallet is then refused `WRONG_DROP_LOCATION` naming its destination.","type":"string"},"override_grant_id":{"description":"A supervisor's grant (`supervisor_override_grant`) for `pick_override_codes::close_foreign_drop(pick_drop_id)` — lets a caller without the right close another operator's pallet.","format":"uuid","type":["string","null"]}},"required":["drop_code","idempotency_key"],"title":"ClosePickDrop","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"pick_drop_close","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"drop_code":"<drop_code>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"already_closed":{"description":"The caller had already closed this pallet into this location: nothing was written this time.","type":"boolean"},"authorized_by":{"description":"Who authorised closing another operator's pallet by a grant (read off the grant row, never the request).","format":"int64","type":["integer","null"]},"balances_moved":{"description":"Balances moved; 0 on an `already_closed` answer.","format":"uint64","minimum":0,"type":"integer"},"drop_code":{"type":"string"},"drop_id":{"description":"The pallet's CONTAINER id.","format":"int64","type":"integer"},"location":{"description":"Where the pallet stands now: its destination. Empty when the pallet was let go (`released`): it stands nowhere.","type":"string"},"order_id":{"format":"int64","type":"integer"},"pick_drop_id":{"description":"The pallet's record.","format":"int64","type":"integer"},"released":{"description":"The pallet held nothing: its record was let go (`Released`) and its label is free again; nothing moved (ruling D12). Absent when false.","type":"boolean"}},"required":["already_closed","balances_moved","drop_code","drop_id","location","order_id","pick_drop_id"],"title":"ClosePickDropResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"already_closed":false,"balances_moved":1,"drop_code":"<drop_code>","drop_id":1,"location":"<location>","order_id":1,"pick_drop_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#pick_confirm_location":{"post":{"operationId":"pick_confirm_location","summary":"Confirm the Pick source location as a durable fact and renew the task lease.","description":"Confirm the Pick source location as a durable fact and renew the task lease.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"pick_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"pick_confirm_location"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"idempotency_key":{"format":"uuid","type":"string"},"scanned_location":{"type":"string"},"task_id":{"format":"int64","type":"integer"}},"required":["idempotency_key","scanned_location","task_id"],"title":"ConfirmPickLocation","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"pick_confirm_location","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"scanned_location":"<scanned_location>","task_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"confirmed":{"$ref":"#/components/schemas/PickConfirmationField"},"episode_id":{"format":"int64","type":"integer"},"next":{"anyOf":[{"$ref":"#/components/schemas/RequiredEvidence"},{"type":"null"}],"description":"What the plan still needs, in screen order; `None` once the source is proven."},"pick_detail_id":{"format":"int64","type":"integer"},"recorded":{"description":"The plan's evidence this call stored (empty on a re-scan the business key absorbed; the quantity is audit, not plan evidence, and is never listed).","items":{"$ref":"#/components/schemas/EvidenceKey"},"type":"array"},"task_id":{"format":"int64","type":"integer"},"task_version":{"description":"The lease renewal bumps it; `pick_commit` / `pick_short` echo it.","format":"int32","type":"integer"}},"required":["confirmed","episode_id","pick_detail_id","recorded","task_id","task_version"],"title":"PickConfirmationResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"confirmed":"Location","episode_id":1,"pick_detail_id":1,"recorded":[{"kind":"Location"}],"task_id":1,"task_version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#pick_confirm_item":{"post":{"operationId":"pick_confirm_item","summary":"Confirm the Pick item barcode as a durable fact and renew the task lease.","description":"Confirm the Pick item barcode as a durable fact and renew the task lease.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"pick_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"pick_confirm_item"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"idempotency_key":{"format":"uuid","type":"string"},"scanned_item":{"type":"string"},"task_id":{"format":"int64","type":"integer"}},"required":["idempotency_key","scanned_item","task_id"],"title":"ConfirmPickItem","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"pick_confirm_item","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"scanned_item":"<scanned_item>","task_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"confirmed":{"$ref":"#/components/schemas/PickConfirmationField"},"episode_id":{"format":"int64","type":"integer"},"next":{"anyOf":[{"$ref":"#/components/schemas/RequiredEvidence"},{"type":"null"}],"description":"What the plan still needs, in screen order; `None` once the source is proven."},"pick_detail_id":{"format":"int64","type":"integer"},"recorded":{"description":"The plan's evidence this call stored (empty on a re-scan the business key absorbed; the quantity is audit, not plan evidence, and is never listed).","items":{"$ref":"#/components/schemas/EvidenceKey"},"type":"array"},"task_id":{"format":"int64","type":"integer"},"task_version":{"description":"The lease renewal bumps it; `pick_commit` / `pick_short` echo it.","format":"int32","type":"integer"}},"required":["confirmed","episode_id","pick_detail_id","recorded","task_id","task_version"],"title":"PickConfirmationResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"confirmed":"Location","episode_id":1,"pick_detail_id":1,"recorded":[{"kind":"Location"}],"task_id":1,"task_version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#pick_confirm_source_lpn":{"post":{"operationId":"pick_confirm_source_lpn","summary":"Confirm the Pick source LPN as a durable fact and renew the task lease.","description":"Confirm the Pick source LPN as a durable fact and renew the task lease.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"pick_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"pick_confirm_source_lpn"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"idempotency_key":{"format":"uuid","type":"string"},"scanned_lpn":{"type":"string"},"task_id":{"format":"int64","type":"integer"}},"required":["idempotency_key","scanned_lpn","task_id"],"title":"ConfirmPickSourceLpn","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"pick_confirm_source_lpn","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"scanned_lpn":"<scanned_lpn>","task_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"confirmed":{"$ref":"#/components/schemas/PickConfirmationField"},"episode_id":{"format":"int64","type":"integer"},"next":{"anyOf":[{"$ref":"#/components/schemas/RequiredEvidence"},{"type":"null"}],"description":"What the plan still needs, in screen order; `None` once the source is proven."},"pick_detail_id":{"format":"int64","type":"integer"},"recorded":{"description":"The plan's evidence this call stored (empty on a re-scan the business key absorbed; the quantity is audit, not plan evidence, and is never listed).","items":{"$ref":"#/components/schemas/EvidenceKey"},"type":"array"},"task_id":{"format":"int64","type":"integer"},"task_version":{"description":"The lease renewal bumps it; `pick_commit` / `pick_short` echo it.","format":"int32","type":"integer"}},"required":["confirmed","episode_id","pick_detail_id","recorded","task_id","task_version"],"title":"PickConfirmationResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"confirmed":"Location","episode_id":1,"pick_detail_id":1,"recorded":[{"kind":"Location"}],"task_id":1,"task_version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#pick_substitute_source_lpn":{"post":{"operationId":"pick_substitute_source_lpn","summary":"Take the Pick's remaining from another LPN of the same lot at the location and renew the task lease.","description":"Take the Pick's remaining from another LPN of the same lot at the location and renew the task lease.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"pick_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"pick_substitute_source_lpn"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"description":"«Взять этот LPN»: the pick `task_id` leads to takes its remaining from the scanned LPN instead of the one it reserved.","properties":{"idempotency_key":{"format":"uuid","type":"string"},"scanned_lpn":{"description":"The LPN the operator scanned at the location (the one a `WRONG_SOURCE_LPN` refused).","type":"string"},"task_id":{"format":"int64","type":"integer"}},"required":["idempotency_key","scanned_lpn","task_id"],"title":"SubstituteSourceLpn","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"pick_substitute_source_lpn","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"scanned_lpn":"<scanned_lpn>","task_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"A confirmation's answer — the task version the renewal left, the new episode, what the plan asks next and what this call recorded — plus the two LPNs.","properties":{"confirmed":{"$ref":"#/components/schemas/PickConfirmationField"},"episode_id":{"format":"int64","type":"integer"},"from_container_id":{"format":"int64","type":"integer"},"next":{"anyOf":[{"$ref":"#/components/schemas/RequiredEvidence"},{"type":"null"}],"description":"What the plan still needs, in screen order; `None` once the source is proven."},"pick_detail_id":{"format":"int64","type":"integer"},"recorded":{"description":"The plan's evidence this call stored (empty on a re-scan the business key absorbed; the quantity is audit, not plan evidence, and is never listed).","items":{"$ref":"#/components/schemas/EvidenceKey"},"type":"array"},"task_id":{"format":"int64","type":"integer"},"task_version":{"description":"The lease renewal bumps it; `pick_commit` / `pick_short` echo it.","format":"int32","type":"integer"},"to_container_id":{"format":"int64","type":"integer"}},"required":["confirmed","episode_id","from_container_id","pick_detail_id","recorded","task_id","task_version","to_container_id"],"title":"SourceLpnSubstituted","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"confirmed":"Location","episode_id":1,"from_container_id":1,"pick_detail_id":1,"recorded":[{"kind":"Location"}],"task_id":1,"task_version":1,"to_container_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#pick_confirm_qty":{"post":{"operationId":"pick_confirm_qty","summary":"Confirm the full Pick quantity as an audit fact and renew the task lease.","description":"Confirm the full Pick quantity as an audit fact and renew the task lease.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"pick_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"pick_confirm_qty"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"idempotency_key":{"format":"uuid","type":"string"},"qty":{"format":"double","type":"number"},"task_id":{"format":"int64","type":"integer"}},"required":["idempotency_key","qty","task_id"],"title":"ConfirmPickQty","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"pick_confirm_qty","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"qty":1.5,"task_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"confirmed":{"$ref":"#/components/schemas/PickConfirmationField"},"episode_id":{"format":"int64","type":"integer"},"next":{"anyOf":[{"$ref":"#/components/schemas/RequiredEvidence"},{"type":"null"}],"description":"What the plan still needs, in screen order; `None` once the source is proven."},"pick_detail_id":{"format":"int64","type":"integer"},"recorded":{"description":"The plan's evidence this call stored (empty on a re-scan the business key absorbed; the quantity is audit, not plan evidence, and is never listed).","items":{"$ref":"#/components/schemas/EvidenceKey"},"type":"array"},"task_id":{"format":"int64","type":"integer"},"task_version":{"description":"The lease renewal bumps it; `pick_commit` / `pick_short` echo it.","format":"int32","type":"integer"}},"required":["confirmed","episode_id","pick_detail_id","recorded","task_id","task_version"],"title":"PickConfirmationResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"confirmed":"Location","episode_id":1,"pick_detail_id":1,"recorded":[{"kind":"Location"}],"task_id":1,"task_version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#pick_confirm_serial":{"post":{"operationId":"pick_confirm_serial","summary":"Capture one or more serial numbers for a Pick without moving inventory.","description":"Capture one or more serial numbers for a Pick without moving inventory.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"pick_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"pick_confirm_serial"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"actual_qty":{"description":"Physical quantity the operator intends to commit. Full picks pass the remaining Pick quantity; short picks pass the observed quantity before scanning its serials.","format":"double","type":"number"},"idempotency_key":{"format":"uuid","type":"string"},"serial_number":{"type":"string"},"task_id":{"format":"int64","type":"integer"}},"required":["actual_qty","idempotency_key","serial_number","task_id"],"title":"CapturePickSerial","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"pick_confirm_serial","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"actual_qty":1.5,"serial_number":"<serial_number>","task_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"already_captured":{"type":"boolean"},"captured_base_qty":{"description":"Base quantity represented by the captured serials under this obligation.","format":"double","type":["number","null"]},"episode_id":{"format":"int64","type":"integer"},"episode_status":{"$ref":"#/components/schemas/EpisodeStatus"},"pick_detail_id":{"format":"int64","type":"integer"},"serials_collected_qty":{"format":"int32","type":"integer"},"serials_to_collect_qty":{"format":"int32","type":"integer"},"task_id":{"format":"int64","type":"integer"},"task_version":{"format":"int32","type":"integer"}},"required":["already_captured","episode_id","episode_status","pick_detail_id","serials_collected_qty","serials_to_collect_qty","task_id","task_version"],"title":"CapturePickSerialResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"already_captured":false,"episode_id":1,"episode_status":"Open","pick_detail_id":1,"serials_collected_qty":1,"serials_to_collect_qty":1,"task_id":1,"task_version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#pick_confirm_internal_lot":{"post":{"operationId":"pick_confirm_internal_lot","summary":"Confirm the Pick's reserved internal lot (scanned or typed) as a durable fact and renew the task lease.","description":"Confirm the Pick's reserved internal lot (scanned or typed) as a durable fact and renew the task lease.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"pick_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"pick_confirm_internal_lot"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"description":"The reserved internal lot, scanned from its label or typed (§11.2).","properties":{"idempotency_key":{"format":"uuid","type":"string"},"manual":{"default":false,"description":"Typed on the keypad rather than scanned (R16).","type":"boolean"},"scanned_lot":{"type":"string"},"task_id":{"format":"int64","type":"integer"}},"required":["idempotency_key","scanned_lot","task_id"],"title":"ConfirmPickInternalLot","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"pick_confirm_internal_lot","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"scanned_lot":"<scanned_lot>","task_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"confirmed":{"$ref":"#/components/schemas/PickConfirmationField"},"episode_id":{"format":"int64","type":"integer"},"next":{"anyOf":[{"$ref":"#/components/schemas/RequiredEvidence"},{"type":"null"}],"description":"What the plan still needs, in screen order; `None` once the source is proven."},"pick_detail_id":{"format":"int64","type":"integer"},"recorded":{"description":"The plan's evidence this call stored (empty on a re-scan the business key absorbed; the quantity is audit, not plan evidence, and is never listed).","items":{"$ref":"#/components/schemas/EvidenceKey"},"type":"array"},"task_id":{"format":"int64","type":"integer"},"task_version":{"description":"The lease renewal bumps it; `pick_commit` / `pick_short` echo it.","format":"int32","type":"integer"}},"required":["confirmed","episode_id","pick_detail_id","recorded","task_id","task_version"],"title":"PickConfirmationResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"confirmed":"Location","episode_id":1,"pick_detail_id":1,"recorded":[{"kind":"Location"}],"task_id":1,"task_version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#pick_confirm_lot_attributes":{"post":{"operationId":"pick_confirm_lot_attributes","summary":"Confirm the Pick lot's checkable attributes (one scan or typed values) as durable facts and renew the task lease.","description":"Confirm the Pick lot's checkable attributes (one scan or typed values) as durable facts and renew the task lease.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"pick_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"pick_confirm_lot_attributes"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"description":"The lot's checkable attributes as the operator sees them (§11.3).","properties":{"idempotency_key":{"format":"uuid","type":"string"},"manual":{"default":[],"description":"Values the operator typed (R16 decides whether that is allowed).","items":{"$ref":"#/components/schemas/ManualLotAttribute"},"type":"array"},"scan":{"default":null,"description":"One scan that may carry several values (GS1: lot + expiry). A plain barcode no format reads is the value of the attribute the plan asks next.","type":["string","null"]},"task_id":{"format":"int64","type":"integer"}},"required":["idempotency_key","task_id"],"title":"ConfirmPickLotAttributes","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"pick_confirm_lot_attributes","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"task_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"confirmed":{"$ref":"#/components/schemas/PickConfirmationField"},"episode_id":{"format":"int64","type":"integer"},"next":{"anyOf":[{"$ref":"#/components/schemas/RequiredEvidence"},{"type":"null"}],"description":"What the plan still needs, in screen order; `None` once the source is proven."},"pick_detail_id":{"format":"int64","type":"integer"},"recorded":{"description":"The plan's evidence this call stored (empty on a re-scan the business key absorbed; the quantity is audit, not plan evidence, and is never listed).","items":{"$ref":"#/components/schemas/EvidenceKey"},"type":"array"},"task_id":{"format":"int64","type":"integer"},"task_version":{"description":"The lease renewal bumps it; `pick_commit` / `pick_short` echo it.","format":"int32","type":"integer"}},"required":["confirmed","episode_id","pick_detail_id","recorded","task_id","task_version"],"title":"PickConfirmationResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"confirmed":"Location","episode_id":1,"pick_detail_id":1,"recorded":[{"kind":"Location"}],"task_id":1,"task_version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#pick_commit":{"post":{"operationId":"pick_commit","summary":"Atomically commit a full Pick into its prepared DROPID. Refused while an open Hard inventory count is counting the pick's source location (LOCATION_BEING_COUNTED); context.pairs names the pair a shift lead's supervisor_override_grant must carry, and its id goes in count_freeze_grant_id.","description":"Atomically commit a full Pick into its prepared DROPID. Refused while an open Hard inventory count is counting the pick's source location (LOCATION_BEING_COUNTED); context.pairs names the pair a shift lead's supervisor_override_grant must carry, and its id goes in count_freeze_grant_id.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n**Versioned entities:** task (id in data.task_id, version in data.expected_task_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_task_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[{"entity":"task","id_field":"task_id","version_field":"expected_task_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"pick_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"pick_commit"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"count_freeze_grant_id":{"description":"A shift lead's grant (`supervisor_override_grant`) authorising this confirmation out of a location an open Hard count is counting (owner's decision 2026-10-21 §6). The SAME single-use grant the move and the adjustment redeem. Absent from the wire when `None`, so an ordinary commit serialises — and hashes — exactly as before.","format":"uuid","type":["string","null"]},"drop_id":{"description":"Discrete (CollectToRoot): the caller's open pick pallet — its CONTAINER id, as `pick_drop_open` answered it. Absent from the wire when `None`, so a discrete request serializes — and hashes — exactly as before slice 4.","format":"int64","type":["integer","null"]},"expected_task_version":{"format":"int32","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"},"instructions_acknowledged":{"description":"The picker read the pick's instructions (RF `PICKINS`). Required when the pick has any (`picking::instructions`); the commit re-derives that from the locked rows, it does not trust the client. Absent from the wire when false, so the idempotency hash of a request without it is what it always was.","type":"boolean"},"serial_capture_episode_id":{"default":null,"format":"int64","type":["integer","null"]},"target_container_code":{"description":"A pick a live assignment holds (DirectToTarget): the box the operator scanned at its position — must be that position's box (R5).","type":["string","null"]},"task_id":{"format":"int64","type":"integer"}},"required":["expected_task_version","idempotency_key","task_id"],"title":"CommitPick","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"pick_commit","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"expected_task_version":1,"task_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"already_committed":{"type":"boolean"},"ask_location_empty":{"default":false,"description":"The pick emptied its source location and the policy says to ask the operator whether it is empty (`pick_to_zero = Confirm`, count spec Appendix L): the RF asks, and sends the answer to `location_confirm_empty`.","type":"boolean"},"destination_balance_id":{"format":"int64","type":["integer","null"]},"line_status":{"$ref":"#/components/schemas/OrderLineStatus"},"movement_id":{"format":"int64","type":"integer"},"order_status":{"$ref":"#/components/schemas/OrderStatus"},"pick_detail_id":{"format":"int64","type":"integer"},"pick_status":{"allOf":[{"$ref":"#/components/schemas/PickDetailStatus"}],"description":"The status the commit wrote: `Picked`, or `AwaitingPlacement` for a pick bound for a station (П-3). A replay under a new key answers the pick's status now — the wall may have placed or returned it since."},"qty_picked":{"format":"double","type":"number"},"route":{"anyOf":[{"$ref":"#/components/schemas/RouteProgress"},{"type":"null"}],"description":"Present only for a pick of an assignment: where its route stands after this commit (R3)."},"task_id":{"format":"int64","type":"integer"},"task_version":{"format":"int32","type":"integer"}},"required":["already_committed","line_status","movement_id","order_status","pick_detail_id","pick_status","qty_picked","task_id","task_version"],"title":"CommitPickResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"already_committed":false,"line_status":"NotAllocated","movement_id":1,"order_status":"New","pick_detail_id":1,"pick_status":{},"qty_picked":1.5,"task_id":1,"task_version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#pick_short":{"post":{"operationId":"pick_short","summary":"Atomically commit a partial or zero Pick and persist remediation intent.","description":"Atomically commit a partial or zero Pick and persist remediation intent.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n**Versioned entities:** task (id in data.task_id, version in data.expected_task_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_task_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[{"entity":"task","id_field":"task_id","version_field":"expected_task_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"pick_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"pick_short"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"actual_qty":{"format":"double","type":"number"},"count_freeze_grant_id":{"description":"A shift lead's single-use grant to take stock off a location an open Hard count is counting (owner's decision 2026-10-21 §6) — the same grant `CommitPick` redeems. A short that FOUND stock moves it off the shelf exactly as a commit does, so it meets the same freeze and needs the same way past it; a zero short moves nothing and reads no grant. Absent from the wire when `None`, so an ordinary short serialises — and hashes — exactly as before.","format":"uuid","type":["string","null"]},"drop_id":{"description":"Discrete (CollectToRoot): the caller's open pick pallet — its CONTAINER id. Required when stock is found; a zero short needs none. Absent from the wire when `None`, so a discrete request serializes — and hashes — exactly as before slice 4.","format":"int64","type":["integer","null"]},"expected_task_version":{"format":"int32","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"},"instructions_acknowledged":{"description":"The picker read the pick's instructions (RF `PICKINS`) — the same acknowledgement `CommitPick` requires, required here when stock is found (`actual_qty > 0`): it goes onto the pallet like a full pick. A zero short handles nothing and needs none. Absent from the wire when false, so the idempotency hash of a request without it is unchanged.","type":"boolean"},"note":{"default":null,"type":["string","null"]},"reason_code":{"type":"string"},"serial_capture_episode_id":{"default":null,"format":"int64","type":["integer","null"]},"target_container_code":{"description":"A pick a live assignment holds: the box the operator scanned at its position (R5). Required when stock is found; a zero short needs none.","type":["string","null"]},"task_id":{"format":"int64","type":"integer"}},"required":["actual_qty","expected_task_version","idempotency_key","reason_code","task_id"],"title":"ShortPick","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"pick_short","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"actual_qty":1.5,"expected_task_version":1,"reason_code":"<reason_code>","task_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"already_committed":{"type":"boolean"},"destination_balance_id":{"format":"int64","type":["integer","null"]},"inventory_count":{"$ref":"#/components/schemas/InventoryCountIntentStatus"},"line_status":{"$ref":"#/components/schemas/OrderLineStatus"},"location_blocked":{"type":"boolean"},"movement_id":{"format":"int64","type":["integer","null"]},"order_status":{"$ref":"#/components/schemas/OrderStatus"},"pick_detail_id":{"format":"int64","type":"integer"},"pick_status":{"$ref":"#/components/schemas/PickDetailStatus"},"picked_qty":{"format":"double","type":"number"},"remediation_id":{"format":"int64","type":"integer"},"route":{"anyOf":[{"$ref":"#/components/schemas/RouteProgress"},{"type":"null"}],"description":"Present only for a pick of an assignment: where its route stands after this short (R3)."},"short_qty":{"format":"double","type":"number"},"shorted_pick_id":{"description":"Q9 / П-5: the pick split off with the shortfall (`Shorted`, no task) when a station pick kept what was found. Absent from the wire otherwise.","format":"int64","type":["integer","null"]},"task_id":{"format":"int64","type":"integer"},"task_version":{"format":"int32","type":"integer"}},"required":["already_committed","inventory_count","line_status","location_blocked","order_status","pick_detail_id","pick_status","picked_qty","remediation_id","short_qty","task_id","task_version"],"title":"ShortPickResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"already_committed":false,"inventory_count":"NotConfigured","line_status":"NotAllocated","location_blocked":false,"order_status":"New","pick_detail_id":1,"pick_status":"Picked","picked_qty":1.5,"remediation_id":1,"short_qty":1.5,"task_id":1,"task_version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#pick_reject":{"post":{"operationId":"pick_reject","summary":"Reject untouched Pick work using Task Manager cooldown and refusal audit.","description":"Reject untouched Pick work using Task Manager cooldown and refusal audit.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n**Versioned entities:** task (id in data.task_id, version in data.expected_task_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_task_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[{"entity":"task","id_field":"task_id","version_field":"expected_task_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"pick_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"pick_reject"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"expected_task_version":{"format":"int32","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"},"reason":{"type":"string"},"task_id":{"format":"int64","type":"integer"},"whole_group":{"description":"The summary step's reject (slice 5 §7): every remaining place of the group the task's pick stands in. `false` (the default): this place alone — and then the field is not serialized, so the payload a key was minted for before the field existed hashes as it did.","type":"boolean"},"work_area_code":{"description":"The same area by its code — what the RF entry \"Отбор по участку\" knows (`globals.pka_area_code`), resolved as `pick_dispatch_next` resolves it (`UNKNOWN_WORK_AREA`), so the area's `allow_task_release` holds for a discrete reject (ruling D15 of the 11.10 review). With `work_area_id` too, both must name the same area (`WORK_AREA_MISMATCH`). Ignored, like the id, for a pick of a live assignment or of a live station route — not even resolved. Blank reads as absent. Not serialized when absent, so a payload a key was minted for before the field existed hashes as it did.","type":["string","null"]},"work_area_id":{"default":null,"description":"Where the task cools down, and whose `allow_task_release` judges the return. Ignored for a pick of a live assignment: its cooldown is the assignment's work area (R9) — and for a stop of a live station route: its cooldown is the route's work area.","format":"int64","type":["integer","null"]}},"required":["expected_task_version","idempotency_key","reason","task_id"],"title":"RejectPick","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"pick_reject","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"expected_task_version":1,"reason":"<reason>","task_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"rejected_task_ids":{"default":[],"description":"Every task that went back to the pool, ascending: the named one alone, or with `whole_group` every place taken along. Empty in a result stored before the field existed.","items":{"format":"int64","type":"integer"},"type":"array"},"reservation_unchanged":{"type":"boolean"},"rest_exception_ids":{"description":"The execution exceptions (`TargetLeftCart`) of the rests this reject repaired — rejected picks whose target could no longer be started as it stood (ruling D2), ascending. Empty in a result stored before the field existed.","items":{"format":"int64","type":"integer"},"type":"array"},"task":{"allOf":[{"$ref":"#/components/schemas/Task"}],"description":"The named place's task, back in the pool."}},"required":["reservation_unchanged","task"],"title":"RejectPickResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"reservation_unchanged":false,"task":{"add_when":"<add_when>","add_who":1,"code":"<code>","created_at":"<created_at>","id":1,"mod_when":"<mod_when>","mod_who":1,"priority":1,"qty_done":1.5,"refused_count":1,"source_id":1,"source_type":"<source_type>","status":"InProgress","task_type":"Pick","version":1}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#pick_manual_complete":{"post":{"operationId":"pick_manual_complete","summary":"Complete a reviewed workstation Pick: actual stock, Pick, Task and durable receipt atomically.","description":"Complete a reviewed workstation Pick: actual stock, Pick, Task and durable receipt atomically.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n**Versioned entities:** task (id in data.task_id, version in data.expected_task_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_task_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[{"entity":"task","id_field":"task_id","version_field":"expected_task_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"pick_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"pick_manual_complete"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"count_freeze_grant_id":{"description":"A shift lead's single-use grant to take stock off a location an open Hard count is counting (owner's decision 2026-10-21 §6) — the same grant `CommitPick` redeems. A workstation completion moves the stock off the shelf exactly as an RF commit does, so it meets the same freeze and needs the same way past it. Absent from the wire when `None`, so an ordinary completion serialises — and hashes — exactly as before.","format":"uuid","type":["string","null"]},"destination_lpn":{"default":null,"type":["string","null"]},"expected_task_version":{"format":"int32","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"},"instructions_acknowledged":{"default":false,"type":"boolean"},"serial_scans":{"default":[],"items":{"type":"string"},"type":"array"},"source":{"allOf":[{"$ref":"#/components/schemas/ManualPickSourceInput"}],"default":{"internal_lot":null,"internal_lot_typed":false,"item_scan":null,"location_scan":null,"lot_attribute_scan":null,"lot_attribute_scans":[],"lot_attributes":[],"source_lpn_scan":null}},"task_id":{"format":"int64","type":"integer"}},"required":["expected_task_version","idempotency_key","task_id"],"title":"CompleteManualPick","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"pick_manual_complete","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"expected_task_version":1,"task_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"already_committed":{"type":"boolean"},"ask_location_empty":{"type":"boolean"},"completion_capability":{"anyOf":[{"$ref":"#/components/schemas/FlowCapability"},{"type":"null"}],"default":null,"description":"Frozen before the physical write, not recomputed by later shipping."},"destination_balance_id":{"format":"int64","type":"integer"},"destination_container_id":{"format":"int64","type":"integer"},"destination_location":{"type":"string"},"destination_lpn":{"type":"string"},"executed_by":{"format":"int64","type":"integer"},"line_status":{"$ref":"#/components/schemas/OrderLineStatus"},"movement_id":{"format":"int64","type":"integer"},"order_id":{"default":0,"format":"int64","type":"integer"},"order_status":{"$ref":"#/components/schemas/OrderStatus"},"pick_detail_id":{"format":"int64","type":"integer"},"pick_status":{"$ref":"#/components/schemas/PickDetailStatus"},"qty_picked":{"format":"double","type":"number"},"task_id":{"format":"int64","type":"integer"},"task_status":{"$ref":"#/components/schemas/TaskStatus"},"task_version":{"format":"int32","type":"integer"}},"required":["already_committed","ask_location_empty","destination_balance_id","destination_container_id","destination_location","destination_lpn","executed_by","line_status","movement_id","order_status","pick_detail_id","pick_status","qty_picked","task_id","task_status","task_version"],"title":"CompleteManualPickResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"already_committed":false,"ask_location_empty":false,"destination_balance_id":1,"destination_container_id":1,"destination_location":"<destination_location>","destination_lpn":"<destination_lpn>","executed_by":1,"line_status":"NotAllocated","movement_id":1,"order_status":"New","pick_detail_id":1,"pick_status":"Picked","qty_picked":1.5,"task_id":1,"task_status":"InProgress","task_version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#pick_manual_finalize":{"post":{"operationId":"pick_manual_finalize","summary":"Hand off completed workstation roots using their frozen routes; never mark Pack done.","description":"Hand off completed workstation roots using their frozen routes; never mark Pack done.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"pick_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"pick_manual_finalize"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"description":"Stateless physical follow-up: the same completed deposits need the same hand-off regardless of what a screen rendered. No client-selected route or invented Pack completion. Owning Order locks protect receipt membership.","properties":{"idempotency_key":{"format":"uuid","type":"string"},"order_id":{"format":"int64","type":"integer"}},"required":["idempotency_key","order_id"],"title":"FinalizeManualPicks","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"pick_manual_finalize","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"order_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"created_unit_ids":{"items":{"format":"int64","type":"integer"},"type":"array"},"existing_unit_ids":{"items":{"format":"int64","type":"integer"},"type":"array"},"order_id":{"format":"int64","type":"integer"},"unrouted_container_ids":{"items":{"format":"int64","type":"integer"},"type":"array"},"waiting_for_picks":{"type":"boolean"}},"required":["created_unit_ids","existing_unit_ids","order_id","unrouted_container_ids","waiting_for_picks"],"title":"FinalizeManualPicksResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"created_unit_ids":[1],"existing_unit_ids":[1],"order_id":1,"unrouted_container_ids":[1],"waiting_for_picks":false}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#shared_pick_route_start":{"post":{"operationId":"shared_pick_route_start","summary":"Start a portion of a station wave's route by wave code, or resume the operator's live one.","description":"Start a portion of a station wave's route by wave code, or resume the operator's live one.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"pick_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"shared_pick_route_start"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"idempotency_key":{"format":"uuid","type":"string"},"max_picks":{"description":"Maximum number of stops to claim in this portion (1..100).","format":"uint16","minimum":0,"type":"integer"},"wave_code":{"description":"The wave by its code — what the operator sees (ruling 8).","type":"string"},"work_area_code":{"type":"string"}},"required":["idempotency_key","max_picks","wave_code","work_area_code"],"title":"StartSharedPickRoute","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"shared_pick_route_start","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"max_picks":1,"wave_code":"<wave_code>","work_area_code":"<work_area_code>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"The answer of the route's RF doors (`shared_pick_route_get`, `shared_pick_route_start`): the live route, or none; and, when the reader named a task, that task's stop — where the RF re-reads the version of the stop it is working after a conflict.","properties":{"live":{"anyOf":[{"$ref":"#/components/schemas/SharedPickRouteView"},{"type":"null"}]},"stop":{"anyOf":[{"$ref":"#/components/schemas/SharedRouteStop"},{"type":"null"}]}},"title":"CurrentSharedPickRoute","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"live":{"resumed":false,"route":{"add_who":1,"assignee":1,"created_at":"<created_at>","id":1,"mod_when":"<mod_when>","mod_who":1,"policy_snapshot":null,"station_location":"<station_location>","version":1,"wave_id":1,"work_area_id":1},"stops":[{"location":null,"pick_id":null,"qty_remaining":null,"sku_code":null,"task_id":null,"task_version":null}],"task_ids":[1],"totes":[{"bound_at":null,"container_id":null,"id":null,"route_id":null}]},"stop":{"location":"<location>","pick_id":1,"qty_remaining":1.5,"sku_code":"<sku_code>","task_id":1,"task_version":1}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#shared_pick_tote_bind":{"post":{"operationId":"shared_pick_tote_bind","summary":"Bind an empty registered shared tote to the operator's station route.","description":"Bind an empty registered shared tote to the operator's station route.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"pick_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"shared_pick_tote_bind"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"description":"Wire command. A physical fact (\"this tote is in my hands\"), so it carries no entity version; the route's held leases are renewed.","properties":{"idempotency_key":{"format":"uuid","type":"string"},"route_id":{"format":"int64","type":"integer"},"tote_code":{"type":"string"}},"required":["idempotency_key","route_id","tote_code"],"title":"BindSharedPickTote","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"shared_pick_tote_bind","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"route_id":1,"tote_code":"<tote_code>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"bound_at":{"type":"string"},"container_id":{"format":"int64","type":"integer"},"delivered_at":{"default":null,"type":["string","null"]},"delivered_by":{"format":"int64","type":["integer","null"]},"id":{"format":"int64","type":"integer"},"released_at":{"default":null,"description":"Given back empty to the handling-unit registry; never together with `delivered_at` (CHECK).","type":["string","null"]},"route_id":{"format":"int64","type":"integer"}},"required":["bound_at","container_id","id","route_id"],"title":"SharedPickTote","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"bound_at":"<bound_at>","container_id":1,"id":1,"route_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#shared_pick_commit":{"post":{"operationId":"shared_pick_commit","summary":"Collect all or part of a station route stop into the route's shared tote.","description":"Collect all or part of a station route stop into the route's shared tote.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n**Versioned entities:** task (id in data.task_id, version in data.expected_task_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_task_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[{"entity":"task","id_field":"task_id","version_field":"expected_task_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"pick_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"shared_pick_commit"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"description":"Wire command: a station route stop's collection of `qty` (base units) into the scanned tote of the caller's route.","properties":{"count_freeze_grant_id":{"description":"A shift lead's single-use grant to collect from a location an open Hard count is counting (owner's decision 2026-10-21 §6). Carried because a collection into the route's tote takes stock off the shelf as surely as a full commit does, so it meets the same freeze and must have the same way past it — `pick_commit`'s own field, forwarded.","format":"uuid","type":["string","null"]},"expected_task_version":{"format":"int32","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"},"instructions_acknowledged":{"default":false,"type":"boolean"},"qty":{"format":"double","type":"number"},"task_id":{"format":"int64","type":"integer"},"tote_code":{"type":"string"}},"required":["expected_task_version","idempotency_key","qty","task_id","tote_code"],"title":"CommitSharedTotePick","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"shared_pick_commit","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"expected_task_version":1,"qty":1.5,"task_id":1,"tote_code":"<tote_code>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"already_committed":{"type":"boolean"},"ask_location_empty":{"default":false,"description":"The pick emptied its source location and the policy says to ask the operator whether it is empty (`pick_to_zero = Confirm`, count spec Appendix L): the RF asks, and sends the answer to `location_confirm_empty`.","type":"boolean"},"destination_balance_id":{"format":"int64","type":["integer","null"]},"line_status":{"$ref":"#/components/schemas/OrderLineStatus"},"movement_id":{"format":"int64","type":"integer"},"order_status":{"$ref":"#/components/schemas/OrderStatus"},"pick_detail_id":{"format":"int64","type":"integer"},"pick_status":{"allOf":[{"$ref":"#/components/schemas/PickDetailStatus"}],"description":"The status the commit wrote: `Picked`, or `AwaitingPlacement` for a pick bound for a station (П-3). A replay under a new key answers the pick's status now — the wall may have placed or returned it since."},"qty_picked":{"format":"double","type":"number"},"route":{"anyOf":[{"$ref":"#/components/schemas/RouteProgress"},{"type":"null"}],"description":"Present only for a pick of an assignment: where its route stands after this commit (R3)."},"task_id":{"format":"int64","type":"integer"},"task_version":{"format":"int32","type":"integer"}},"required":["already_committed","line_status","movement_id","order_status","pick_detail_id","pick_status","qty_picked","task_id","task_version"],"title":"CommitPickResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"already_committed":false,"line_status":"NotAllocated","movement_id":1,"order_status":"New","pick_detail_id":1,"pick_status":{},"qty_picked":1.5,"task_id":1,"task_version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#shared_pick_tote_deliver":{"post":{"operationId":"shared_pick_tote_deliver","summary":"Deliver a station route's shared tote to its frozen station.","description":"Deliver a station route's shared tote to its frozen station.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"pick_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"shared_pick_tote_deliver"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"description":"Wire command: the scanned tote and the scanned location.","properties":{"idempotency_key":{"format":"uuid","type":"string"},"to_location":{"type":"string"},"tote_code":{"type":"string"}},"required":["idempotency_key","to_location","tote_code"],"title":"DeliverSharedPickTote","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"shared_pick_tote_deliver","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"to_location":"<to_location>","tote_code":"<tote_code>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"moved":{"description":"`false` when nothing moved: a repeat, or a tote already standing at the station.","type":"boolean"},"route_completed":{"description":"The delivery finished the route: no live stop and no undelivered tote is left, and the operator's next start takes a new portion.","type":"boolean"},"station_location":{"type":"string"},"tote_container_id":{"format":"int64","type":"integer"},"wave_id":{"description":"The wave whose route the tote served: reconciled at once after a delivery that moved the tote (ruling 6).","format":"int64","type":"integer"}},"required":["moved","route_completed","station_location","tote_container_id","wave_id"],"title":"SharedToteDeliveryResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"moved":false,"route_completed":false,"station_location":"<station_location>","tote_container_id":1,"wave_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#shared_pick_tote_release":{"post":{"operationId":"shared_pick_tote_release","summary":"Give an empty shared tote of the operator's station route back to the handling-unit registry.","description":"Give an empty shared tote of the operator's station route back to the handling-unit registry.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"pick_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"shared_pick_tote_release"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"description":"Wire command: the route and the scanned tote.","properties":{"idempotency_key":{"format":"uuid","type":"string"},"route_id":{"format":"int64","type":"integer"},"tote_code":{"type":"string"}},"required":["idempotency_key","route_id","tote_code"],"title":"ReleaseEmptySharedPickTote","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"shared_pick_tote_release","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"route_id":1,"tote_code":"<tote_code>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"route_completed":{"description":"The release finished the route: no live stop and no live tote is left, and the operator's next start takes a new portion.","type":"boolean"},"tote_container_id":{"format":"int64","type":"integer"}},"required":["route_completed","tote_container_id"],"title":"SharedToteReleased","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"route_completed":false,"tote_container_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#pick_work_get":{"post":{"operationId":"pick_work_get","summary":"Return authoritative Pick work and prepared DROPID state for reconnect.","description":"Return authoritative Pick work and prepared DROPID state for reconnect.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"pick_commands","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"pick_work_get"},"params":{"type":"object","properties":{"data":{"properties":{"task_id":{"format":"int64","type":"integer"}},"required":["task_id"],"title":"PickWorkInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"pick_work_get","params":{"data":{"task_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"allowed_actions":{"items":{"$ref":"#/components/schemas/PickAction"},"type":"array"},"instructions":{"description":"What the picker must read before the pick commits, in reading order: the SKU's instruction, the order line's, the ShipAsIs rule (`picking::instructions`). RF `PICKINS` shows them.","items":{"type":"string"},"type":"array"},"instructions_require_acknowledgement":{"description":"`pick_commit` (and `pick_short` with stock found) refuses without `instructions_acknowledged` while this is true — exactly when `instructions` is not empty.","type":"boolean"},"lease_expires_at":{"type":["string","null"]},"order_id":{"format":"int64","type":"integer"},"pick_detail_id":{"format":"int64","type":"integer"},"serial_progress":{"anyOf":[{"$ref":"#/components/schemas/PickSerialProgressView"},{"type":"null"}]},"serials_required":{"type":"boolean"},"source":{"$ref":"#/components/schemas/PickSourceView"},"target":{"anyOf":[{"$ref":"#/components/schemas/PickTargetView"},{"type":"null"}]},"task_id":{"format":"int64","type":"integer"},"task_version":{"format":"int32","type":"integer"},"verification":{"allOf":[{"$ref":"#/components/schemas/VerificationView"}],"description":"What must be proven about the source before the pick commits, what is proven, what comes next (R17). `allowed_actions` follows it."}},"required":["allowed_actions","instructions","instructions_require_acknowledgement","order_id","pick_detail_id","serials_required","source","task_id","task_version","verification"],"title":"PickWorkView","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"allowed_actions":["ConfirmLocation"],"instructions":["<instructions>"],"instructions_require_acknowledgement":false,"order_id":1,"pick_detail_id":1,"serials_required":false,"source":{"location":"<location>","lot":"<lot>","lot_display":[{"code":"<code>","label":"<label>","value":"<value>","verification":null}],"lot_summary":"<lot_summary>","owner_id":1,"qty":1.5,"sku_code":"<sku_code>","uom":"<uom>"},"task_id":1,"task_version":1,"verification":{"satisfied":[{"kind":null}],"stale":false}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#pick_drop_current":{"post":{"operationId":"pick_drop_current","summary":"The operator's open pick pallet: its label, order, goods and frozen destination location.","description":"The operator's open pick pallet: its label, order, goods and frozen destination location.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"pick_commands","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"pick_drop_current"},"params":{"type":"object","properties":{"data":{"title":"PickDropCurrentInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"pick_drop_current","params":{"data":{}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"The RF screen's answer: an object, so a screen reads `response.drop.*`.","properties":{"drop":{"anyOf":[{"$ref":"#/components/schemas/OpenPickDropView"},{"type":"null"}]}},"title":"CurrentPickDrop","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"drop":{"drop_code":"<drop_code>","drop_id":1,"has_goods":false,"opened_at":"<opened_at>","order_code":"<order_code>","order_id":1,"pick_drop_id":1,"version":1}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#pick_manual_review":{"post":{"operationId":"pick_manual_review","summary":"Review workstation Pick source requirements without an RF lease.","description":"Review workstation Pick source requirements without an RF lease.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"pick_commands","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"pick_manual_review"},"params":{"type":"object","properties":{"data":{"properties":{"task_id":{"format":"int64","type":"integer"}},"required":["task_id"],"title":"ManualPickReviewInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"pick_manual_review","params":{"data":{"task_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"destination_location":{"type":"string"},"destination_lpn_required":{"type":"boolean"},"instructions":{"items":{"type":"string"},"type":"array"},"internal_lot":{"type":"string"},"pick_detail_id":{"format":"int64","type":"integer"},"qty":{"format":"double","type":"number"},"required_serial_count":{"format":"uint32","minimum":0,"type":"integer"},"sku_code":{"type":"string"},"source_location":{"type":"string"},"source_lpn":{"type":["string","null"]},"task_id":{"format":"int64","type":"integer"},"task_version":{"format":"int32","type":"integer"},"verification_plan":{"$ref":"#/components/schemas/VerificationPlan"}},"required":["destination_location","destination_lpn_required","instructions","internal_lot","pick_detail_id","qty","required_serial_count","sku_code","source_location","task_id","task_version","verification_plan"],"title":"ManualPickReview","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"destination_location":"<destination_location>","destination_lpn_required":false,"instructions":["<instructions>"],"internal_lot":"<internal_lot>","pick_detail_id":1,"qty":1.5,"required_serial_count":1,"sku_code":"<sku_code>","source_location":"<source_location>","task_id":1,"task_version":1,"verification_plan":{"lot_proof":"NotRequired","policy_id":1,"policy_revision":1,"required_evidence":[{"capture":null,"kind":null}],"source":{"internal_lot":"<internal_lot>","owner_id":1,"sku_code":"<sku_code>","source_location":"<source_location>"}}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#shared_pick_route_get":{"post":{"operationId":"shared_pick_route_get","summary":"The operator's live station route: its workable stops with their task versions, and its totes.","description":"The operator's live station route: its workable stops with their task versions, and its totes.\n\n**Category:** `query`. Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":true,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"pick_commands","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"shared_pick_route_get"},"params":{"type":"object","properties":{"data":{"properties":{"task_id":{"default":null,"description":"The stop the reader is working: its current version comes back in `stop` (the RF's refresh after a version conflict).","format":"int64","type":["integer","null"]}},"title":"SharedPickRouteGetInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"shared_pick_route_get","params":{"data":{"task_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"The answer of the route's RF doors (`shared_pick_route_get`, `shared_pick_route_start`): the live route, or none; and, when the reader named a task, that task's stop — where the RF re-reads the version of the stop it is working after a conflict.","properties":{"live":{"anyOf":[{"$ref":"#/components/schemas/SharedPickRouteView"},{"type":"null"}]},"stop":{"anyOf":[{"$ref":"#/components/schemas/SharedRouteStop"},{"type":"null"}]}},"title":"CurrentSharedPickRoute","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"live":{"resumed":false,"route":{"add_who":1,"assignee":1,"created_at":"<created_at>","id":1,"mod_when":"<mod_when>","mod_who":1,"policy_snapshot":null,"station_location":"<station_location>","version":1,"wave_id":1,"work_area_id":1},"stops":[{"location":null,"pick_id":null,"qty_remaining":null,"sku_code":null,"task_id":null,"task_version":null}],"task_ids":[1],"totes":[{"bound_at":null,"container_id":null,"id":null,"route_id":null}]},"stop":{"location":"<location>","pick_id":1,"qty_remaining":1.5,"sku_code":"<sku_code>","task_id":1,"task_version":1}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#pick_reconciliation_report":{"post":{"operationId":"pick_reconciliation_report","summary":"Report task/Pick lifecycle and dispatch-eligibility inconsistencies.","description":"Report task/Pick lifecycle and dispatch-eligibility inconsistencies.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"pick_commands","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"pick_reconciliation_report"},"params":{"type":"object","properties":{"data":{"title":"PickReconciliationInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"pick_reconciliation_report","params":{"data":{}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"counts":{"items":{"$ref":"#/components/schemas/PickReconciliationCount"},"type":"array"},"healthy":{"type":"boolean"},"issue_count":{"format":"uint","minimum":0,"type":"integer"},"issues":{"items":{"$ref":"#/components/schemas/PickReconciliationIssue"},"type":"array"}},"required":["counts","healthy","issue_count","issues"],"title":"PickReconciliationReport","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"counts":[{"code":"ORPHAN_TASK","count":1}],"healthy":false,"issue_count":1,"issues":[{"code":"ORPHAN_TASK","detail":"<detail>"}]}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#shared_pick_tote_complete_supervised":{"post":{"operationId":"shared_pick_tote_complete_supervised","summary":"Deliver (or release, if empty) a live shared tote of a station route whose operator is gone, as a supervisor.","description":"Deliver (or release, if empty) a live shared tote of a station route whose operator is gone, as a supervisor.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n**Versioned entities:** shared_pick_route (id in data.route_id, version in data.expected_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[{"entity":"shared_pick_route","id_field":"route_id","version_field":"expected_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"pick_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"shared_pick_tote_complete_supervised"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"description":"Wire command: the route, its version as the board showed it, and the tote.","properties":{"expected_version":{"description":"`shared_pick_route.version` as the board showed it.","format":"int32","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"},"route_id":{"format":"int64","type":"integer"},"tote_code":{"type":"string"}},"required":["expected_version","idempotency_key","route_id","tote_code"],"title":"CompleteSharedPickToteSupervised","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"shared_pick_tote_complete_supervised","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"expected_version":1,"route_id":1,"tote_code":"<tote_code>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"route_id":{"format":"int64","type":"integer"},"route_version":{"description":"The route's version after the door — what the board echoes next.","format":"int32","type":"integer"},"tote":{"$ref":"#/components/schemas/SupervisedToteOutcome"}},"required":["route_id","route_version","tote"],"title":"SharedToteCompletedSupervised","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"route_id":1,"route_version":1,"tote":{"moved":false,"outcome":"delivered","route_completed":false,"station_location":"<station_location>","tote_container_id":1,"wave_id":1}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#pick_drop_list":{"post":{"operationId":"pick_drop_list","summary":"List every operator's open pick pallet with its record version and whether its frozen destination still takes it, for the supervisor.","description":"List every operator's open pick pallet with its record version and whether its frozen destination still takes it, for the supervisor.\n\n**Category:** `query`. Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":true,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"pick_commands","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"pick_drop_list"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"pick_drop_list"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/OpenPickDropBoardRow"},"title":"Array_of_OpenPickDropBoardRow","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"drop_code":"<drop_code>","drop_id":1,"has_goods":false,"id":1,"opened_at":"<opened_at>","operator_id":1,"operator_username":"<operator_username>","order_code":"<order_code>","order_id":1,"pick_drop_id":1,"routed":false,"version":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#shared_pick_route_list":{"post":{"operationId":"shared_pick_route_list","summary":"List every live tote of every live station route with its route version, its frozen station and whether its operator is gone, for the supervisor.","description":"List every live tote of every live station route with its route version, its frozen station and whether its operator is gone, for the supervisor.\n\n**Category:** `query`. Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":true,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"pick_commands","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"shared_pick_route_list"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"shared_pick_route_list"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/SharedRouteToteBoardRow"},"title":"Array_of_SharedRouteToteBoardRow","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"bound_at":"<bound_at>","holds_goods":false,"id":1,"live_stops":1,"operator_id":1,"operator_username":"<operator_username>","route_id":1,"route_version":1,"state":{},"station_location":"<station_location>","tote_code":"<tote_code>","wave_code":"<wave_code>","work_area_code":"<work_area_code>"}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#pick_assignment_start":{"post":{"operationId":"pick_assignment_start","summary":"Build a pick assignment of whole planned targets on a scanned carrier.","description":"Build a pick assignment of whole planned targets on a scanned carrier.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"pick_assignment","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"pick_assignment_start"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"carrier_code":{"description":"The scanned carrier.","type":"string"},"idempotency_key":{"format":"uuid","type":"string"},"work_area_code":{"description":"The area the operator named on \"Отбор по участку\" — the same code the dispatch answered \"scan carrier\" for.","type":"string"}},"required":["carrier_code","idempotency_key","work_area_code"],"title":"StartPickAssignment","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"pick_assignment_start","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"carrier_code":"<carrier_code>","work_area_code":"<work_area_code>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"assignment":{"$ref":"#/components/schemas/PickAssignmentView"},"continuations_taken":{"default":[],"description":"The `Bypassed` continuations this start took, each as one position of the new assignment (ruling T22), in position order.","items":{"format":"int64","type":"integer"},"type":"array"},"resumed":{"description":"The operator already had a live assignment: it is continued and nothing new was built or claimed.","type":"boolean"}},"required":["assignment","resumed"],"title":"StartPickAssignmentResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"assignment":{"allowed_actions":["BindPosition"],"assignment_id":1,"code":"<code>","positions_bound":1,"positions_total":1,"status":"Picking","step":{"kind":"BindPosition","order_id":1,"order_number":"<order_number>","planned_target_kind":null,"position_no":1},"version":1,"work_area_id":1},"resumed":false}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#pick_assignment_bind_position":{"post":{"operationId":"pick_assignment_bind_position","summary":"Bind a scanned box to a position of the operator's pick assignment carrier.","description":"Bind a scanned box to a position of the operator's pick assignment carrier.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"pick_assignment","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"pick_assignment_bind_position"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"container_code":{"description":"The scanned box — or, for a disposable carton, the planned carton's own label.","type":"string"},"idempotency_key":{"format":"uuid","type":"string"},"position_no":{"description":"The position on the carrier (1..N), as `pick_assignment_get` named it.","format":"int16","type":"integer"}},"required":["container_code","idempotency_key","position_no"],"title":"BindPickAssignmentPosition","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"pick_assignment_bind_position","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"container_code":"<container_code>","position_no":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"already_bound":{"description":"The position was already bound to this box: nothing was written.","type":"boolean"},"assignment":{"allOf":[{"$ref":"#/components/schemas/PickAssignmentView"}],"description":"The assignment after the bind: its new `version`, `status` (`Ready` after the last bind) and the next step (the next `Open` position)."},"container_code":{"type":"string"},"position_no":{"format":"int16","type":"integer"}},"required":["already_bound","assignment","container_code","position_no"],"title":"BindPickAssignmentPositionResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"already_bound":false,"assignment":{"allowed_actions":["BindPosition"],"assignment_id":1,"code":"<code>","positions_bound":1,"positions_total":1,"status":"Picking","step":{"kind":"BindPosition","order_id":1,"order_number":"<order_number>","planned_target_kind":null,"position_no":1},"version":1,"work_area_id":1},"container_code":"<container_code>","position_no":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#pick_assignment_get":{"post":{"operationId":"pick_assignment_get","summary":"Return a pick assignment (or the operator's live one) with its version.","description":"Return a pick assignment (or the operator's live one) with its version.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"pick_assignment","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"pick_assignment_get"},"params":{"type":"object","properties":{"data":{"properties":{"assignment_id":{"default":null,"description":"Absent: the live assignment of the operator asking.","format":"int64","type":["integer","null"]}},"title":"PickAssignmentGetInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"pick_assignment_get","params":{"data":{"assignment_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"assignment":{"anyOf":[{"$ref":"#/components/schemas/PickAssignmentView"},{"type":"null"}],"description":"`None`: the operator has no live assignment."}},"title":"PickAssignmentGetResult","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"assignment":{"allowed_actions":[],"assignment_id":1,"code":"<code>","positions_bound":1,"positions_total":1,"status":"Picking","step":{"kind":null,"order_id":null,"order_number":null,"planned_target_kind":null,"position_no":null},"version":1,"work_area_id":1}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#pick_assignment_dissolve":{"post":{"operationId":"pick_assignment_dissolve","summary":"Dissolve your own pick assignment; after its first commit with a supervisor's grant.","description":"Dissolve your own pick assignment; after its first commit with a supervisor's grant.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n**Versioned entities:** pick_assignment (id in data.assignment_id, version in data.expected_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[{"entity":"pick_assignment","id_field":"assignment_id","version_field":"expected_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"pick_assignment","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"pick_assignment_dissolve"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"description":"The operator dissolves the assignment they hold (RF): before the first commit alone — after it, [`DissolveRefusal::SupervisorConfirmationRequired`] unless a supervisor's grant comes with it.","properties":{"assignment_id":{"format":"int64","type":"integer"},"expected_version":{"description":"`pick_assignment.version` as `pick_assignment_get` returned it.","format":"int32","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"},"override_grant_id":{"description":"A supervisor's grant (`supervisor_override_grant`) for `pick_override_codes::dissolve_after_commit(assignment_id)` — lets the holder dissolve after a commit (R14).","format":"uuid","type":["string","null"]}},"required":["assignment_id","expected_version","idempotency_key"],"title":"DissolvePickAssignment","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"pick_assignment_dissolve","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"assignment_id":1,"expected_version":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"assignment_id":{"format":"int64","type":"integer"},"authorized_by":{"description":"Who authorised a holder's dissolve after a commit (the grant's authorizer, read off the grant row — never from the request).","format":"int64","type":["integer","null"]},"boxes_off":{"description":"Boxes taken off the carrier, ascending.","items":{"format":"int64","type":"integer"},"type":"array"},"carrier_freed":{"description":"Nothing is left on the carrier: it is `Empty` again.","type":"boolean"},"code":{"type":"string"},"kept_positions":{"description":"`Bound` positions kept because their box holds goods, ascending.","items":{"format":"int16","type":"integer"},"type":"array"},"released_positions":{"description":"Positions `Released`, ascending.","items":{"format":"int16","type":"integer"},"type":"array"},"released_task_ids":{"description":"Tasks returned to the pool, ascending.","items":{"format":"int64","type":"integer"},"type":"array"},"rest_exception_ids":{"description":"The execution exceptions (`TargetLeftCart`) of the rests this dissolve repaired — targets whose rest could no longer be started as it stood (ruling D2), ascending. Empty in a result stored before the field existed.","items":{"format":"int64","type":"integer"},"type":"array"},"status":{"$ref":"#/components/schemas/PickAssignmentStatus"},"version":{"description":"The version after the dissolve.","format":"int32","type":"integer"}},"required":["assignment_id","boxes_off","carrier_freed","code","kept_positions","released_positions","released_task_ids","status","version"],"title":"DissolvePickAssignmentResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"assignment_id":1,"boxes_off":[1],"carrier_freed":false,"code":"<code>","kept_positions":[1],"released_positions":[1],"released_task_ids":[1],"status":"Picking","version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#pick_assignment_dissolve_supervised":{"post":{"operationId":"pick_assignment_dissolve_supervised","summary":"Dissolve any live pick assignment as a supervisor, with a reason.","description":"Dissolve any live pick assignment as a supervisor, with a reason.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n**Versioned entities:** pick_assignment (id in data.assignment_id, version in data.expected_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[{"entity":"pick_assignment","id_field":"assignment_id","version_field":"expected_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"pick_assignment","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"pick_assignment_dissolve_supervised"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"description":"A supervisor dissolves any live assignment from the board, also after commits: boxes with goods stay on the carrier.","properties":{"assignment_id":{"format":"int64","type":"integer"},"expected_version":{"description":"`pick_assignment.version` as the board row showed it.","format":"int32","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"},"reason":{"description":"Why: written on every released task (`skip_reason`). Required.","type":"string"}},"required":["assignment_id","expected_version","idempotency_key","reason"],"title":"DissolvePickAssignmentSupervised","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"pick_assignment_dissolve_supervised","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"assignment_id":1,"expected_version":1,"reason":"<reason>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"assignment_id":{"format":"int64","type":"integer"},"authorized_by":{"description":"Who authorised a holder's dissolve after a commit (the grant's authorizer, read off the grant row — never from the request).","format":"int64","type":["integer","null"]},"boxes_off":{"description":"Boxes taken off the carrier, ascending.","items":{"format":"int64","type":"integer"},"type":"array"},"carrier_freed":{"description":"Nothing is left on the carrier: it is `Empty` again.","type":"boolean"},"code":{"type":"string"},"kept_positions":{"description":"`Bound` positions kept because their box holds goods, ascending.","items":{"format":"int16","type":"integer"},"type":"array"},"released_positions":{"description":"Positions `Released`, ascending.","items":{"format":"int16","type":"integer"},"type":"array"},"released_task_ids":{"description":"Tasks returned to the pool, ascending.","items":{"format":"int64","type":"integer"},"type":"array"},"rest_exception_ids":{"description":"The execution exceptions (`TargetLeftCart`) of the rests this dissolve repaired — targets whose rest could no longer be started as it stood (ruling D2), ascending. Empty in a result stored before the field existed.","items":{"format":"int64","type":"integer"},"type":"array"},"status":{"$ref":"#/components/schemas/PickAssignmentStatus"},"version":{"description":"The version after the dissolve.","format":"int32","type":"integer"}},"required":["assignment_id","boxes_off","carrier_freed","code","kept_positions","released_positions","released_task_ids","status","version"],"title":"DissolvePickAssignmentResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"assignment_id":1,"boxes_off":[1],"carrier_freed":false,"code":"<code>","kept_positions":[1],"released_positions":[1],"released_task_ids":[1],"status":"Picking","version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#pick_assignment_skip":{"post":{"operationId":"pick_assignment_skip","summary":"Skip a pick inside your pick assignment: it moves to the end of the route.","description":"Skip a pick inside your pick assignment: it moves to the end of the route.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"pick_assignment","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"pick_assignment_skip"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"description":"\"Not now — later on the route\" (spec C.8, C.11-3; R2). A `stateless_command`: the operator skips because of where they stand, not because of what the screen showed; no entity version.","properties":{"idempotency_key":{"format":"uuid","type":"string"},"task_id":{"format":"int64","type":"integer"},"whole_group":{"description":"The summary step's skip (slice 5 §7): every remaining place of the group the task's pick stands in. `false` (the default): this place alone — and then the field is not serialized, so the payload a key was minted for before the field existed hashes as it did.","type":"boolean"}},"required":["idempotency_key","task_id"],"title":"SkipInAssignment","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"pick_assignment_skip","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"task_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"The assignment after the skip: its new version and status (`Picking` once a route command ran — R3).","properties":{"assignment_id":{"format":"int64","type":"integer"},"skipped_task_ids":{"default":[],"description":"Every task whose stop was skipped, ascending: the named one alone, or with `whole_group` every place taken along. Empty in a result stored before the field existed.","items":{"format":"int64","type":"integer"},"type":"array"},"status":{"$ref":"#/components/schemas/PickAssignmentStatus"},"task_id":{"format":"int64","type":"integer"},"version":{"format":"int32","type":"integer"}},"required":["assignment_id","status","task_id","version"],"title":"SkipInAssignmentResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"assignment_id":1,"status":"Picking","task_id":1,"version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#pick_assignment_complete":{"post":{"operationId":"pick_assignment_complete","summary":"Deliver your pick assignment's carrier (or a carrier dissolved with goods) to its delivery location and complete it.","description":"Deliver your pick assignment's carrier (or a carrier dissolved with goods) to its delivery location and complete it.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"pick_assignment","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"pick_assignment_complete"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"description":"\"The carrier is delivered here\" (spec C.3 Завершение, C.6, ADR-091 §4.4; R11–R13). A `stateless_command`: a physical fact the operator reports, whatever the screen showed — no entity version.","properties":{"carrier_code":{"description":"A carrier dissolved with goods, scanned by any operator (R12). Absent: the caller's own live (or dissolved-with-goods) assignment.","type":["string","null"]},"idempotency_key":{"format":"uuid","type":"string"},"location_code":{"description":"The scanned delivery location. Required when the policy's completion is `ConfirmAtLocation`, or for a `Complete` cart a supervisor retargeted (`pick_destination_retarget`: the location it stood in died — it goes to the one they named); otherwise not read for `Complete` (finish in place).","type":["string","null"]}},"required":["idempotency_key"],"title":"CompletePickAssignment","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"pick_assignment_complete","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"assignment_id":{"format":"int64","type":"integer"},"boxes_off":{"description":"Empty boxes taken off the carrier, ascending.","items":{"format":"int64","type":"integer"},"type":"array"},"boxes_unloaded":{"description":"Boxes with goods detached from the carrier: roots at the delivery location, stock untouched (R12/R21), ascending.","items":{"format":"int64","type":"integer"},"type":"array"},"carrier_freed":{"description":"The carrier is `Empty` with no children — always `true` after a successful delivery (R12); kept as a field for the RF result.","type":"boolean"},"closed_positions":{"description":"Positions whose box holds goods: `Closed` (box and planned carton kept on the row as the record), ascending.","items":{"format":"int16","type":"integer"},"type":"array"},"code":{"type":"string"},"delivered_by":{"description":"Who delivered it: the caller — the holder, the operator who scanned a carrier dissolved with goods, or a supervisor on the holder's behalf (ruling D3). `None` in a result stored before the field existed.","format":"int64","type":["integer","null"]},"delivered_location":{"type":"string"},"moved":{"description":"The tree was moved (`false`: it already stood there, or `Complete`).","type":"boolean"},"released_positions":{"description":"Bound positions with an empty box: `Released`, the box off the carrier, ascending.","items":{"format":"int16","type":"integer"},"type":"array"},"status":{"allOf":[{"$ref":"#/components/schemas/PickAssignmentStatus"}],"description":"`Completed`, or `Dissolved` for a carrier dissolved with goods."},"version":{"description":"The version after the delivery.","format":"int32","type":"integer"}},"required":["assignment_id","boxes_off","boxes_unloaded","carrier_freed","closed_positions","code","delivered_location","moved","released_positions","status","version"],"title":"CompletePickAssignmentResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"assignment_id":1,"boxes_off":[1],"boxes_unloaded":[1],"carrier_freed":false,"closed_positions":[1],"code":"<code>","delivered_location":"<delivered_location>","moved":false,"released_positions":[1],"status":{},"version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#pick_assignment_position_close":{"post":{"operationId":"pick_assignment_position_close","summary":"Report the box at a position of your pick assignment full: it closes, the rest goes into new cartons.","description":"Report the box at a position of your pick assignment full: it closes, the rest goes into new cartons.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"pick_assignment","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"pick_assignment_position_close"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"comment":{"description":"Required when `reason_code` is `OTHER`.","type":["string","null"]},"idempotency_key":{"format":"uuid","type":"string"},"position_no":{"description":"The position whose box is full, as `pick_assignment_get` named it.","format":"int16","type":"integer"},"reason":{"$ref":"#/components/schemas/PositionCloseReason"},"reason_code":{"$ref":"#/components/schemas/CartonFullReason"}},"required":["idempotency_key","position_no","reason","reason_code"],"title":"ClosePickAssignmentPosition","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"pick_assignment_position_close","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"position_no":1,"reason":"CartonFull","reason_code":"MASTER_DATA_DIMENSIONS"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"already_reported":{"description":"The position was already closed full: nothing was written, the existing exception is answered (T9).","type":"boolean"},"assignment":{"allOf":[{"$ref":"#/components/schemas/PickAssignmentView"}],"description":"The assignment after the close: its version, status and next step."},"box_code":{"type":"string"},"error_code":{"description":"`RecoveryRequired`: why the repair failed.","type":["string","null"]},"exception_id":{"format":"int64","type":"integer"},"exception_status":{"$ref":"#/components/schemas/TargetExceptionStatus"},"left_picks":{"description":"Picks that left the assignment for the next one, ascending.","items":{"format":"int64","type":"integer"},"type":"array"},"new_targets":{"items":{"$ref":"#/components/schemas/NewTargetOutcome"},"type":"array"},"next_action":{"$ref":"#/components/schemas/OperatorAction"},"position_no":{"format":"int16","type":"integer"},"released_task_ids":{"description":"Tasks handed back to the pool, ascending.","items":{"format":"int64","type":"integer"},"type":"array"},"remaining_picks":{"description":"Picks still open on this carrier's route after the close.","format":"int16","type":"integer"},"resulting_plan_id":{"description":"`PlannedCarton`, resolved: the child plan of the repair.","format":"int64","type":["integer","null"]},"target_kind":{"$ref":"#/components/schemas/PickTargetKind"}},"required":["already_reported","assignment","box_code","exception_id","exception_status","left_picks","new_targets","next_action","position_no","released_task_ids","remaining_picks","target_kind"],"title":"ClosePickAssignmentPositionResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"already_reported":false,"assignment":{"allowed_actions":["BindPosition"],"assignment_id":1,"code":"<code>","positions_bound":1,"positions_total":1,"status":"Picking","step":{"kind":"BindPosition","order_id":1,"order_number":"<order_number>","planned_target_kind":null,"position_no":1},"version":1,"work_area_id":1},"box_code":"<box_code>","exception_id":1,"exception_status":"Reported","left_picks":[1],"new_targets":[{"picks":1,"target_kind":"PlannedCarton"}],"next_action":"BindNewBox","position_no":1,"released_task_ids":[1],"remaining_picks":1,"target_kind":"PlannedCarton"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#pick_assignment_position_hand_over":{"post":{"operationId":"pick_assignment_position_hand_over","summary":"Hand the picks of a full box whose repair failed over to recovery: they leave your carrier.","description":"Hand the picks of a full box whose repair failed over to recovery: they leave your carrier.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"pick_assignment","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"pick_assignment_position_hand_over"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"idempotency_key":{"format":"uuid","type":"string"},"position_no":{"description":"The position waiting for recovery, as the route's `RecoveryHandover` step named it.","format":"int16","type":"integer"}},"required":["idempotency_key","position_no"],"title":"HandOverPickAssignmentPosition","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"pick_assignment_position_hand_over","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"position_no":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"assignment":{"allOf":[{"$ref":"#/components/schemas/PickAssignmentView"}],"description":"The assignment after the hand-over: its version, status and next step."},"exception_id":{"format":"int64","type":"integer"},"left_picks":{"description":"Picks that left the assignment, ascending; empty on a repeat.","items":{"format":"int64","type":"integer"},"type":"array"},"position_no":{"format":"int16","type":"integer"},"released_task_ids":{"description":"Their tasks, back in the pool, ascending; empty on a repeat.","items":{"format":"int64","type":"integer"},"type":"array"}},"required":["assignment","exception_id","left_picks","position_no","released_task_ids"],"title":"HandOverPickAssignmentPositionResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"assignment":{"allowed_actions":["BindPosition"],"assignment_id":1,"code":"<code>","positions_bound":1,"positions_total":1,"status":"Picking","step":{"kind":"BindPosition","order_id":1,"order_number":"<order_number>","planned_target_kind":null,"position_no":1},"version":1,"work_area_id":1},"exception_id":1,"left_picks":[1],"position_no":1,"released_task_ids":[1]}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#pick_assignment_position_replace_container":{"post":{"operationId":"pick_assignment_position_replace_container","summary":"Replace the damaged box at a position of your pick assignment by a new box: the goods move into it.","description":"Replace the damaged box at a position of your pick assignment by a new box: the goods move into it.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"pick_assignment","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"pick_assignment_position_replace_container"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"idempotency_key":{"format":"uuid","type":"string"},"new_container_code":{"description":"The scanned new box (or, for a position planned as a disposable carton, that carton's own label).","type":"string"},"position_no":{"description":"The position whose box is damaged, as `pick_assignment_get` named it.","format":"int16","type":"integer"}},"required":["idempotency_key","new_container_code","position_no"],"title":"ReplacePickAssignmentContainer","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"pick_assignment_position_replace_container","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"new_container_code":"<new_container_code>","position_no":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"already_replaced":{"description":"The position was already bound to this box by a replacement: nothing was written, the recorded replacement is answered.","type":"boolean"},"assignment":{"allOf":[{"$ref":"#/components/schemas/PickAssignmentView"}],"description":"The assignment after the replacement: its version and next step."},"balances_moved":{"description":"Balance rows with stock that moved into the new box (0 on `already_replaced`: nothing moved this time).","format":"uint64","minimum":0,"type":"integer"},"damage_hold_id":{"format":"int64","type":["integer","null"]},"new_container_code":{"type":"string"},"old_container_code":{"type":"string"},"old_container_outcome":{"allOf":[{"$ref":"#/components/schemas/ReplacedContainerOutcome"}],"description":"`Disposed`: a disposable box, written off. `HeldDamaged`: a reusable box, back to `Empty` under a `Damaged` hold."},"position_no":{"format":"int16","type":"integer"},"replacement_id":{"format":"int64","type":"integer"}},"required":["already_replaced","assignment","balances_moved","new_container_code","old_container_code","old_container_outcome","position_no","replacement_id"],"title":"ReplacePickAssignmentContainerResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"already_replaced":false,"assignment":{"allowed_actions":["BindPosition"],"assignment_id":1,"code":"<code>","positions_bound":1,"positions_total":1,"status":"Picking","step":{"kind":"BindPosition","order_id":1,"order_number":"<order_number>","planned_target_kind":null,"position_no":1},"version":1,"work_area_id":1},"balances_moved":1,"new_container_code":"<new_container_code>","old_container_code":"<old_container_code>","old_container_outcome":{},"position_no":1,"replacement_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#cartonization_exception_retry":{"post":{"operationId":"cartonization_exception_retry","summary":"Retry the repair of a box-full exception that waits for recovery, as a supervisor.","description":"Retry the repair of a box-full exception that waits for recovery, as a supervisor.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"pick_assignment","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"cartonization_exception_retry"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"exception_id":{"description":"The exception, as the supervisor's list shows it.","format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"required":["exception_id","idempotency_key"],"title":"RetryCartonException","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"cartonization_exception_retry","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"exception_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"already_finished":{"description":"It was finished (`Resolved` or `Cancelled`) before this press: its result, nothing written.","type":"boolean"},"error_code":{"description":"`RecoveryRequired`: why the repair failed this time. `Cancelled`: why nothing was repaired (`CARTON_REPLAN_NOTHING_LEFT`).","type":["string","null"]},"exception_id":{"format":"int64","type":"integer"},"handed_over_picks":{"description":"Picks this retry took off a carrier first, ascending.","items":{"format":"int64","type":"integer"},"type":"array"},"new_cartons":{"description":"Resolved: the new planned cartons, each waiting whole for the next carrier (`position_no` empty).","items":{"$ref":"#/components/schemas/NewTargetOutcome"},"type":"array"},"released_task_ids":{"description":"Their tasks, `Seized` back to the pool, ascending.","items":{"format":"int64","type":"integer"},"type":"array"},"resulting_plan_id":{"description":"Resolved: the child plan of the repair.","format":"int64","type":["integer","null"]},"status":{"allOf":[{"$ref":"#/components/schemas/TargetExceptionStatus"}],"description":"`Resolved`, `RecoveryRequired` again, or `Cancelled` — nothing was left to repair."}},"required":["already_finished","exception_id","handed_over_picks","new_cartons","released_task_ids","status"],"title":"RetryCartonExceptionResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"already_finished":false,"exception_id":1,"handed_over_picks":[1],"new_cartons":[{"picks":1,"target_kind":"PlannedCarton"}],"released_task_ids":[1],"status":{}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#cartonization_exception_list":{"post":{"operationId":"cartonization_exception_list","summary":"List pick target execution exceptions (box full) for the supervisor, newest first.","description":"List pick target execution exceptions (box full) for the supervisor, newest first.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"pick_assignment","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"cartonization_exception_list"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"cartonization_exception_list"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/TargetExceptionRow"},"title":"Array_of_TargetExceptionRow","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"assignment_code":"<assignment_code>","assignment_id":1,"id":1,"kind":"<kind>","order_id":1,"order_number":"<order_number>","picks":1,"position_no":1,"reported_at":"<reported_at>","reported_by":1,"status":"<status>","target_kind":"<target_kind>"}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#pick_assignment_complete_supervised":{"post":{"operationId":"pick_assignment_complete_supervised","summary":"Deliver a pick assignment's carrier waiting for delivery (Delivering, or dissolved with goods) on its holder's behalf, as a supervisor.","description":"Deliver a pick assignment's carrier waiting for delivery (Delivering, or dissolved with goods) on its holder's behalf, as a supervisor.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n**Versioned entities:** pick_assignment (id in data.assignment_id, version in data.expected_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[{"entity":"pick_assignment","id_field":"assignment_id","version_field":"expected_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"pick_assignment","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"pick_assignment_complete_supervised"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"description":"A supervisor delivers a `Delivering` cart on its holder's behalf (ruling D3): the holder left the shift, is ill, or their account is gone, and the picked goods must still reach their location. So is a cart the supervisor dissolved with goods on its carrier (the only exit ruling D1 leaves a started cart). The carrier goes to the assignment's delivery location as the row has it — frozen at start, or retargeted by a supervisor (`pick_destination_retarget`) — with no scan; the policy's `Complete` finishes it where it stands, unless a supervisor retargeted it because that location died: then at the location they named. Recorded with the supervisor as `delivered_by` and on every journal row.\n\nA `stateful_command` on `pick_assignment.version` (`.claude/rules/api-versioning-and-idempotency.md`): the supervisor decides on what the board shows — a cart waiting for delivery, its location; had they seen the holder back on it, or another location, they would not press this. A stale version answers code 40 with the current state.","properties":{"assignment_id":{"format":"int64","type":"integer"},"expected_version":{"description":"`pick_assignment.version` as the board row showed it.","format":"int32","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"required":["assignment_id","expected_version","idempotency_key"],"title":"CompletePickAssignmentSupervised","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"pick_assignment_complete_supervised","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"assignment_id":1,"expected_version":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"assignment_id":{"format":"int64","type":"integer"},"boxes_off":{"description":"Empty boxes taken off the carrier, ascending.","items":{"format":"int64","type":"integer"},"type":"array"},"boxes_unloaded":{"description":"Boxes with goods detached from the carrier: roots at the delivery location, stock untouched (R12/R21), ascending.","items":{"format":"int64","type":"integer"},"type":"array"},"carrier_freed":{"description":"The carrier is `Empty` with no children — always `true` after a successful delivery (R12); kept as a field for the RF result.","type":"boolean"},"closed_positions":{"description":"Positions whose box holds goods: `Closed` (box and planned carton kept on the row as the record), ascending.","items":{"format":"int16","type":"integer"},"type":"array"},"code":{"type":"string"},"delivered_by":{"description":"Who delivered it: the caller — the holder, the operator who scanned a carrier dissolved with goods, or a supervisor on the holder's behalf (ruling D3). `None` in a result stored before the field existed.","format":"int64","type":["integer","null"]},"delivered_location":{"type":"string"},"moved":{"description":"The tree was moved (`false`: it already stood there, or `Complete`).","type":"boolean"},"released_positions":{"description":"Bound positions with an empty box: `Released`, the box off the carrier, ascending.","items":{"format":"int16","type":"integer"},"type":"array"},"status":{"allOf":[{"$ref":"#/components/schemas/PickAssignmentStatus"}],"description":"`Completed`, or `Dissolved` for a carrier dissolved with goods."},"version":{"description":"The version after the delivery.","format":"int32","type":"integer"}},"required":["assignment_id","boxes_off","boxes_unloaded","carrier_freed","closed_positions","code","delivered_location","moved","released_positions","status","version"],"title":"CompletePickAssignmentResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"assignment_id":1,"boxes_off":[1],"boxes_unloaded":[1],"carrier_freed":false,"closed_positions":[1],"code":"<code>","delivered_location":"<delivered_location>","moved":false,"released_positions":[1],"status":{},"version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#pick_destination_retarget":{"post":{"operationId":"pick_destination_retarget","summary":"Send the goods of a cart waiting for delivery or of a loaded pick pallet to another location when the frozen one no longer takes them, as a supervisor.","description":"Send the goods of a cart waiting for delivery or of a loaded pick pallet to another location when the frozen one no longer takes them, as a supervisor.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n**Versioned entities:** pick_assignment (id in data.assignment_id, version in data.expected_version); pick_drop (id in data.pick_drop_id, version in data.expected_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_version`, `expected_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[{"entity":"pick_assignment","id_field":"assignment_id","version_field":"expected_version"},{"entity":"pick_drop","id_field":"pick_drop_id","version_field":"expected_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"pick_assignment","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"pick_destination_retarget"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"description":"Wire command. Exactly one subject; `expected_version` is ITS version.","properties":{"assignment_id":{"description":"A cart waiting for delivery (`pick_assignment.id`): `Delivering`, or dissolved with goods on its carrier.","format":"int64","type":["integer","null"]},"expected_version":{"description":"The subject's version as the board showed it.","format":"int32","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"},"location_code":{"description":"The new destination.","type":"string"},"pick_drop_id":{"description":"A loaded open pick pallet's RECORD (`pick_drop.id`, the wire's `pick_drop_id` — not its container).","format":"int64","type":["integer","null"]},"reason":{"default":"","description":"Why — written on the journal row. Required: missing or blank is refused `RETARGET_REASON_REQUIRED`.","type":"string"}},"required":["expected_version","idempotency_key","location_code"],"title":"RetargetPickDestination","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"pick_destination_retarget","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"expected_version":1,"location_code":"<location_code>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"assignment_id":{"format":"int64","type":["integer","null"]},"from_location":{"description":"The destination it replaced — for a cart finished in place, the location its carrier stood in (`None`: it had none).","type":["string","null"]},"order_ids":{"default":[],"description":"The orders whose later pallets and carts now go to `to_location`, ascending.","items":{"format":"int64","type":"integer"},"type":"array"},"pick_drop_id":{"format":"int64","type":["integer","null"]},"retarget_id":{"description":"The journal row.","format":"int64","type":"integer"},"routed":{"description":"The router still waits there (`completion_capability` kept).","type":"boolean"},"to_location":{"type":"string"},"version":{"description":"The subject's version after the change.","format":"int32","type":"integer"}},"required":["retarget_id","routed","to_location","version"],"title":"RetargetPickDestinationResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"retarget_id":1,"routed":false,"to_location":"<to_location>","version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#pick_assignment_list":{"post":{"operationId":"pick_assignment_list","summary":"List pick assignments in any status for the supervisor's board, newest first.","description":"List pick assignments in any status for the supervisor's board, newest first.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"pick_assignment","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"pick_assignment_list"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"pick_assignment_list"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/PickAssignmentBoardRow"},"title":"Array_of_PickAssignmentBoardRow","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"assignee":1,"assignee_username":"<assignee_username>","awaits_delivery":false,"code":"<code>","created_at":"<created_at>","grouping_unit":"<grouping_unit>","id":1,"positions_bound":1,"positions_total":1,"status":"<status>","version":1,"work_area_code":"<work_area_code>","work_area_id":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#pick_assignment_board_get":{"post":{"operationId":"pick_assignment_board_get","summary":"Get one pick assignment as the board shows it, in any status.","description":"Get one pick assignment as the board shows it, in any status.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"pick_assignment","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"pick_assignment_board_get"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"pick_assignment_board_get","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"One assignment as the board lists it (`pick_assignment_board` view).","properties":{"assignee":{"format":"int64","type":"integer"},"assignee_name":{"type":["string","null"]},"assignee_username":{"type":"string"},"awaits_delivery":{"description":"The cart waits to be delivered: `Delivering`, or dissolved with a box still on its carrier and never delivered — what the supervisor's delivery and retarget act on (ruling R6).","type":"boolean"},"carrier_code":{"type":["string","null"]},"carrier_container_id":{"format":"int64","type":["integer","null"]},"code":{"type":"string"},"completed_at":{"default":null,"type":["string","null"]},"created_at":{"type":"string"},"delivery_location":{"description":"Where the cart goes — frozen at start, moved only by a retarget; `None` for a cart that never froze one.","type":["string","null"]},"dissolved_at":{"default":null,"type":["string","null"]},"grouping_unit":{"type":"string"},"id":{"format":"int64","type":"integer"},"positions_bound":{"description":"Positions holding a box now (Bound) or to the end (Closed).","format":"int32","type":"integer"},"positions_total":{"format":"int32","type":"integer"},"ready_at":{"default":null,"type":["string","null"]},"status":{"description":"`pick_assignment_status` as text.","type":"string"},"version":{"format":"int32","type":"integer"},"work_area_code":{"type":"string"},"work_area_id":{"format":"int64","type":"integer"}},"required":["assignee","assignee_username","awaits_delivery","code","created_at","grouping_unit","id","positions_bound","positions_total","status","version","work_area_code","work_area_id"],"title":"PickAssignmentBoardRow","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"assignee":1,"assignee_username":"<assignee_username>","awaits_delivery":false,"code":"<code>","created_at":"<created_at>","grouping_unit":"<grouping_unit>","id":1,"positions_bound":1,"positions_total":1,"status":"<status>","version":1,"work_area_code":"<work_area_code>","work_area_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#pick_assignment_position_list":{"post":{"operationId":"pick_assignment_position_list","summary":"List the positions of pick assignments (filter by assignment_id).","description":"List the positions of pick assignments (filter by assignment_id).\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"pick_assignment","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"pick_assignment_position_list"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"pick_assignment_position_list"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/PickAssignmentPositionBoardRow"},"title":"Array_of_PickAssignmentPositionBoardRow","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"assignment_id":1,"id":1,"order_id":1,"order_number":"<order_number>","planned_target_kind":"<planned_target_kind>","position_no":1,"status":"<status>"}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#pick_short_reason_create_draft":{"post":{"operationId":"pick_short_reason_create_draft","summary":"Create the next editable revision of a Pick-short reason.","description":"Create the next editable revision of a Pick-short reason.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"pick_short_reason","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"pick_short_reason_create_draft"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"actions":{"items":{"$ref":"#/components/schemas/PickShortActionDraft"},"type":"array"},"allow_partial":{"default":true,"type":"boolean"},"allow_zero":{"default":true,"type":"boolean"},"code":{"type":"string"},"description":{"type":"string"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"}},"required":["actions","code","description"],"title":"CreatePickShortReasonDraft","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"pick_short_reason_create_draft","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"actions":[{"action":"ReleaseCurrentRemainder"}],"code":"<code>","description":"<description>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"actions":{"items":{"$ref":"#/components/schemas/PickShortReasonAction"},"type":"array"},"reason":{"$ref":"#/components/schemas/PickShortReason"}},"required":["actions","reason"],"title":"PickShortReasonView","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"actions":[{"action":"ReleaseCurrentRemainder","add_when":"<add_when>","add_who":1,"enabled":false,"mod_when":"<mod_when>","mod_who":1,"reason_revision_id":1,"required":false,"supervisor_review":false}],"reason":{"add_when":"<add_when>","add_who":1,"allow_partial":false,"allow_zero":false,"code":"<code>","description":"<description>","id":1,"mod_when":"<mod_when>","mod_who":1,"revision_no":1,"status":"Draft","version":1}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#pick_short_reason_update_draft":{"post":{"operationId":"pick_short_reason_update_draft","summary":"Replace one Pick-short draft and its typed action set.","description":"Replace one Pick-short draft and its typed action set.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n**Versioned entities:** pick_short_reason (id in data.reason_id, version in data.expected_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[{"entity":"pick_short_reason","id_field":"reason_id","version_field":"expected_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"pick_short_reason","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"pick_short_reason_update_draft"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"actions":{"items":{"$ref":"#/components/schemas/PickShortActionDraft"},"type":"array"},"allow_partial":{"type":"boolean"},"allow_zero":{"type":"boolean"},"description":{"type":"string"},"expected_version":{"format":"int32","type":"integer"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"reason_id":{"format":"int64","type":"integer"}},"required":["actions","allow_partial","allow_zero","description","expected_version","reason_id"],"title":"UpdatePickShortReasonDraft","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"pick_short_reason_update_draft","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"actions":[{"action":"ReleaseCurrentRemainder"}],"allow_partial":false,"allow_zero":false,"description":"<description>","expected_version":1,"reason_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"actions":{"items":{"$ref":"#/components/schemas/PickShortReasonAction"},"type":"array"},"reason":{"$ref":"#/components/schemas/PickShortReason"}},"required":["actions","reason"],"title":"PickShortReasonView","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"actions":[{"action":"ReleaseCurrentRemainder","add_when":"<add_when>","add_who":1,"enabled":false,"mod_when":"<mod_when>","mod_who":1,"reason_revision_id":1,"required":false,"supervisor_review":false}],"reason":{"add_when":"<add_when>","add_who":1,"allow_partial":false,"allow_zero":false,"code":"<code>","description":"<description>","id":1,"mod_when":"<mod_when>","mod_who":1,"revision_no":1,"status":"Draft","version":1}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#pick_short_reason_publish":{"post":{"operationId":"pick_short_reason_publish","summary":"Validate and publish an immutable Pick-short reason revision.","description":"Validate and publish an immutable Pick-short reason revision.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n**Versioned entities:** pick_short_reason (id in data.reason_id, version in data.expected_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[{"entity":"pick_short_reason","id_field":"reason_id","version_field":"expected_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"pick_short_reason","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"pick_short_reason_publish"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"expected_version":{"format":"int32","type":"integer"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"reason_id":{"format":"int64","type":"integer"}},"required":["expected_version","reason_id"],"title":"PublishPickShortReason","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"pick_short_reason_publish","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"expected_version":1,"reason_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"actions":{"items":{"$ref":"#/components/schemas/PickShortReasonAction"},"type":"array"},"reason":{"$ref":"#/components/schemas/PickShortReason"}},"required":["actions","reason"],"title":"PickShortReasonView","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"actions":[{"action":"ReleaseCurrentRemainder","add_when":"<add_when>","add_who":1,"enabled":false,"mod_when":"<mod_when>","mod_who":1,"reason_revision_id":1,"required":false,"supervisor_review":false}],"reason":{"add_when":"<add_when>","add_who":1,"allow_partial":false,"allow_zero":false,"code":"<code>","description":"<description>","id":1,"mod_when":"<mod_when>","mod_who":1,"revision_no":1,"status":"Draft","version":1}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#pick_short_reason_retire":{"post":{"operationId":"pick_short_reason_retire","summary":"Retire a published Pick-short reason revision.","description":"Retire a published Pick-short reason revision.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n**Versioned entities:** pick_short_reason (id in data.reason_id, version in data.expected_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[{"entity":"pick_short_reason","id_field":"reason_id","version_field":"expected_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"pick_short_reason","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"pick_short_reason_retire"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"expected_version":{"format":"int32","type":"integer"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"reason_id":{"format":"int64","type":"integer"}},"required":["expected_version","reason_id"],"title":"RetirePickShortReason","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"pick_short_reason_retire","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"expected_version":1,"reason_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"actions":{"items":{"$ref":"#/components/schemas/PickShortReasonAction"},"type":"array"},"reason":{"$ref":"#/components/schemas/PickShortReason"}},"required":["actions","reason"],"title":"PickShortReasonView","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"actions":[{"action":"ReleaseCurrentRemainder","add_when":"<add_when>","add_who":1,"enabled":false,"mod_when":"<mod_when>","mod_who":1,"reason_revision_id":1,"required":false,"supervisor_review":false}],"reason":{"add_when":"<add_when>","add_who":1,"allow_partial":false,"allow_zero":false,"code":"<code>","description":"<description>","id":1,"mod_when":"<mod_when>","mod_who":1,"revision_no":1,"status":"Draft","version":1}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#pick_short_reason_get":{"post":{"operationId":"pick_short_reason_get","summary":"Get one Pick-short reason revision with actions.","description":"Get one Pick-short reason revision with actions.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"pick_short_reason","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"pick_short_reason_get"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"pick_short_reason_get","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"actions":{"items":{"$ref":"#/components/schemas/PickShortReasonAction"},"type":"array"},"reason":{"$ref":"#/components/schemas/PickShortReason"}},"required":["actions","reason"],"title":"PickShortReasonView","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"actions":[{"action":"ReleaseCurrentRemainder","add_when":"<add_when>","add_who":1,"enabled":false,"mod_when":"<mod_when>","mod_who":1,"reason_revision_id":1,"required":false,"supervisor_review":false}],"reason":{"add_when":"<add_when>","add_who":1,"allow_partial":false,"allow_zero":false,"code":"<code>","description":"<description>","id":1,"mod_when":"<mod_when>","mod_who":1,"revision_no":1,"status":"Draft","version":1}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#pick_short_reason_list":{"post":{"operationId":"pick_short_reason_list","summary":"List all Pick-short reason revisions with actions.","description":"List all Pick-short reason revisions with actions.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"pick_short_reason","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"pick_short_reason_list"},"params":{"type":"object","properties":{"data":{"title":"PickShortReasonListInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"pick_short_reason_list","params":{"data":{}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/PickShortReasonView"},"title":"Array_of_PickShortReasonView","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"actions":[{"action":null,"add_when":"<add_when>","add_who":1,"enabled":false,"mod_when":"<mod_when>","mod_who":1,"reason_revision_id":1,"required":false,"supervisor_review":false}],"reason":{"add_when":"<add_when>","add_who":1,"allow_partial":false,"allow_zero":false,"code":"<code>","description":"<description>","id":1,"mod_when":"<mod_when>","mod_who":1,"revision_no":1,"status":"Draft","version":1}}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_pick_short_reason_revision":{"post":{"operationId":"get_pick_short_reason_revision","summary":"Get a pick_short_reason_revision by ID — CRUD.","description":"Get a pick_short_reason_revision by ID — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"pick_short_reason","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_pick_short_reason_revision"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_pick_short_reason_revision","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"allow_partial":{"type":"boolean"},"allow_zero":{"type":"boolean"},"code":{"type":"string"},"description":{"type":"string"},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"published_at":{"default":null,"type":["string","null"]},"retired_at":{"default":null,"type":["string","null"]},"revision_no":{"format":"int32","type":"integer"},"status":{"$ref":"#/components/schemas/PickShortReasonStatus"},"version":{"format":"int32","type":"integer"}},"required":["add_when","add_who","allow_partial","allow_zero","code","description","id","mod_when","mod_who","revision_no","status","version"],"title":"PickShortReason","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"allow_partial":false,"allow_zero":false,"code":"<code>","description":"<description>","id":1,"mod_when":"<mod_when>","mod_who":1,"revision_no":1,"status":"Draft","version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_pick_short_reason_revision":{"post":{"operationId":"list_pick_short_reason_revision","summary":"List pick_short_reason_revision — CRUD.","description":"List pick_short_reason_revision — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"pick_short_reason","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_pick_short_reason_revision"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_pick_short_reason_revision"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/PickShortReason"},"title":"Array_of_PickShortReason","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"allow_partial":false,"allow_zero":false,"code":"<code>","description":"<description>","id":1,"mod_when":"<mod_when>","mod_who":1,"revision_no":1,"status":"Draft","version":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_pick_short_reason_revision":{"post":{"operationId":"count_pick_short_reason_revision","summary":"Count pick_short_reason_revision — CRUD.","description":"Count pick_short_reason_revision — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"pick_short_reason","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_pick_short_reason_revision"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_pick_short_reason_revision"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_pick_short_reason_action":{"post":{"operationId":"get_pick_short_reason_action","summary":"Get one Pick-short action by its metadata UI compound key.","description":"Get one Pick-short action by its metadata UI compound key.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"pick_short_reason","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_pick_short_reason_action"},"params":{"type":"object","properties":{"row_key":{"type":"string"}},"required":["row_key"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_pick_short_reason_action","params":{"row_key":"<row_key>"}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"title":"AnyValue"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":null}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_pick_short_reason_action":{"post":{"operationId":"list_pick_short_reason_action","summary":"List Pick-short actions as a metadata UI read projection.","description":"List Pick-short actions as a metadata UI read projection.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"pick_short_reason","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_pick_short_reason_action"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_pick_short_reason_action"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":true,"title":"Array_of_AnyValue","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_pick_short_reason_action":{"post":{"operationId":"count_pick_short_reason_action","summary":"Count pick_short_reason_action — CRUD.","description":"Count pick_short_reason_action — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"pick_short_reason","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_pick_short_reason_action"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_pick_short_reason_action"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#picking_policy_create_draft":{"post":{"operationId":"picking_policy_create_draft","summary":"Create the next editable revision of a picking policy.","description":"Create the next editable revision of a picking policy.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"picking_policy","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"picking_policy_create_draft"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"code":{"type":"string"},"description":{"type":"string"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"sections":{"anyOf":[{"$ref":"#/components/schemas/PickingPolicySections"},{"type":"null"}],"description":"`None`: a copy of the code's latest revision, `DISCRETE` for a new code."}},"required":["code","description"],"title":"CreatePickingPolicyDraft","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"picking_policy_create_draft","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"code":"<code>","description":"<description>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"On the wire the revision's columns sit at the top level, like every `get_<entity>`, because `generic_rpc_form_load` fills the web card from the top-level keys (wms-meta-ui 081).","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"carrier_required":{"type":"boolean"},"code":{"type":"string"},"completion":{"$ref":"#/components/schemas/PickingCompletion"},"deposit_mode":{"$ref":"#/components/schemas/PickingDepositMode"},"description":{"type":"string"},"grouping_unit":{"$ref":"#/components/schemas/PickingGroupingUnit"},"id":{"format":"int64","type":"integer"},"item_confirmation":{"$ref":"#/components/schemas/PickingItemConfirmation"},"loose_lot_confirmation":{"$ref":"#/components/schemas/PickingLooseLotConfirmation"},"lot_attribute_capture":{"$ref":"#/components/schemas/PickingLotAttributeCapture"},"max_targets":{"format":"int16","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"pallet_drop_suggestion":{"allOf":[{"$ref":"#/components/schemas/PickingPalletDropSuggestion"}],"description":"Where the suggested location for a closed pick pallet comes from."},"pallet_drop_types":{"description":"Location types (`LocType` labels) a closed discrete pick pallet may be put into (the pick-pallet wms-app migration, `chk_picking_policy_pallet_drop_types`). `text[]` like `putaway_step_criterion.values`; the domain parses the labels.","items":{"type":"string"},"type":"array"},"pick_to_zero":{"allOf":[{"$ref":"#/components/schemas/PickToZeroMode"}],"description":"What a full pick that leaves its source location holding no stock does (wms-app 111, count spec Appendices D and L)."},"published_at":{"default":null,"type":["string","null"]},"qty_confirmation":{"$ref":"#/components/schemas/PickingQtyConfirmation"},"reserved_lpn_confirmation":{"$ref":"#/components/schemas/PickingReservedLpnConfirmation"},"retired_at":{"default":null,"type":["string","null"]},"revision_no":{"format":"int32","type":"integer"},"sections":{"$ref":"#/components/schemas/PickingPolicySections"},"source_location_confirmation":{"$ref":"#/components/schemas/PickingSourceLocationConfirmation"},"status":{"$ref":"#/components/schemas/PickingPolicyStatus"},"target_binding":{"$ref":"#/components/schemas/PickingTargetBinding"},"target_confirmation":{"$ref":"#/components/schemas/PickingTargetConfirmation"},"version":{"format":"int32","type":"integer"}},"required":["add_when","add_who","carrier_required","code","completion","deposit_mode","description","grouping_unit","id","item_confirmation","loose_lot_confirmation","lot_attribute_capture","max_targets","mod_when","mod_who","pallet_drop_suggestion","pallet_drop_types","pick_to_zero","qty_confirmation","reserved_lpn_confirmation","revision_no","sections","source_location_confirmation","status","target_binding","target_confirmation","version"],"title":"PickingPolicyView","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"add_when":"<add_when>","add_who":1,"carrier_required":false,"code":"<code>","completion":"Complete","deposit_mode":"CollectToRoot","description":"<description>","grouping_unit":"Order","id":1,"item_confirmation":"DisplayOnly","loose_lot_confirmation":"NoConfirmation","lot_attribute_capture":"ScanOnly","max_targets":1,"mod_when":"<mod_when>","mod_who":1,"pallet_drop_suggestion":{},"pallet_drop_types":["<pallet_drop_types>"],"pick_to_zero":{},"qty_confirmation":"PerPick","reserved_lpn_confirmation":"DoNotConfirm","revision_no":1,"sections":{"carrier_required":false,"completion":"Complete","deposit_mode":"CollectToRoot","grouping_unit":"Order","item_confirmation":"DisplayOnly","loose_lot_confirmation":"NoConfirmation","lot_attribute_capture":"ScanOnly","max_targets":1,"pallet_drop_suggestion":{},"pallet_drop_types":["None"],"pick_to_zero":{},"qty_confirmation":"PerPick","reserved_lpn_confirmation":"DoNotConfirm","source_location_confirmation":{},"target_binding":"Unbound","target_confirmation":"ScanContainer"},"source_location_confirmation":"DisplayOnly","status":"Draft","target_binding":"Unbound","target_confirmation":"ScanContainer","version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#picking_policy_update_draft":{"post":{"operationId":"picking_policy_update_draft","summary":"Replace the description and sections of one picking-policy draft.","description":"Replace the description and sections of one picking-policy draft.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n**Versioned entities:** picking_policy (id in data.policy_id, version in data.expected_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[{"entity":"picking_policy","id_field":"policy_id","version_field":"expected_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"picking_policy","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"picking_policy_update_draft"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"description":"Every field is required on the wire: an update that left the pallet-drop list out would otherwise reset a narrowed list without a word, and one that left a Confirmation value out would loosen what the operator proves at the source. Only an assignment snapshot taken before those settings existed reads them as their defaults ([`PickingPolicySections::deserialize_snapshot`]).","properties":{"carrier_required":{"type":"boolean"},"completion":{"$ref":"#/components/schemas/PickingCompletion"},"deposit_mode":{"$ref":"#/components/schemas/PickingDepositMode"},"description":{"type":"string"},"expected_version":{"format":"int32","type":"integer"},"grouping_unit":{"$ref":"#/components/schemas/PickingGroupingUnit"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"item_confirmation":{"$ref":"#/components/schemas/PickingItemConfirmation"},"loose_lot_confirmation":{"$ref":"#/components/schemas/PickingLooseLotConfirmation"},"lot_attribute_capture":{"$ref":"#/components/schemas/PickingLotAttributeCapture"},"max_targets":{"format":"int16","type":"integer"},"pallet_drop_suggestion":{"allOf":[{"$ref":"#/components/schemas/PickingPalletDropSuggestion"}],"description":"Where the location suggested for a closed pallet comes from."},"pallet_drop_types":{"description":"The location types a closed discrete pick pallet may be put into (section «Завершение»): at least one, none twice, all from [`PALLET_DROP_ADMISSIBLE`], ordered as it is once saved.","items":{"$ref":"#/components/schemas/LocType"},"type":"array"},"pick_to_zero":{"allOf":[{"$ref":"#/components/schemas/PickToZeroMode"}],"description":"What a full pick that leaves its source location holding no stock does (section «Завершение»): nothing, count the location (count spec Appendix D, PICK_TO_ZERO) or ask the operator whether it is empty (Appendix L, ZERO_CONFIRMATION)."},"policy_id":{"format":"int64","type":"integer"},"qty_confirmation":{"$ref":"#/components/schemas/PickingQtyConfirmation"},"reserved_lpn_confirmation":{"$ref":"#/components/schemas/PickingReservedLpnConfirmation"},"source_location_confirmation":{"allOf":[{"$ref":"#/components/schemas/PickingSourceLocationConfirmation"}],"description":"Spec §7, section «Подтверждение»: what the operator proves at the source. Not part of the grouping shape (`shape_eq` ignores them)."},"target_binding":{"$ref":"#/components/schemas/PickingTargetBinding"},"target_confirmation":{"$ref":"#/components/schemas/PickingTargetConfirmation"}},"required":["carrier_required","completion","deposit_mode","description","expected_version","grouping_unit","item_confirmation","loose_lot_confirmation","lot_attribute_capture","max_targets","pallet_drop_suggestion","pallet_drop_types","pick_to_zero","policy_id","qty_confirmation","reserved_lpn_confirmation","source_location_confirmation","target_binding","target_confirmation"],"title":"UpdatePickingPolicyDraft","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"picking_policy_update_draft","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"carrier_required":false,"completion":"Complete","deposit_mode":"CollectToRoot","description":"<description>","expected_version":1,"grouping_unit":"Order","item_confirmation":"DisplayOnly","loose_lot_confirmation":"NoConfirmation","lot_attribute_capture":"ScanOnly","max_targets":1,"pallet_drop_suggestion":{},"pallet_drop_types":["None"],"pick_to_zero":{},"policy_id":1,"qty_confirmation":"PerPick","reserved_lpn_confirmation":"DoNotConfirm","source_location_confirmation":{},"target_binding":"Unbound","target_confirmation":"ScanContainer"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"On the wire the revision's columns sit at the top level, like every `get_<entity>`, because `generic_rpc_form_load` fills the web card from the top-level keys (wms-meta-ui 081).","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"carrier_required":{"type":"boolean"},"code":{"type":"string"},"completion":{"$ref":"#/components/schemas/PickingCompletion"},"deposit_mode":{"$ref":"#/components/schemas/PickingDepositMode"},"description":{"type":"string"},"grouping_unit":{"$ref":"#/components/schemas/PickingGroupingUnit"},"id":{"format":"int64","type":"integer"},"item_confirmation":{"$ref":"#/components/schemas/PickingItemConfirmation"},"loose_lot_confirmation":{"$ref":"#/components/schemas/PickingLooseLotConfirmation"},"lot_attribute_capture":{"$ref":"#/components/schemas/PickingLotAttributeCapture"},"max_targets":{"format":"int16","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"pallet_drop_suggestion":{"allOf":[{"$ref":"#/components/schemas/PickingPalletDropSuggestion"}],"description":"Where the suggested location for a closed pick pallet comes from."},"pallet_drop_types":{"description":"Location types (`LocType` labels) a closed discrete pick pallet may be put into (the pick-pallet wms-app migration, `chk_picking_policy_pallet_drop_types`). `text[]` like `putaway_step_criterion.values`; the domain parses the labels.","items":{"type":"string"},"type":"array"},"pick_to_zero":{"allOf":[{"$ref":"#/components/schemas/PickToZeroMode"}],"description":"What a full pick that leaves its source location holding no stock does (wms-app 111, count spec Appendices D and L)."},"published_at":{"default":null,"type":["string","null"]},"qty_confirmation":{"$ref":"#/components/schemas/PickingQtyConfirmation"},"reserved_lpn_confirmation":{"$ref":"#/components/schemas/PickingReservedLpnConfirmation"},"retired_at":{"default":null,"type":["string","null"]},"revision_no":{"format":"int32","type":"integer"},"sections":{"$ref":"#/components/schemas/PickingPolicySections"},"source_location_confirmation":{"$ref":"#/components/schemas/PickingSourceLocationConfirmation"},"status":{"$ref":"#/components/schemas/PickingPolicyStatus"},"target_binding":{"$ref":"#/components/schemas/PickingTargetBinding"},"target_confirmation":{"$ref":"#/components/schemas/PickingTargetConfirmation"},"version":{"format":"int32","type":"integer"}},"required":["add_when","add_who","carrier_required","code","completion","deposit_mode","description","grouping_unit","id","item_confirmation","loose_lot_confirmation","lot_attribute_capture","max_targets","mod_when","mod_who","pallet_drop_suggestion","pallet_drop_types","pick_to_zero","qty_confirmation","reserved_lpn_confirmation","revision_no","sections","source_location_confirmation","status","target_binding","target_confirmation","version"],"title":"PickingPolicyView","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"add_when":"<add_when>","add_who":1,"carrier_required":false,"code":"<code>","completion":"Complete","deposit_mode":"CollectToRoot","description":"<description>","grouping_unit":"Order","id":1,"item_confirmation":"DisplayOnly","loose_lot_confirmation":"NoConfirmation","lot_attribute_capture":"ScanOnly","max_targets":1,"mod_when":"<mod_when>","mod_who":1,"pallet_drop_suggestion":{},"pallet_drop_types":["<pallet_drop_types>"],"pick_to_zero":{},"qty_confirmation":"PerPick","reserved_lpn_confirmation":"DoNotConfirm","revision_no":1,"sections":{"carrier_required":false,"completion":"Complete","deposit_mode":"CollectToRoot","grouping_unit":"Order","item_confirmation":"DisplayOnly","loose_lot_confirmation":"NoConfirmation","lot_attribute_capture":"ScanOnly","max_targets":1,"pallet_drop_suggestion":{},"pallet_drop_types":["None"],"pick_to_zero":{},"qty_confirmation":"PerPick","reserved_lpn_confirmation":"DoNotConfirm","source_location_confirmation":{},"target_binding":"Unbound","target_confirmation":"ScanContainer"},"source_location_confirmation":"DisplayOnly","status":"Draft","target_binding":"Unbound","target_confirmation":"ScanContainer","version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#picking_policy_publish":{"post":{"operationId":"picking_policy_publish","summary":"Validate and publish a picking-policy revision, retiring the previous one.","description":"Validate and publish a picking-policy revision, retiring the previous one.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n**Versioned entities:** picking_policy (id in data.policy_id, version in data.expected_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[{"entity":"picking_policy","id_field":"policy_id","version_field":"expected_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"picking_policy","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"picking_policy_publish"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"expected_version":{"format":"int32","type":"integer"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"policy_id":{"format":"int64","type":"integer"}},"required":["expected_version","policy_id"],"title":"PublishPickingPolicy","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"picking_policy_publish","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"expected_version":1,"policy_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"On the wire the revision's columns sit at the top level, like every `get_<entity>`, because `generic_rpc_form_load` fills the web card from the top-level keys (wms-meta-ui 081).","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"carrier_required":{"type":"boolean"},"code":{"type":"string"},"completion":{"$ref":"#/components/schemas/PickingCompletion"},"deposit_mode":{"$ref":"#/components/schemas/PickingDepositMode"},"description":{"type":"string"},"grouping_unit":{"$ref":"#/components/schemas/PickingGroupingUnit"},"id":{"format":"int64","type":"integer"},"item_confirmation":{"$ref":"#/components/schemas/PickingItemConfirmation"},"loose_lot_confirmation":{"$ref":"#/components/schemas/PickingLooseLotConfirmation"},"lot_attribute_capture":{"$ref":"#/components/schemas/PickingLotAttributeCapture"},"max_targets":{"format":"int16","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"pallet_drop_suggestion":{"allOf":[{"$ref":"#/components/schemas/PickingPalletDropSuggestion"}],"description":"Where the suggested location for a closed pick pallet comes from."},"pallet_drop_types":{"description":"Location types (`LocType` labels) a closed discrete pick pallet may be put into (the pick-pallet wms-app migration, `chk_picking_policy_pallet_drop_types`). `text[]` like `putaway_step_criterion.values`; the domain parses the labels.","items":{"type":"string"},"type":"array"},"pick_to_zero":{"allOf":[{"$ref":"#/components/schemas/PickToZeroMode"}],"description":"What a full pick that leaves its source location holding no stock does (wms-app 111, count spec Appendices D and L)."},"published_at":{"default":null,"type":["string","null"]},"qty_confirmation":{"$ref":"#/components/schemas/PickingQtyConfirmation"},"reserved_lpn_confirmation":{"$ref":"#/components/schemas/PickingReservedLpnConfirmation"},"retired_at":{"default":null,"type":["string","null"]},"revision_no":{"format":"int32","type":"integer"},"sections":{"$ref":"#/components/schemas/PickingPolicySections"},"source_location_confirmation":{"$ref":"#/components/schemas/PickingSourceLocationConfirmation"},"status":{"$ref":"#/components/schemas/PickingPolicyStatus"},"target_binding":{"$ref":"#/components/schemas/PickingTargetBinding"},"target_confirmation":{"$ref":"#/components/schemas/PickingTargetConfirmation"},"version":{"format":"int32","type":"integer"}},"required":["add_when","add_who","carrier_required","code","completion","deposit_mode","description","grouping_unit","id","item_confirmation","loose_lot_confirmation","lot_attribute_capture","max_targets","mod_when","mod_who","pallet_drop_suggestion","pallet_drop_types","pick_to_zero","qty_confirmation","reserved_lpn_confirmation","revision_no","sections","source_location_confirmation","status","target_binding","target_confirmation","version"],"title":"PickingPolicyView","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"add_when":"<add_when>","add_who":1,"carrier_required":false,"code":"<code>","completion":"Complete","deposit_mode":"CollectToRoot","description":"<description>","grouping_unit":"Order","id":1,"item_confirmation":"DisplayOnly","loose_lot_confirmation":"NoConfirmation","lot_attribute_capture":"ScanOnly","max_targets":1,"mod_when":"<mod_when>","mod_who":1,"pallet_drop_suggestion":{},"pallet_drop_types":["<pallet_drop_types>"],"pick_to_zero":{},"qty_confirmation":"PerPick","reserved_lpn_confirmation":"DoNotConfirm","revision_no":1,"sections":{"carrier_required":false,"completion":"Complete","deposit_mode":"CollectToRoot","grouping_unit":"Order","item_confirmation":"DisplayOnly","loose_lot_confirmation":"NoConfirmation","lot_attribute_capture":"ScanOnly","max_targets":1,"pallet_drop_suggestion":{},"pallet_drop_types":["None"],"pick_to_zero":{},"qty_confirmation":"PerPick","reserved_lpn_confirmation":"DoNotConfirm","source_location_confirmation":{},"target_binding":"Unbound","target_confirmation":"ScanContainer"},"source_location_confirmation":"DisplayOnly","status":"Draft","target_binding":"Unbound","target_confirmation":"ScanContainer","version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#picking_policy_retire":{"post":{"operationId":"picking_policy_retire","summary":"Retire a published picking-policy revision no work area depends on.","description":"Retire a published picking-policy revision no work area depends on.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n**Versioned entities:** picking_policy (id in data.policy_id, version in data.expected_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[{"entity":"picking_policy","id_field":"policy_id","version_field":"expected_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"picking_policy","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"picking_policy_retire"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"expected_version":{"format":"int32","type":"integer"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"policy_id":{"format":"int64","type":"integer"}},"required":["expected_version","policy_id"],"title":"RetirePickingPolicy","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"picking_policy_retire","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"expected_version":1,"policy_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"On the wire the revision's columns sit at the top level, like every `get_<entity>`, because `generic_rpc_form_load` fills the web card from the top-level keys (wms-meta-ui 081).","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"carrier_required":{"type":"boolean"},"code":{"type":"string"},"completion":{"$ref":"#/components/schemas/PickingCompletion"},"deposit_mode":{"$ref":"#/components/schemas/PickingDepositMode"},"description":{"type":"string"},"grouping_unit":{"$ref":"#/components/schemas/PickingGroupingUnit"},"id":{"format":"int64","type":"integer"},"item_confirmation":{"$ref":"#/components/schemas/PickingItemConfirmation"},"loose_lot_confirmation":{"$ref":"#/components/schemas/PickingLooseLotConfirmation"},"lot_attribute_capture":{"$ref":"#/components/schemas/PickingLotAttributeCapture"},"max_targets":{"format":"int16","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"pallet_drop_suggestion":{"allOf":[{"$ref":"#/components/schemas/PickingPalletDropSuggestion"}],"description":"Where the suggested location for a closed pick pallet comes from."},"pallet_drop_types":{"description":"Location types (`LocType` labels) a closed discrete pick pallet may be put into (the pick-pallet wms-app migration, `chk_picking_policy_pallet_drop_types`). `text[]` like `putaway_step_criterion.values`; the domain parses the labels.","items":{"type":"string"},"type":"array"},"pick_to_zero":{"allOf":[{"$ref":"#/components/schemas/PickToZeroMode"}],"description":"What a full pick that leaves its source location holding no stock does (wms-app 111, count spec Appendices D and L)."},"published_at":{"default":null,"type":["string","null"]},"qty_confirmation":{"$ref":"#/components/schemas/PickingQtyConfirmation"},"reserved_lpn_confirmation":{"$ref":"#/components/schemas/PickingReservedLpnConfirmation"},"retired_at":{"default":null,"type":["string","null"]},"revision_no":{"format":"int32","type":"integer"},"sections":{"$ref":"#/components/schemas/PickingPolicySections"},"source_location_confirmation":{"$ref":"#/components/schemas/PickingSourceLocationConfirmation"},"status":{"$ref":"#/components/schemas/PickingPolicyStatus"},"target_binding":{"$ref":"#/components/schemas/PickingTargetBinding"},"target_confirmation":{"$ref":"#/components/schemas/PickingTargetConfirmation"},"version":{"format":"int32","type":"integer"}},"required":["add_when","add_who","carrier_required","code","completion","deposit_mode","description","grouping_unit","id","item_confirmation","loose_lot_confirmation","lot_attribute_capture","max_targets","mod_when","mod_who","pallet_drop_suggestion","pallet_drop_types","pick_to_zero","qty_confirmation","reserved_lpn_confirmation","revision_no","sections","source_location_confirmation","status","target_binding","target_confirmation","version"],"title":"PickingPolicyView","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"add_when":"<add_when>","add_who":1,"carrier_required":false,"code":"<code>","completion":"Complete","deposit_mode":"CollectToRoot","description":"<description>","grouping_unit":"Order","id":1,"item_confirmation":"DisplayOnly","loose_lot_confirmation":"NoConfirmation","lot_attribute_capture":"ScanOnly","max_targets":1,"mod_when":"<mod_when>","mod_who":1,"pallet_drop_suggestion":{},"pallet_drop_types":["<pallet_drop_types>"],"pick_to_zero":{},"qty_confirmation":"PerPick","reserved_lpn_confirmation":"DoNotConfirm","revision_no":1,"sections":{"carrier_required":false,"completion":"Complete","deposit_mode":"CollectToRoot","grouping_unit":"Order","item_confirmation":"DisplayOnly","loose_lot_confirmation":"NoConfirmation","lot_attribute_capture":"ScanOnly","max_targets":1,"pallet_drop_suggestion":{},"pallet_drop_types":["None"],"pick_to_zero":{},"qty_confirmation":"PerPick","reserved_lpn_confirmation":"DoNotConfirm","source_location_confirmation":{},"target_binding":"Unbound","target_confirmation":"ScanContainer"},"source_location_confirmation":"DisplayOnly","status":"Draft","target_binding":"Unbound","target_confirmation":"ScanContainer","version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#work_area_assign_picking_policy":{"post":{"operationId":"work_area_assign_picking_policy","summary":"Point a work area at a published picking policy (none: DISCRETE).","description":"Point a work area at a published picking policy (none: DISCRETE).\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"picking_policy","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"work_area_assign_picking_policy"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"code":{"description":"`None`: the area works by `DISCRETE`.","type":["string","null"]},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"work_area_id":{"format":"int64","type":"integer"}},"required":["work_area_id"],"title":"AssignPickingPolicyToWorkArea","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"work_area_assign_picking_policy","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"work_area_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"What an area works by: its assigned code (`None` = no assignment) and the published revision that code resolves to right now.","properties":{"code":{"type":["string","null"]},"resolved":{"$ref":"#/components/schemas/PickingPolicy"},"work_area_id":{"format":"int64","type":"integer"}},"required":["resolved","work_area_id"],"title":"WorkAreaPolicyView","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"resolved":{"add_when":"<add_when>","add_who":1,"carrier_required":false,"code":"<code>","completion":"Complete","deposit_mode":"CollectToRoot","description":"<description>","grouping_unit":"Order","id":1,"item_confirmation":"DisplayOnly","loose_lot_confirmation":"NoConfirmation","lot_attribute_capture":"ScanOnly","max_targets":1,"mod_when":"<mod_when>","mod_who":1,"pallet_drop_suggestion":{},"pallet_drop_types":["<pallet_drop_types>"],"pick_to_zero":{},"qty_confirmation":"PerPick","reserved_lpn_confirmation":"DoNotConfirm","revision_no":1,"source_location_confirmation":"DisplayOnly","status":"Draft","target_binding":"Unbound","target_confirmation":"ScanContainer","version":1},"work_area_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#work_area_equipment_policy_create":{"post":{"operationId":"work_area_equipment_policy_create","summary":"Name the picking policy a work area works by for one equipment profile.","description":"Name the picking policy a work area works by for one equipment profile.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"picking_policy","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"work_area_equipment_policy_create"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"code":{"description":"A code with a published revision; `DISCRETE` is a legitimate answer (\"on foot in a cart area picks discretely\").","type":"string"},"equipment_profile_id":{"format":"int64","type":"integer"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"},"work_area_id":{"format":"int64","type":"integer"}},"required":["code","equipment_profile_id","work_area_id"],"title":"CreateWorkAreaEquipmentPolicy","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"work_area_equipment_policy_create","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"code":"<code>","equipment_profile_id":1,"work_area_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"The stored row.","properties":{"equipment_profile_id":{"format":"int64","type":"integer"},"id":{"format":"int64","type":"integer"},"picking_policy_code":{"type":"string"},"work_area_id":{"format":"int64","type":"integer"}},"required":["equipment_profile_id","id","picking_policy_code","work_area_id"],"title":"WorkAreaPickingPolicy","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"equipment_profile_id":1,"id":1,"picking_policy_code":"<picking_policy_code>","work_area_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#work_area_equipment_policy_update":{"post":{"operationId":"work_area_equipment_policy_update","summary":"Point a work area's equipment-profile row at another published picking policy.","description":"Point a work area's equipment-profile row at another published picking policy.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"picking_policy","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"work_area_equipment_policy_update"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"code":{"type":"string"},"id":{"description":"The row (`work_area_picking_policy.id`).","format":"int64","type":"integer"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"}},"required":["code","id"],"title":"ChangeWorkAreaEquipmentPolicy","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"work_area_equipment_policy_update","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"code":"<code>","id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"The stored row.","properties":{"equipment_profile_id":{"format":"int64","type":"integer"},"id":{"format":"int64","type":"integer"},"picking_policy_code":{"type":"string"},"work_area_id":{"format":"int64","type":"integer"}},"required":["equipment_profile_id","id","picking_policy_code","work_area_id"],"title":"WorkAreaPickingPolicy","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"equipment_profile_id":1,"id":1,"picking_policy_code":"<picking_policy_code>","work_area_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#work_area_equipment_policy_delete":{"post":{"operationId":"work_area_equipment_policy_delete","summary":"Remove a work area's policy for one equipment profile (back to the area default).","description":"Remove a work area's policy for one equipment profile (back to the area default).\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"picking_policy","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"work_area_equipment_policy_delete"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"id":{"format":"int64","type":"integer"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","format":"uuid","type":"string"}},"required":["id"],"title":"RemoveWorkAreaEquipmentPolicy","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"work_area_equipment_policy_delete","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"The stored row.","properties":{"equipment_profile_id":{"format":"int64","type":"integer"},"id":{"format":"int64","type":"integer"},"picking_policy_code":{"type":"string"},"work_area_id":{"format":"int64","type":"integer"}},"required":["equipment_profile_id","id","picking_policy_code","work_area_id"],"title":"WorkAreaPickingPolicy","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"equipment_profile_id":1,"id":1,"picking_policy_code":"<picking_policy_code>","work_area_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#picking_policy_get":{"post":{"operationId":"picking_policy_get","summary":"Get one picking-policy revision with its sections.","description":"Get one picking-policy revision with its sections.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"picking_policy","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"picking_policy_get"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"picking_policy_get","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"On the wire the revision's columns sit at the top level, like every `get_<entity>`, because `generic_rpc_form_load` fills the web card from the top-level keys (wms-meta-ui 081).","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"carrier_required":{"type":"boolean"},"code":{"type":"string"},"completion":{"$ref":"#/components/schemas/PickingCompletion"},"deposit_mode":{"$ref":"#/components/schemas/PickingDepositMode"},"description":{"type":"string"},"grouping_unit":{"$ref":"#/components/schemas/PickingGroupingUnit"},"id":{"format":"int64","type":"integer"},"item_confirmation":{"$ref":"#/components/schemas/PickingItemConfirmation"},"loose_lot_confirmation":{"$ref":"#/components/schemas/PickingLooseLotConfirmation"},"lot_attribute_capture":{"$ref":"#/components/schemas/PickingLotAttributeCapture"},"max_targets":{"format":"int16","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"pallet_drop_suggestion":{"allOf":[{"$ref":"#/components/schemas/PickingPalletDropSuggestion"}],"description":"Where the suggested location for a closed pick pallet comes from."},"pallet_drop_types":{"description":"Location types (`LocType` labels) a closed discrete pick pallet may be put into (the pick-pallet wms-app migration, `chk_picking_policy_pallet_drop_types`). `text[]` like `putaway_step_criterion.values`; the domain parses the labels.","items":{"type":"string"},"type":"array"},"pick_to_zero":{"allOf":[{"$ref":"#/components/schemas/PickToZeroMode"}],"description":"What a full pick that leaves its source location holding no stock does (wms-app 111, count spec Appendices D and L)."},"published_at":{"default":null,"type":["string","null"]},"qty_confirmation":{"$ref":"#/components/schemas/PickingQtyConfirmation"},"reserved_lpn_confirmation":{"$ref":"#/components/schemas/PickingReservedLpnConfirmation"},"retired_at":{"default":null,"type":["string","null"]},"revision_no":{"format":"int32","type":"integer"},"sections":{"$ref":"#/components/schemas/PickingPolicySections"},"source_location_confirmation":{"$ref":"#/components/schemas/PickingSourceLocationConfirmation"},"status":{"$ref":"#/components/schemas/PickingPolicyStatus"},"target_binding":{"$ref":"#/components/schemas/PickingTargetBinding"},"target_confirmation":{"$ref":"#/components/schemas/PickingTargetConfirmation"},"version":{"format":"int32","type":"integer"}},"required":["add_when","add_who","carrier_required","code","completion","deposit_mode","description","grouping_unit","id","item_confirmation","loose_lot_confirmation","lot_attribute_capture","max_targets","mod_when","mod_who","pallet_drop_suggestion","pallet_drop_types","pick_to_zero","qty_confirmation","reserved_lpn_confirmation","revision_no","sections","source_location_confirmation","status","target_binding","target_confirmation","version"],"title":"PickingPolicyView","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"carrier_required":false,"code":"<code>","completion":"Complete","deposit_mode":"CollectToRoot","description":"<description>","grouping_unit":"Order","id":1,"item_confirmation":"DisplayOnly","loose_lot_confirmation":"NoConfirmation","lot_attribute_capture":"ScanOnly","max_targets":1,"mod_when":"<mod_when>","mod_who":1,"pallet_drop_suggestion":{},"pallet_drop_types":["<pallet_drop_types>"],"pick_to_zero":{},"qty_confirmation":"PerPick","reserved_lpn_confirmation":"DoNotConfirm","revision_no":1,"sections":{"carrier_required":false,"completion":"Complete","deposit_mode":"CollectToRoot","grouping_unit":"Order","item_confirmation":"DisplayOnly","loose_lot_confirmation":"NoConfirmation","lot_attribute_capture":"ScanOnly","max_targets":1,"pallet_drop_suggestion":{},"pallet_drop_types":["None"],"pick_to_zero":{},"qty_confirmation":"PerPick","reserved_lpn_confirmation":"DoNotConfirm","source_location_confirmation":{},"target_binding":"Unbound","target_confirmation":"ScanContainer"},"source_location_confirmation":"DisplayOnly","status":"Draft","target_binding":"Unbound","target_confirmation":"ScanContainer","version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#picking_policy_list":{"post":{"operationId":"picking_policy_list","summary":"List picking-policy revisions, filtered like any list (by status, code).","description":"List picking-policy revisions, filtered like any list (by status, code).\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"picking_policy","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"picking_policy_list"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"picking_policy_list"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/PickingPolicy"},"title":"Array_of_PickingPolicy","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"carrier_required":false,"code":"<code>","completion":"Complete","deposit_mode":"CollectToRoot","description":"<description>","grouping_unit":"Order","id":1,"item_confirmation":"DisplayOnly","loose_lot_confirmation":"NoConfirmation","lot_attribute_capture":"ScanOnly","max_targets":1,"mod_when":"<mod_when>","mod_who":1,"pallet_drop_suggestion":{},"pallet_drop_types":["<pallet_drop_types>"],"pick_to_zero":{},"qty_confirmation":"PerPick","reserved_lpn_confirmation":"DoNotConfirm","revision_no":1,"source_location_confirmation":"DisplayOnly","status":"Draft","target_binding":"Unbound","target_confirmation":"ScanContainer","version":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#work_area_equipment_policy_list":{"post":{"operationId":"work_area_equipment_policy_list","summary":"List work areas' picking policies by equipment profile (filter by work_area_id).","description":"List work areas' picking policies by equipment profile (filter by work_area_id).\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"picking_policy","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"work_area_equipment_policy_list"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"work_area_equipment_policy_list"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/WorkAreaPickingPolicyRow"},"title":"Array_of_WorkAreaPickingPolicyRow","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"equipment_profile_code":"<equipment_profile_code>","equipment_profile_id":1,"id":1,"picking_policy_code":"<picking_policy_code>","work_area_id":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#packing_queue_list":{"post":{"operationId":"packing_queue_list","summary":"List the units waiting to be packed at a pack station, oldest first.","description":"List the units waiting to be packed at a pack station, oldest first.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"packing","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"packing_queue_list"},"params":{"type":"object","properties":{"data":{"properties":{"limit":{"default":null,"description":"At most this many units; absent — 50, never more than 200.","format":"int64","type":["integer","null"]},"station":{"description":"The pack station's location code (scanned or chosen).","type":"string"}},"required":["station"],"title":"PackingQueueListInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"packing_queue_list","params":{"data":{"station":"<station>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"What waits at a station.","properties":{"capability":{"$ref":"#/components/schemas/FlowCapability"},"station":{"description":"The station's location code, as stored.","type":"string"},"units":{"description":"Oldest first.","items":{"$ref":"#/components/schemas/StationQueueRow"},"type":"array"}},"required":["capability","station","units"],"title":"StationQueue","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"capability":"Pack","station":"<station>","units":[{"created_at":"<created_at>","order_id":1,"picks":1,"subject_container_id":1,"subject_kind":{},"unit_id":1,"version":1}]}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#packing_work_get":{"post":{"operationId":"packing_work_get","summary":"Read the station's view of one unit: its package, what it should and does hold, the weights.","description":"Read the station's view of one unit: its package, what it should and does hold, the weights.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"packing","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"packing_work_get"},"params":{"type":"object","properties":{"data":{"properties":{"carton_id":{"default":null,"description":"A pallet being repacked: the output carton of its job to show (`carton` and `carton_holds` of the answer).","format":"int64","type":["integer","null"]},"unit_id":{"description":"The router unit, as the station's queue named it.","format":"int64","type":"integer"}},"required":["unit_id"],"title":"PackingWorkGetInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"packing_work_get","params":{"data":{"unit_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"What the station shows for one unit.","properties":{"actual":{"description":"Inventory in the container's tree — what it holds.","items":{"$ref":"#/components/schemas/WorkLine"},"type":"array"},"carton":{"anyOf":[{"$ref":"#/components/schemas/PackingCarton"},{"type":"null"}],"description":"`Verify`: the obligation's live package, once opened. `Repack`: the output carton the view was asked for (`carton_id`)."},"carton_holds":{"description":"What `carton` holds: for a package under verification the unit's own container (`actual`); for an output carton, its tree.","items":{"$ref":"#/components/schemas/WorkLine"},"type":"array"},"container_code":{"type":"string"},"execution_expected_weight":{"description":"Σ unit weight × qty of the ACTUAL content + tare (§24.2); `None` when some item has no weight.","format":"double","type":["number","null"]},"expected":{"description":"The unit's picks, by item — what the package should hold.","items":{"$ref":"#/components/schemas/WorkLine"},"type":"array"},"job":{"anyOf":[{"$ref":"#/components/schemas/PackingJob"},{"type":"null"}],"description":"The order's live packing job, once the work was opened."},"obligation":{"anyOf":[{"$ref":"#/components/schemas/PackingObligation"},{"type":"null"}],"description":"What packing owes this unit, once the work was opened."},"open_cartons":{"description":"The job's open output cartons (`Repack`), oldest first.","items":{"$ref":"#/components/schemas/OpenOutputCarton"},"type":"array"},"order_number":{"type":"string"},"plan_expected_weight":{"description":"The planned gross weight, when the container is a carton of the order's live cartonization plan (§24.1). Shown for reference only: the MVP weight policy is `Record` (§24.3) — a close records the measured weight and compares nothing (B4-37).","format":"double","type":["number","null"]},"printer":{"anyOf":[{"$ref":"#/components/schemas/LabelPrinter"},{"type":"null"}],"description":"The printer the shipping label goes to unless the operator scans another: the station's ([`station_printer`]). `None` — no printer covers the station."},"tare_weight":{"format":"double","type":"number"},"unit":{"$ref":"#/components/schemas/OutboundFlowUnit"}},"required":["actual","carton_holds","container_code","expected","open_cartons","order_number","tare_weight","unit"],"title":"PackingWork","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"actual":[{"owner_id":1,"qty":1.5,"sku_code":"<sku_code>"}],"carton_holds":[{"owner_id":1,"qty":1.5,"sku_code":"<sku_code>"}],"container_code":"<container_code>","expected":[{"owner_id":1,"qty":1.5,"sku_code":"<sku_code>"}],"open_cartons":[{"carton_id":1,"container_code":"<container_code>","container_id":1,"version":1}],"order_number":"<order_number>","tare_weight":1.5,"unit":{"add_when":"<add_when>","add_who":1,"completed_normal_capabilities":["Pack"],"created_at":"<created_at>","id":1,"mod_when":"<mod_when>","mod_who":1,"next_capability":"Pack","status":"Pending","subject_container_id":1,"subject_kind":{},"version":1}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#packing_work_open":{"post":{"operationId":"packing_work_open","summary":"Open the packing work of a unit at a station, by its id or its container's label.","description":"Open the packing work of a unit at a station, by its id or its container's label.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"packing","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"packing_work_open"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"container_code":{"default":null,"description":"the label of the unit's container, as the operator scanned it at the station: the unit waiting there with it.","type":["string","null"]},"idempotency_key":{"format":"uuid","type":"string"},"station":{"description":"The station the operator works at.","type":"string"},"unit_id":{"default":null,"description":"The router unit, as the station's queue named it. Or:","format":"int64","type":["integer","null"]}},"required":["idempotency_key","station"],"title":"OpenPackingWork","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"packing_work_open","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"station":"<station>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"action":{"$ref":"#/components/schemas/PackingAction"},"already_open":{"description":"The work was open already: nothing new was written.","type":"boolean"},"carton_id":{"description":"`Verify`: the package under verification. `Repack`: `None` — the output cartons are opened by `packing_carton_open`.","format":"int64","type":["integer","null"]},"carton_version":{"description":"What `packing_carton_close` sends back as `expected_version`.","format":"int32","type":["integer","null"]},"job_id":{"format":"int64","type":"integer"},"job_version":{"format":"int32","type":"integer"},"obligation_id":{"format":"int64","type":"integer"},"obligation_version":{"description":"`Repack`: the obligation's version — what `packing_source_complete` sends back as `expected_version`.","format":"int32","type":"integer"},"unit_id":{"description":"The unit opened: what `packing_work_get` reads next.","format":"int64","type":"integer"}},"required":["action","already_open","job_id","job_version","obligation_id","obligation_version","unit_id"],"title":"OpenPackingWorkResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"action":"Repack","already_open":false,"job_id":1,"job_version":1,"obligation_id":1,"obligation_version":1,"unit_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#packing_carton_close":{"post":{"operationId":"packing_carton_close","summary":"Close a package or an output carton with its measured weight; prints its shipping label.","description":"Close a package or an output carton with its measured weight; prints its shipping label.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n**Versioned entities:** packing_carton (id in data.carton_id, version in data.expected_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[{"entity":"packing_carton","id_field":"carton_id","version_field":"expected_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"packing","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"packing_carton_close"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"carton_full":{"default":false,"description":"An output carton closed because it is physically full (§19).","type":"boolean"},"carton_id":{"format":"int64","type":"integer"},"expected_version":{"description":"`packing_carton.version` as the operator saw it.","format":"int32","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"},"measured_gross_weight":{"default":null,"description":"The scale's reading, in the owner's canonical weight UOM.","format":"double","type":["number","null"]},"printer_code":{"default":null,"description":"The printer the operator scanned for the shipping label (an active printer's code); absent — the station's printer.","type":["string","null"]}},"required":["carton_id","expected_version","idempotency_key"],"title":"ClosePackingCarton","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"packing_carton_close","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"carton_id":1,"expected_version":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"carton_id":{"format":"int64","type":"integer"},"carton_version":{"description":"The version after the close.","format":"int32","type":"integer"},"execution_expected_weight":{"format":"double","type":["number","null"]},"job_id":{"format":"int64","type":"integer"},"job_status":{"$ref":"#/components/schemas/PackingJobStatus"},"label_printer":{"anyOf":[{"$ref":"#/components/schemas/LabelPrinter"},{"type":"null"}],"description":"Where the shipping label is printed after the commit; `None` — no printer covers the station, no label."},"measured_gross_weight":{"format":"double","type":"number"},"obligation_status":{"anyOf":[{"$ref":"#/components/schemas/PackingObligationStatus"},{"type":"null"}],"description":"A package's obligation after the close; `None` for an output carton of `Repack` (its source's obligation is not touched, §11.4)."},"order_packed":{"description":"The close finished the order's packing (spec §14).","type":"boolean"},"unit_id":{"description":"The package's unit, or the unit the output carton released.","format":"int64","type":"integer"},"unit_next":{"allOf":[{"$ref":"#/components/schemas/FlowCapability"}],"description":"What the router sends the package to next (`None`: its flow is done)."},"unit_status":{"$ref":"#/components/schemas/FlowUnitStatus"},"weight_verdict":{"$ref":"#/components/schemas/PackingWeightVerdict"}},"required":["carton_id","carton_version","job_id","job_status","measured_gross_weight","order_packed","unit_id","unit_next","unit_status","weight_verdict"],"title":"ClosePackingCartonResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"carton_id":1,"carton_version":1,"job_id":1,"job_status":"Open","measured_gross_weight":1.5,"order_packed":false,"unit_id":1,"unit_next":{},"unit_status":"Pending","weight_verdict":"Recorded"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#packing_carton_void":{"post":{"operationId":"packing_carton_void","summary":"Void an open package; the unit keeps waiting to be packed.","description":"Void an open package; the unit keeps waiting to be packed.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n**Versioned entities:** packing_carton (id in data.carton_id, version in data.expected_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[{"entity":"packing_carton","id_field":"carton_id","version_field":"expected_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"packing","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"packing_carton_void"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"carton_id":{"format":"int64","type":"integer"},"expected_version":{"description":"`packing_carton.version` as the operator saw it.","format":"int32","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"required":["carton_id","expected_version","idempotency_key"],"title":"VoidPackingCarton","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"packing_carton_void","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"carton_id":1,"expected_version":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"carton_id":{"format":"int64","type":"integer"},"carton_status":{"$ref":"#/components/schemas/PackingCartonStatus"},"carton_version":{"description":"The version after the void.","format":"int32","type":"integer"},"job_id":{"format":"int64","type":"integer"}},"required":["carton_id","carton_status","carton_version","job_id"],"title":"VoidPackingCartonResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"carton_id":1,"carton_status":"Open","carton_version":1,"job_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#packing_carton_reopen":{"post":{"operationId":"packing_carton_reopen","summary":"Reopen a closed package with a supervisor's grant and a reason.","description":"Reopen a closed package with a supervisor's grant and a reason.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n**Versioned entities:** packing_carton (id in data.carton_id, version in data.expected_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[{"entity":"packing_carton","id_field":"carton_id","version_field":"expected_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"packing","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"packing_carton_reopen"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"carton_id":{"format":"int64","type":"integer"},"expected_version":{"description":"`packing_carton.version` as the operator saw it.","format":"int32","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"},"override_grant_id":{"description":"A supervisor's grant for `packing_override_codes::reopen_carton(carton_id)`.","format":"uuid","type":["string","null"]},"reason":{"description":"Why the package is reopened; journalled.","type":"string"}},"required":["carton_id","expected_version","idempotency_key","reason"],"title":"ReopenPackingCarton","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"packing_carton_reopen","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"carton_id":1,"expected_version":1,"reason":"<reason>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"authorized_by":{"description":"Who authorised the reopen (read off the grant, never the request).","format":"int64","type":"integer"},"carton_id":{"format":"int64","type":"integer"},"carton_status":{"$ref":"#/components/schemas/PackingCartonStatus"},"carton_version":{"description":"The version after the reopen.","format":"int32","type":"integer"},"job_id":{"format":"int64","type":"integer"},"job_reopened":{"description":"The job was `Packed` and is `Open` again (recovery, P-32).","type":"boolean"},"job_status":{"$ref":"#/components/schemas/PackingJobStatus"},"obligation_id":{"description":"A package's obligation; `None` for an output carton of `Repack`.","format":"int64","type":["integer","null"]},"obligation_status":{"anyOf":[{"$ref":"#/components/schemas/PackingObligationStatus"},{"type":"null"}]},"reopen_id":{"description":"The journal row.","format":"int64","type":"integer"},"unit_id":{"format":"int64","type":"integer"},"unit_next":{"allOf":[{"$ref":"#/components/schemas/FlowCapability"}],"description":"What the unit waits for now: `Pack` again."},"unit_status":{"$ref":"#/components/schemas/FlowUnitStatus"}},"required":["authorized_by","carton_id","carton_status","carton_version","job_id","job_reopened","job_status","reopen_id","unit_id","unit_next","unit_status"],"title":"ReopenPackingCartonResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"authorized_by":1,"carton_id":1,"carton_status":"Open","carton_version":1,"job_id":1,"job_reopened":false,"job_status":"Open","reopen_id":1,"unit_id":1,"unit_next":{},"unit_status":"Pending"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#packing_exception_report":{"post":{"operationId":"packing_exception_report","summary":"Report missing or unexpected goods in an open package; blocks the order's packing.","description":"Report missing or unexpected goods in an open package; blocks the order's packing.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"packing","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"packing_exception_report"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"carton_id":{"description":"The package the discrepancy was found in.","format":"int64","type":"integer"},"code":{"$ref":"#/components/schemas/PackingExceptionCode"},"idempotency_key":{"format":"uuid","type":"string"},"note":{"type":["string","null"]}},"required":["carton_id","code","idempotency_key"],"title":"ReportPackingException","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"packing_exception_report","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"carton_id":1,"code":"SourceShort"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"blocking":{"description":"The exception keeps the order from `Packed`.","type":"boolean"},"code":{"$ref":"#/components/schemas/PackingExceptionCode"},"exception_id":{"format":"int64","type":"integer"},"job_id":{"format":"int64","type":"integer"},"status":{"$ref":"#/components/schemas/PackingExceptionStatus"}},"required":["blocking","code","exception_id","job_id","status"],"title":"ReportPackingExceptionResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"blocking":false,"code":"SourceShort","exception_id":1,"job_id":1,"status":"Open"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#packing_carton_open":{"post":{"operationId":"packing_carton_open","summary":"Open the next output carton for a pallet being repacked, by the box's label.","description":"Open the next output carton for a pallet being repacked, by the box's label.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"packing","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"packing_carton_open"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"carton_code":{"description":"The label of the box, as the operator scanned it.","type":"string"},"idempotency_key":{"format":"uuid","type":"string"},"unit_id":{"description":"The pallet being repacked (its router unit, as the work was opened).","format":"int64","type":"integer"}},"required":["carton_code","idempotency_key","unit_id"],"title":"OpenPackingCarton","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"packing_carton_open","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"carton_code":"<carton_code>","unit_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"already_open":{"description":"This job had the box open already: nothing new was written.","type":"boolean"},"carton_id":{"format":"int64","type":"integer"},"carton_version":{"description":"What `packing_carton_close` / `_void` send back as `expected_version`.","format":"int32","type":"integer"},"container_code":{"type":"string"},"container_id":{"format":"int64","type":"integer"},"job_id":{"format":"int64","type":"integer"}},"required":["already_open","carton_id","carton_version","container_code","container_id","job_id"],"title":"OpenPackingCartonResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"already_open":false,"carton_id":1,"carton_version":1,"container_code":"<container_code>","container_id":1,"job_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#packing_add":{"post":{"operationId":"packing_add","summary":"Move picked goods from the pallet being repacked into an open output carton.","description":"Move picked goods from the pallet being repacked into an open output carton.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"packing","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"packing_add"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"carton_id":{"description":"The output carton the goods go into.","format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"},"lot":{"default":null,"description":"The lot, when the operator scanned it; needed only when the pallet holds the item in several.","type":["string","null"]},"qty":{"format":"double","type":"number"},"sku_code":{"type":"string"},"unit_id":{"description":"The pallet they come from (its router unit).","format":"int64","type":"integer"}},"required":["carton_id","idempotency_key","qty","sku_code","unit_id"],"title":"PackingAdd","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"packing_add","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"carton_id":1,"qty":1.5,"sku_code":"<sku_code>","unit_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"carton_id":{"format":"int64","type":"integer"},"carton_version":{"description":"The carton's version after the add: what `packing_carton_close` sends back.","format":"int32","type":"integer"},"lot":{"type":"string"},"qty":{"format":"double","type":"number"},"sku_code":{"type":"string"},"source_empty":{"description":"Nothing of the order is left on the pallet: the screen offers to complete the source (§11.4) — it never completes by itself.","type":"boolean"},"source_picked_left":{"description":"Picked stock of the order still on the pallet, all items together.","format":"double","type":"number"},"tran_id":{"description":"The journal row.","format":"int64","type":"integer"}},"required":["carton_id","carton_version","lot","qty","sku_code","source_empty","source_picked_left","tran_id"],"title":"PackingAddResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"carton_id":1,"carton_version":1,"lot":"<lot>","qty":1.5,"sku_code":"<sku_code>","source_empty":false,"source_picked_left":1.5,"tran_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#packing_remove":{"post":{"operationId":"packing_remove","summary":"Move picked goods out of an output carton: back onto its pallet or into another open carton.","description":"Move picked goods out of an output carton: back onto its pallet or into another open carton.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"packing","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"packing_remove"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"carton_id":{"description":"The output carton the goods come out of.","format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"},"lot":{"default":null,"description":"The lot, when the operator scanned it; needed only when the carton holds the item in several.","type":["string","null"]},"qty":{"format":"double","type":"number"},"sku_code":{"type":"string"},"to_carton_id":{"default":null,"description":"into this other open output carton of the order.","format":"int64","type":["integer","null"]},"to_unit_id":{"default":null,"description":"Back onto this pallet (its router unit) — or:","format":"int64","type":["integer","null"]}},"required":["carton_id","idempotency_key","qty","sku_code"],"title":"PackingRemove","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"packing_remove","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"carton_id":1,"qty":1.5,"sku_code":"<sku_code>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"carton_id":{"format":"int64","type":"integer"},"carton_version":{"description":"The carton's version after the remove.","format":"int32","type":"integer"},"lot":{"type":"string"},"qty":{"format":"double","type":"number"},"sku_code":{"type":"string"},"to_carton_id":{"description":"The target carton and its version, when the goods went into one.","format":"int64","type":["integer","null"]},"to_carton_version":{"format":"int32","type":["integer","null"]},"tran_id":{"description":"The journal row.","format":"int64","type":"integer"}},"required":["carton_id","carton_version","lot","qty","sku_code","tran_id"],"title":"PackingRemoveResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"carton_id":1,"carton_version":1,"lot":"<lot>","qty":1.5,"sku_code":"<sku_code>","tran_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#packing_source_complete":{"post":{"operationId":"packing_source_complete","summary":"Complete a repacked pallet: its obligation is satisfied and its router unit consumed.","description":"Complete a repacked pallet: its obligation is satisfied and its router unit consumed.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n**Versioned entities:** packing_obligation (id in data.obligation_id, version in data.expected_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[{"entity":"packing_obligation","id_field":"obligation_id","version_field":"expected_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"packing","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"packing_source_complete"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"expected_version":{"description":"`packing_obligation.version` as the operator saw it.","format":"int32","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"},"obligation_id":{"description":"The obligation over the pallet repacked, as `packing_work_open` answered it.","format":"int64","type":"integer"}},"required":["expected_version","idempotency_key","obligation_id"],"title":"CompletePackingSource","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"packing_source_complete","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"expected_version":1,"obligation_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"job_id":{"format":"int64","type":"integer"},"job_status":{"$ref":"#/components/schemas/PackingJobStatus"},"obligation_id":{"format":"int64","type":"integer"},"obligation_status":{"$ref":"#/components/schemas/PackingObligationStatus"},"obligation_version":{"description":"The version after the completion.","format":"int32","type":"integer"},"order_packed":{"description":"The completion finished the order's packing (spec §14).","type":"boolean"},"unit_id":{"format":"int64","type":"integer"},"unit_status":{"allOf":[{"$ref":"#/components/schemas/FlowUnitStatus"}],"description":"`Consumed`."}},"required":["job_id","job_status","obligation_id","obligation_status","obligation_version","order_packed","unit_id","unit_status"],"title":"CompletePackingSourceResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"job_id":1,"job_status":"Open","obligation_id":1,"obligation_status":"Open","obligation_version":1,"order_packed":false,"unit_id":1,"unit_status":{}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#packing_exception_list":{"post":{"operationId":"packing_exception_list","summary":"List the open packing exceptions that hold orders back, oldest first.","description":"List the open packing exceptions that hold orders back, oldest first.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"packing","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"packing_exception_list"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"packing_exception_list"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/OpenPackingException"},"title":"Array_of_OpenPackingException","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"code":"SourceShort","id":1,"order_id":1,"reported_at":"<reported_at>","reported_by":1,"station_location":"<station_location>","version":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#packing_exception_get":{"post":{"operationId":"packing_exception_get","summary":"Read one open packing exception, as the supervisor's card loads it.","description":"Read one open packing exception, as the supervisor's card loads it.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"packing","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"packing_exception_get"},"params":{"type":"object","properties":{"id":{"description":"The exception's id.","format":"int64","type":"integer"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"packing_exception_get","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"An open blocking exception as the supervisor's screen lists it ([`PackingExceptionBmc::open_blocking`]): what was reported, on which order, carton and station.","properties":{"carton_code":{"type":["string","null"]},"carton_id":{"format":"int64","type":["integer","null"]},"code":{"$ref":"#/components/schemas/PackingExceptionCode"},"id":{"format":"int64","type":"integer"},"note":{"type":["string","null"]},"order_id":{"format":"int64","type":"integer"},"order_number":{"type":["string","null"]},"reported_at":{"type":"string"},"reported_by":{"format":"int64","type":"integer"},"station_location":{"type":"string"},"version":{"format":"int32","type":"integer"}},"required":["code","id","order_id","reported_at","reported_by","station_location","version"],"title":"OpenPackingException","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"code":"SourceShort","id":1,"order_id":1,"reported_at":"<reported_at>","reported_by":1,"station_location":"<station_location>","version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#packing_exception_resolve":{"post":{"operationId":"packing_exception_resolve","summary":"Resolve an open packing exception after investigation; the order packs if nothing else holds it.","description":"Resolve an open packing exception after investigation; the order packs if nothing else holds it.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n**Versioned entities:** packing_exception (id in data.exception_id, version in data.expected_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[{"entity":"packing_exception","id_field":"exception_id","version_field":"expected_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"packing","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"packing_exception_resolve"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"exception_id":{"format":"int64","type":"integer"},"expected_version":{"description":"`packing_exception.version` as the supervisor saw it.","format":"int32","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"},"note":{"description":"What the supervisor writes about it; blank is none.","type":["string","null"]},"resolution":{"$ref":"#/components/schemas/PackingExceptionResolution"}},"required":["exception_id","expected_version","idempotency_key","resolution"],"title":"ResolvePackingException","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"packing_exception_resolve","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"exception_id":1,"expected_version":1,"resolution":"NoDiscrepancy"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"exception_id":{"format":"int64","type":"integer"},"job_status":{"$ref":"#/components/schemas/PackingJobStatus"},"order_id":{"format":"int64","type":"integer"},"order_packed":{"description":"The resolution was the last thing that held the order (spec §14).","type":"boolean"},"resolution":{"$ref":"#/components/schemas/PackingExceptionResolution"},"status":{"$ref":"#/components/schemas/PackingExceptionStatus"},"version":{"description":"The version after the resolution.","format":"int32","type":"integer"}},"required":["exception_id","job_status","order_id","order_packed","resolution","status","version"],"title":"ResolvePackingExceptionResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"exception_id":1,"job_status":"Open","order_id":1,"order_packed":false,"resolution":"NoDiscrepancy","status":"Open","version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#packing_exception_resolve_short":{"post":{"operationId":"packing_exception_resolve_short","summary":"Write a package's missing goods off to Lost and resolve its PACK_SOURCE_SHORT.","description":"Write a package's missing goods off to Lost and resolve its PACK_SOURCE_SHORT.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n**Versioned entities:** packing_exception (id in data.exception_id, version in data.expected_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[{"entity":"packing_exception","id_field":"exception_id","version_field":"expected_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"packing","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"packing_exception_resolve_short"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"exception_id":{"format":"int64","type":"integer"},"expected_version":{"description":"`packing_exception.version` as the supervisor saw it.","format":"int32","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"},"lot":{"default":"","type":"string"},"note":{"description":"What the supervisor writes about it; blank is none.","type":["string","null"]},"owner_id":{"description":"The item found missing: owner, SKU and lot — the lot left out is the stock without one (`\"\"`), as the web card sends a blank field …","format":"int64","type":"integer"},"qty":{"description":"… and how much of it, in base units.","format":"double","type":"number"},"reason_code":{"default":"PACK_SHORT","description":"The published short reason whose policy the remediation runs.","type":"string"},"sku_code":{"type":"string"}},"required":["exception_id","expected_version","idempotency_key","owner_id","qty","sku_code"],"title":"ResolvePackingSourceShort","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"packing_exception_resolve_short","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"exception_id":1,"expected_version":1,"owner_id":1,"qty":1.5,"sku_code":"<sku_code>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"carton_id":{"format":"int64","type":"integer"},"carton_status":{"allOf":[{"$ref":"#/components/schemas/PackingCartonStatus"}],"description":"`Open`; `Voided` when the short emptied it."},"carton_version":{"description":"The package's version after the write-off: what it holds changed.","format":"int32","type":"integer"},"exception_id":{"format":"int64","type":"integer"},"job_status":{"$ref":"#/components/schemas/PackingJobStatus"},"lost_location":{"type":"string"},"moved_qty":{"description":"How much left the package.","format":"double","type":"number"},"obligation_status":{"allOf":[{"$ref":"#/components/schemas/PackingObligationStatus"}],"description":"`Satisfied` when the short emptied the package; as it was otherwise."},"order_id":{"format":"int64","type":"integer"},"order_packed":{"description":"The resolution was the last thing that held the order (spec §14).","type":"boolean"},"resolution":{"$ref":"#/components/schemas/PackingExceptionResolution"},"shorted":{"description":"The picks shorted, in content order.","items":{"$ref":"#/components/schemas/PackageShortedPick"},"type":"array"},"status":{"$ref":"#/components/schemas/PackingExceptionStatus"},"unit_status":{"allOf":[{"$ref":"#/components/schemas/FlowUnitStatus"}],"description":"`Consumed` when the short emptied the package (its goods went to Lost); `Pending` otherwise."},"version":{"description":"The exception's version after the resolution.","format":"int32","type":"integer"}},"required":["carton_id","carton_status","carton_version","exception_id","job_status","lost_location","moved_qty","obligation_status","order_id","order_packed","resolution","shorted","status","unit_status","version"],"title":"ResolvePackingSourceShortResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"carton_id":1,"carton_status":{},"carton_version":1,"exception_id":1,"job_status":"Open","lost_location":"<lost_location>","moved_qty":1.5,"obligation_status":{},"order_id":1,"order_packed":false,"resolution":"NoDiscrepancy","shorted":[{"pick_id":1,"qty":1.5,"remediation_id":1,"shorted_pick_id":1}],"status":"Open","unit_status":{},"version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#packing_exception_resolve_unexpected":{"post":{"operationId":"packing_exception_resolve_unexpected","summary":"Set a packing carton's unexpected item aside for a count and resolve its PACK_UNEXPECTED_ITEM.","description":"Set a packing carton's unexpected item aside for a count and resolve its PACK_UNEXPECTED_ITEM.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n**Versioned entities:** packing_exception (id in data.exception_id, version in data.expected_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[{"entity":"packing_exception","id_field":"exception_id","version_field":"expected_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"packing","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"packing_exception_resolve_unexpected"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"exception_id":{"format":"int64","type":"integer"},"expected_version":{"description":"`packing_exception.version` as the supervisor saw it.","format":"int32","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"},"lot":{"description":"… the lot, when the supervisor can tell it; blank is none …","type":["string","null"]},"note":{"description":"What the supervisor writes about it; blank is none.","type":["string","null"]},"owner_id":{"description":"The item found: owner, SKU …","format":"int64","type":"integer"},"qty":{"description":"… and how much of it, in base units.","format":"double","type":"number"},"set_aside_location":{"description":"The location the packer sets the item aside into: the one counted.","type":"string"},"sku_code":{"type":"string"}},"required":["exception_id","expected_version","idempotency_key","owner_id","qty","set_aside_location","sku_code"],"title":"ResolvePackingUnexpectedItem","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"packing_exception_resolve_unexpected","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"exception_id":1,"expected_version":1,"owner_id":1,"qty":1.5,"set_aside_location":"<set_aside_location>","sku_code":"<sku_code>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"carton_id":{"format":"int64","type":"integer"},"count_event_id":{"description":"The outbox event that asks for the count.","format":"int64","type":"integer"},"exception_id":{"format":"int64","type":"integer"},"excess_id":{"description":"The `packing_excess` fact.","format":"int64","type":"integer"},"job_status":{"$ref":"#/components/schemas/PackingJobStatus"},"order_id":{"format":"int64","type":"integer"},"order_packed":{"description":"The resolution was the last thing that held the order (spec §14).","type":"boolean"},"resolution":{"$ref":"#/components/schemas/PackingExceptionResolution"},"set_aside_location":{"type":"string"},"status":{"$ref":"#/components/schemas/PackingExceptionStatus"},"version":{"description":"The exception's version after the resolution.","format":"int32","type":"integer"}},"required":["carton_id","count_event_id","exception_id","excess_id","job_status","order_id","order_packed","resolution","set_aside_location","status","version"],"title":"ResolvePackingUnexpectedItemResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"carton_id":1,"count_event_id":1,"exception_id":1,"excess_id":1,"job_status":"Open","order_id":1,"order_packed":false,"resolution":"NoDiscrepancy","set_aside_location":"<set_aside_location>","status":"Open","version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#station_excess_list":{"post":{"operationId":"station_excess_list","summary":"Read station excess facts and their inventory-count request receipts.","description":"Read station excess facts and their inventory-count request receipts.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"station","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"station_excess_list"},"params":{"type":"object","properties":{"data":{"properties":{"station_location":{"description":"The station's location code (type `Sort`).","type":"string"}},"required":["station_location"],"title":"StationGetInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"station_excess_list","params":{"data":{"station_location":"<station_location>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/StationExcess"},"title":"Array_of_StationExcess","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"id":1,"operation_id":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f","owner_id":1,"qty":1.5,"reported_by":1,"sku_code":"<sku_code>","station_location":"<station_location>","tote_code":"<tote_code>","tote_container_id":1,"uom":"<uom>","wave_id":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#station_excess_context":{"post":{"operationId":"station_excess_context","summary":"Resolve excess report codes within a distribution station.","description":"Resolve excess report codes within a distribution station.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"station","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"station_excess_context"},"params":{"type":"object","properties":{"data":{"description":"Codes read before an operator records excess. Resolving codes is a query, never a receipt, count request or permission to write a report.","properties":{"owner_code":{"type":"string"},"sku_code":{"type":"string"},"station_location":{"type":"string"},"tote_code":{"type":"string"},"wave_code":{"type":"string"}},"required":["owner_code","sku_code","station_location","tote_code","wave_code"],"title":"StationExcessContextInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"station_excess_context","params":{"data":{"owner_code":"<owner_code>","sku_code":"<sku_code>","station_location":"<station_location>","tote_code":"<tote_code>","wave_code":"<wave_code>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"anyOf":[{"$ref":"#/components/schemas/StationExcessContext"},{"type":"null"}],"title":"Nullable_StationExcessContext"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"owner_code":"<owner_code>","owner_id":1,"sku_code":"<sku_code>","station_location":"<station_location>","tote_code":"<tote_code>","uom":"<uom>","wave_code":"<wave_code>","wave_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#station_remainder_order":{"post":{"operationId":"station_remainder_order","summary":"Read a station tote order before a supervisor decides to withdraw it.","description":"Read a station tote order before a supervisor decides to withdraw it.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"station","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"station_remainder_order"},"params":{"type":"object","properties":{"data":{"description":"A supervisor reads the order by its number, in the named station tote. The returned version is the decision's version, not an auto-retry token.","properties":{"order_number":{"type":"string"},"station_location":{"type":"string"},"tote_code":{"type":"string"}},"required":["order_number","station_location","tote_code"],"title":"StationRemainderOrderInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"station_remainder_order","params":{"data":{"order_number":"<order_number>","station_location":"<station_location>","tote_code":"<tote_code>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"anyOf":[{"$ref":"#/components/schemas/StationRemainderOrder"},{"type":"null"}],"title":"Nullable_StationRemainderOrder"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"awaiting_qty":1.5,"order_id":1,"order_number":"<order_number>","station_location":"<station_location>","status":"<status>","tote_code":"<tote_code>","version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#station_tote_short":{"post":{"operationId":"station_tote_short","summary":"Declare all remaining units of an item absent or damaged in a station tote.","description":"Declare all remaining units of an item absent or damaged in a station tote.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"station","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"station_tote_short"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"idempotency_key":{"format":"uuid","type":"string"},"owner_id":{"default":null,"description":"Omitted: the physical declaration covers this code for every owner.","format":"int64","type":["integer","null"]},"reason_code":{"default":"STATION_SHORT","type":"string"},"sku_code":{"default":null,"description":"No quantity: every remaining pick of this item, across all lots.","type":["string","null"]},"station_location":{"type":"string"},"tote_code":{"type":"string"}},"required":["idempotency_key","station_location","tote_code"],"title":"ShortStationTote","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"station_tote_short","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"station_location":"<station_location>","tote_code":"<tote_code>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"lost_location":{"type":"string"},"picks":{"items":{"$ref":"#/components/schemas/StationShortedPick"},"type":"array"},"qty":{"format":"double","type":"number"},"station_location":{"type":"string"},"tote_code":{"type":"string"}},"required":["lost_location","picks","qty","station_location","tote_code"],"title":"StationToteShorted","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"lost_location":"<lost_location>","picks":[{"pick_id":1,"qty":1.5,"remediation_id":1,"shorted_pick_id":1}],"qty":1.5,"station_location":"<station_location>","tote_code":"<tote_code>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#station_excess_report":{"post":{"operationId":"station_excess_report","summary":"Report station excess now; request counting after the wall becomes free.","description":"Report station excess now; request counting after the wall becomes free.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"station","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"station_excess_report"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"idempotency_key":{"format":"uuid","type":"string"},"owner_id":{"format":"int64","type":"integer"},"qty":{"format":"double","type":"number"},"sku_code":{"type":"string"},"station_location":{"type":"string"},"tote_code":{"type":"string"},"wave_id":{"format":"int64","type":"integer"}},"required":["idempotency_key","owner_id","qty","sku_code","station_location","tote_code","wave_id"],"title":"ReportStationExcess","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"station_excess_report","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"owner_id":1,"qty":1.5,"sku_code":"<sku_code>","station_location":"<station_location>","tote_code":"<tote_code>","wave_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"count_id":{"description":"The request receipt, not a claim that inventory has been adjusted.","format":"int64","type":["integer","null"]},"id":{"format":"int64","type":"integer"},"operation_id":{"format":"uuid","type":"string"},"owner_id":{"format":"int64","type":"integer"},"qty":{"format":"double","type":"number"},"reported_by":{"format":"int64","type":"integer"},"sku_code":{"type":"string"},"station_location":{"type":"string"},"tote_code":{"type":"string"},"tote_container_id":{"format":"int64","type":"integer"},"uom":{"type":"string"},"wave_id":{"format":"int64","type":"integer"}},"required":["id","operation_id","owner_id","qty","reported_by","sku_code","station_location","tote_code","tote_container_id","uom","wave_id"],"title":"StationExcess","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"id":1,"operation_id":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f","owner_id":1,"qty":1.5,"reported_by":1,"sku_code":"<sku_code>","station_location":"<station_location>","tote_code":"<tote_code>","tote_container_id":1,"uom":"<uom>","wave_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#station_tote_lost":{"post":{"operationId":"station_tote_lost","summary":"Declare a whole tote lost before reaching the station (supervisor).","description":"Declare a whole tote lost before reaching the station (supervisor).\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"station","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"station_tote_lost"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"idempotency_key":{"format":"uuid","type":"string"},"owner_id":{"default":null,"description":"Omitted: the physical declaration covers this code for every owner.","format":"int64","type":["integer","null"]},"reason_code":{"default":"STATION_SHORT","type":"string"},"sku_code":{"default":null,"description":"No quantity: every remaining pick of this item, across all lots.","type":["string","null"]},"station_location":{"type":"string"},"tote_code":{"type":"string"}},"required":["idempotency_key","station_location","tote_code"],"title":"ShortStationTote","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"station_tote_lost","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"station_location":"<station_location>","tote_code":"<tote_code>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"lost_location":{"type":"string"},"picks":{"items":{"$ref":"#/components/schemas/StationShortedPick"},"type":"array"},"qty":{"format":"double","type":"number"},"station_location":{"type":"string"},"tote_code":{"type":"string"}},"required":["lost_location","picks","qty","station_location","tote_code"],"title":"StationToteShorted","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"lost_location":"<lost_location>","picks":[{"pick_id":1,"qty":1.5,"remediation_id":1,"shorted_pick_id":1}],"qty":1.5,"station_location":"<station_location>","tote_code":"<tote_code>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#station_excess_count":{"post":{"operationId":"station_excess_count","summary":"Count station excess now (supervisor): returning remainder will stop until counting ends.","description":"Count station excess now (supervisor): returning remainder will stop until counting ends.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"station","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"station_excess_count"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"idempotency_key":{"format":"uuid","type":"string"},"station_location":{"type":"string"}},"required":["idempotency_key","station_location"],"title":"CountStationExcess","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"station_excess_count","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"station_location":"<station_location>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"count_id":{"format":"int64","type":["integer","null"]},"deferred":{"type":"boolean"},"open_positions":{"format":"uint","minimum":0,"type":"integer"},"pending_facts":{"format":"uint","minimum":0,"type":"integer"},"return_blocked_until_count_complete":{"description":"The UI warns of this consequence before a supervisor forces a count.","type":"boolean"},"station_location":{"type":"string"},"task_id":{"format":"int64","type":["integer","null"]},"waiting_for_count_id":{"description":"An existing partial count must end before a full-location request can start.","format":"int64","type":["integer","null"]}},"required":["deferred","open_positions","pending_facts","return_blocked_until_count_complete","station_location"],"title":"StationExcessCount","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"deferred":false,"open_positions":1,"pending_facts":1,"return_blocked_until_count_complete":false,"station_location":"<station_location>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#station_order_withdraw":{"post":{"operationId":"station_order_withdraw","summary":"Withdraw an unshipped station order and free its tote remainder for return.","description":"Withdraw an unshipped station order and free its tote remainder for return.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n**Versioned entities:** shipment_order (id in data.order_id, version in data.expected_order_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_order_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[{"entity":"shipment_order","id_field":"order_id","version_field":"expected_order_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"station","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"station_order_withdraw"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"expected_order_version":{"format":"int32","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"},"order_id":{"format":"int64","type":"integer"},"reason":{"type":"string"},"station_location":{"type":"string"},"tote_code":{"type":"string"}},"required":["expected_order_version","idempotency_key","order_id","reason","station_location","tote_code"],"title":"WithdrawStationOrder","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"station_order_withdraw","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"expected_order_version":1,"order_id":1,"reason":"<reason>","station_location":"<station_location>","tote_code":"<tote_code>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"new_order_version":{"format":"int32","type":"integer"},"order_id":{"format":"int64","type":"integer"},"position_freed":{"type":"boolean"},"ready_to_return_qty":{"format":"double","type":"number"},"returned_pick_ids":{"items":{"format":"int64","type":"integer"},"type":"array"},"station_location":{"type":"string"},"tote_code":{"type":"string"}},"required":["new_order_version","order_id","position_freed","ready_to_return_qty","returned_pick_ids","station_location","tote_code"],"title":"StationOrderWithdrawn","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"new_order_version":1,"order_id":1,"position_freed":false,"ready_to_return_qty":1.5,"returned_pick_ids":[1],"station_location":"<station_location>","tote_code":"<tote_code>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#station_get":{"post":{"operationId":"station_get","summary":"Read a distribution station's positions with the order and wave holding each.","description":"Read a distribution station's positions with the order and wave holding each.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"station","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"station_get"},"params":{"type":"object","properties":{"data":{"properties":{"station_location":{"description":"The station's location code (type `Sort`).","type":"string"}},"required":["station_location"],"title":"StationGetInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"station_get","params":{"data":{"station_location":"<station_location>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"A distribution station as its screen shows it: every position with the order and wave holding it. A query.","properties":{"free":{"format":"uint","minimum":0,"type":"integer"},"positions":{"items":{"$ref":"#/components/schemas/StationPositionView"},"type":"array"},"station_location":{"type":"string"},"total":{"format":"uint","minimum":0,"type":"integer"}},"required":["free","positions","station_location","total"],"title":"StationDetails","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"free":1,"positions":[{"complete":false,"id":1,"picks_in_box":1,"picks_still_coming":1,"position_no":1,"station_location":"<station_location>"}],"station_location":"<station_location>","total":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#station_list":{"post":{"operationId":"station_list","summary":"List the locations that may be distribution stations, with their positions counted.","description":"List the locations that may be distribution stations, with their positions counted.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"station","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"station_list"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"station_list"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/StationSummary"},"title":"Array_of_StationSummary","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"boxes":1,"free":1,"station_location":"<station_location>","total":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#station_card_get":{"post":{"operationId":"station_card_get","summary":"Read one distribution station's position counts, as its card loads them.","description":"Read one distribution station's position counts, as its card loads them.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"station","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"station_card_get"},"params":{"type":"object","properties":{"station_location":{"description":"The station's location code.","type":"string"}},"required":["station_location"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"station_card_get","params":{"station_location":"<station_location>"}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"A location that may be a distribution station — every `Sort` location — with its positions counted, as the stations screen lists them (plain read). A `Sort` location with no positions is a station not set up yet.","properties":{"boxes":{"format":"int64","type":"integer"},"free":{"format":"int64","type":"integer"},"station_location":{"type":"string"},"total":{"format":"int64","type":"integer"}},"required":["boxes","free","station_location","total"],"title":"StationSummary","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"boxes":1,"free":1,"station_location":"<station_location>","total":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#station_position_list":{"post":{"operationId":"station_position_list","summary":"List one distribution station's positions with the order, wave and box of each.","description":"List one distribution station's positions with the order, wave and box of each.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"station","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"station_position_list"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"station_position_list"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/StationPositionView"},"title":"Array_of_StationPositionView","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"complete":false,"id":1,"picks_in_box":1,"picks_still_coming":1,"position_no":1,"station_location":"<station_location>"}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#station_place_suggest":{"post":{"operationId":"station_place_suggest","summary":"Suggest the station position that wants an item from a tote, and how much.","description":"Suggest the station position that wants an item from a tote, and how much.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"station","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"station_place_suggest"},"params":{"type":"object","properties":{"data":{"description":"What the placement screen asks after the tote and the item are scanned.","properties":{"lot":{"default":null,"description":"The lot, when scanned; narrows the suggestion to it.","type":["string","null"]},"sku_code":{"type":"string"},"station_location":{"description":"The station's location code (type `Sort`).","type":"string"},"tote_code":{"type":"string"}},"required":["sku_code","station_location","tote_code"],"title":"PlacementSuggestInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"station_place_suggest","params":{"data":{"sku_code":"<sku_code>","station_location":"<station_location>","tote_code":"<tote_code>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"Which position wants the item from the tote, and how much (R-10, R-11): the lowest-numbered one, its box when it has one, the quantity offered. `position_no: None` — the tote holds the item awaiting placement, but for no order on a position of this station. A tote that holds none of it is refused (`STATION_ITEM_NOT_IN_TOTE`).","properties":{"box_code":{"description":"The position's box, when one is on it; none — the screen asks for an empty box first (D-6).","type":["string","null"]},"lots":{"description":"The lots the position's goods are in, in this tote; more than one — the screen asks for the lot.","items":{"type":"string"},"type":"array"},"need":{"description":"The quantity offered: what the position wants from this tote.","format":"double","type":"number"},"order_id":{"format":"int64","type":["integer","null"]},"position_no":{"format":"int32","type":["integer","null"]},"sku_code":{"type":"string"},"station_location":{"type":"string"},"tote_awaiting":{"description":"What of the item awaits placement in the tote, every order.","format":"double","type":"number"},"tote_code":{"type":"string"}},"required":["lots","need","sku_code","station_location","tote_awaiting","tote_code"],"title":"PlacementSuggestion","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"lots":["<lots>"],"need":1.5,"sku_code":"<sku_code>","station_location":"<station_location>","tote_awaiting":1.5,"tote_code":"<tote_code>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#station_configure":{"post":{"operationId":"station_configure","summary":"Give a distribution station its number of positions.","description":"Give a distribution station its number of positions.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"station","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"station_configure"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"idempotency_key":{"format":"uuid","type":"string"},"positions":{"description":"How many positions the station has, numbered `1..=positions`.","format":"int32","type":"integer"},"station_location":{"description":"The station's location code (type `Sort`).","type":"string"}},"required":["idempotency_key","positions","station_location"],"title":"ConfigureStation","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"station_configure","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"positions":1,"station_location":"<station_location>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"A distribution station as its screen shows it: every position with the order and wave holding it. A query.","properties":{"free":{"format":"uint","minimum":0,"type":"integer"},"positions":{"items":{"$ref":"#/components/schemas/StationPositionView"},"type":"array"},"station_location":{"type":"string"},"total":{"format":"uint","minimum":0,"type":"integer"}},"required":["free","positions","station_location","total"],"title":"StationDetails","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"free":1,"positions":[{"complete":false,"id":1,"picks_in_box":1,"picks_still_coming":1,"position_no":1,"station_location":"<station_location>"}],"station_location":"<station_location>","total":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#station_box_bind":{"post":{"operationId":"station_box_bind","summary":"Put an empty box on a distribution station's position.","description":"Put an empty box on a distribution station's position.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"station","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"station_box_bind"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"box_code":{"description":"The scanned box's code.","type":"string"},"idempotency_key":{"format":"uuid","type":"string"},"position_no":{"description":"The position's number at the station.","format":"int32","type":"integer"},"station_location":{"description":"The station's location code (type `Sort`).","type":"string"}},"required":["box_code","idempotency_key","position_no","station_location"],"title":"BindStationBox","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"station_box_bind","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"box_code":"<box_code>","position_no":1,"station_location":"<station_location>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"The position with its box, as the station screen shows it.","properties":{"newly_bound":{"description":"`false` when the box was already this position's.","type":"boolean"},"position":{"$ref":"#/components/schemas/StationPositionView"},"station_location":{"type":"string"}},"required":["newly_bound","position","station_location"],"title":"StationBoxBound","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"newly_bound":false,"position":{"complete":false,"id":1,"picks_in_box":1,"picks_still_coming":1,"position_no":1,"station_location":"<station_location>"},"station_location":"<station_location>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#station_box_deliver":{"post":{"operationId":"station_box_deliver","summary":"Carry a station position's closed box to the pack station it waits for.","description":"Carry a station position's closed box to the pack station it waits for.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"station","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"station_box_deliver"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"box_code":{"description":"The scanned box's code.","type":"string"},"idempotency_key":{"format":"uuid","type":"string"},"to_location":{"description":"The scanned location: the pack station the box goes to.","type":"string"}},"required":["box_code","idempotency_key","to_location"],"title":"DeliverStationBox","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"station_box_deliver","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"box_code":"<box_code>","to_location":"<to_location>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"box_code":{"type":"string"},"from_location":{"type":["string","null"]},"moved":{"description":"`false` when the box already stood there (nothing written).","type":"boolean"},"order_id":{"format":"int64","type":"integer"},"to_location":{"type":"string"},"unit_id":{"format":"int64","type":"integer"}},"required":["box_code","moved","order_id","to_location","unit_id"],"title":"StationBoxDelivered","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"box_code":"<box_code>","moved":false,"order_id":1,"to_location":"<to_location>","unit_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#station_place":{"post":{"operationId":"station_place","summary":"Place goods from a tote into a distribution station position's box.","description":"Place goods from a tote into a distribution station position's box.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"station","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"station_place"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"box_code":{"description":"The scanned box of the position the goods go to.","type":"string"},"idempotency_key":{"format":"uuid","type":"string"},"lot":{"default":null,"description":"The lot, when the operator scanned it; needed only when the tote holds the item for the position's order in several.","type":["string","null"]},"qty":{"format":"double","type":"number"},"sku_code":{"type":"string"},"station_location":{"description":"The station's location code (type `Sort`).","type":"string"},"tote_code":{"description":"The tote the goods come from.","type":"string"}},"required":["box_code","idempotency_key","qty","sku_code","station_location","tote_code"],"title":"PlaceAtStation","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"station_place","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"box_code":"<box_code>","qty":1.5,"sku_code":"<sku_code>","station_location":"<station_location>","tote_code":"<tote_code>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"What the placement did, as the station screen says it.","properties":{"box_code":{"type":"string"},"lot":{"type":"string"},"order_id":{"format":"int64","type":"integer"},"picks":{"items":{"$ref":"#/components/schemas/PlacedPickView"},"type":"array"},"position_need_left":{"description":"What the position still wants of the item from this tote.","format":"double","type":"number"},"position_no":{"format":"int32","type":"integer"},"qty":{"format":"double","type":"number"},"sku_code":{"type":"string"},"station_location":{"type":"string"},"tote_code":{"type":"string"}},"required":["box_code","lot","order_id","picks","position_need_left","position_no","qty","sku_code","station_location","tote_code"],"title":"StationPlaced","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"box_code":"<box_code>","lot":"<lot>","order_id":1,"picks":[{"order_line_id":1,"pick_id":1,"placed_pick_id":1,"qty":1.5,"remaining_qty":1.5}],"position_need_left":1.5,"position_no":1,"qty":1.5,"sku_code":"<sku_code>","station_location":"<station_location>","tote_code":"<tote_code>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#station_box_close":{"post":{"operationId":"station_box_close","summary":"Close a distribution station position's box once nothing more is coming to it.","description":"Close a distribution station position's box once nothing more is coming to it.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"station","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"station_box_close"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"box_code":{"description":"The scanned box's code.","type":"string"},"idempotency_key":{"format":"uuid","type":"string"},"station_location":{"description":"The station's location code (type `Sort`).","type":"string"}},"required":["box_code","idempotency_key","station_location"],"title":"CloseStationBox","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"station_box_close","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"box_code":"<box_code>","station_location":"<station_location>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"What the close did, as the station screen says it.","properties":{"box_code":{"type":"string"},"destination":{"description":"Where the box goes next (the pack station), when it was handed over.","type":["string","null"]},"order_id":{"format":"int64","type":"integer"},"picks":{"description":"The picks that left in the box (0: an empty box stayed on the freed position).","format":"uint","minimum":0,"type":"integer"},"position_freed":{"description":"The position is free for the next wave (R-20); `false` after a full box, whose position waits for a new one.","type":"boolean"},"position_no":{"format":"int32","type":"integer"},"station_location":{"type":"string"},"unit_id":{"description":"The router unit the box became, when its area names a next step.","format":"int64","type":["integer","null"]}},"required":["box_code","order_id","picks","position_freed","position_no","station_location"],"title":"StationBoxClosed","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"box_code":"<box_code>","order_id":1,"picks":1,"position_freed":false,"position_no":1,"station_location":"<station_location>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#station_box_close_full":{"post":{"operationId":"station_box_close_full","summary":"Close a distribution station position's full box; the position waits for a new one.","description":"Close a distribution station position's full box; the position waits for a new one.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"station","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"station_box_close_full"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"box_code":{"description":"The scanned box's code.","type":"string"},"idempotency_key":{"format":"uuid","type":"string"},"station_location":{"description":"The station's location code (type `Sort`).","type":"string"}},"required":["box_code","idempotency_key","station_location"],"title":"CloseStationBox","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"station_box_close_full","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"box_code":"<box_code>","station_location":"<station_location>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"What the close did, as the station screen says it.","properties":{"box_code":{"type":"string"},"destination":{"description":"Where the box goes next (the pack station), when it was handed over.","type":["string","null"]},"order_id":{"format":"int64","type":"integer"},"picks":{"description":"The picks that left in the box (0: an empty box stayed on the freed position).","format":"uint","minimum":0,"type":"integer"},"position_freed":{"description":"The position is free for the next wave (R-20); `false` after a full box, whose position waits for a new one.","type":"boolean"},"position_no":{"format":"int32","type":"integer"},"station_location":{"type":"string"},"unit_id":{"description":"The router unit the box became, when its area names a next step.","format":"int64","type":["integer","null"]}},"required":["box_code","order_id","picks","position_freed","position_no","station_location"],"title":"StationBoxClosed","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"box_code":"<box_code>","order_id":1,"picks":1,"position_freed":false,"position_no":1,"station_location":"<station_location>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#consolidation_queue_list":{"post":{"operationId":"consolidation_queue_list","summary":"List the boxes waiting at a consolidation station and its open pallets.","description":"List the boxes waiting at a consolidation station and its open pallets.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"consolidation","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"consolidation_queue_list"},"params":{"type":"object","properties":{"data":{"properties":{"station":{"description":"The consolidation station's location code.","type":"string"}},"required":["station"],"title":"ConsolidationQueueListInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"consolidation_queue_list","params":{"data":{"station":"<station>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"What a consolidation station has: the boxes waiting there (on a pallet or not yet) and its open pallets.","properties":{"boxes":{"items":{"$ref":"#/components/schemas/ConsolidationBox"},"type":"array"},"pallets":{"items":{"$ref":"#/components/schemas/ConsolidationPallet"},"type":"array"},"station_location":{"type":"string"}},"required":["boxes","pallets","station_location"],"title":"ConsolidationQueue","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"boxes":[{"container_code":"<container_code>","container_id":1,"order_id":1,"order_number":"<order_number>","owner_id":1,"unit_id":1,"unit_version":1}],"pallets":[{"boxes":1,"order_number":"<order_number>","owner_id":1,"pallet_code":"<pallet_code>","status":"Open","target_id":1,"target_version":1}],"station_location":"<station_location>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#consolidation_unit_get":{"post":{"operationId":"consolidation_unit_get","summary":"Read a box waiting for consolidation: its order, route and the pallet it goes on.","description":"Read a box waiting for consolidation: its order, route and the pallet it goes on.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"consolidation","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"consolidation_unit_get"},"params":{"type":"object","properties":{"data":{"properties":{"container_code":{"description":"The box's label, as scanned.","type":"string"},"station":{"description":"The consolidation station's location code.","type":"string"}},"required":["container_code","station"],"title":"ConsolidationUnitGetInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"consolidation_unit_get","params":{"data":{"container_code":"<container_code>","station":"<station>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"A scanned box: its order and route, and where it goes — the pallet it is on, or an open pallet of its route and owner at the station (of its order, for a pallet with no route), if any.","properties":{"container_code":{"type":"string"},"container_id":{"format":"int64","type":"integer"},"dispatch_id":{"description":"The route the box goes on (its assignment); `None` without one.","format":"int64","type":["integer","null"]},"order_id":{"format":"int64","type":"integer"},"order_number":{"type":"string"},"owner_id":{"description":"The owner of the box's container.","format":"int64","type":"integer"},"pallet_code":{"type":["string","null"]},"station_location":{"description":"The consolidation station the box waits at (its unit's destination).","type":["string","null"]},"stop_id":{"format":"int64","type":["integer","null"]},"suggested_pallet_code":{"description":"An open pallet the box may go on at the station (when it is on none yet): same route and owner — and order, for a pallet with no route.","type":["string","null"]},"target_id":{"description":"The pallet the box stands on, when it is a target's.","format":"int64","type":["integer","null"]},"unit_id":{"format":"int64","type":"integer"},"unit_version":{"format":"int32","type":"integer"}},"required":["container_code","container_id","order_id","order_number","owner_id","unit_id","unit_version"],"title":"ConsolidationUnitView","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"container_code":"<container_code>","container_id":1,"order_id":1,"order_number":"<order_number>","owner_id":1,"unit_id":1,"unit_version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#consolidation_target_get":{"post":{"operationId":"consolidation_target_get","summary":"Read a consolidation pallet and the boxes on it.","description":"Read a consolidation pallet and the boxes on it.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"consolidation","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"consolidation_target_get"},"params":{"type":"object","properties":{"data":{"properties":{"pallet_code":{"default":null,"description":"…or the pallet's label, as a terminal scans it.","type":["string","null"]},"target_id":{"default":null,"description":"The pallet's target, as a list named it…","format":"int64","type":["integer","null"]}},"title":"ConsolidationTargetGetInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"consolidation_target_get","params":{"data":{"pallet_code":"<pallet_code>","target_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"One pallet and the boxes on it.","properties":{"boxes":{"items":{"$ref":"#/components/schemas/ConsolidationBox"},"type":"array"},"pallet":{"$ref":"#/components/schemas/ConsolidationPallet"}},"required":["boxes","pallet"],"title":"ConsolidationTargetView","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"boxes":[{"container_code":"<container_code>","container_id":1,"order_id":1,"order_number":"<order_number>","owner_id":1,"unit_id":1,"unit_version":1}],"pallet":{"boxes":1,"order_number":"<order_number>","owner_id":1,"pallet_code":"<pallet_code>","status":"Open","target_id":1,"target_version":1}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#consolidation_station_list":{"post":{"operationId":"consolidation_station_list","summary":"List the consolidation stations with their waiting boxes and pallets.","description":"List the consolidation stations with their waiting boxes and pallets.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"consolidation","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"consolidation_station_list"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"consolidation_station_list"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/ConsolidationStationSummary"},"title":"Array_of_ConsolidationStationSummary","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"boxes_waiting":1,"closed_pallets":1,"open_pallets":1,"station_location":"<station_location>"}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#consolidation_station_card_get":{"post":{"operationId":"consolidation_station_card_get","summary":"Read one consolidation station's counts, as its card loads them.","description":"Read one consolidation station's counts, as its card loads them.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"consolidation","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"consolidation_station_card_get"},"params":{"type":"object","properties":{"station_location":{"description":"The consolidation station's location code.","type":"string"}},"required":["station_location"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"consolidation_station_card_get","params":{"station_location":"<station_location>"}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"A consolidation location on the supervisor's board: the work areas that name it and what stands there — boxes waiting for a pallet, open pallets, closed pallets not yet taken away.","properties":{"boxes_waiting":{"description":"Boxes waiting at the station that stand on no pallet yet.","format":"int64","type":"integer"},"closed_pallets":{"description":"Closed pallets whose container still stands at the station.","format":"int64","type":"integer"},"open_pallets":{"format":"int64","type":"integer"},"station_location":{"type":"string"},"work_areas":{"description":"The work areas whose consolidation station this is, comma-separated; `None` when no area names it (no box is sent there).","type":["string","null"]}},"required":["boxes_waiting","closed_pallets","open_pallets","station_location"],"title":"ConsolidationStationSummary","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"boxes_waiting":1,"closed_pallets":1,"open_pallets":1,"station_location":"<station_location>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#consolidation_board_pallet_list":{"post":{"operationId":"consolidation_board_pallet_list","summary":"List a consolidation station's open pallets and the closed ones still standing there.","description":"List a consolidation station's open pallets and the closed ones still standing there.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"consolidation","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"consolidation_board_pallet_list"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"consolidation_board_pallet_list"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/ConsolidationBoardPallet"},"title":"Array_of_ConsolidationBoardPallet","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"boxes":1,"order_number":"<order_number>","pallet_code":"<pallet_code>","station_location":"<station_location>","status":"Open","target_id":1,"target_version":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#consolidation_board_box_list":{"post":{"operationId":"consolidation_board_box_list","summary":"List the boxes waiting at a consolidation station, on a pallet or not yet.","description":"List the boxes waiting at a consolidation station, on a pallet or not yet.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"consolidation","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"consolidation_board_box_list"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"consolidation_board_box_list"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/ConsolidationBox"},"title":"Array_of_ConsolidationBox","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"container_code":"<container_code>","container_id":1,"order_id":1,"order_number":"<order_number>","owner_id":1,"unit_id":1,"unit_version":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#consolidation_session_open":{"post":{"operationId":"consolidation_session_open","summary":"Open (or resume) the caller's session at a consolidation station.","description":"Open (or resume) the caller's session at a consolidation station.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"consolidation","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"consolidation_session_open"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"idempotency_key":{"format":"uuid","type":"string"},"station_location":{"description":"The consolidation station, as scanned.","type":"string"}},"required":["idempotency_key","station_location"],"title":"OpenConsolidationSession","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"consolidation_session_open","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"station_location":"<station_location>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"open_pallets":{"description":"The station's open pallets, oldest first.","items":{"$ref":"#/components/schemas/ConsolidationPalletView"},"type":"array"},"session_id":{"format":"int64","type":"integer"},"station_location":{"type":"string"}},"required":["open_pallets","session_id","station_location"],"title":"OpenConsolidationSessionResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"open_pallets":[{"boxes":1,"order_number":"<order_number>","pallet_code":"<pallet_code>","target_id":1,"target_version":1}],"session_id":1,"station_location":"<station_location>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#consolidation_session_close":{"post":{"operationId":"consolidation_session_close","summary":"Close the caller's consolidation session.","description":"Close the caller's consolidation session.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"consolidation","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"consolidation_session_close"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"idempotency_key":{"format":"uuid","type":"string"},"session_id":{"format":"int64","type":"integer"}},"required":["idempotency_key","session_id"],"title":"CloseConsolidationSession","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"consolidation_session_close","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"session_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"closed":{"description":"`false` when the session was closed already.","type":"boolean"},"session_id":{"format":"int64","type":"integer"}},"required":["closed","session_id"],"title":"CloseConsolidationSessionResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"closed":false,"session_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#consolidation_add":{"post":{"operationId":"consolidation_add","summary":"Put a packed box onto an outbound pallet at the consolidation station.","description":"Put a packed box onto an outbound pallet at the consolidation station.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"consolidation","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"consolidation_add"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"container_code":{"description":"The box's label, as scanned.","type":"string"},"idempotency_key":{"format":"uuid","type":"string"},"pallet_code":{"description":"The pallet's label, as scanned.","type":"string"},"session_id":{"format":"int64","type":"integer"}},"required":["container_code","idempotency_key","pallet_code","session_id"],"title":"ConsolidationAdd","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"consolidation_add","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"container_code":"<container_code>","pallet_code":"<pallet_code>","session_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"already_on":{"description":"The box stood on this pallet already: nothing was written.","type":"boolean"},"auto_closed":{"anyOf":[{"$ref":"#/components/schemas/AutoCloseReason"},{"type":"null"}],"description":"The pallet closed itself with this box, and why (auto-close, owner 2026-10-23); `None`: it is still open."},"boxes":{"description":"Boxes on the pallet now.","format":"int64","type":"integer"},"container_code":{"type":"string"},"dispatch_id":{"format":"int64","type":["integer","null"]},"order_id":{"description":"The box's order.","format":"int64","type":"integer"},"pallet_code":{"type":"string"},"pallet_unit_id":{"description":"The closed pallet's router unit, when it closed itself.","format":"int64","type":["integer","null"]},"stop_id":{"format":"int64","type":["integer","null"]},"target_id":{"format":"int64","type":"integer"},"target_version":{"description":"What `consolidation_target_close` sends back as `expected_version`.","format":"int32","type":"integer"}},"required":["already_on","boxes","container_code","order_id","pallet_code","target_id","target_version"],"title":"ConsolidationAddResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"already_on":false,"boxes":1,"container_code":"<container_code>","order_id":1,"pallet_code":"<pallet_code>","target_id":1,"target_version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#consolidation_remove":{"post":{"operationId":"consolidation_remove","summary":"Take a box off an open consolidation pallet.","description":"Take a box off an open consolidation pallet.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"consolidation","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"consolidation_remove"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"container_code":{"description":"The box's label, as scanned.","type":"string"},"idempotency_key":{"format":"uuid","type":"string"},"session_id":{"format":"int64","type":"integer"}},"required":["container_code","idempotency_key","session_id"],"title":"ConsolidationRemove","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"consolidation_remove","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"container_code":"<container_code>","session_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"boxes":{"description":"Boxes left on the pallet.","format":"int64","type":"integer"},"container_code":{"type":"string"},"pallet_code":{"type":"string"},"target_id":{"format":"int64","type":"integer"},"target_version":{"format":"int32","type":"integer"}},"required":["boxes","container_code","pallet_code","target_id","target_version"],"title":"ConsolidationRemoveResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"boxes":1,"container_code":"<container_code>","pallet_code":"<pallet_code>","target_id":1,"target_version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#consolidation_target_close":{"post":{"operationId":"consolidation_target_close","summary":"Close a consolidation pallet: it becomes an outbound unit of its own.","description":"Close a consolidation pallet: it becomes an outbound unit of its own.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR. An administrator can change the grants.\n\n**Versioned entities:** consolidation_target (id in data.target_id, version in data.expected_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR"],"x-quark-versioned-entities":[{"entity":"consolidation_target","id_field":"target_id","version_field":"expected_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"consolidation","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"consolidation_target_close"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"expected_version":{"description":"`consolidation_target.version` as the operator saw it.","format":"int32","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"},"target_id":{"format":"int64","type":"integer"}},"required":["expected_version","idempotency_key","target_id"],"title":"CloseConsolidationTarget","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"consolidation_target_close","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"expected_version":1,"target_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"boxes":{"format":"int64","type":"integer"},"pallet_code":{"type":"string"},"pallet_unit_id":{"description":"The pallet's router unit, `Completed`: what Stage takes.","format":"int64","type":"integer"},"pallet_unit_status":{"$ref":"#/components/schemas/FlowUnitStatus"},"target_id":{"format":"int64","type":"integer"},"target_version":{"format":"int32","type":"integer"}},"required":["boxes","pallet_code","pallet_unit_id","pallet_unit_status","target_id","target_version"],"title":"CloseConsolidationTargetResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"boxes":1,"pallet_code":"<pallet_code>","pallet_unit_id":1,"pallet_unit_status":"Pending","target_id":1,"target_version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#consolidation_target_reopen":{"post":{"operationId":"consolidation_target_reopen","summary":"Reopen a closed consolidation pallet (supervisor).","description":"Reopen a closed consolidation pallet (supervisor).\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n**Versioned entities:** consolidation_target (id in data.target_id, version in data.expected_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["outbound"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[{"entity":"consolidation_target","id_field":"target_id","version_field":"expected_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"consolidation","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"consolidation_target_reopen"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"expected_version":{"description":"`consolidation_target.version` as the supervisor saw it.","format":"int32","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"},"target_id":{"format":"int64","type":"integer"}},"required":["expected_version","idempotency_key","target_id"],"title":"ReopenConsolidationTarget","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"consolidation_target_reopen","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"expected_version":1,"target_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"boxes":{"description":"Boxes waiting on the pallet again.","format":"int64","type":"integer"},"pallet_code":{"type":"string"},"target_id":{"format":"int64","type":"integer"},"target_version":{"format":"int32","type":"integer"}},"required":["boxes","pallet_code","target_id","target_version"],"title":"ReopenConsolidationTargetResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"boxes":1,"pallet_code":"<pallet_code>","target_id":1,"target_version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#create_work_area":{"post":{"operationId":"create_work_area","summary":"Create a work area, optionally naming its pack station (a Pack location).","description":"Create a work area, optionally naming its pack station (a Pack location).\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["tasks"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"UNIQUE_VIOLATION or INVALID_DATA","when":"The code already exists, or a value breaks a rule."}],"x-quark-module":"work_area","x-quark-operation":"create","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"create_work_area"},"params":{"type":"object","properties":{"data":{"description":"A field left `None` is left out of the INSERT, so the column takes its DEFAULT (`''`, `1`, `true` — wms-app 315).","properties":{"allow_task_release":{"type":["boolean","null"]},"code":{"type":"string"},"consolidation_station_location":{"type":["string","null"]},"description":{"type":["string","null"]},"max_concurrent_tasks":{"format":"int16","type":["integer","null"]},"pack_station_location":{"type":["string","null"]}},"required":["code"],"title":"WorkAreaForCreate","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"create_work_area","params":{"data":{"code":"<code>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"<Strong>Work area</Strong> — a named set of putaway zones where an operator is allowed to work (task-manager pass 2, `docs/superpowers/specs/2026-08-27-work-areas-operator-profile-design.md`).\n\nIt is the unit task distribution will filter by: an operator's rights are a grid of `task type × work area`, and a task reaches its area through `task.from_location → location.putawayzone → work_area_zone`. Renamed from `facility` (owner decision 2026-08-27); the columns that make it an area — the concurrent-task limit, \"may hand a task back\" — arrived in step 2 (wms-app 315), and the rules that read them come in step 6.","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"allow_task_release":{"description":"May an operator hand a task back here (Infor \"Sign Off Allowed\"). Read by `TaskService::skip_task_in_area` since step 6 — it gates BOTH doors, the hand-back and the refusal; without a named area the warehouse default (`TASK_ALLOW_RELEASE_DEFAULT`) rules instead.","type":"boolean"},"code":{"type":"string"},"consolidation_station_location":{"description":"The area's consolidation station (consolidation H1; wms-app 20261021191021): the `Consolidation` location where its packed units are put onto outbound pallets. `None` — packed units are `Completed` as before.","type":["string","null"]},"description":{"type":"string"},"id":{"format":"int64","type":"integer"},"max_concurrent_tasks":{"description":"Tasks one operator may hold at once inside this area — only when the terminal names the area (spec §4.1). Read by `TaskService::claim_one_in_area` since step 6; without a named area the warehouse default (`TASK_MAX_CONCURRENT_DEFAULT`) rules instead.","format":"int16","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"pack_station_location":{"description":"The area's pack station (wms-app 065; post-pick spec О-1, D-55): the `Pack` location its carriers are delivered to when their units go to packing. `None` — no station: picking delivers as before. Only a `Pack` location (wms-app 079).","type":["string","null"]},"picking_policy_code":{"description":"Code of the picking policy this area works by (its published revision); `None` = `DISCRETE`. Read side only — assignment goes through `PickingPolicyBmc::assign_to_work_area` (wms-app 042).","type":["string","null"]}},"required":["add_when","add_who","allow_task_release","code","description","id","max_concurrent_tasks","mod_when","mod_who"],"title":"WorkArea","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"allow_task_release":false,"code":"<code>","description":"<description>","id":1,"max_concurrent_tasks":1,"mod_when":"<mod_when>","mod_who":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#create_work_area_zone":{"post":{"operationId":"create_work_area_zone","summary":"Create a new work_area_zone — CRUD.","description":"Create a new work_area_zone — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["tasks"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"UNIQUE_VIOLATION or INVALID_DATA","when":"The code already exists, or a value breaks a rule."}],"x-quark-module":"work_area","x-quark-operation":"create","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"create_work_area_zone"},"params":{"type":"object","properties":{"data":{"properties":{"putawayzone":{"type":"string"},"work_area_id":{"format":"int64","type":"integer"}},"required":["putawayzone","work_area_id"],"title":"WorkAreaZoneForCreate","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"create_work_area_zone","params":{"data":{"putawayzone":"<putawayzone>","work_area_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"One putaway zone of a work area. Many-to-many: a zone may belong to several areas (`UNIQUE (work_area_id, putawayzone)`, not unique by zone).","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"putawayzone":{"type":"string"},"work_area_id":{"format":"int64","type":"integer"}},"required":["add_when","add_who","id","mod_when","mod_who","putawayzone","work_area_id"],"title":"WorkAreaZone","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"id":1,"mod_when":"<mod_when>","mod_who":1,"putawayzone":"<putawayzone>","work_area_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_work_area":{"post":{"operationId":"get_work_area","summary":"Get a work_area by ID — CRUD.","description":"Get a work_area by ID — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["tasks"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"work_area","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_work_area"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_work_area","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"<Strong>Work area</Strong> — a named set of putaway zones where an operator is allowed to work (task-manager pass 2, `docs/superpowers/specs/2026-08-27-work-areas-operator-profile-design.md`).\n\nIt is the unit task distribution will filter by: an operator's rights are a grid of `task type × work area`, and a task reaches its area through `task.from_location → location.putawayzone → work_area_zone`. Renamed from `facility` (owner decision 2026-08-27); the columns that make it an area — the concurrent-task limit, \"may hand a task back\" — arrived in step 2 (wms-app 315), and the rules that read them come in step 6.","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"allow_task_release":{"description":"May an operator hand a task back here (Infor \"Sign Off Allowed\"). Read by `TaskService::skip_task_in_area` since step 6 — it gates BOTH doors, the hand-back and the refusal; without a named area the warehouse default (`TASK_ALLOW_RELEASE_DEFAULT`) rules instead.","type":"boolean"},"code":{"type":"string"},"consolidation_station_location":{"description":"The area's consolidation station (consolidation H1; wms-app 20261021191021): the `Consolidation` location where its packed units are put onto outbound pallets. `None` — packed units are `Completed` as before.","type":["string","null"]},"description":{"type":"string"},"id":{"format":"int64","type":"integer"},"max_concurrent_tasks":{"description":"Tasks one operator may hold at once inside this area — only when the terminal names the area (spec §4.1). Read by `TaskService::claim_one_in_area` since step 6; without a named area the warehouse default (`TASK_MAX_CONCURRENT_DEFAULT`) rules instead.","format":"int16","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"pack_station_location":{"description":"The area's pack station (wms-app 065; post-pick spec О-1, D-55): the `Pack` location its carriers are delivered to when their units go to packing. `None` — no station: picking delivers as before. Only a `Pack` location (wms-app 079).","type":["string","null"]},"picking_policy_code":{"description":"Code of the picking policy this area works by (its published revision); `None` = `DISCRETE`. Read side only — assignment goes through `PickingPolicyBmc::assign_to_work_area` (wms-app 042).","type":["string","null"]}},"required":["add_when","add_who","allow_task_release","code","description","id","max_concurrent_tasks","mod_when","mod_who"],"title":"WorkArea","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"allow_task_release":false,"code":"<code>","description":"<description>","id":1,"max_concurrent_tasks":1,"mod_when":"<mod_when>","mod_who":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_work_area_zone":{"post":{"operationId":"get_work_area_zone","summary":"Get a work_area_zone by ID — CRUD.","description":"Get a work_area_zone by ID — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["tasks"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"work_area","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_work_area_zone"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_work_area_zone","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"One putaway zone of a work area. Many-to-many: a zone may belong to several areas (`UNIQUE (work_area_id, putawayzone)`, not unique by zone).","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"putawayzone":{"type":"string"},"work_area_id":{"format":"int64","type":"integer"}},"required":["add_when","add_who","id","mod_when","mod_who","putawayzone","work_area_id"],"title":"WorkAreaZone","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"id":1,"mod_when":"<mod_when>","mod_who":1,"putawayzone":"<putawayzone>","work_area_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_work_area":{"post":{"operationId":"list_work_area","summary":"List work_area — CRUD.","description":"List work_area — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["tasks"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"work_area","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_work_area"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_work_area"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/WorkArea"},"title":"Array_of_WorkArea","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"allow_task_release":false,"code":"<code>","description":"<description>","id":1,"max_concurrent_tasks":1,"mod_when":"<mod_when>","mod_who":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_work_area_zone":{"post":{"operationId":"list_work_area_zone","summary":"List work_area_zone — CRUD.","description":"List work_area_zone — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["tasks"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"work_area","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_work_area_zone"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_work_area_zone"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/WorkAreaZone"},"title":"Array_of_WorkAreaZone","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"id":1,"mod_when":"<mod_when>","mod_who":1,"putawayzone":"<putawayzone>","work_area_id":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#update_work_area":{"post":{"operationId":"update_work_area","summary":"Update work-area behavior and its pack station without changing its stable code.","description":"Update work-area behavior and its pack station without changing its stable code.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["tasks"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"INVALID_DATA","when":"A value breaks a rule."}],"x-quark-module":"work_area","x-quark-operation":"update","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"update_work_area"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"},"data":{"additionalProperties":false,"properties":{"allow_task_release":{"type":"boolean"},"consolidation_station_location":{"type":["string","null"]},"description":{"type":"string"},"max_concurrent_tasks":{"format":"int16","type":"integer"},"pack_station_location":{"type":["string","null"]}},"title":"WorkAreaUpdateApi","type":"object"}},"required":["id","data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"update_work_area","params":{"id":1,"data":{"allow_task_release":false,"consolidation_station_location":"<consolidation_station_location>","description":"<description>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"<Strong>Work area</Strong> — a named set of putaway zones where an operator is allowed to work (task-manager pass 2, `docs/superpowers/specs/2026-08-27-work-areas-operator-profile-design.md`).\n\nIt is the unit task distribution will filter by: an operator's rights are a grid of `task type × work area`, and a task reaches its area through `task.from_location → location.putawayzone → work_area_zone`. Renamed from `facility` (owner decision 2026-08-27); the columns that make it an area — the concurrent-task limit, \"may hand a task back\" — arrived in step 2 (wms-app 315), and the rules that read them come in step 6.","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"allow_task_release":{"description":"May an operator hand a task back here (Infor \"Sign Off Allowed\"). Read by `TaskService::skip_task_in_area` since step 6 — it gates BOTH doors, the hand-back and the refusal; without a named area the warehouse default (`TASK_ALLOW_RELEASE_DEFAULT`) rules instead.","type":"boolean"},"code":{"type":"string"},"consolidation_station_location":{"description":"The area's consolidation station (consolidation H1; wms-app 20261021191021): the `Consolidation` location where its packed units are put onto outbound pallets. `None` — packed units are `Completed` as before.","type":["string","null"]},"description":{"type":"string"},"id":{"format":"int64","type":"integer"},"max_concurrent_tasks":{"description":"Tasks one operator may hold at once inside this area — only when the terminal names the area (spec §4.1). Read by `TaskService::claim_one_in_area` since step 6; without a named area the warehouse default (`TASK_MAX_CONCURRENT_DEFAULT`) rules instead.","format":"int16","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"pack_station_location":{"description":"The area's pack station (wms-app 065; post-pick spec О-1, D-55): the `Pack` location its carriers are delivered to when their units go to packing. `None` — no station: picking delivers as before. Only a `Pack` location (wms-app 079).","type":["string","null"]},"picking_policy_code":{"description":"Code of the picking policy this area works by (its published revision); `None` = `DISCRETE`. Read side only — assignment goes through `PickingPolicyBmc::assign_to_work_area` (wms-app 042).","type":["string","null"]}},"required":["add_when","add_who","allow_task_release","code","description","id","max_concurrent_tasks","mod_when","mod_who"],"title":"WorkArea","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"allow_task_release":false,"code":"<code>","description":"<description>","id":1,"max_concurrent_tasks":1,"mod_when":"<mod_when>","mod_who":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#update_work_area_zone":{"post":{"operationId":"update_work_area_zone","summary":"Move a work-area association to another zone; null/work-area changes are rejected.","description":"Move a work-area association to another zone; null/work-area changes are rejected.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["tasks"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"INVALID_DATA","when":"A value breaks a rule."}],"x-quark-module":"work_area","x-quark-operation":"update","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"update_work_area_zone"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"},"data":{"additionalProperties":false,"properties":{"putawayzone":{"type":"string"}},"title":"WorkAreaZoneUpdateApi","type":"object"}},"required":["id","data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"update_work_area_zone","params":{"id":1,"data":{"putawayzone":"<putawayzone>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"One putaway zone of a work area. Many-to-many: a zone may belong to several areas (`UNIQUE (work_area_id, putawayzone)`, not unique by zone).","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"putawayzone":{"type":"string"},"work_area_id":{"format":"int64","type":"integer"}},"required":["add_when","add_who","id","mod_when","mod_who","putawayzone","work_area_id"],"title":"WorkAreaZone","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"id":1,"mod_when":"<mod_when>","mod_who":1,"putawayzone":"<putawayzone>","work_area_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_work_area":{"post":{"operationId":"delete_work_area","summary":"Delete a work_area by ID — CRUD.","description":"Delete a work_area by ID — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["tasks"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"DEPENDENT_DATA_EXIST","when":"Other rows still use this row."}],"x-quark-module":"work_area","x-quark-operation":"delete","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_work_area"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_work_area","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"<Strong>Work area</Strong> — a named set of putaway zones where an operator is allowed to work (task-manager pass 2, `docs/superpowers/specs/2026-08-27-work-areas-operator-profile-design.md`).\n\nIt is the unit task distribution will filter by: an operator's rights are a grid of `task type × work area`, and a task reaches its area through `task.from_location → location.putawayzone → work_area_zone`. Renamed from `facility` (owner decision 2026-08-27); the columns that make it an area — the concurrent-task limit, \"may hand a task back\" — arrived in step 2 (wms-app 315), and the rules that read them come in step 6.","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"allow_task_release":{"description":"May an operator hand a task back here (Infor \"Sign Off Allowed\"). Read by `TaskService::skip_task_in_area` since step 6 — it gates BOTH doors, the hand-back and the refusal; without a named area the warehouse default (`TASK_ALLOW_RELEASE_DEFAULT`) rules instead.","type":"boolean"},"code":{"type":"string"},"consolidation_station_location":{"description":"The area's consolidation station (consolidation H1; wms-app 20261021191021): the `Consolidation` location where its packed units are put onto outbound pallets. `None` — packed units are `Completed` as before.","type":["string","null"]},"description":{"type":"string"},"id":{"format":"int64","type":"integer"},"max_concurrent_tasks":{"description":"Tasks one operator may hold at once inside this area — only when the terminal names the area (spec §4.1). Read by `TaskService::claim_one_in_area` since step 6; without a named area the warehouse default (`TASK_MAX_CONCURRENT_DEFAULT`) rules instead.","format":"int16","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"pack_station_location":{"description":"The area's pack station (wms-app 065; post-pick spec О-1, D-55): the `Pack` location its carriers are delivered to when their units go to packing. `None` — no station: picking delivers as before. Only a `Pack` location (wms-app 079).","type":["string","null"]},"picking_policy_code":{"description":"Code of the picking policy this area works by (its published revision); `None` = `DISCRETE`. Read side only — assignment goes through `PickingPolicyBmc::assign_to_work_area` (wms-app 042).","type":["string","null"]}},"required":["add_when","add_who","allow_task_release","code","description","id","max_concurrent_tasks","mod_when","mod_who"],"title":"WorkArea","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"allow_task_release":false,"code":"<code>","description":"<description>","id":1,"max_concurrent_tasks":1,"mod_when":"<mod_when>","mod_who":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_work_area_zone":{"post":{"operationId":"delete_work_area_zone","summary":"Delete a work_area_zone by ID — CRUD.","description":"Delete a work_area_zone by ID — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["tasks"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"DEPENDENT_DATA_EXIST","when":"Other rows still use this row."}],"x-quark-module":"work_area","x-quark-operation":"delete","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_work_area_zone"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_work_area_zone","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"One putaway zone of a work area. Many-to-many: a zone may belong to several areas (`UNIQUE (work_area_id, putawayzone)`, not unique by zone).","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"putawayzone":{"type":"string"},"work_area_id":{"format":"int64","type":"integer"}},"required":["add_when","add_who","id","mod_when","mod_who","putawayzone","work_area_id"],"title":"WorkAreaZone","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"id":1,"mod_when":"<mod_when>","mod_who":1,"putawayzone":"<putawayzone>","work_area_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_work_area":{"post":{"operationId":"count_work_area","summary":"Count work_area — CRUD.","description":"Count work_area — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["tasks"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"work_area","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_work_area"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_work_area"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#create_equipment_profile":{"post":{"operationId":"create_equipment_profile","summary":"Create a new equipment_profile — CRUD.","description":"Create a new equipment_profile — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["tasks"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"UNIQUE_VIOLATION or INVALID_DATA","when":"The code already exists, or a value breaks a rule."}],"x-quark-module":"equipment_profile","x-quark-operation":"create","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"create_equipment_profile"},"params":{"type":"object","properties":{"data":{"description":"A field left `None` is left out of the INSERT, so the column takes its DEFAULT (`''`, `0`, `0`, `true` — wms-app 320).","properties":{"code":{"type":"string"},"description":{"type":["string","null"]},"is_active":{"type":["boolean","null"]},"max_weight":{"format":"double","type":["number","null"]},"weight_reduction_per_level":{"format":"double","type":["number","null"]}},"required":["code"],"title":"EquipmentProfileForCreate","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"create_equipment_profile","params":{"data":{"code":"<code>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"<Strong>Equipment profile</Strong> — the machine an operator drives, how much it lifts, and (through [`EquipmentProfileZoneExclusion`]) the putaway zones it cannot enter (task-manager pass 2, step 3, `docs/superpowers/specs/2026-08-27-work-areas-operator-profile-design.md` §2.3). An operator points here through `operator.equipment_profile_id`; no profile means on foot.\n\nStep 5 narrows an operator's zones by its exclusions; its weights limit which tasks dispatch hands them ([`LiftCapacity`]).","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"description":{"type":"string"},"id":{"format":"int64","type":"integer"},"is_active":{"type":"boolean"},"max_weight":{"description":"What the machine lifts at ground level; `0` = no limit, the putaway engine's convention for every capacity column.","format":"double","type":"number"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"weight_reduction_per_level":{"description":"Lost per location level: up there the machine lifts `max_weight - weight_reduction_per_level * location.level`.","format":"double","type":"number"}},"required":["add_when","add_who","code","description","id","is_active","max_weight","mod_when","mod_who","weight_reduction_per_level"],"title":"EquipmentProfile","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","description":"<description>","id":1,"is_active":false,"max_weight":1.5,"mod_when":"<mod_when>","mod_who":1,"weight_reduction_per_level":1.5}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#create_equipment_profile_zone_exclusion":{"post":{"operationId":"create_equipment_profile_zone_exclusion","summary":"Create a new equipment_profile_zone_exclusion — CRUD.","description":"Create a new equipment_profile_zone_exclusion — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["tasks"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"UNIQUE_VIOLATION or INVALID_DATA","when":"The code already exists, or a value breaks a rule."}],"x-quark-module":"equipment_profile","x-quark-operation":"create","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"create_equipment_profile_zone_exclusion"},"params":{"type":"object","properties":{"data":{"properties":{"equipment_profile_id":{"format":"int64","type":"integer"},"putawayzone":{"type":"string"}},"required":["equipment_profile_id","putawayzone"],"title":"EquipmentProfileZoneExclusionForCreate","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"create_equipment_profile_zone_exclusion","params":{"data":{"equipment_profile_id":1,"putawayzone":"<putawayzone>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"One putaway zone the profile's machine may NOT enter. Exclusions, not permissions (spec §2.4): a zone nobody listed is open to the whole fleet.","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"equipment_profile_id":{"format":"int64","type":"integer"},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"putawayzone":{"type":"string"}},"required":["add_when","add_who","equipment_profile_id","id","mod_when","mod_who","putawayzone"],"title":"EquipmentProfileZoneExclusion","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"equipment_profile_id":1,"id":1,"mod_when":"<mod_when>","mod_who":1,"putawayzone":"<putawayzone>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_equipment_profile":{"post":{"operationId":"get_equipment_profile","summary":"Get a equipment_profile by ID — CRUD.","description":"Get a equipment_profile by ID — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["tasks"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"equipment_profile","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_equipment_profile"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_equipment_profile","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"<Strong>Equipment profile</Strong> — the machine an operator drives, how much it lifts, and (through [`EquipmentProfileZoneExclusion`]) the putaway zones it cannot enter (task-manager pass 2, step 3, `docs/superpowers/specs/2026-08-27-work-areas-operator-profile-design.md` §2.3). An operator points here through `operator.equipment_profile_id`; no profile means on foot.\n\nStep 5 narrows an operator's zones by its exclusions; its weights limit which tasks dispatch hands them ([`LiftCapacity`]).","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"description":{"type":"string"},"id":{"format":"int64","type":"integer"},"is_active":{"type":"boolean"},"max_weight":{"description":"What the machine lifts at ground level; `0` = no limit, the putaway engine's convention for every capacity column.","format":"double","type":"number"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"weight_reduction_per_level":{"description":"Lost per location level: up there the machine lifts `max_weight - weight_reduction_per_level * location.level`.","format":"double","type":"number"}},"required":["add_when","add_who","code","description","id","is_active","max_weight","mod_when","mod_who","weight_reduction_per_level"],"title":"EquipmentProfile","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","description":"<description>","id":1,"is_active":false,"max_weight":1.5,"mod_when":"<mod_when>","mod_who":1,"weight_reduction_per_level":1.5}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_equipment_profile_zone_exclusion":{"post":{"operationId":"get_equipment_profile_zone_exclusion","summary":"Get a equipment_profile_zone_exclusion by ID — CRUD.","description":"Get a equipment_profile_zone_exclusion by ID — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["tasks"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"equipment_profile","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_equipment_profile_zone_exclusion"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_equipment_profile_zone_exclusion","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"One putaway zone the profile's machine may NOT enter. Exclusions, not permissions (spec §2.4): a zone nobody listed is open to the whole fleet.","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"equipment_profile_id":{"format":"int64","type":"integer"},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"putawayzone":{"type":"string"}},"required":["add_when","add_who","equipment_profile_id","id","mod_when","mod_who","putawayzone"],"title":"EquipmentProfileZoneExclusion","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"equipment_profile_id":1,"id":1,"mod_when":"<mod_when>","mod_who":1,"putawayzone":"<putawayzone>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_equipment_profile":{"post":{"operationId":"list_equipment_profile","summary":"List equipment_profile — CRUD.","description":"List equipment_profile — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["tasks"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"equipment_profile","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_equipment_profile"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_equipment_profile"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/EquipmentProfile"},"title":"Array_of_EquipmentProfile","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"code":"<code>","description":"<description>","id":1,"is_active":false,"max_weight":1.5,"mod_when":"<mod_when>","mod_who":1,"weight_reduction_per_level":1.5}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_equipment_profile_zone_exclusion":{"post":{"operationId":"list_equipment_profile_zone_exclusion","summary":"List equipment_profile_zone_exclusion — CRUD.","description":"List equipment_profile_zone_exclusion — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["tasks"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"equipment_profile","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_equipment_profile_zone_exclusion"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_equipment_profile_zone_exclusion"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/EquipmentProfileZoneExclusion"},"title":"Array_of_EquipmentProfileZoneExclusion","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"equipment_profile_id":1,"id":1,"mod_when":"<mod_when>","mod_who":1,"putawayzone":"<putawayzone>"}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#update_equipment_profile":{"post":{"operationId":"update_equipment_profile","summary":"Update equipment limits without changing the profile's stable code.","description":"Update equipment limits without changing the profile's stable code.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["tasks"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"INVALID_DATA","when":"A value breaks a rule."}],"x-quark-module":"equipment_profile","x-quark-operation":"update","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"update_equipment_profile"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"},"data":{"additionalProperties":false,"properties":{"description":{"type":"string"},"is_active":{"type":"boolean"},"max_weight":{"format":"double","type":"number"},"weight_reduction_per_level":{"format":"double","type":"number"}},"title":"EquipmentProfileUpdateApi","type":"object"}},"required":["id","data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"update_equipment_profile","params":{"id":1,"data":{"description":"<description>","is_active":false,"max_weight":1.5}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"<Strong>Equipment profile</Strong> — the machine an operator drives, how much it lifts, and (through [`EquipmentProfileZoneExclusion`]) the putaway zones it cannot enter (task-manager pass 2, step 3, `docs/superpowers/specs/2026-08-27-work-areas-operator-profile-design.md` §2.3). An operator points here through `operator.equipment_profile_id`; no profile means on foot.\n\nStep 5 narrows an operator's zones by its exclusions; its weights limit which tasks dispatch hands them ([`LiftCapacity`]).","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"description":{"type":"string"},"id":{"format":"int64","type":"integer"},"is_active":{"type":"boolean"},"max_weight":{"description":"What the machine lifts at ground level; `0` = no limit, the putaway engine's convention for every capacity column.","format":"double","type":"number"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"weight_reduction_per_level":{"description":"Lost per location level: up there the machine lifts `max_weight - weight_reduction_per_level * location.level`.","format":"double","type":"number"}},"required":["add_when","add_who","code","description","id","is_active","max_weight","mod_when","mod_who","weight_reduction_per_level"],"title":"EquipmentProfile","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","description":"<description>","id":1,"is_active":false,"max_weight":1.5,"mod_when":"<mod_when>","mod_who":1,"weight_reduction_per_level":1.5}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#update_equipment_profile_zone_exclusion":{"post":{"operationId":"update_equipment_profile_zone_exclusion","summary":"Move an equipment-profile exclusion to another zone; null/profile changes are rejected.","description":"Move an equipment-profile exclusion to another zone; null/profile changes are rejected.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["tasks"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"INVALID_DATA","when":"A value breaks a rule."}],"x-quark-module":"equipment_profile","x-quark-operation":"update","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"update_equipment_profile_zone_exclusion"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"},"data":{"additionalProperties":false,"properties":{"putawayzone":{"type":"string"}},"title":"EquipmentProfileZoneExclusionUpdateApi","type":"object"}},"required":["id","data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"update_equipment_profile_zone_exclusion","params":{"id":1,"data":{"putawayzone":"<putawayzone>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"One putaway zone the profile's machine may NOT enter. Exclusions, not permissions (spec §2.4): a zone nobody listed is open to the whole fleet.","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"equipment_profile_id":{"format":"int64","type":"integer"},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"putawayzone":{"type":"string"}},"required":["add_when","add_who","equipment_profile_id","id","mod_when","mod_who","putawayzone"],"title":"EquipmentProfileZoneExclusion","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"equipment_profile_id":1,"id":1,"mod_when":"<mod_when>","mod_who":1,"putawayzone":"<putawayzone>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_equipment_profile":{"post":{"operationId":"delete_equipment_profile","summary":"Delete a equipment_profile by ID — CRUD.","description":"Delete a equipment_profile by ID — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["tasks"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"DEPENDENT_DATA_EXIST","when":"Other rows still use this row."}],"x-quark-module":"equipment_profile","x-quark-operation":"delete","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_equipment_profile"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_equipment_profile","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"<Strong>Equipment profile</Strong> — the machine an operator drives, how much it lifts, and (through [`EquipmentProfileZoneExclusion`]) the putaway zones it cannot enter (task-manager pass 2, step 3, `docs/superpowers/specs/2026-08-27-work-areas-operator-profile-design.md` §2.3). An operator points here through `operator.equipment_profile_id`; no profile means on foot.\n\nStep 5 narrows an operator's zones by its exclusions; its weights limit which tasks dispatch hands them ([`LiftCapacity`]).","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"description":{"type":"string"},"id":{"format":"int64","type":"integer"},"is_active":{"type":"boolean"},"max_weight":{"description":"What the machine lifts at ground level; `0` = no limit, the putaway engine's convention for every capacity column.","format":"double","type":"number"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"weight_reduction_per_level":{"description":"Lost per location level: up there the machine lifts `max_weight - weight_reduction_per_level * location.level`.","format":"double","type":"number"}},"required":["add_when","add_who","code","description","id","is_active","max_weight","mod_when","mod_who","weight_reduction_per_level"],"title":"EquipmentProfile","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","description":"<description>","id":1,"is_active":false,"max_weight":1.5,"mod_when":"<mod_when>","mod_who":1,"weight_reduction_per_level":1.5}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_equipment_profile_zone_exclusion":{"post":{"operationId":"delete_equipment_profile_zone_exclusion","summary":"Delete a equipment_profile_zone_exclusion by ID — CRUD.","description":"Delete a equipment_profile_zone_exclusion by ID — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["tasks"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"DEPENDENT_DATA_EXIST","when":"Other rows still use this row."}],"x-quark-module":"equipment_profile","x-quark-operation":"delete","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_equipment_profile_zone_exclusion"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_equipment_profile_zone_exclusion","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"One putaway zone the profile's machine may NOT enter. Exclusions, not permissions (spec §2.4): a zone nobody listed is open to the whole fleet.","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"equipment_profile_id":{"format":"int64","type":"integer"},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"putawayzone":{"type":"string"}},"required":["add_when","add_who","equipment_profile_id","id","mod_when","mod_who","putawayzone"],"title":"EquipmentProfileZoneExclusion","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"equipment_profile_id":1,"id":1,"mod_when":"<mod_when>","mod_who":1,"putawayzone":"<putawayzone>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_many_equipment_profile":{"post":{"operationId":"delete_many_equipment_profile","summary":"Delete multiple equipment_profile by IDs — CRUD.","description":"Delete multiple equipment_profile by IDs — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["tasks"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"DEPENDENT_DATA_EXIST","when":"Other rows still use this row."}],"x-quark-module":"equipment_profile","x-quark-operation":"delete","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_many_equipment_profile"},"params":{"type":"object","properties":{"ids":{"items":{"format":"int64","type":"integer"},"type":"array","description":"Record IDs"}},"required":["ids"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_many_equipment_profile","params":{"ids":[1]}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"uint64","minimum":0,"title":"uint64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_many_equipment_profile_zone_exclusion":{"post":{"operationId":"delete_many_equipment_profile_zone_exclusion","summary":"Delete multiple equipment_profile_zone_exclusion by IDs — CRUD.","description":"Delete multiple equipment_profile_zone_exclusion by IDs — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["tasks"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"DEPENDENT_DATA_EXIST","when":"Other rows still use this row."}],"x-quark-module":"equipment_profile","x-quark-operation":"delete","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_many_equipment_profile_zone_exclusion"},"params":{"type":"object","properties":{"ids":{"items":{"format":"int64","type":"integer"},"type":"array","description":"Record IDs"}},"required":["ids"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_many_equipment_profile_zone_exclusion","params":{"ids":[1]}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"uint64","minimum":0,"title":"uint64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_equipment_profile":{"post":{"operationId":"count_equipment_profile","summary":"Count equipment_profile — CRUD.","description":"Count equipment_profile — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["tasks"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"equipment_profile","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_equipment_profile"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_equipment_profile"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_operator":{"post":{"operationId":"get_operator","summary":"Get a operator by ID — CRUD.","description":"Get a operator by ID — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["tasks"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"operator","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_operator"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_operator","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"equipment_profile_id":{"description":"The machine this operator drives (`equipment_profile`, wms-app 320); `None` = on foot. Set by hand — `sync_from_enterprise` writes only the three columns it projects and never touches this one.","format":"int64","type":["integer","null"]},"full_name":{"type":["string","null"]},"id":{"description":"Equals `enterprise.user.id` — see the module doc comment.","format":"int64","type":"integer"},"is_active":{"type":"boolean"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"synced_at":{"type":"string"},"username":{"type":"string"}},"required":["add_when","add_who","id","is_active","mod_when","mod_who","synced_at","username"],"title":"Operator","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"id":1,"is_active":false,"mod_when":"<mod_when>","mod_who":1,"synced_at":"<synced_at>","username":"<username>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_operator":{"post":{"operationId":"list_operator","summary":"List operator — CRUD.","description":"List operator — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["tasks"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"operator","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_operator"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_operator"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/Operator"},"title":"Array_of_Operator","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"id":1,"is_active":false,"mod_when":"<mod_when>","mod_who":1,"synced_at":"<synced_at>","username":"<username>"}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_operator":{"post":{"operationId":"count_operator","summary":"Count operator — CRUD.","description":"Count operator — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["tasks"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"operator","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_operator"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_operator"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#update_operator":{"post":{"operationId":"update_operator","summary":"Update an operator's equipment profile; an explicit JSON null clears it (the operator is on foot). Login, name and active come from the users sync and are not writable here.","description":"Update an operator's equipment profile; an explicit JSON null clears it (the operator is on foot). Login, name and active come from the users sync and are not writable here.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["tasks"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"operator","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"update_operator"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"},"data":{"description":"What a PERSON may change on an operator: the equipment profile, nothing else. `username`, `full_name` and `is_active` belong to the sync job (`sync_from_enterprise`), which would overwrite a hand edit on its next pass — so they are not fields here, and no payload can reach them.","properties":{"equipment_profile_id":{"description":"`None` leaves it alone; an explicit JSON `null` clears it (on foot) — see [`OPERATOR_CLEARABLE_COLUMNS`].","format":"int64","type":["integer","null"]}},"title":"OperatorForUpdate","type":"object"}},"required":["id","data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"update_operator","params":{"id":1,"data":{"equipment_profile_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"equipment_profile_id":{"description":"The machine this operator drives (`equipment_profile`, wms-app 320); `None` = on foot. Set by hand — `sync_from_enterprise` writes only the three columns it projects and never touches this one.","format":"int64","type":["integer","null"]},"full_name":{"type":["string","null"]},"id":{"description":"Equals `enterprise.user.id` — see the module doc comment.","format":"int64","type":"integer"},"is_active":{"type":"boolean"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"synced_at":{"type":"string"},"username":{"type":"string"}},"required":["add_when","add_who","id","is_active","mod_when","mod_who","synced_at","username"],"title":"Operator","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"id":1,"is_active":false,"mod_when":"<mod_when>","mod_who":1,"synced_at":"<synced_at>","username":"<username>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#sync_operators":{"post":{"operationId":"sync_operators","summary":"Sync this warehouse's operators from its users now (the same projection the 5-minute background sync runs). The warehouse is the request context's.","description":"Sync this warehouse's operators from its users now (the same projection the 5-minute background sync runs). The warehouse is the request context's.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog says this method needs no idempotency key.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["tasks"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"operator","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"sync_operators"},"params":{"type":"object","properties":{"data":{"description":"`sync_operators` takes nothing: the warehouse is the request context's.","title":"SyncOperatorsInput","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"sync_operators","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"What one Sync press did to this warehouse's operator list.","properties":{"deactivated":{"description":"Operators whose user lost RF login, went inactive or left the warehouse — deactivated, never deleted (`task.assignee` refers to them).","format":"uint64","minimum":0,"type":"integer"},"upserted":{"description":"Operators created, or refreshed from a user whose login, name or active state had changed.","format":"uint64","minimum":0,"type":"integer"}},"required":["deactivated","upserted"],"title":"SyncOperatorsResult","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"deactivated":1,"upserted":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#create_operator_task_permission":{"post":{"operationId":"create_operator_task_permission","summary":"Create a new operator_task_permission — CRUD.","description":"Create a new operator_task_permission — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["tasks"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"UNIQUE_VIOLATION or INVALID_DATA","when":"The code already exists, or a value breaks a rule."}],"x-quark-module":"operator","x-quark-operation":"create","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"create_operator_task_permission"},"params":{"type":"object","properties":{"data":{"properties":{"operator_id":{"format":"int64","type":"integer"},"pick_execution_enabled":{"default":null,"description":"The Pick rollout gate, as the grant is created. `None` leaves the column to its default (off). It must be accepted HERE, not only on update: the permission screen offers the checkbox on New, and a create struct without the field let serde drop a ticked box silently — the grant was stored with Pick Execution off while the screen said it was saved.","type":["boolean","null"]},"task_type":{"$ref":"#/components/schemas/TaskType"},"work_area_id":{"format":"int64","type":"integer"}},"required":["operator_id","task_type","work_area_id"],"title":"OperatorTaskPermissionForCreate","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"create_operator_task_permission","params":{"data":{"operator_id":1,"task_type":"Pick","work_area_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"operator_id":{"format":"int64","type":"integer"},"pick_execution_enabled":{"description":"Rollout gate for the dedicated source-owned Pick RF flow. The row is still the generic permission; this flag only controls new Pick issue.","type":"boolean"},"task_type":{"$ref":"#/components/schemas/TaskType"},"work_area_id":{"format":"int64","type":"integer"}},"required":["add_when","add_who","id","mod_when","mod_who","operator_id","pick_execution_enabled","task_type","work_area_id"],"title":"OperatorTaskPermission","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"id":1,"mod_when":"<mod_when>","mod_who":1,"operator_id":1,"pick_execution_enabled":false,"task_type":"Pick","work_area_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_operator_task_permission":{"post":{"operationId":"get_operator_task_permission","summary":"Get a operator_task_permission by ID — CRUD.","description":"Get a operator_task_permission by ID — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["tasks"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"operator","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_operator_task_permission"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_operator_task_permission","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"operator_id":{"format":"int64","type":"integer"},"pick_execution_enabled":{"description":"Rollout gate for the dedicated source-owned Pick RF flow. The row is still the generic permission; this flag only controls new Pick issue.","type":"boolean"},"task_type":{"$ref":"#/components/schemas/TaskType"},"work_area_id":{"format":"int64","type":"integer"}},"required":["add_when","add_who","id","mod_when","mod_who","operator_id","pick_execution_enabled","task_type","work_area_id"],"title":"OperatorTaskPermission","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"id":1,"mod_when":"<mod_when>","mod_who":1,"operator_id":1,"pick_execution_enabled":false,"task_type":"Pick","work_area_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_operator_task_permission":{"post":{"operationId":"list_operator_task_permission","summary":"List operator_task_permission — CRUD.","description":"List operator_task_permission — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["tasks"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"operator","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_operator_task_permission"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_operator_task_permission"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/OperatorTaskPermission"},"title":"Array_of_OperatorTaskPermission","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"id":1,"mod_when":"<mod_when>","mod_who":1,"operator_id":1,"pick_execution_enabled":false,"task_type":"Pick","work_area_id":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_operator_task_permission":{"post":{"operationId":"count_operator_task_permission","summary":"Count operator_task_permission — CRUD.","description":"Count operator_task_permission — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["tasks"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"operator","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_operator_task_permission"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_operator_task_permission"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#update_operator_task_permission":{"post":{"operationId":"update_operator_task_permission","summary":"Update a task permission's type, work area, or dedicated Pick rollout flag; null and operator changes are rejected.","description":"Update a task permission's type, work area, or dedicated Pick rollout flag; null and operator changes are rejected.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["tasks"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"INVALID_DATA","when":"A value breaks a rule."}],"x-quark-module":"operator","x-quark-operation":"update","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"update_operator_task_permission"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"},"data":{"additionalProperties":false,"description":"`operator_id` is the immutable owner of the permission row. Task type and work area remain editable, but neither can be cleared.","properties":{"pick_execution_enabled":{"type":"boolean"},"task_type":{"oneOf":[{"enum":["Pick","Putaway","Replenish","Move"],"type":"string"},{"description":"One location of an inventory count, one attempt (source `inventory_count_task`, wms-app 062). No quantity: the count is blind.","enum":["Count"],"type":"string"}]},"work_area_id":{"format":"int64","type":"integer"}},"title":"OperatorTaskPermissionUpdateApi","type":"object"}},"required":["id","data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"update_operator_task_permission","params":{"id":1,"data":{"pick_execution_enabled":false,"task_type":"Pick","work_area_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"operator_id":{"format":"int64","type":"integer"},"pick_execution_enabled":{"description":"Rollout gate for the dedicated source-owned Pick RF flow. The row is still the generic permission; this flag only controls new Pick issue.","type":"boolean"},"task_type":{"$ref":"#/components/schemas/TaskType"},"work_area_id":{"format":"int64","type":"integer"}},"required":["add_when","add_who","id","mod_when","mod_who","operator_id","pick_execution_enabled","task_type","work_area_id"],"title":"OperatorTaskPermission","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"id":1,"mod_when":"<mod_when>","mod_who":1,"operator_id":1,"pick_execution_enabled":false,"task_type":"Pick","work_area_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_operator_task_permission":{"post":{"operationId":"delete_operator_task_permission","summary":"Delete a operator_task_permission by ID — CRUD.","description":"Delete a operator_task_permission by ID — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["tasks"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"DEPENDENT_DATA_EXIST","when":"Other rows still use this row."}],"x-quark-module":"operator","x-quark-operation":"delete","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_operator_task_permission"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_operator_task_permission","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"operator_id":{"format":"int64","type":"integer"},"pick_execution_enabled":{"description":"Rollout gate for the dedicated source-owned Pick RF flow. The row is still the generic permission; this flag only controls new Pick issue.","type":"boolean"},"task_type":{"$ref":"#/components/schemas/TaskType"},"work_area_id":{"format":"int64","type":"integer"}},"required":["add_when","add_who","id","mod_when","mod_who","operator_id","pick_execution_enabled","task_type","work_area_id"],"title":"OperatorTaskPermission","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"id":1,"mod_when":"<mod_when>","mod_who":1,"operator_id":1,"pick_execution_enabled":false,"task_type":"Pick","work_area_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_many_operator_task_permission":{"post":{"operationId":"delete_many_operator_task_permission","summary":"Delete multiple operator_task_permission by IDs — CRUD.","description":"Delete multiple operator_task_permission by IDs — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["tasks"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"DEPENDENT_DATA_EXIST","when":"Other rows still use this row."}],"x-quark-module":"operator","x-quark-operation":"delete","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_many_operator_task_permission"},"params":{"type":"object","properties":{"ids":{"items":{"format":"int64","type":"integer"},"type":"array","description":"Record IDs"}},"required":["ids"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_many_operator_task_permission","params":{"ids":[1]}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"uint64","minimum":0,"title":"uint64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_task":{"post":{"operationId":"get_task","summary":"Get a task by id.","description":"Get a task by id.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["tasks"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"task","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_task"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_task","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"assignee":{"format":"int64","type":["integer","null"]},"batch_id":{"format":"int64","type":["integer","null"]},"claimed_at":{"default":null,"type":["string","null"]},"code":{"type":"string"},"container_id":{"format":"int64","type":["integer","null"]},"created_at":{"type":"string"},"ended_at":{"default":null,"type":["string","null"]},"escalated_at":{"default":null,"description":"Когда задача ушла супервайзеру: отказов набралось до порога `TASK_SKIP_ESCALATE_AFTER`. Пока стоит — выдача её не отдаёт никому.","type":["string","null"]},"from_location":{"type":["string","null"]},"heartbeat_at":{"default":null,"type":["string","null"]},"id":{"format":"int64","type":"integer"},"lease_expires_at":{"default":null,"type":["string","null"]},"lot":{"type":["string","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"owner_id":{"format":"int64","type":["integer","null"]},"priority":{"format":"int16","type":"integer"},"qty":{"format":"double","type":["number","null"]},"qty_done":{"format":"double","type":"number"},"refused_count":{"description":"Сколько раз от задачи ОТКАЗАЛИСЬ (сдача в счёт не идёт). Растёт в [`TaskBmc::release_to_pool`], обнуляется только переназначением супервайзером ([`TaskBmc::reassign_cas`]) — миграция 307.","format":"int32","type":"integer"},"return_kind":{"description":"КАК задача в последний раз вернулась в пул: `Refused` (отказ оператора), `HandedBack` (сдача), `Seized` (изъял супервайзер), `Expired` (истекла аренда). `skip_reason` пишут все трое, у кого есть причина, и без этого поля доска выдавала бы причину изъятия за причину отказа (миграция 308). Снимается вместе с `skip_reason`, когда задачу снова берут.","type":["string","null"]},"short_reason_code":{"type":["string","null"]},"short_reason_note":{"type":["string","null"]},"skip_reason":{"type":["string","null"]},"skipped_at":{"default":null,"type":["string","null"]},"sku_code":{"type":["string","null"]},"source_id":{"format":"int64","type":"integer"},"source_type":{"type":"string"},"started_at":{"default":null,"type":["string","null"]},"status":{"$ref":"#/components/schemas/TaskStatus"},"task_type":{"$ref":"#/components/schemas/TaskType"},"to_location":{"type":["string","null"]},"uom":{"type":["string","null"]},"version":{"format":"int32","type":"integer"},"wave_id":{"format":"int64","type":["integer","null"]},"weight":{"description":"Вес запаса задачи на момент её создания — единственная формула веса (`pack::StockWeights`), скопированная, как и `qty` (wms-app 340).\n\n`None` — взвесить было нечем (`PhysicalMetric::Unknown`): ни у базовой строки упаковки, ни у карточки товара веса нет. Такая задача проходит любой предел грузоподъёмности — проверка, которой нечего сравнивать, не имеет права отказывать (wms-app 341, спека физических измерений §9.2). Ноль больше не значит «неизвестно»: он сравнивается как число.","format":"double","type":["number","null"]},"workstation_completed_by":{"default":null,"description":"Real web executor of source-owned workstation Pick completion. A pooled task can finish without pretending it had an RF assignment.","format":"int64","type":["integer","null"]}},"required":["add_when","add_who","code","created_at","id","mod_when","mod_who","priority","qty_done","refused_count","source_id","source_type","status","task_type","version"],"title":"Task","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","created_at":"<created_at>","id":1,"mod_when":"<mod_when>","mod_who":1,"priority":1,"qty_done":1.5,"refused_count":1,"source_id":1,"source_type":"<source_type>","status":"InProgress","task_type":"Pick","version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_task":{"post":{"operationId":"list_task","summary":"List tasks, optionally filtered.","description":"List tasks, optionally filtered.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["tasks"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"task","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_task"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_task"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/Task"},"title":"Array_of_Task","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"code":"<code>","created_at":"<created_at>","id":1,"mod_when":"<mod_when>","mod_who":1,"priority":1,"qty_done":1.5,"refused_count":1,"source_id":1,"source_type":"<source_type>","status":"InProgress","task_type":"Pick","version":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_task":{"post":{"operationId":"count_task","summary":"Count tasks, optionally filtered.","description":"Count tasks, optionally filtered.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["tasks"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"task","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_task"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_task"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#task_claim":{"post":{"operationId":"task_claim","summary":"Claim work: your own unfinished task if you have one, else one from the pool.","description":"Claim work: your own unfinished task if you have one, else one from the pool.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["tasks"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"task_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"task_claim"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"description":"`task_claim` wire command. No `assignee` field — see above.","properties":{"idempotency_key":{"format":"uuid","type":"string"},"task_type":{"$ref":"#/components/schemas/TaskType"},"work_area_id":{"default":null,"description":"The work area the terminal is set to, when it names one (spec §4.1): only that area's tasks are handed out. Absent — the MVP's call, still lawful — means \"across every work area I hold this right in\". Optional on the wire, so no existing caller breaks.","format":"int64","type":["integer","null"]}},"required":["idempotency_key","task_type"],"title":"ClaimTask","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"task_claim","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"task_type":"Pick"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"`task: None` is a normal answer (pool empty for this type), not an error — mirrors `claim_one`'s own `Result<Option<Task>, TaskError>`.","properties":{"task":{"anyOf":[{"$ref":"#/components/schemas/Task"},{"type":"null"}]}},"title":"ClaimTaskResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"task":{"add_when":"<add_when>","add_who":1,"code":"<code>","created_at":"<created_at>","id":1,"mod_when":"<mod_when>","mod_who":1,"priority":1,"qty_done":1.5,"refused_count":1,"source_id":1,"source_type":"<source_type>","status":"InProgress","task_type":"Pick","version":1}}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#task_heartbeat":{"post":{"operationId":"task_heartbeat","summary":"Renew the holder's live task lease without reporting quantity progress.","description":"Renew the holder's live task lease without reporting quantity progress.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["tasks"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"task_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"task_heartbeat"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"description":"Wire command. Retrying one request replays its first result; a subsequent heartbeat uses a new key and therefore extends the lease again.","properties":{"idempotency_key":{"format":"uuid","type":"string"},"task_id":{"format":"int64","type":"integer"}},"required":["idempotency_key","task_id"],"title":"HeartbeatTask","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"task_heartbeat","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"task_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"assignee":{"format":"int64","type":["integer","null"]},"batch_id":{"format":"int64","type":["integer","null"]},"claimed_at":{"default":null,"type":["string","null"]},"code":{"type":"string"},"container_id":{"format":"int64","type":["integer","null"]},"created_at":{"type":"string"},"ended_at":{"default":null,"type":["string","null"]},"escalated_at":{"default":null,"description":"Когда задача ушла супервайзеру: отказов набралось до порога `TASK_SKIP_ESCALATE_AFTER`. Пока стоит — выдача её не отдаёт никому.","type":["string","null"]},"from_location":{"type":["string","null"]},"heartbeat_at":{"default":null,"type":["string","null"]},"id":{"format":"int64","type":"integer"},"lease_expires_at":{"default":null,"type":["string","null"]},"lot":{"type":["string","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"owner_id":{"format":"int64","type":["integer","null"]},"priority":{"format":"int16","type":"integer"},"qty":{"format":"double","type":["number","null"]},"qty_done":{"format":"double","type":"number"},"refused_count":{"description":"Сколько раз от задачи ОТКАЗАЛИСЬ (сдача в счёт не идёт). Растёт в [`TaskBmc::release_to_pool`], обнуляется только переназначением супервайзером ([`TaskBmc::reassign_cas`]) — миграция 307.","format":"int32","type":"integer"},"return_kind":{"description":"КАК задача в последний раз вернулась в пул: `Refused` (отказ оператора), `HandedBack` (сдача), `Seized` (изъял супервайзер), `Expired` (истекла аренда). `skip_reason` пишут все трое, у кого есть причина, и без этого поля доска выдавала бы причину изъятия за причину отказа (миграция 308). Снимается вместе с `skip_reason`, когда задачу снова берут.","type":["string","null"]},"short_reason_code":{"type":["string","null"]},"short_reason_note":{"type":["string","null"]},"skip_reason":{"type":["string","null"]},"skipped_at":{"default":null,"type":["string","null"]},"sku_code":{"type":["string","null"]},"source_id":{"format":"int64","type":"integer"},"source_type":{"type":"string"},"started_at":{"default":null,"type":["string","null"]},"status":{"$ref":"#/components/schemas/TaskStatus"},"task_type":{"$ref":"#/components/schemas/TaskType"},"to_location":{"type":["string","null"]},"uom":{"type":["string","null"]},"version":{"format":"int32","type":"integer"},"wave_id":{"format":"int64","type":["integer","null"]},"weight":{"description":"Вес запаса задачи на момент её создания — единственная формула веса (`pack::StockWeights`), скопированная, как и `qty` (wms-app 340).\n\n`None` — взвесить было нечем (`PhysicalMetric::Unknown`): ни у базовой строки упаковки, ни у карточки товара веса нет. Такая задача проходит любой предел грузоподъёмности — проверка, которой нечего сравнивать, не имеет права отказывать (wms-app 341, спека физических измерений §9.2). Ноль больше не значит «неизвестно»: он сравнивается как число.","format":"double","type":["number","null"]},"workstation_completed_by":{"default":null,"description":"Real web executor of source-owned workstation Pick completion. A pooled task can finish without pretending it had an RF assignment.","format":"int64","type":["integer","null"]}},"required":["add_when","add_who","code","created_at","id","mod_when","mod_who","priority","qty_done","refused_count","source_id","source_type","status","task_type","version"],"title":"Task","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","created_at":"<created_at>","id":1,"mod_when":"<mod_when>","mod_who":1,"priority":1,"qty_done":1.5,"refused_count":1,"source_id":1,"source_type":"<source_type>","status":"InProgress","task_type":"Pick","version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#task_report_progress":{"post":{"operationId":"task_report_progress","summary":"Report progress (qty done) on a claimed task.","description":"Report progress (qty done) on a claimed task.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["tasks"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"task_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"task_report_progress"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"description":"`task_report_progress` wire command.","properties":{"delta":{"format":"double","type":"number"},"idempotency_key":{"format":"uuid","type":"string"},"task_id":{"format":"int64","type":"integer"}},"required":["delta","idempotency_key","task_id"],"title":"ReportTaskProgress","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"task_report_progress","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"delta":1.5,"task_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"assignee":{"format":"int64","type":["integer","null"]},"batch_id":{"format":"int64","type":["integer","null"]},"claimed_at":{"default":null,"type":["string","null"]},"code":{"type":"string"},"container_id":{"format":"int64","type":["integer","null"]},"created_at":{"type":"string"},"ended_at":{"default":null,"type":["string","null"]},"escalated_at":{"default":null,"description":"Когда задача ушла супервайзеру: отказов набралось до порога `TASK_SKIP_ESCALATE_AFTER`. Пока стоит — выдача её не отдаёт никому.","type":["string","null"]},"from_location":{"type":["string","null"]},"heartbeat_at":{"default":null,"type":["string","null"]},"id":{"format":"int64","type":"integer"},"lease_expires_at":{"default":null,"type":["string","null"]},"lot":{"type":["string","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"owner_id":{"format":"int64","type":["integer","null"]},"priority":{"format":"int16","type":"integer"},"qty":{"format":"double","type":["number","null"]},"qty_done":{"format":"double","type":"number"},"refused_count":{"description":"Сколько раз от задачи ОТКАЗАЛИСЬ (сдача в счёт не идёт). Растёт в [`TaskBmc::release_to_pool`], обнуляется только переназначением супервайзером ([`TaskBmc::reassign_cas`]) — миграция 307.","format":"int32","type":"integer"},"return_kind":{"description":"КАК задача в последний раз вернулась в пул: `Refused` (отказ оператора), `HandedBack` (сдача), `Seized` (изъял супервайзер), `Expired` (истекла аренда). `skip_reason` пишут все трое, у кого есть причина, и без этого поля доска выдавала бы причину изъятия за причину отказа (миграция 308). Снимается вместе с `skip_reason`, когда задачу снова берут.","type":["string","null"]},"short_reason_code":{"type":["string","null"]},"short_reason_note":{"type":["string","null"]},"skip_reason":{"type":["string","null"]},"skipped_at":{"default":null,"type":["string","null"]},"sku_code":{"type":["string","null"]},"source_id":{"format":"int64","type":"integer"},"source_type":{"type":"string"},"started_at":{"default":null,"type":["string","null"]},"status":{"$ref":"#/components/schemas/TaskStatus"},"task_type":{"$ref":"#/components/schemas/TaskType"},"to_location":{"type":["string","null"]},"uom":{"type":["string","null"]},"version":{"format":"int32","type":"integer"},"wave_id":{"format":"int64","type":["integer","null"]},"weight":{"description":"Вес запаса задачи на момент её создания — единственная формула веса (`pack::StockWeights`), скопированная, как и `qty` (wms-app 340).\n\n`None` — взвесить было нечем (`PhysicalMetric::Unknown`): ни у базовой строки упаковки, ни у карточки товара веса нет. Такая задача проходит любой предел грузоподъёмности — проверка, которой нечего сравнивать, не имеет права отказывать (wms-app 341, спека физических измерений §9.2). Ноль больше не значит «неизвестно»: он сравнивается как число.","format":"double","type":["number","null"]},"workstation_completed_by":{"default":null,"description":"Real web executor of source-owned workstation Pick completion. A pooled task can finish without pretending it had an RF assignment.","format":"int64","type":["integer","null"]}},"required":["add_when","add_who","code","created_at","id","mod_when","mod_who","priority","qty_done","refused_count","source_id","source_type","status","task_type","version"],"title":"Task","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","created_at":"<created_at>","id":1,"mod_when":"<mod_when>","mod_who":1,"priority":1,"qty_done":1.5,"refused_count":1,"source_id":1,"source_type":"<source_type>","status":"InProgress","task_type":"Pick","version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#task_finish":{"post":{"operationId":"task_finish","summary":"Finish a claimed task (Completed or Shorted, decided by qty done).","description":"Finish a claimed task (Completed or Shorted, decided by qty done).\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["tasks"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"task_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"task_finish"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"description":"`task_finish` wire command.","properties":{"idempotency_key":{"format":"uuid","type":"string"},"short_reason":{"default":null,"description":"Only persisted when `finish_task` decides the task is `Shorted` — a reason posted for a task that turns out `Completed` is silently dropped, mirroring `finish_task`'s own contract (the terminal status is the aggregate's call, not the caller's).","type":["string","null"]},"task_id":{"format":"int64","type":"integer"}},"required":["idempotency_key","task_id"],"title":"FinishTask","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"task_finish","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"task_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"assignee":{"format":"int64","type":["integer","null"]},"batch_id":{"format":"int64","type":["integer","null"]},"claimed_at":{"default":null,"type":["string","null"]},"code":{"type":"string"},"container_id":{"format":"int64","type":["integer","null"]},"created_at":{"type":"string"},"ended_at":{"default":null,"type":["string","null"]},"escalated_at":{"default":null,"description":"Когда задача ушла супервайзеру: отказов набралось до порога `TASK_SKIP_ESCALATE_AFTER`. Пока стоит — выдача её не отдаёт никому.","type":["string","null"]},"from_location":{"type":["string","null"]},"heartbeat_at":{"default":null,"type":["string","null"]},"id":{"format":"int64","type":"integer"},"lease_expires_at":{"default":null,"type":["string","null"]},"lot":{"type":["string","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"owner_id":{"format":"int64","type":["integer","null"]},"priority":{"format":"int16","type":"integer"},"qty":{"format":"double","type":["number","null"]},"qty_done":{"format":"double","type":"number"},"refused_count":{"description":"Сколько раз от задачи ОТКАЗАЛИСЬ (сдача в счёт не идёт). Растёт в [`TaskBmc::release_to_pool`], обнуляется только переназначением супервайзером ([`TaskBmc::reassign_cas`]) — миграция 307.","format":"int32","type":"integer"},"return_kind":{"description":"КАК задача в последний раз вернулась в пул: `Refused` (отказ оператора), `HandedBack` (сдача), `Seized` (изъял супервайзер), `Expired` (истекла аренда). `skip_reason` пишут все трое, у кого есть причина, и без этого поля доска выдавала бы причину изъятия за причину отказа (миграция 308). Снимается вместе с `skip_reason`, когда задачу снова берут.","type":["string","null"]},"short_reason_code":{"type":["string","null"]},"short_reason_note":{"type":["string","null"]},"skip_reason":{"type":["string","null"]},"skipped_at":{"default":null,"type":["string","null"]},"sku_code":{"type":["string","null"]},"source_id":{"format":"int64","type":"integer"},"source_type":{"type":"string"},"started_at":{"default":null,"type":["string","null"]},"status":{"$ref":"#/components/schemas/TaskStatus"},"task_type":{"$ref":"#/components/schemas/TaskType"},"to_location":{"type":["string","null"]},"uom":{"type":["string","null"]},"version":{"format":"int32","type":"integer"},"wave_id":{"format":"int64","type":["integer","null"]},"weight":{"description":"Вес запаса задачи на момент её создания — единственная формула веса (`pack::StockWeights`), скопированная, как и `qty` (wms-app 340).\n\n`None` — взвесить было нечем (`PhysicalMetric::Unknown`): ни у базовой строки упаковки, ни у карточки товара веса нет. Такая задача проходит любой предел грузоподъёмности — проверка, которой нечего сравнивать, не имеет права отказывать (wms-app 341, спека физических измерений §9.2). Ноль больше не значит «неизвестно»: он сравнивается как число.","format":"double","type":["number","null"]},"workstation_completed_by":{"default":null,"description":"Real web executor of source-owned workstation Pick completion. A pooled task can finish without pretending it had an RF assignment.","format":"int64","type":["integer","null"]}},"required":["add_when","add_who","code","created_at","id","mod_when","mod_who","priority","qty_done","refused_count","source_id","source_type","status","task_type","version"],"title":"Task","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","created_at":"<created_at>","id":1,"mod_when":"<mod_when>","mod_who":1,"priority":1,"qty_done":1.5,"refused_count":1,"source_id":1,"source_type":"<source_type>","status":"InProgress","task_type":"Pick","version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#task_skip":{"post":{"operationId":"task_skip","summary":"Give a claimed task back: refuse it (cools down) or hand it back (available at once).","description":"Give a claimed task back: refuse it (cools down) or hand it back (available at once).\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["tasks"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"task_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"task_skip"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"description":"`task_skip` wire command.","oneOf":[{"description":"Оператор ОТКАЗАЛСЯ: «эту паллету я уже поставил, дай другую».\n\nЗадача уходит в пул с отметкой и на время остывания не выдаётся НИКОМУ — иначе следующий запрос вернул бы её ему же, и он оказался бы в цикле.","properties":{"kind":{"enum":["Refused"],"type":"string"},"reason":{"type":"string"}},"required":["kind","reason"],"type":"object"},{"description":"Оператор СДАЛ задачу: перерыв, конец смены.\n\nОн ни от чего не отказывался, поэтому ни причины, ни отметки: строка возвращается в пул чистой и доступна любому немедленно. Прятать её на десять минут значило бы наказывать склад за чужой обед — и именно так это и работало, пока возврат был один на оба случая.","properties":{"kind":{"enum":["HandedBack"],"type":"string"}},"required":["kind"],"type":"object"}],"properties":{"idempotency_key":{"format":"uuid","type":"string"},"task_id":{"format":"int64","type":"integer"},"work_area_id":{"default":null,"description":"Участок, на который настроен терминал (шаг 6): из него берётся `allow_task_release`. Необязателен — прежний вызов законен и значит «вне объявленного участка», ровно как у `ClaimTask`.","format":"int64","type":["integer","null"]}},"required":["idempotency_key","task_id"],"title":"SkipTask","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"task_skip","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"kind":"Refused","reason":"<reason>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"assignee":{"format":"int64","type":["integer","null"]},"batch_id":{"format":"int64","type":["integer","null"]},"claimed_at":{"default":null,"type":["string","null"]},"code":{"type":"string"},"container_id":{"format":"int64","type":["integer","null"]},"created_at":{"type":"string"},"ended_at":{"default":null,"type":["string","null"]},"escalated_at":{"default":null,"description":"Когда задача ушла супервайзеру: отказов набралось до порога `TASK_SKIP_ESCALATE_AFTER`. Пока стоит — выдача её не отдаёт никому.","type":["string","null"]},"from_location":{"type":["string","null"]},"heartbeat_at":{"default":null,"type":["string","null"]},"id":{"format":"int64","type":"integer"},"lease_expires_at":{"default":null,"type":["string","null"]},"lot":{"type":["string","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"owner_id":{"format":"int64","type":["integer","null"]},"priority":{"format":"int16","type":"integer"},"qty":{"format":"double","type":["number","null"]},"qty_done":{"format":"double","type":"number"},"refused_count":{"description":"Сколько раз от задачи ОТКАЗАЛИСЬ (сдача в счёт не идёт). Растёт в [`TaskBmc::release_to_pool`], обнуляется только переназначением супервайзером ([`TaskBmc::reassign_cas`]) — миграция 307.","format":"int32","type":"integer"},"return_kind":{"description":"КАК задача в последний раз вернулась в пул: `Refused` (отказ оператора), `HandedBack` (сдача), `Seized` (изъял супервайзер), `Expired` (истекла аренда). `skip_reason` пишут все трое, у кого есть причина, и без этого поля доска выдавала бы причину изъятия за причину отказа (миграция 308). Снимается вместе с `skip_reason`, когда задачу снова берут.","type":["string","null"]},"short_reason_code":{"type":["string","null"]},"short_reason_note":{"type":["string","null"]},"skip_reason":{"type":["string","null"]},"skipped_at":{"default":null,"type":["string","null"]},"sku_code":{"type":["string","null"]},"source_id":{"format":"int64","type":"integer"},"source_type":{"type":"string"},"started_at":{"default":null,"type":["string","null"]},"status":{"$ref":"#/components/schemas/TaskStatus"},"task_type":{"$ref":"#/components/schemas/TaskType"},"to_location":{"type":["string","null"]},"uom":{"type":["string","null"]},"version":{"format":"int32","type":"integer"},"wave_id":{"format":"int64","type":["integer","null"]},"weight":{"description":"Вес запаса задачи на момент её создания — единственная формула веса (`pack::StockWeights`), скопированная, как и `qty` (wms-app 340).\n\n`None` — взвесить было нечем (`PhysicalMetric::Unknown`): ни у базовой строки упаковки, ни у карточки товара веса нет. Такая задача проходит любой предел грузоподъёмности — проверка, которой нечего сравнивать, не имеет права отказывать (wms-app 341, спека физических измерений §9.2). Ноль больше не значит «неизвестно»: он сравнивается как число.","format":"double","type":["number","null"]},"workstation_completed_by":{"default":null,"description":"Real web executor of source-owned workstation Pick completion. A pooled task can finish without pretending it had an RF assignment.","format":"int64","type":["integer","null"]}},"required":["add_when","add_who","code","created_at","id","mod_when","mod_who","priority","qty_done","refused_count","source_id","source_type","status","task_type","version"],"title":"Task","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","created_at":"<created_at>","id":1,"mod_when":"<mod_when>","mod_who":1,"priority":1,"qty_done":1.5,"refused_count":1,"source_id":1,"source_type":"<source_type>","status":"InProgress","task_type":"Pick","version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#task_reassign":{"post":{"operationId":"task_reassign","summary":"Supervisor reassigns a task to another operator.","description":"Supervisor reassigns a task to another operator.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n**Versioned entities:** task (id in data.task_id, version in data.expected_task_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_task_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["tasks"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[{"entity":"task","id_field":"task_id","version_field":"expected_task_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"task_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"task_reassign"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"description":"`task_reassign` wire command — one of two `stateful_command`s in this crate (`task_force_release`, below, is the other).\n\n`expected_task_version` lives in `data` (this struct), not `meta.expected_version`: ADR-058's typed-OCC convention colocates the version with the entity it guards (`.claude/rules/api-versioning-and-idempotency.md`), and the default `payload_for_hash` already strips every `expected_*_version` field from the idempotency hash, so a retry after a version refresh still dedupes.","properties":{"expected_task_version":{"format":"int32","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"},"task_id":{"format":"int64","type":"integer"},"to":{"format":"int64","type":"integer"}},"required":["expected_task_version","idempotency_key","task_id","to"],"title":"ReassignTask","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"task_reassign","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"expected_task_version":1,"task_id":1,"to":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"assignee":{"format":"int64","type":["integer","null"]},"batch_id":{"format":"int64","type":["integer","null"]},"claimed_at":{"default":null,"type":["string","null"]},"code":{"type":"string"},"container_id":{"format":"int64","type":["integer","null"]},"created_at":{"type":"string"},"ended_at":{"default":null,"type":["string","null"]},"escalated_at":{"default":null,"description":"Когда задача ушла супервайзеру: отказов набралось до порога `TASK_SKIP_ESCALATE_AFTER`. Пока стоит — выдача её не отдаёт никому.","type":["string","null"]},"from_location":{"type":["string","null"]},"heartbeat_at":{"default":null,"type":["string","null"]},"id":{"format":"int64","type":"integer"},"lease_expires_at":{"default":null,"type":["string","null"]},"lot":{"type":["string","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"owner_id":{"format":"int64","type":["integer","null"]},"priority":{"format":"int16","type":"integer"},"qty":{"format":"double","type":["number","null"]},"qty_done":{"format":"double","type":"number"},"refused_count":{"description":"Сколько раз от задачи ОТКАЗАЛИСЬ (сдача в счёт не идёт). Растёт в [`TaskBmc::release_to_pool`], обнуляется только переназначением супервайзером ([`TaskBmc::reassign_cas`]) — миграция 307.","format":"int32","type":"integer"},"return_kind":{"description":"КАК задача в последний раз вернулась в пул: `Refused` (отказ оператора), `HandedBack` (сдача), `Seized` (изъял супервайзер), `Expired` (истекла аренда). `skip_reason` пишут все трое, у кого есть причина, и без этого поля доска выдавала бы причину изъятия за причину отказа (миграция 308). Снимается вместе с `skip_reason`, когда задачу снова берут.","type":["string","null"]},"short_reason_code":{"type":["string","null"]},"short_reason_note":{"type":["string","null"]},"skip_reason":{"type":["string","null"]},"skipped_at":{"default":null,"type":["string","null"]},"sku_code":{"type":["string","null"]},"source_id":{"format":"int64","type":"integer"},"source_type":{"type":"string"},"started_at":{"default":null,"type":["string","null"]},"status":{"$ref":"#/components/schemas/TaskStatus"},"task_type":{"$ref":"#/components/schemas/TaskType"},"to_location":{"type":["string","null"]},"uom":{"type":["string","null"]},"version":{"format":"int32","type":"integer"},"wave_id":{"format":"int64","type":["integer","null"]},"weight":{"description":"Вес запаса задачи на момент её создания — единственная формула веса (`pack::StockWeights`), скопированная, как и `qty` (wms-app 340).\n\n`None` — взвесить было нечем (`PhysicalMetric::Unknown`): ни у базовой строки упаковки, ни у карточки товара веса нет. Такая задача проходит любой предел грузоподъёмности — проверка, которой нечего сравнивать, не имеет права отказывать (wms-app 341, спека физических измерений §9.2). Ноль больше не значит «неизвестно»: он сравнивается как число.","format":"double","type":["number","null"]},"workstation_completed_by":{"default":null,"description":"Real web executor of source-owned workstation Pick completion. A pooled task can finish without pretending it had an RF assignment.","format":"int64","type":["integer","null"]}},"required":["add_when","add_who","code","created_at","id","mod_when","mod_who","priority","qty_done","refused_count","source_id","source_type","status","task_type","version"],"title":"Task","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","created_at":"<created_at>","id":1,"mod_when":"<mod_when>","mod_who":1,"priority":1,"qty_done":1.5,"refused_count":1,"source_id":1,"source_type":"<source_type>","status":"InProgress","task_type":"Pick","version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#task_force_release":{"post":{"operationId":"task_force_release","summary":"Supervisor forcibly returns someone else's claimed task, or an escalated pooled one, to the pool.","description":"Supervisor forcibly returns someone else's claimed task, or an escalated pooled one, to the pool.\n\n**Category:** `stateful_command`. Changes data. Requires `meta.idempotency_key` and the current version of each row it checks.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n**Versioned entities:** task (id in data.task_id, version in data.expected_task_version).\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- Send the current version of the row in `expected_task_version`. If the row changed in between, the call fails with return code 40 and tells you the current state.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["tasks"],"x-quark-category":"stateful_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[{"entity":"task","id_field":"task_id","version_field":"expected_task_version"}],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR, return_code 40","when":"The row changed since you read it. The answer carries `context.current_state`. Read again and decide again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"task_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"task_force_release"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"description":"`task_force_release` wire command — the supervisor band's counterpart to `ReassignTask`. `expected_task_version` lives in `data` (this struct), same ADR-058 convention as `ReassignTask` above.","properties":{"expected_task_version":{"format":"int32","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"},"reason":{"type":"string"},"task_id":{"format":"int64","type":"integer"}},"required":["expected_task_version","idempotency_key","reason","task_id"],"title":"ForceReleaseTask","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"task_force_release","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"expected_task_version":1,"reason":"<reason>","task_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"assignee":{"format":"int64","type":["integer","null"]},"batch_id":{"format":"int64","type":["integer","null"]},"claimed_at":{"default":null,"type":["string","null"]},"code":{"type":"string"},"container_id":{"format":"int64","type":["integer","null"]},"created_at":{"type":"string"},"ended_at":{"default":null,"type":["string","null"]},"escalated_at":{"default":null,"description":"Когда задача ушла супервайзеру: отказов набралось до порога `TASK_SKIP_ESCALATE_AFTER`. Пока стоит — выдача её не отдаёт никому.","type":["string","null"]},"from_location":{"type":["string","null"]},"heartbeat_at":{"default":null,"type":["string","null"]},"id":{"format":"int64","type":"integer"},"lease_expires_at":{"default":null,"type":["string","null"]},"lot":{"type":["string","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"owner_id":{"format":"int64","type":["integer","null"]},"priority":{"format":"int16","type":"integer"},"qty":{"format":"double","type":["number","null"]},"qty_done":{"format":"double","type":"number"},"refused_count":{"description":"Сколько раз от задачи ОТКАЗАЛИСЬ (сдача в счёт не идёт). Растёт в [`TaskBmc::release_to_pool`], обнуляется только переназначением супервайзером ([`TaskBmc::reassign_cas`]) — миграция 307.","format":"int32","type":"integer"},"return_kind":{"description":"КАК задача в последний раз вернулась в пул: `Refused` (отказ оператора), `HandedBack` (сдача), `Seized` (изъял супервайзер), `Expired` (истекла аренда). `skip_reason` пишут все трое, у кого есть причина, и без этого поля доска выдавала бы причину изъятия за причину отказа (миграция 308). Снимается вместе с `skip_reason`, когда задачу снова берут.","type":["string","null"]},"short_reason_code":{"type":["string","null"]},"short_reason_note":{"type":["string","null"]},"skip_reason":{"type":["string","null"]},"skipped_at":{"default":null,"type":["string","null"]},"sku_code":{"type":["string","null"]},"source_id":{"format":"int64","type":"integer"},"source_type":{"type":"string"},"started_at":{"default":null,"type":["string","null"]},"status":{"$ref":"#/components/schemas/TaskStatus"},"task_type":{"$ref":"#/components/schemas/TaskType"},"to_location":{"type":["string","null"]},"uom":{"type":["string","null"]},"version":{"format":"int32","type":"integer"},"wave_id":{"format":"int64","type":["integer","null"]},"weight":{"description":"Вес запаса задачи на момент её создания — единственная формула веса (`pack::StockWeights`), скопированная, как и `qty` (wms-app 340).\n\n`None` — взвесить было нечем (`PhysicalMetric::Unknown`): ни у базовой строки упаковки, ни у карточки товара веса нет. Такая задача проходит любой предел грузоподъёмности — проверка, которой нечего сравнивать, не имеет права отказывать (wms-app 341, спека физических измерений §9.2). Ноль больше не значит «неизвестно»: он сравнивается как число.","format":"double","type":["number","null"]},"workstation_completed_by":{"default":null,"description":"Real web executor of source-owned workstation Pick completion. A pooled task can finish without pretending it had an RF assignment.","format":"int64","type":["integer","null"]}},"required":["add_when","add_who","code","created_at","id","mod_when","mod_who","priority","qty_done","refused_count","source_id","source_type","status","task_type","version"],"title":"Task","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","created_at":"<created_at>","id":1,"mod_when":"<mod_when>","mod_who":1,"priority":1,"qty_done":1.5,"refused_count":1,"source_id":1,"source_type":"<source_type>","status":"InProgress","task_type":"Pick","version":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#task_delete":{"post":{"operationId":"task_delete","summary":"Delete a task nobody has claimed; its pick stays reserved.","description":"Delete a task nobody has claimed; its pick stays reserved.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["tasks"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"task_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"task_delete"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"idempotency_key":{"format":"uuid","type":"string"},"order_id":{"format":"int64","type":"integer"},"task_id":{"format":"int64","type":"integer"}},"required":["idempotency_key","order_id","task_id"],"title":"DeleteTask","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"task_delete","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"order_id":1,"task_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"launch_cleared":{"description":"Удалена последняя задача заказа, и запуск снят: снова выдать работу — «Release». Тот же флаг и тот же смысл, что у `CancelOrderAllocationResult::launch_cleared`.","type":"boolean"},"line_status":{"$ref":"#/components/schemas/OrderLineStatus"},"new_version":{"description":"Версия шапки после команды. Эхо прежней, пока шапку не трогали; сдвигается, когда удаление последней задачи сняло запуск (`launch_cleared`) — это запись в шапку от команды пользователя.","format":"int32","type":"integer"},"order_id":{"format":"int64","type":"integer"},"order_number":{"description":"Номер заказа — для сообщения на экране: супервайзер знает заказ по номеру, а не по id.","type":"string"},"order_status":{"allOf":[{"$ref":"#/components/schemas/OrderStatus"}],"description":"Статус заказа ПОСЛЕ пересчёта в этой же транзакции — экрану не с чего гадать (тот же контракт, что у `DeletePickDetailResult`)."},"pick_detail_id":{"format":"int64","type":"integer"},"task_id":{"format":"int64","type":"integer"}},"required":["launch_cleared","line_status","new_version","order_id","order_number","order_status","pick_detail_id","task_id"],"title":"DeleteTaskResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"launch_cleared":false,"line_status":"NotAllocated","new_version":1,"order_id":1,"order_number":"<order_number>","order_status":{},"pick_detail_id":1,"task_id":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#task_delete_many":{"post":{"operationId":"task_delete_many","summary":"Delete several unclaimed tasks at once; claimed ones are skipped and named.","description":"Delete several unclaimed tasks at once; claimed ones are skipped and named.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["tasks"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"task_commands","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"task_delete_many"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"properties":{"idempotency_key":{"format":"uuid","type":"string"},"task_ids":{"items":{"format":"int64","type":"integer"},"type":"array"}},"required":["idempotency_key","task_ids"],"title":"DeleteTasks","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"task_delete_many","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"task_ids":[1]}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"deleted":{"description":"Удалённые — в порядке, в каком их прислали, по одному ответу `DeleteTask` на задачу (с заказом, статусами и `launch_cleared`).","items":{"$ref":"#/components/schemas/DeleteTaskResult"},"type":"array"},"refused":{"description":"Не удалённые — с причиной словами команды.","items":{"$ref":"#/components/schemas/TaskNotDeleted"},"type":"array"}},"required":["deleted","refused"],"title":"DeleteTasksResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"deleted":[{"launch_cleared":false,"line_status":"NotAllocated","new_version":1,"order_id":1,"order_number":"<order_number>","order_status":{},"pick_detail_id":1,"task_id":1}],"refused":[{"reason":"<reason>","task_id":1}]}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#create_report_definition":{"post":{"operationId":"create_report_definition","summary":"Create a new report_definition — CRUD.","description":"Create a new report_definition — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["reporting"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"UNIQUE_VIOLATION or INVALID_DATA","when":"The code already exists, or a value breaks a rule."}],"x-quark-module":"report_definition","x-quark-operation":"create","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"create_report_definition"},"params":{"type":"object","properties":{"data":{"description":"The wire shape of \"create a report\", which still carries a `name`: the report wizard asks its author for one, and that author has no idea labels exist. [`ReportDefinitionBmc::create`] turns it into the report's label.\n\nNo `Fields` derive, unlike the other `ForCreate` structs in this crate: `name` is not a column, so this shape cannot be handed to sea-query at all. [`ReportDefinitionForInsert`] is what gets written.","properties":{"category":{"type":"string"},"code":{"type":"string"},"config_json":true,"created_via":{"type":["string","null"]},"description":{"type":["string","null"]},"is_active":{"type":["boolean","null"]},"module_id":{"format":"int64","type":["integer","null"]},"name":{"description":"What the author called the report. Becomes the label's `default_text` — the English source — because that is the only slot a brand-new label has. If the author typed Russian, English now holds Russian for that one report until somebody edits it; the alternative is refusing to create a report until an English name exists, which no wizard asks for.","type":"string"},"parameters":true,"template_id":{"format":"int64","type":["integer","null"]},"template_kind":{"type":["string","null"]},"tier":{"type":"string"},"version_status":{"type":["string","null"]}},"required":["category","code","name","tier"],"title":"ReportDefinitionForCreate","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"create_report_definition","params":{"data":{"category":"<category>","code":"<code>","name":"<name>","tier":"<tier>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"A report in the catalogue.\n\nThe user-visible name is NOT here: it is `label_id`, resolved per reader through [`LabelBmc::text`] or, for the album, in that read model's own query so it can sort by what it shows. Migration 242 replaced the Russian `name` column and its unread `name_localized` JSONB with this one FK.","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"category":{"type":"string"},"code":{"type":"string"},"config_json":true,"created_via":{"type":"string"},"description":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"is_active":{"type":"boolean"},"label_id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"module_id":{"format":"int64","type":["integer","null"]},"parameters":true,"template_id":{"format":"int64","type":["integer","null"]},"template_kind":{"type":["string","null"]},"tier":{"type":"string"},"version_status":{"type":"string"}},"required":["add_when","add_who","category","code","config_json","created_via","id","is_active","label_id","mod_when","mod_who","parameters","tier","version_status"],"title":"ReportDefinition","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"category":"<category>","code":"<code>","config_json":null,"created_via":"<created_via>","id":1,"is_active":false,"label_id":1,"mod_when":"<mod_when>","mod_who":1,"parameters":null,"tier":"<tier>","version_status":"<version_status>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_report_definition":{"post":{"operationId":"get_report_definition","summary":"Get a report_definition by ID — CRUD.","description":"Get a report_definition by ID — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["reporting"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"report_definition","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_report_definition"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_report_definition","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"A report in the catalogue.\n\nThe user-visible name is NOT here: it is `label_id`, resolved per reader through [`LabelBmc::text`] or, for the album, in that read model's own query so it can sort by what it shows. Migration 242 replaced the Russian `name` column and its unread `name_localized` JSONB with this one FK.","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"category":{"type":"string"},"code":{"type":"string"},"config_json":true,"created_via":{"type":"string"},"description":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"is_active":{"type":"boolean"},"label_id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"module_id":{"format":"int64","type":["integer","null"]},"parameters":true,"template_id":{"format":"int64","type":["integer","null"]},"template_kind":{"type":["string","null"]},"tier":{"type":"string"},"version_status":{"type":"string"}},"required":["add_when","add_who","category","code","config_json","created_via","id","is_active","label_id","mod_when","mod_who","parameters","tier","version_status"],"title":"ReportDefinition","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"category":"<category>","code":"<code>","config_json":null,"created_via":"<created_via>","id":1,"is_active":false,"label_id":1,"mod_when":"<mod_when>","mod_who":1,"parameters":null,"tier":"<tier>","version_status":"<version_status>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_report_definition":{"post":{"operationId":"list_report_definition","summary":"List report_definition — CRUD.","description":"List report_definition — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["reporting"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"report_definition","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_report_definition"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_report_definition"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/ReportDefinition"},"title":"Array_of_ReportDefinition","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"category":"<category>","code":"<code>","config_json":null,"created_via":"<created_via>","id":1,"is_active":false,"label_id":1,"mod_when":"<mod_when>","mod_who":1,"parameters":null,"tier":"<tier>","version_status":"<version_status>"}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#update_report_definition":{"post":{"operationId":"update_report_definition","summary":"Update a report definition; identity/provenance are immutable and nullable links are explicit.","description":"Update a report definition; identity/provenance are immutable and nullable links are explicit.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["reporting"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"INVALID_DATA","when":"A value breaks a rule."}],"x-quark-module":"report_definition","x-quark-operation":"update","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"update_report_definition"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"},"data":{"additionalProperties":false,"properties":{"category":{"type":"string"},"config_json":true,"description":{"type":["string","null"]},"is_active":{"type":"boolean"},"module_id":{"format":"int64","type":["integer","null"]},"name":{"type":"string"},"parameters":true,"template_id":{"format":"int64","type":["integer","null"]},"template_kind":{"type":["string","null"]},"tier":{"type":"string"},"version_status":{"type":"string"}},"title":"ReportDefinitionUpdateApi","type":"object"}},"required":["id","data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"update_report_definition","params":{"id":1,"data":{"category":"<category>","config_json":null,"description":"<description>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"A report in the catalogue.\n\nThe user-visible name is NOT here: it is `label_id`, resolved per reader through [`LabelBmc::text`] or, for the album, in that read model's own query so it can sort by what it shows. Migration 242 replaced the Russian `name` column and its unread `name_localized` JSONB with this one FK.","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"category":{"type":"string"},"code":{"type":"string"},"config_json":true,"created_via":{"type":"string"},"description":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"is_active":{"type":"boolean"},"label_id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"module_id":{"format":"int64","type":["integer","null"]},"parameters":true,"template_id":{"format":"int64","type":["integer","null"]},"template_kind":{"type":["string","null"]},"tier":{"type":"string"},"version_status":{"type":"string"}},"required":["add_when","add_who","category","code","config_json","created_via","id","is_active","label_id","mod_when","mod_who","parameters","tier","version_status"],"title":"ReportDefinition","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"category":"<category>","code":"<code>","config_json":null,"created_via":"<created_via>","id":1,"is_active":false,"label_id":1,"mod_when":"<mod_when>","mod_who":1,"parameters":null,"tier":"<tier>","version_status":"<version_status>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_report_definition":{"post":{"operationId":"delete_report_definition","summary":"Delete a report_definition by ID — CRUD.","description":"Delete a report_definition by ID — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["reporting"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"DEPENDENT_DATA_EXIST","when":"Other rows still use this row."}],"x-quark-module":"report_definition","x-quark-operation":"delete","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_report_definition"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_report_definition","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"A report in the catalogue.\n\nThe user-visible name is NOT here: it is `label_id`, resolved per reader through [`LabelBmc::text`] or, for the album, in that read model's own query so it can sort by what it shows. Migration 242 replaced the Russian `name` column and its unread `name_localized` JSONB with this one FK.","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"category":{"type":"string"},"code":{"type":"string"},"config_json":true,"created_via":{"type":"string"},"description":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"is_active":{"type":"boolean"},"label_id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"module_id":{"format":"int64","type":["integer","null"]},"parameters":true,"template_id":{"format":"int64","type":["integer","null"]},"template_kind":{"type":["string","null"]},"tier":{"type":"string"},"version_status":{"type":"string"}},"required":["add_when","add_who","category","code","config_json","created_via","id","is_active","label_id","mod_when","mod_who","parameters","tier","version_status"],"title":"ReportDefinition","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"category":"<category>","code":"<code>","config_json":null,"created_via":"<created_via>","id":1,"is_active":false,"label_id":1,"mod_when":"<mod_when>","mod_who":1,"parameters":null,"tier":"<tier>","version_status":"<version_status>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_many_report_definition":{"post":{"operationId":"delete_many_report_definition","summary":"Delete multiple report_definition by IDs — CRUD.","description":"Delete multiple report_definition by IDs — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["reporting"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"DEPENDENT_DATA_EXIST","when":"Other rows still use this row."}],"x-quark-module":"report_definition","x-quark-operation":"delete","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_many_report_definition"},"params":{"type":"object","properties":{"ids":{"items":{"format":"int64","type":"integer"},"type":"array","description":"Record IDs"}},"required":["ids"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_many_report_definition","params":{"ids":[1]}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"uint64","minimum":0,"title":"uint64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_report_definition":{"post":{"operationId":"count_report_definition","summary":"Count report_definition — CRUD.","description":"Count report_definition — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["reporting"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"report_definition","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_report_definition"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_report_definition"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#generate_report_data":{"post":{"operationId":"generate_report_data","summary":"Generate report render data","description":"Generate report render data\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["reporting"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"report_definition","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"generate_report_data"},"params":{"type":"object","properties":{"data":{"description":"Parameters for report generation.","properties":{"params":{"additionalProperties":{"type":"string"},"default":{},"type":"object"},"report_definition_id":{"format":"int64","type":"integer"}},"required":["report_definition_id"],"title":"GenerateReportParams","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"generate_report_data","params":{"data":{"report_definition_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"Result of report data preparation — ready to send to renderer.","properties":{"data":true,"options":{"$ref":"#/components/schemas/ReportRenderOptions"},"output_format":{"type":"string"},"template_kind":{"type":"string"},"template_source":{"type":"string"}},"required":["data","options","output_format","template_kind","template_source"],"title":"ReportRenderData","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"data":null,"options":{"orientation":"<orientation>","paper":"<paper>"},"output_format":"<output_format>","template_kind":"<template_kind>","template_source":"<template_source>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#print_report":{"post":{"operationId":"print_report","summary":"Generate report PDF","description":"Generate report PDF\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["reporting"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"report_definition","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"print_report"},"params":{"type":"object","properties":{"data":{"description":"Parameters for report generation.","properties":{"params":{"additionalProperties":{"type":"string"},"default":{},"type":"object"},"report_definition_id":{"format":"int64","type":"integer"}},"required":["report_definition_id"],"title":"GenerateReportParams","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"print_report","params":{"data":{"report_definition_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"PDF bytes result from renderer.","properties":{"bytes":{"items":{"format":"uint8","minimum":0,"type":"integer"},"type":"array"},"content_type":{"type":"string"},"filename":{"type":"string"}},"required":["bytes","content_type","filename"],"title":"ReportPdfResult","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"bytes":[1],"content_type":"<content_type>","filename":"<filename>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#test_dataset":{"post":{"operationId":"test_dataset","summary":"Test dataset SQL query","description":"Test dataset SQL query\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["reporting"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"report_definition","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"test_dataset"},"params":{"type":"object","properties":{"data":{"description":"Parameters for testing a single dataset SQL query.","properties":{"limit":{"default":20,"format":"int64","type":"integer"},"param_values":{"default":[],"description":"Значения для `$1, $2, …` — список ПОЗИЦИОННЫЙ: элемент N это `$N+1`.\n\nЧитается своим десериализатором, потому что до него доезжает уже НОРМАЛИЗОВАННОЕ тело: `app-server/src/web/routes_rpc.rs` схлопывает каждую пустую строку в теле запроса в `null`. Политика верная и общая — оператор, пропустивший необязательное поле, не должен создавать контейнер с пустым `code`, — но здесь она встречается с полем, где пустое значение ЗАКОННО: параметр отчёта, который человек не заполнил, это пустая строка, а не отсутствие элемента. Выбросить элемент нельзя тем более: список позиционный, и пропажа сдвинула бы все следующие `$N`.\n\nСм. [`param_values_from_wire`].","items":{"type":"string"},"type":"array"},"sql":{"type":"string"}},"required":["sql"],"title":"TestDatasetParams","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"test_dataset","params":{"data":{"sql":"<sql>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"Result of a dataset test — sample rows.","properties":{"row_count":{"format":"uint","minimum":0,"type":"integer"},"rows":{"items":true,"type":"array"}},"required":["row_count","rows"],"title":"TestDatasetResult","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"row_count":1,"rows":[]}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_report_album":{"post":{"operationId":"list_report_album","summary":"List reports for the album screen","description":"List reports for the album screen\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["reporting"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"report_definition","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_report_album"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_report_album"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/ReportAlbumRow"},"title":"Array_of_ReportAlbumRow","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"category":"<category>","code":"<code>","id":1,"is_favorite":false,"name":"<name>","origin":"<origin>","parameters":null,"runs_12m":1,"runs_monthly":null,"tier":"<tier>"}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_report_album":{"post":{"operationId":"get_report_album","summary":"Get one report for the album/wizard","description":"Get one report for the album/wizard\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["reporting"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"report_definition","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_report_album"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_report_album","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"category":{"type":"string"},"code":{"type":"string"},"description":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"is_favorite":{"type":"boolean"},"last_run_at":{"default":null,"type":["string","null"]},"name":{"description":"The report's name in the locale the album was asked for, already resolved: a translation if there is one, the English `default_text` otherwise. The album screen renders this string as-is.","type":"string"},"origin":{"description":"`industry` for seeded/migrated definitions, `custom` for ones built here.","type":"string"},"parameters":true,"regulation":{"type":["string","null"]},"runs_12m":{"format":"int64","type":"integer"},"runs_monthly":{"description":"Exactly `SPARKLINE_MONTHS` integers, oldest month first."},"template_kind":{"type":["string","null"]},"tier":{"type":"string"}},"required":["category","code","id","is_favorite","name","origin","parameters","runs_12m","runs_monthly","tier"],"title":"ReportAlbumRow","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"category":"<category>","code":"<code>","id":1,"is_favorite":false,"name":"<name>","origin":"<origin>","parameters":null,"runs_12m":1,"runs_monthly":null,"tier":"<tier>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#set_report_favorite":{"post":{"operationId":"set_report_favorite","summary":"Star or unstar a report for the calling user","description":"Star or unstar a report for the calling user\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- Send `meta.idempotency_key`. If you send the same call again with the same key and the same data, you get the first answer back and nothing runs twice.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["reporting"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR, return_code 42","when":"The idempotency key was used before with different data. Make a new key."},{"http":"400","error":"RF_ERROR, return_code 44","when":"The first call with this key is still running. Send the same call again."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"report_definition","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"set_report_favorite"},"params":{"type":"object","properties":{"meta":{"properties":{"acknowledged_overrides":{"items":{"oneOf":[{"description":"Bare override code (receipt / dimensionless).","type":"integer"},{"description":"Move override pair (dimension code + hold-code subject).","properties":{"code":{"type":"integer"},"subject":{"type":"string"}},"required":["code"],"type":"object"}]},"type":"array"},"expected_version":{"format":"int64","type":"integer"},"idempotency_key":{"format":"uuid","type":"string"}},"type":"object","description":"Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."},"data":{"description":"Wire shape for `set_report_favorite`. `favorite` is the end state the caller wants, not a flip — that is what makes the command idempotent.","properties":{"favorite":{"description":"The end state the caller wants, not a flip.","type":"boolean"},"report_definition_id":{"format":"int64","type":"integer"}},"required":["favorite","report_definition_id"],"title":"SetFavoriteData","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"set_report_favorite","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"favorite":false,"report_definition_id":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"favorite":{"type":"boolean"}},"required":["favorite"],"title":"SetFavoriteResult","type":"object"},"meta":{"type":"object","properties":{"idempotency_replayed":{"type":"boolean"}}}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"meta":{"idempotency_replayed":false},"data":{"favorite":false}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#create_report_template":{"post":{"operationId":"create_report_template","summary":"Create a new report_template — CRUD.","description":"Create a new report_template — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["reporting"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"UNIQUE_VIOLATION or INVALID_DATA","when":"The code already exists, or a value breaks a rule."}],"x-quark-module":"report_template","x-quark-operation":"create","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"create_report_template"},"params":{"type":"object","properties":{"data":{"properties":{"code":{"type":"string"},"kind":{"type":"string"},"locale_default":{"type":["string","null"]},"name":{"type":"string"},"orientation":{"type":["string","null"]},"paper":{"type":["string","null"]},"source":{"type":"string"},"version_status":{"type":["string","null"]}},"required":["code","kind","name","source"],"title":"ReportTemplateForCreate","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"create_report_template","params":{"data":{"code":"<code>","kind":"<kind>","name":"<name>","source":"<source>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"id":{"format":"int64","type":"integer"},"kind":{"type":"string"},"locale_default":{"type":["string","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"name":{"type":"string"},"orientation":{"type":["string","null"]},"paper":{"type":["string","null"]},"source":{"type":"string"},"version_status":{"type":"string"}},"required":["add_when","add_who","code","id","kind","mod_when","mod_who","name","source","version_status"],"title":"ReportTemplate","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","id":1,"kind":"<kind>","mod_when":"<mod_when>","mod_who":1,"name":"<name>","source":"<source>","version_status":"<version_status>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_report_template":{"post":{"operationId":"get_report_template","summary":"Get a report_template by ID — CRUD.","description":"Get a report_template by ID — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["reporting"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"report_template","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_report_template"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_report_template","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"id":{"format":"int64","type":"integer"},"kind":{"type":"string"},"locale_default":{"type":["string","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"name":{"type":"string"},"orientation":{"type":["string","null"]},"paper":{"type":["string","null"]},"source":{"type":"string"},"version_status":{"type":"string"}},"required":["add_when","add_who","code","id","kind","mod_when","mod_who","name","source","version_status"],"title":"ReportTemplate","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","id":1,"kind":"<kind>","mod_when":"<mod_when>","mod_who":1,"name":"<name>","source":"<source>","version_status":"<version_status>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_report_template":{"post":{"operationId":"list_report_template","summary":"List report_template — CRUD.","description":"List report_template — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["reporting"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"report_template","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_report_template"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_report_template"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/ReportTemplate"},"title":"Array_of_ReportTemplate","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"code":"<code>","id":1,"kind":"<kind>","mod_when":"<mod_when>","mod_who":1,"name":"<name>","source":"<source>","version_status":"<version_status>"}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#update_report_template":{"post":{"operationId":"update_report_template","summary":"Update a report template without changing its stable code.","description":"Update a report template without changing its stable code.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["reporting"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"INVALID_DATA","when":"A value breaks a rule."}],"x-quark-module":"report_template","x-quark-operation":"update","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"update_report_template"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"},"data":{"additionalProperties":false,"properties":{"kind":{"type":"string"},"locale_default":{"type":["string","null"]},"name":{"type":"string"},"orientation":{"type":["string","null"]},"paper":{"type":["string","null"]},"source":{"type":"string"},"version_status":{"type":"string"}},"title":"ReportTemplateUpdateApi","type":"object"}},"required":["id","data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"update_report_template","params":{"id":1,"data":{"kind":"<kind>","locale_default":"<locale_default>","name":"<name>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"id":{"format":"int64","type":"integer"},"kind":{"type":"string"},"locale_default":{"type":["string","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"name":{"type":"string"},"orientation":{"type":["string","null"]},"paper":{"type":["string","null"]},"source":{"type":"string"},"version_status":{"type":"string"}},"required":["add_when","add_who","code","id","kind","mod_when","mod_who","name","source","version_status"],"title":"ReportTemplate","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","id":1,"kind":"<kind>","mod_when":"<mod_when>","mod_who":1,"name":"<name>","source":"<source>","version_status":"<version_status>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_report_template":{"post":{"operationId":"delete_report_template","summary":"Delete a report_template by ID — CRUD.","description":"Delete a report_template by ID — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["reporting"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"DEPENDENT_DATA_EXIST","when":"Other rows still use this row."}],"x-quark-module":"report_template","x-quark-operation":"delete","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_report_template"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_report_template","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"id":{"format":"int64","type":"integer"},"kind":{"type":"string"},"locale_default":{"type":["string","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"name":{"type":"string"},"orientation":{"type":["string","null"]},"paper":{"type":["string","null"]},"source":{"type":"string"},"version_status":{"type":"string"}},"required":["add_when","add_who","code","id","kind","mod_when","mod_who","name","source","version_status"],"title":"ReportTemplate","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","id":1,"kind":"<kind>","mod_when":"<mod_when>","mod_who":1,"name":"<name>","source":"<source>","version_status":"<version_status>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_many_report_template":{"post":{"operationId":"delete_many_report_template","summary":"Delete multiple report_template by IDs — CRUD.","description":"Delete multiple report_template by IDs — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["reporting"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"DEPENDENT_DATA_EXIST","when":"Other rows still use this row."}],"x-quark-module":"report_template","x-quark-operation":"delete","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_many_report_template"},"params":{"type":"object","properties":{"ids":{"items":{"format":"int64","type":"integer"},"type":"array","description":"Record IDs"}},"required":["ids"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_many_report_template","params":{"ids":[1]}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"uint64","minimum":0,"title":"uint64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_report_template":{"post":{"operationId":"count_report_template","summary":"Count report_template — CRUD.","description":"Count report_template — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["reporting"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"report_template","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_report_template"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_report_template"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#create_label_definition":{"post":{"operationId":"create_label_definition","summary":"Create a new label_definition — CRUD.","description":"Create a new label_definition — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["reporting"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"UNIQUE_VIOLATION or INVALID_DATA","when":"The code already exists, or a value breaks a rule."}],"x-quark-module":"label_definition","x-quark-operation":"create","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"create_label_definition"},"params":{"type":"object","properties":{"data":{"properties":{"category":{"type":"string"},"code":{"type":"string"},"description":{"type":["string","null"]},"dpi":{"format":"int32","type":["integer","null"]},"height_mm":{"format":"double","type":"number"},"is_active":{"type":["boolean","null"]},"name":{"type":"string"},"template_id":{"format":"int64","type":["integer","null"]},"width_mm":{"format":"double","type":"number"}},"required":["category","code","height_mm","name","width_mm"],"title":"LabelDefinitionForCreate","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"create_label_definition","params":{"data":{"category":"<category>","code":"<code>","height_mm":1.5,"name":"<name>","width_mm":1.5}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"category":{"type":"string"},"code":{"type":"string"},"description":{"type":["string","null"]},"dpi":{"format":"int32","type":"integer"},"height_mm":{"format":"double","type":"number"},"id":{"format":"int64","type":"integer"},"is_active":{"type":"boolean"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"name":{"type":"string"},"template_id":{"format":"int64","type":["integer","null"]},"width_mm":{"format":"double","type":"number"}},"required":["add_when","add_who","category","code","dpi","height_mm","id","is_active","mod_when","mod_who","name","width_mm"],"title":"LabelDefinition","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"category":"<category>","code":"<code>","dpi":1,"height_mm":1.5,"id":1,"is_active":false,"mod_when":"<mod_when>","mod_who":1,"name":"<name>","width_mm":1.5}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_label_definition":{"post":{"operationId":"get_label_definition","summary":"Get a label_definition by ID — CRUD.","description":"Get a label_definition by ID — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["reporting"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"label_definition","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_label_definition"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_label_definition","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"category":{"type":"string"},"code":{"type":"string"},"description":{"type":["string","null"]},"dpi":{"format":"int32","type":"integer"},"height_mm":{"format":"double","type":"number"},"id":{"format":"int64","type":"integer"},"is_active":{"type":"boolean"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"name":{"type":"string"},"template_id":{"format":"int64","type":["integer","null"]},"width_mm":{"format":"double","type":"number"}},"required":["add_when","add_who","category","code","dpi","height_mm","id","is_active","mod_when","mod_who","name","width_mm"],"title":"LabelDefinition","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"category":"<category>","code":"<code>","dpi":1,"height_mm":1.5,"id":1,"is_active":false,"mod_when":"<mod_when>","mod_who":1,"name":"<name>","width_mm":1.5}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_label_definition":{"post":{"operationId":"list_label_definition","summary":"List label_definition — CRUD.","description":"List label_definition — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["reporting"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"label_definition","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_label_definition"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_label_definition"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/LabelDefinition"},"title":"Array_of_LabelDefinition","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"category":"<category>","code":"<code>","dpi":1,"height_mm":1.5,"id":1,"is_active":false,"mod_when":"<mod_when>","mod_who":1,"name":"<name>","width_mm":1.5}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#update_label_definition":{"post":{"operationId":"update_label_definition","summary":"Update a label definition; stable code is immutable and nullable links are explicit.","description":"Update a label definition; stable code is immutable and nullable links are explicit.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["reporting"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"INVALID_DATA","when":"A value breaks a rule."}],"x-quark-module":"label_definition","x-quark-operation":"update","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"update_label_definition"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"},"data":{"additionalProperties":false,"properties":{"category":{"type":"string"},"description":{"type":["string","null"]},"dpi":{"format":"int32","type":"integer"},"height_mm":{"format":"double","type":"number"},"is_active":{"type":"boolean"},"name":{"type":"string"},"template_id":{"format":"int64","type":["integer","null"]},"width_mm":{"format":"double","type":"number"}},"title":"LabelDefinitionUpdateApi","type":"object"}},"required":["id","data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"update_label_definition","params":{"id":1,"data":{"category":"<category>","description":"<description>","dpi":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"category":{"type":"string"},"code":{"type":"string"},"description":{"type":["string","null"]},"dpi":{"format":"int32","type":"integer"},"height_mm":{"format":"double","type":"number"},"id":{"format":"int64","type":"integer"},"is_active":{"type":"boolean"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"name":{"type":"string"},"template_id":{"format":"int64","type":["integer","null"]},"width_mm":{"format":"double","type":"number"}},"required":["add_when","add_who","category","code","dpi","height_mm","id","is_active","mod_when","mod_who","name","width_mm"],"title":"LabelDefinition","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"category":"<category>","code":"<code>","dpi":1,"height_mm":1.5,"id":1,"is_active":false,"mod_when":"<mod_when>","mod_who":1,"name":"<name>","width_mm":1.5}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_label_definition":{"post":{"operationId":"delete_label_definition","summary":"Delete a label_definition by ID — CRUD.","description":"Delete a label_definition by ID — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["reporting"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"DEPENDENT_DATA_EXIST","when":"Other rows still use this row."}],"x-quark-module":"label_definition","x-quark-operation":"delete","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_label_definition"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_label_definition","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"category":{"type":"string"},"code":{"type":"string"},"description":{"type":["string","null"]},"dpi":{"format":"int32","type":"integer"},"height_mm":{"format":"double","type":"number"},"id":{"format":"int64","type":"integer"},"is_active":{"type":"boolean"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"name":{"type":"string"},"template_id":{"format":"int64","type":["integer","null"]},"width_mm":{"format":"double","type":"number"}},"required":["add_when","add_who","category","code","dpi","height_mm","id","is_active","mod_when","mod_who","name","width_mm"],"title":"LabelDefinition","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"category":"<category>","code":"<code>","dpi":1,"height_mm":1.5,"id":1,"is_active":false,"mod_when":"<mod_when>","mod_who":1,"name":"<name>","width_mm":1.5}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_many_label_definition":{"post":{"operationId":"delete_many_label_definition","summary":"Delete multiple label_definition by IDs — CRUD.","description":"Delete multiple label_definition by IDs — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["reporting"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"DEPENDENT_DATA_EXIST","when":"Other rows still use this row."}],"x-quark-module":"label_definition","x-quark-operation":"delete","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_many_label_definition"},"params":{"type":"object","properties":{"ids":{"items":{"format":"int64","type":"integer"},"type":"array","description":"Record IDs"}},"required":["ids"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_many_label_definition","params":{"ids":[1]}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"uint64","minimum":0,"title":"uint64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_label_definition":{"post":{"operationId":"count_label_definition","summary":"Count label_definition — CRUD.","description":"Count label_definition — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["reporting"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"label_definition","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_label_definition"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_label_definition"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#generate_label_data":{"post":{"operationId":"generate_label_data","summary":"Generate label render data","description":"Generate label render data\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["reporting"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"label_definition","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"generate_label_data"},"params":{"type":"object","properties":{"data":{"properties":{"data":{"additionalProperties":{"type":"string"},"type":"object"},"label_code":{"type":"string"}},"required":["data","label_code"],"title":"GenerateLabelParams","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"generate_label_data","params":{"data":{"data":{},"label_code":"<label_code>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"config":true,"data":{"additionalProperties":{"type":"string"},"type":"object"},"label_name":{"type":"string"},"output_format":{"type":"string"},"renderer_url":{"description":"The label renderer URL for this deployment. Left empty by the pure data-resolution service; the RPC handler fills it from the `LABEL_RENDERER_URL` system setting (F43 — one source of truth, so the on-screen preview renders against the same renderer as the printer path instead of the web-ui's own env var).","type":"string"}},"required":["config","data","label_name","output_format","renderer_url"],"title":"LabelRenderData","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"config":null,"data":{},"label_name":"<label_name>","output_format":"<output_format>","renderer_url":"<renderer_url>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#print_label":{"post":{"operationId":"print_label","summary":"Generate label ZPL for printing","description":"Generate label ZPL for printing\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["reporting"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"label_definition","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"print_label"},"params":{"type":"object","properties":{"data":{"properties":{"data":{"additionalProperties":{"type":"string"},"type":"object"},"label_code":{"type":"string"}},"required":["data","label_code"],"title":"GenerateLabelParams","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"print_label","params":{"data":{"data":{},"label_code":"<label_code>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"ZPL bytes result from renderer.","properties":{"label_name":{"type":"string"},"zpl_bytes":{"items":{"format":"uint8","minimum":0,"type":"integer"},"type":"array"}},"required":["label_name","zpl_bytes"],"title":"LabelPrintResult","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"label_name":"<label_name>","zpl_bytes":[1]}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#send_label_to_printer":{"post":{"operationId":"send_label_to_printer","summary":"Print label directly to Zebra printer","description":"Print label directly to Zebra printer\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["reporting"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"label_definition","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"send_label_to_printer"},"params":{"type":"object","properties":{"data":{"description":"Parameters for sending a label directly to a printer.","properties":{"data":{"additionalProperties":{"type":"string"},"type":"object"},"label_code":{"type":"string"},"printer_host":{"type":"string"},"printer_port":{"default":9100,"format":"uint16","minimum":0,"type":"integer"}},"required":["data","label_code","printer_host"],"title":"SendLabelParams","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"send_label_to_printer","params":{"data":{"data":{},"label_code":"<label_code>","printer_host":"<printer_host>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"Result of sending a label to a printer.","properties":{"bytes_sent":{"format":"uint","minimum":0,"type":"integer"},"label_name":{"type":"string"}},"required":["bytes_sent","label_name"],"title":"LabelSendResult","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"bytes_sent":1,"label_name":"<label_name>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#create_label_template":{"post":{"operationId":"create_label_template","summary":"Create a new label_template — CRUD.","description":"Create a new label_template — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["reporting"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"UNIQUE_VIOLATION or INVALID_DATA","when":"The code already exists, or a value breaks a rule."}],"x-quark-module":"label_template","x-quark-operation":"create","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"create_label_template"},"params":{"type":"object","properties":{"data":{"properties":{"code":{"type":"string"},"config_json":true,"name":{"type":"string"},"version_status":{"type":["string","null"]}},"required":["code","name"],"title":"LabelTemplateForCreate","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"create_label_template","params":{"data":{"code":"<code>","name":"<name>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"config_json":true,"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"name":{"type":"string"},"version_status":{"type":"string"}},"required":["add_when","add_who","code","config_json","id","mod_when","mod_who","name","version_status"],"title":"LabelTemplate","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","config_json":null,"id":1,"mod_when":"<mod_when>","mod_who":1,"name":"<name>","version_status":"<version_status>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_label_template":{"post":{"operationId":"get_label_template","summary":"Get a label_template by ID — CRUD.","description":"Get a label_template by ID — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["reporting"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"label_template","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_label_template"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_label_template","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"config_json":true,"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"name":{"type":"string"},"version_status":{"type":"string"}},"required":["add_when","add_who","code","config_json","id","mod_when","mod_who","name","version_status"],"title":"LabelTemplate","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","config_json":null,"id":1,"mod_when":"<mod_when>","mod_who":1,"name":"<name>","version_status":"<version_status>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_label_template":{"post":{"operationId":"list_label_template","summary":"List label_template — CRUD.","description":"List label_template — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["reporting"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"label_template","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_label_template"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_label_template"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/LabelTemplate"},"title":"Array_of_LabelTemplate","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"code":"<code>","config_json":null,"id":1,"mod_when":"<mod_when>","mod_who":1,"name":"<name>","version_status":"<version_status>"}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#update_label_template":{"post":{"operationId":"update_label_template","summary":"Update a label template without changing its stable code.","description":"Update a label template without changing its stable code.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["reporting"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"INVALID_DATA","when":"A value breaks a rule."}],"x-quark-module":"label_template","x-quark-operation":"update","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"update_label_template"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"},"data":{"additionalProperties":false,"properties":{"config_json":true,"name":{"type":"string"},"version_status":{"type":"string"}},"title":"LabelTemplateUpdateApi","type":"object"}},"required":["id","data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"update_label_template","params":{"id":1,"data":{"config_json":null,"name":"<name>","version_status":"<version_status>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"config_json":true,"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"name":{"type":"string"},"version_status":{"type":"string"}},"required":["add_when","add_who","code","config_json","id","mod_when","mod_who","name","version_status"],"title":"LabelTemplate","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","config_json":null,"id":1,"mod_when":"<mod_when>","mod_who":1,"name":"<name>","version_status":"<version_status>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_label_template":{"post":{"operationId":"delete_label_template","summary":"Delete a label_template by ID — CRUD.","description":"Delete a label_template by ID — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["reporting"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"DEPENDENT_DATA_EXIST","when":"Other rows still use this row."}],"x-quark-module":"label_template","x-quark-operation":"delete","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_label_template"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_label_template","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"config_json":true,"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"name":{"type":"string"},"version_status":{"type":"string"}},"required":["add_when","add_who","code","config_json","id","mod_when","mod_who","name","version_status"],"title":"LabelTemplate","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","config_json":null,"id":1,"mod_when":"<mod_when>","mod_who":1,"name":"<name>","version_status":"<version_status>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_many_label_template":{"post":{"operationId":"delete_many_label_template","summary":"Delete multiple label_template by IDs — CRUD.","description":"Delete multiple label_template by IDs — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["reporting"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"DEPENDENT_DATA_EXIST","when":"Other rows still use this row."}],"x-quark-module":"label_template","x-quark-operation":"delete","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_many_label_template"},"params":{"type":"object","properties":{"ids":{"items":{"format":"int64","type":"integer"},"type":"array","description":"Record IDs"}},"required":["ids"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_many_label_template","params":{"ids":[1]}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"uint64","minimum":0,"title":"uint64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_label_template":{"post":{"operationId":"count_label_template","summary":"Count label_template — CRUD.","description":"Count label_template — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["reporting"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"label_template","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_label_template"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_label_template"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#create_printer_configuration":{"post":{"operationId":"create_printer_configuration","summary":"Create a new printer_configuration — CRUD.","description":"Create a new printer_configuration — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["reporting"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"UNIQUE_VIOLATION or INVALID_DATA","when":"The code already exists, or a value breaks a rule."}],"x-quark-module":"printer_configuration","x-quark-operation":"create","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"create_printer_configuration"},"params":{"type":"object","properties":{"data":{"properties":{"code":{"type":"string"},"description":{"type":["string","null"]},"is_active":{"type":["boolean","null"]},"is_default":{"type":["boolean","null"]},"label_definition_id":{"format":"int64","type":["integer","null"]},"name":{"type":"string"},"printer_host":{"type":"string"},"printer_model":{"type":["string","null"]},"printer_port":{"format":"int32","type":["integer","null"]},"zone_code":{"type":["string","null"]}},"required":["code","name","printer_host"],"title":"PrinterConfigurationForCreate","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"create_printer_configuration","params":{"data":{"code":"<code>","name":"<name>","printer_host":"<printer_host>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"description":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"is_active":{"type":"boolean"},"is_default":{"type":"boolean"},"label_definition_id":{"format":"int64","type":["integer","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"name":{"type":"string"},"printer_host":{"type":"string"},"printer_model":{"type":["string","null"]},"printer_port":{"format":"int32","type":"integer"},"zone_code":{"type":["string","null"]}},"required":["add_when","add_who","code","id","is_active","is_default","mod_when","mod_who","name","printer_host","printer_port"],"title":"PrinterConfiguration","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","id":1,"is_active":false,"is_default":false,"mod_when":"<mod_when>","mod_who":1,"name":"<name>","printer_host":"<printer_host>","printer_port":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_printer_configuration":{"post":{"operationId":"get_printer_configuration","summary":"Get a printer_configuration by ID — CRUD.","description":"Get a printer_configuration by ID — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["reporting"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"printer_configuration","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_printer_configuration"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_printer_configuration","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"description":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"is_active":{"type":"boolean"},"is_default":{"type":"boolean"},"label_definition_id":{"format":"int64","type":["integer","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"name":{"type":"string"},"printer_host":{"type":"string"},"printer_model":{"type":["string","null"]},"printer_port":{"format":"int32","type":"integer"},"zone_code":{"type":["string","null"]}},"required":["add_when","add_who","code","id","is_active","is_default","mod_when","mod_who","name","printer_host","printer_port"],"title":"PrinterConfiguration","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","id":1,"is_active":false,"is_default":false,"mod_when":"<mod_when>","mod_who":1,"name":"<name>","printer_host":"<printer_host>","printer_port":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_printer_configuration":{"post":{"operationId":"list_printer_configuration","summary":"List printer_configuration — CRUD.","description":"List printer_configuration — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["reporting"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"printer_configuration","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_printer_configuration"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_printer_configuration"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/PrinterConfiguration"},"title":"Array_of_PrinterConfiguration","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"code":"<code>","id":1,"is_active":false,"is_default":false,"mod_when":"<mod_when>","mod_who":1,"name":"<name>","printer_host":"<printer_host>","printer_port":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#update_printer_configuration":{"post":{"operationId":"update_printer_configuration","summary":"Update printer configuration with explicit nullable-field semantics.","description":"Update printer configuration with explicit nullable-field semantics.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["reporting"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"INVALID_DATA","when":"A value breaks a rule."}],"x-quark-module":"printer_configuration","x-quark-operation":"update","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"update_printer_configuration"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"},"data":{"additionalProperties":false,"properties":{"description":{"type":["string","null"]},"is_active":{"type":"boolean"},"is_default":{"type":"boolean"},"label_definition_id":{"format":"int64","type":["integer","null"]},"name":{"type":"string"},"printer_host":{"type":"string"},"printer_model":{"type":["string","null"]},"printer_port":{"format":"int32","type":"integer"},"zone_code":{"type":["string","null"]}},"title":"PrinterConfigurationUpdateApi","type":"object"}},"required":["id","data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"update_printer_configuration","params":{"id":1,"data":{"description":"<description>","is_active":false,"is_default":false}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"description":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"is_active":{"type":"boolean"},"is_default":{"type":"boolean"},"label_definition_id":{"format":"int64","type":["integer","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"name":{"type":"string"},"printer_host":{"type":"string"},"printer_model":{"type":["string","null"]},"printer_port":{"format":"int32","type":"integer"},"zone_code":{"type":["string","null"]}},"required":["add_when","add_who","code","id","is_active","is_default","mod_when","mod_who","name","printer_host","printer_port"],"title":"PrinterConfiguration","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","id":1,"is_active":false,"is_default":false,"mod_when":"<mod_when>","mod_who":1,"name":"<name>","printer_host":"<printer_host>","printer_port":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_printer_configuration":{"post":{"operationId":"delete_printer_configuration","summary":"Delete a printer_configuration by ID — CRUD.","description":"Delete a printer_configuration by ID — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["reporting"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"DEPENDENT_DATA_EXIST","when":"Other rows still use this row."}],"x-quark-module":"printer_configuration","x-quark-operation":"delete","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_printer_configuration"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_printer_configuration","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"description":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"is_active":{"type":"boolean"},"is_default":{"type":"boolean"},"label_definition_id":{"format":"int64","type":["integer","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"name":{"type":"string"},"printer_host":{"type":"string"},"printer_model":{"type":["string","null"]},"printer_port":{"format":"int32","type":"integer"},"zone_code":{"type":["string","null"]}},"required":["add_when","add_who","code","id","is_active","is_default","mod_when","mod_who","name","printer_host","printer_port"],"title":"PrinterConfiguration","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","id":1,"is_active":false,"is_default":false,"mod_when":"<mod_when>","mod_who":1,"name":"<name>","printer_host":"<printer_host>","printer_port":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_many_printer_configuration":{"post":{"operationId":"delete_many_printer_configuration","summary":"Delete multiple printer_configuration by IDs — CRUD.","description":"Delete multiple printer_configuration by IDs — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["reporting"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"DEPENDENT_DATA_EXIST","when":"Other rows still use this row."}],"x-quark-module":"printer_configuration","x-quark-operation":"delete","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_many_printer_configuration"},"params":{"type":"object","properties":{"ids":{"items":{"format":"int64","type":"integer"},"type":"array","description":"Record IDs"}},"required":["ids"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_many_printer_configuration","params":{"ids":[1]}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"uint64","minimum":0,"title":"uint64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_printer_configuration":{"post":{"operationId":"count_printer_configuration","summary":"Count printer_configuration — CRUD.","description":"Count printer_configuration — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["reporting"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"printer_configuration","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_printer_configuration"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_printer_configuration"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#create_printer_assignment":{"post":{"operationId":"create_printer_assignment","summary":"Create a new printer_assignment — CRUD.","description":"Create a new printer_assignment — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["reporting"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"UNIQUE_VIOLATION or INVALID_DATA","when":"The code already exists, or a value breaks a rule."}],"x-quark-module":"printer_assignments","x-quark-operation":"create","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"create_printer_assignment"},"params":{"type":"object","properties":{"data":{"properties":{"is_active":{"type":["boolean","null"]},"printer_id":{"format":"int64","type":"integer"},"priority":{"format":"int32","type":["integer","null"]},"scope_id":{"format":"int64","type":["integer","null"]},"scope_type":{"$ref":"#/components/schemas/PrinterScope"}},"required":["printer_id","scope_type"],"title":"PrinterAssignmentForCreate","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"create_printer_assignment","params":{"data":{"printer_id":1,"scope_type":"User"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"id":{"format":"int64","type":"integer"},"is_active":{"type":"boolean"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"printer_id":{"format":"int64","type":"integer"},"priority":{"format":"int32","type":"integer"},"scope_id":{"description":"`user_id` | `zone_id` | `owner_id` | NULL for Warehouse default.","format":"int64","type":["integer","null"]},"scope_type":{"$ref":"#/components/schemas/PrinterScope"}},"required":["add_when","add_who","id","is_active","mod_when","mod_who","printer_id","priority","scope_type"],"title":"PrinterAssignment","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"id":1,"is_active":false,"mod_when":"<mod_when>","mod_who":1,"printer_id":1,"priority":1,"scope_type":"User"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_printer_assignment":{"post":{"operationId":"get_printer_assignment","summary":"Get a printer_assignment by ID — CRUD.","description":"Get a printer_assignment by ID — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["reporting"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"printer_assignments","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_printer_assignment"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_printer_assignment","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"id":{"format":"int64","type":"integer"},"is_active":{"type":"boolean"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"printer_id":{"format":"int64","type":"integer"},"priority":{"format":"int32","type":"integer"},"scope_id":{"description":"`user_id` | `zone_id` | `owner_id` | NULL for Warehouse default.","format":"int64","type":["integer","null"]},"scope_type":{"$ref":"#/components/schemas/PrinterScope"}},"required":["add_when","add_who","id","is_active","mod_when","mod_who","printer_id","priority","scope_type"],"title":"PrinterAssignment","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"id":1,"is_active":false,"mod_when":"<mod_when>","mod_who":1,"printer_id":1,"priority":1,"scope_type":"User"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_printer_assignment":{"post":{"operationId":"list_printer_assignment","summary":"List printer_assignment — CRUD.","description":"List printer_assignment — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["reporting"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"printer_assignments","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_printer_assignment"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_printer_assignment"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/PrinterAssignment"},"title":"Array_of_PrinterAssignment","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"id":1,"is_active":false,"mod_when":"<mod_when>","mod_who":1,"printer_id":1,"priority":1,"scope_type":"User"}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#update_printer_assignment":{"post":{"operationId":"update_printer_assignment","summary":"Update a printer-routing rule; a warehouse scope explicitly clears scope_id.","description":"Update a printer-routing rule; a warehouse scope explicitly clears scope_id.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["reporting"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"INVALID_DATA","when":"A value breaks a rule."}],"x-quark-module":"printer_assignments","x-quark-operation":"update","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"update_printer_assignment"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"},"data":{"additionalProperties":false,"properties":{"is_active":{"type":"boolean"},"printer_id":{"format":"int64","type":"integer"},"priority":{"format":"int32","type":"integer"},"scope_id":{"format":"int64","type":["integer","null"]},"scope_type":{"description":"Per migration 085. Lookup priority: explicit (in command) → User → Zone → Owner → Warehouse default.","enum":["User","Zone","Owner","Warehouse"],"type":"string"}},"title":"PrinterAssignmentUpdateApi","type":"object"}},"required":["id","data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"update_printer_assignment","params":{"id":1,"data":{"is_active":false,"printer_id":1,"priority":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"id":{"format":"int64","type":"integer"},"is_active":{"type":"boolean"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"printer_id":{"format":"int64","type":"integer"},"priority":{"format":"int32","type":"integer"},"scope_id":{"description":"`user_id` | `zone_id` | `owner_id` | NULL for Warehouse default.","format":"int64","type":["integer","null"]},"scope_type":{"$ref":"#/components/schemas/PrinterScope"}},"required":["add_when","add_who","id","is_active","mod_when","mod_who","printer_id","priority","scope_type"],"title":"PrinterAssignment","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"id":1,"is_active":false,"mod_when":"<mod_when>","mod_who":1,"printer_id":1,"priority":1,"scope_type":"User"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_printer_assignment":{"post":{"operationId":"delete_printer_assignment","summary":"Delete a printer_assignment by ID — CRUD.","description":"Delete a printer_assignment by ID — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["reporting"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"DEPENDENT_DATA_EXIST","when":"Other rows still use this row."}],"x-quark-module":"printer_assignments","x-quark-operation":"delete","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_printer_assignment"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_printer_assignment","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"id":{"format":"int64","type":"integer"},"is_active":{"type":"boolean"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"printer_id":{"format":"int64","type":"integer"},"priority":{"format":"int32","type":"integer"},"scope_id":{"description":"`user_id` | `zone_id` | `owner_id` | NULL for Warehouse default.","format":"int64","type":["integer","null"]},"scope_type":{"$ref":"#/components/schemas/PrinterScope"}},"required":["add_when","add_who","id","is_active","mod_when","mod_who","printer_id","priority","scope_type"],"title":"PrinterAssignment","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"id":1,"is_active":false,"mod_when":"<mod_when>","mod_who":1,"printer_id":1,"priority":1,"scope_type":"User"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_many_printer_assignment":{"post":{"operationId":"delete_many_printer_assignment","summary":"Delete multiple printer_assignment by IDs — CRUD.","description":"Delete multiple printer_assignment by IDs — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["reporting"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"DEPENDENT_DATA_EXIST","when":"Other rows still use this row."}],"x-quark-module":"printer_assignments","x-quark-operation":"delete","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_many_printer_assignment"},"params":{"type":"object","properties":{"ids":{"items":{"format":"int64","type":"integer"},"type":"array","description":"Record IDs"}},"required":["ids"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_many_printer_assignment","params":{"ids":[1]}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"uint64","minimum":0,"title":"uint64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_printer_assignment":{"post":{"operationId":"count_printer_assignment","summary":"Count printer_assignment — CRUD.","description":"Count printer_assignment — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["reporting"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"printer_assignments","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_printer_assignment"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_printer_assignment"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_screen_def":{"post":{"operationId":"list_screen_def","summary":"List all screen definitions for the current warehouse","description":"List all screen definitions for the current warehouse\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["rf"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"screen_def","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_screen_def"},"params":{"type":"object","properties":{}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_screen_def"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/ScreenDefRecord"},"title":"Array_of_ScreenDefRecord","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"definition":null,"screen_id":"<screen_id>"}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_screen_def":{"post":{"operationId":"get_screen_def","summary":"Get a single screen definition by ID","description":"Get a single screen definition by ID\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["rf"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"screen_def","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_screen_def"},"params":{"type":"object","properties":{"screen_id":{"type":"string"}},"required":["screen_id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_screen_def","params":{"screen_id":"<screen_id>"}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"Screen definition record (screen_id + opaque JSON blob)","properties":{"definition":true,"screen_id":{"type":"string"}},"required":["definition","screen_id"],"title":"ScreenDefRecord","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"definition":null,"screen_id":"<screen_id>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_screen_defs":{"post":{"operationId":"get_screen_defs","summary":"Batch-fetch screen definitions by IDs","description":"Batch-fetch screen definitions by IDs\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["rf"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"screen_def","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_screen_defs"},"params":{"type":"object","properties":{"screen_ids":{"items":{"type":"string"},"type":"array"}},"required":["screen_ids"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_screen_defs","params":{"screen_ids":["<screen_ids>"]}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"additionalProperties":true,"title":"Map_of_Nullable_AnyValue","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#save_all_screen_defs":{"post":{"operationId":"save_all_screen_defs","summary":"Atomically replace all screen definitions and save tree","description":"Atomically replace all screen definitions and save tree\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["rf"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"screen_def","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"save_all_screen_defs"},"params":{"type":"object","properties":{"screens":{"items":{"$ref":"#/components/schemas/ScreenDefForSave"},"type":"array"},"tree":{}},"required":["screens","tree"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"save_all_screen_defs","params":{"screens":[{"definition":null,"screen_id":"<screen_id>"}],"tree":null}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_screen_tree":{"post":{"operationId":"get_screen_tree","summary":"Get the designer tree structure","description":"Get the designer tree structure\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["rf"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"screen_def","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_screen_tree"},"params":{"type":"object","properties":{}}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_screen_tree"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"title":"Nullable_AnyValue"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":null}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#fetch_screen":{"post":{"operationId":"fetch_screen","summary":"Fetch one ScreenFile JSON v2 by id (with optional ifNoneMatch ETag check).","description":"Fetch one ScreenFile JSON v2 by id (with optional ifNoneMatch ETag check).\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- You can call this method without logging in.\n- This method only reads. It changes nothing and needs no idempotency key.\n- A tenant extension cannot replace this method.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["rf"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"-","error":"(none for access)","when":"This method needs no login and no permission."}],"x-quark-module":"metadata","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"fetch_screen"},"params":{"type":"object","properties":{"data":{"properties":{"environment":{"default":"default","type":"string"},"id":{"type":"string"},"if_none_match":{"default":null,"format":"int64","type":["integer","null"]}},"required":["id"],"title":"FetchScreenParams","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"fetch_screen","params":{"data":{"id":"<id>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"anyOf":[{"properties":{"not_modified":{"type":"boolean"},"revision":{"format":"int64","type":"integer"},"screen":true,"ttl":{"format":"uint32","minimum":0,"type":"integer"}},"required":["not_modified","revision","screen","ttl"],"type":"object"},{"properties":{"not_modified":{"type":"boolean"},"revision":{"format":"int64","type":"integer"}},"required":["not_modified","revision"],"type":"object"}],"title":"FetchScreenResponse"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"not_modified":false,"revision":1,"screen":null,"ttl":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#fetch_reachable_from":{"post":{"operationId":"fetch_reachable_from","summary":"Bundle: every ScreenFile transitively reachable from rootId via metadata graph.","description":"Bundle: every ScreenFile transitively reachable from rootId via metadata graph.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- You can call this method without logging in.\n- This method only reads. It changes nothing and needs no idempotency key.\n- A tenant extension cannot replace this method.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["rf"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"-","error":"(none for access)","when":"This method needs no login and no permission."}],"x-quark-module":"metadata","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"fetch_reachable_from"},"params":{"type":"object","properties":{"data":{"properties":{"environment":{"default":"default","type":"string"},"root_id":{"type":"string"}},"required":["root_id"],"title":"FetchReachableFromParams","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"fetch_reachable_from","params":{"data":{"root_id":"<root_id>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"revisions":{"additionalProperties":{"format":"int64","type":"integer"},"type":"object"},"screens":{"additionalProperties":true,"type":"object"},"ttl":{"format":"uint32","minimum":0,"type":"integer"}},"required":["revisions","screens","ttl"],"title":"FetchReachableFromResponse","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"revisions":{},"screens":{},"ttl":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_screens":{"post":{"operationId":"list_screens","summary":"List screens active in environment (id/title/type/category/revision; no body).","description":"List screens active in environment (id/title/type/category/revision; no body).\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- You can call this method without logging in.\n- This method only reads. It changes nothing and needs no idempotency key.\n- A tenant extension cannot replace this method.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["rf"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"-","error":"(none for access)","when":"This method needs no login and no permission."}],"x-quark-module":"metadata","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_screens"},"params":{"type":"object","properties":{"data":{"properties":{"category":{"default":null,"type":["string","null"]},"environment":{"default":"default","type":"string"}},"title":"ListScreensParams","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_screens","params":{"data":{"category":"<category>","environment":"default"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/ScreenSummaryResponse"},"title":"Array_of_ScreenSummaryResponse","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"id":"<id>","revision":1,"title":"<title>","type":"<type>"}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_revision":{"post":{"operationId":"get_revision","summary":"Cheap revision-only check (no body) for a given screen + environment.","description":"Cheap revision-only check (no body) for a given screen + environment.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- You can call this method without logging in.\n- This method only reads. It changes nothing and needs no idempotency key.\n- A tenant extension cannot replace this method.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["rf"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"-","error":"(none for access)","when":"This method needs no login and no permission."}],"x-quark-module":"metadata","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_revision"},"params":{"type":"object","properties":{"data":{"properties":{"environment":{"default":"default","type":"string"},"id":{"type":"string"}},"required":["id"],"title":"GetRevisionParams","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_revision","params":{"data":{"id":"<id>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"revision":{"format":"int64","type":"integer"}},"required":["revision"],"title":"GetRevisionResponse","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"revision":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#save_screen":{"post":{"operationId":"save_screen","summary":"Validate body and append a new ScreenFile revision (does NOT activate).","description":"Validate body and append a new ScreenFile revision (does NOT activate).\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["rf"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"metadata","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"save_screen"},"params":{"type":"object","properties":{"data":{"properties":{"body":true,"comment":{"default":null,"type":["string","null"]},"id":{"type":"string"}},"required":["body","id"],"title":"SaveScreenParams","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"save_screen","params":{"data":{"body":null,"id":"<id>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"id":{"type":"string"},"revision":{"format":"int64","type":"integer"}},"required":["id","revision"],"title":"SaveScreenResponse","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"id":"<id>","revision":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#activate_revision":{"post":{"operationId":"activate_revision","summary":"Set an existing revision as the active one for (id, environment); returns the previous.","description":"Set an existing revision as the active one for (id, environment); returns the previous.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["rf"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"metadata","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"activate_revision"},"params":{"type":"object","properties":{"data":{"properties":{"environment":{"default":"default","type":"string"},"id":{"type":"string"},"revision":{"format":"int64","type":"integer"}},"required":["id","revision"],"title":"ActivateRevisionParams","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"activate_revision","params":{"data":{"id":"<id>","revision":1}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"environment":{"type":"string"},"id":{"type":"string"},"previous_revision":{"format":"int64","type":["integer","null"]},"revision":{"format":"int64","type":"integer"}},"required":["environment","id","revision"],"title":"ActivateRevisionResponse","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"environment":"<environment>","id":"<id>","revision":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_available_stock":{"post":{"operationId":"get_available_stock","summary":"Inventory: get available stock","description":"Inventory: get available stock\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["integration"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"inventory","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_available_stock"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_available_stock","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/AvailableStock"},"title":"Array_of_AvailableStock","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"allocated_qty":1.5,"available_qty":1.5,"location_count":1,"sku_code":"<sku_code>","total_qty":1.5}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_all_stock":{"post":{"operationId":"get_all_stock","summary":"Inventory: get all stock","description":"Inventory: get all stock\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["integration"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"inventory","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_all_stock"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_all_stock","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/AllStock"},"title":"Array_of_AllStock","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"allocated_qty":1.5,"available_qty":1.5,"sku_code":"<sku_code>","total_qty":1.5}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#sync_stock_log":{"post":{"operationId":"sync_stock_log","summary":"Inventory: sync stock log","description":"Inventory: sync stock log\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["integration"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"inventory","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"sync_stock_log"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"sync_stock_log","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"title":"AnyValue"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":null}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_inventory_balance":{"post":{"operationId":"list_inventory_balance","summary":"List inventory_balance — CRUD.","description":"List inventory_balance — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["integration"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"inventory","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_inventory_balance"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_inventory_balance"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/InventoryBalanceAtp"},"title":"Array_of_InventoryBalanceAtp","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"atp":1.5,"id":1,"location":"<location>","lot":"<lot>","mod_when":"<mod_when>","mod_who":1,"owner_id":1,"pack_id":1,"qty":1.5,"qty_allocated":1.5,"qty_expected":1.5,"qty_on_hold":1.5,"qty_picked":1.5,"sku_code":"<sku_code>","uom":"<uom>"}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_inventory_balance_on_hold":{"post":{"operationId":"list_inventory_balance_on_hold","summary":"List inventory_balance_on_hold — CRUD.","description":"List inventory_balance_on_hold — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["integration"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"inventory","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_inventory_balance_on_hold"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_inventory_balance_on_hold"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/InventoryBalanceAtp"},"title":"Array_of_InventoryBalanceAtp","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"atp":1.5,"id":1,"location":"<location>","lot":"<lot>","mod_when":"<mod_when>","mod_who":1,"owner_id":1,"pack_id":1,"qty":1.5,"qty_allocated":1.5,"qty_expected":1.5,"qty_on_hold":1.5,"qty_picked":1.5,"sku_code":"<sku_code>","uom":"<uom>"}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_inventory_balance_lot":{"post":{"operationId":"list_inventory_balance_lot","summary":"List inventory_balance_lot — CRUD.","description":"List inventory_balance_lot — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["integration"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"inventory","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_inventory_balance_lot"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_inventory_balance_lot"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/InventoryBalanceLot"},"title":"Array_of_InventoryBalanceLot","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"id":1,"lot":"<lot>","mod_when":"<mod_when>","mod_who":1,"owner_id":1,"sku_code":"<sku_code>"}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_inventory_balance":{"post":{"operationId":"count_inventory_balance","summary":"Count inventory_balance — CRUD.","description":"Count inventory_balance — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["integration"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"inventory","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_inventory_balance"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_inventory_balance"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_inventory_balance_on_hold":{"post":{"operationId":"count_inventory_balance_on_hold","summary":"Count inventory_balance_on_hold — CRUD.","description":"Count inventory_balance_on_hold — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["integration"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"inventory","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_inventory_balance_on_hold"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_inventory_balance_on_hold"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_inventory_balance_lot":{"post":{"operationId":"count_inventory_balance_lot","summary":"Count inventory_balance_lot — CRUD.","description":"Count inventory_balance_lot — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["integration"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"inventory","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_inventory_balance_lot"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_inventory_balance_lot"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_inventory_hold":{"post":{"operationId":"list_inventory_hold","summary":"List inventory_hold — CRUD.","description":"List inventory_hold — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["integration"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"inventory","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_inventory_hold"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_inventory_hold"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/InventoryHold"},"title":"Array_of_InventoryHold","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"code":"<code>","id":1,"is_hold_on":false,"mod_when":"<mod_when>","mod_who":1,"status":"None"}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_inventory_hold":{"post":{"operationId":"count_inventory_hold","summary":"Count inventory_hold — CRUD.","description":"Count inventory_hold — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["integration"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"inventory","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_inventory_hold"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_inventory_hold"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_inventory_hold":{"post":{"operationId":"get_inventory_hold","summary":"Get a inventory_hold by ID — CRUD.","description":"Get a inventory_hold by ID — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["integration"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"inventory","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_inventory_hold"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_inventory_hold","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"Represents a hold placed on inventory, supporting lot, location, or LPN-based holds.\n\nThis struct is designed for detailed tracking and auditing of inventory holds in a warehouse management system. It supports flexible hold types (lot, location, LPN), status management, and full audit trails.\n\n# Fields - `id`: Unique identifier for the hold record. - `code`: Business code for the hold (may be used for grouping or referencing). - `lot`: Optional lot number, if the hold is placed at the lot level. - `loc`: Optional location code, if the hold is placed at the location level. - `lpn`: Optional License Plate Number, if the hold is placed on a movable unit. - `is_hold_on`: `true` if the hold is currently active, `false` if released. - `status`: The current status of the hold (custom enum). - `date_on`: Timestamp when the hold was placed. - `who_on`: User ID or actor who placed the hold. - `date_off`: Timestamp when the hold was released (if applicable). - `who_off`: User ID or actor who released the hold (if applicable). - `comments`: Optional comments or notes about the hold. - `hours_to_hold`: Optional planned duration (in hours) for the hold. - `auto_release_date`: Optional date when the hold should be automatically released. - `add_who`: User ID who created the record. - `add_when`: Timestamp when the record was created. - `mod_who`: User ID who last modified the record. - `mod_when`: Timestamp when the record was last modified.\n\n# Serialization - Uses RFC3339 datetime format for all timestamps. - Designed for use with Serde and SQLx for seamless database and API integration.\n\n# Example ``` let hold = InventoryHold { id: 1, code: \"HOLD-2025-001\".to_string(), lot: Some(\"LOT-123\".to_string()), loc: None, lpn: None, is_hold_on: true, status: InventoryStatusHold::Active, date_on: OffsetDateTime::now_utc(), who_on: 42, date_off: OffsetDateTime::now_utc(), who_off: 0, comments: Some(\"Quality check pending\".to_string()), hours_to_hold: Some(24.0), auto_release_date: OffsetDateTime::now_utc(), add_who: 42, add_when: OffsetDateTime::now_utc(), mod_who: 42, mod_when: OffsetDateTime::now_utc(), }; ```","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"auto_release_date":{"default":null,"type":["string","null"]},"code":{"type":"string"},"comments":{"type":["string","null"]},"date_off":{"default":null,"type":["string","null"]},"date_on":{"default":null,"type":["string","null"]},"hours_to_hold":{"format":"double","type":["number","null"]},"id":{"format":"int64","type":"integer"},"is_hold_on":{"type":"boolean"},"loc":{"type":["string","null"]},"lot":{"type":["string","null"]},"lpn":{"type":["string","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"status":{"$ref":"#/components/schemas/InventoryStatusHold"},"who_off":{"format":"int64","type":["integer","null"]},"who_on":{"format":"int64","type":["integer","null"]}},"required":["add_when","add_who","code","id","is_hold_on","mod_when","mod_who","status"],"title":"InventoryHold","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","id":1,"is_hold_on":false,"mod_when":"<mod_when>","mod_who":1,"status":"None"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#update_inventory_hold":{"post":{"operationId":"update_inventory_hold","summary":"Update inventory-hold comments and auto-release schedule","description":"Update inventory-hold comments and auto-release schedule\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["integration"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"inventory","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"update_inventory_hold"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"},"data":{"additionalProperties":false,"properties":{"auto_release_date":{"description":"Omitted keeps the schedule, null removes it, and an RFC 3339 value schedules release at that absolute instant.","format":"date-time","type":["string","null"]},"comments":{"description":"Omitted = invalid no-op, null = clear, string = replace.","type":["string","null"]}},"title":"UpdateInventoryHoldFields","type":"object"}},"required":["id","data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"update_inventory_hold","params":{"id":1,"data":{"auto_release_date":"2026-01-01T00:00:00Z","comments":"<comments>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"Represents a hold placed on inventory, supporting lot, location, or LPN-based holds.\n\nThis struct is designed for detailed tracking and auditing of inventory holds in a warehouse management system. It supports flexible hold types (lot, location, LPN), status management, and full audit trails.\n\n# Fields - `id`: Unique identifier for the hold record. - `code`: Business code for the hold (may be used for grouping or referencing). - `lot`: Optional lot number, if the hold is placed at the lot level. - `loc`: Optional location code, if the hold is placed at the location level. - `lpn`: Optional License Plate Number, if the hold is placed on a movable unit. - `is_hold_on`: `true` if the hold is currently active, `false` if released. - `status`: The current status of the hold (custom enum). - `date_on`: Timestamp when the hold was placed. - `who_on`: User ID or actor who placed the hold. - `date_off`: Timestamp when the hold was released (if applicable). - `who_off`: User ID or actor who released the hold (if applicable). - `comments`: Optional comments or notes about the hold. - `hours_to_hold`: Optional planned duration (in hours) for the hold. - `auto_release_date`: Optional date when the hold should be automatically released. - `add_who`: User ID who created the record. - `add_when`: Timestamp when the record was created. - `mod_who`: User ID who last modified the record. - `mod_when`: Timestamp when the record was last modified.\n\n# Serialization - Uses RFC3339 datetime format for all timestamps. - Designed for use with Serde and SQLx for seamless database and API integration.\n\n# Example ``` let hold = InventoryHold { id: 1, code: \"HOLD-2025-001\".to_string(), lot: Some(\"LOT-123\".to_string()), loc: None, lpn: None, is_hold_on: true, status: InventoryStatusHold::Active, date_on: OffsetDateTime::now_utc(), who_on: 42, date_off: OffsetDateTime::now_utc(), who_off: 0, comments: Some(\"Quality check pending\".to_string()), hours_to_hold: Some(24.0), auto_release_date: OffsetDateTime::now_utc(), add_who: 42, add_when: OffsetDateTime::now_utc(), mod_who: 42, mod_when: OffsetDateTime::now_utc(), }; ```","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"auto_release_date":{"default":null,"type":["string","null"]},"code":{"type":"string"},"comments":{"type":["string","null"]},"date_off":{"default":null,"type":["string","null"]},"date_on":{"default":null,"type":["string","null"]},"hours_to_hold":{"format":"double","type":["number","null"]},"id":{"format":"int64","type":"integer"},"is_hold_on":{"type":"boolean"},"loc":{"type":["string","null"]},"lot":{"type":["string","null"]},"lpn":{"type":["string","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"status":{"$ref":"#/components/schemas/InventoryStatusHold"},"who_off":{"format":"int64","type":["integer","null"]},"who_on":{"format":"int64","type":["integer","null"]}},"required":["add_when","add_who","code","id","is_hold_on","mod_when","mod_who","status"],"title":"InventoryHold","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","id":1,"is_hold_on":false,"mod_when":"<mod_when>","mod_who":1,"status":"None"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_inventory_balance_by_sku":{"post":{"operationId":"list_inventory_balance_by_sku","summary":"List inventory_balance_by_sku — CRUD.","description":"List inventory_balance_by_sku — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["integration"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"inventory","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_inventory_balance_by_sku"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_inventory_balance_by_sku"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/InventoryBalanceBySku"},"title":"Array_of_InventoryBalanceBySku","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"atp":1.5,"id":1,"locs":1,"owner_id":1,"qty":1.5,"qty_allocated":1.5,"qty_expected":1.5,"qty_on_hold":1.5,"sku_code":"<sku_code>"}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_inventory_balance_by_lot":{"post":{"operationId":"list_inventory_balance_by_lot","summary":"List inventory_balance_by_lot — CRUD.","description":"List inventory_balance_by_lot — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["integration"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"inventory","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_inventory_balance_by_lot"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_inventory_balance_by_lot"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/InventoryBalanceByLot"},"title":"Array_of_InventoryBalanceByLot","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"atp":1.5,"expired":false,"id":1,"locs":1,"lot":"<lot>","owner_id":1,"qty":1.5,"qty_allocated":1.5,"sku_code":"<sku_code>","status":"<status>"}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_inventory_balance_by_container":{"post":{"operationId":"list_inventory_balance_by_container","summary":"List inventory_balance_by_container — CRUD.","description":"List inventory_balance_by_container — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["integration"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"inventory","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_inventory_balance_by_container"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_inventory_balance_by_container"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/InventoryBalanceByContainer"},"title":"Array_of_InventoryBalanceByContainer","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"atp":1.5,"code":"<code>","created":"<created>","id":1,"owner_id":1,"qty":1.5,"qty_allocated":1.5,"sku_count":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_inventory_balance_by_sku":{"post":{"operationId":"count_inventory_balance_by_sku","summary":"Count inventory_balance_by_sku — CRUD.","description":"Count inventory_balance_by_sku — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["integration"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"inventory","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_inventory_balance_by_sku"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_inventory_balance_by_sku"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_inventory_balance_by_lot":{"post":{"operationId":"count_inventory_balance_by_lot","summary":"Count inventory_balance_by_lot — CRUD.","description":"Count inventory_balance_by_lot — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["integration"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"inventory","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_inventory_balance_by_lot"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_inventory_balance_by_lot"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_inventory_balance_by_container":{"post":{"operationId":"count_inventory_balance_by_container","summary":"Count inventory_balance_by_container — CRUD.","description":"Count inventory_balance_by_container — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["integration"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"inventory","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_inventory_balance_by_container"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_inventory_balance_by_container"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_container_hierarchy":{"post":{"operationId":"get_container_hierarchy","summary":"Get by-container balances as a hierarchy (tree) view","description":"Get by-container balances as a hierarchy (tree) view\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["integration"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"inventory","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_container_hierarchy"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_container_hierarchy"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"Response shape for the container-hierarchy RPC. The generic tree action only reads `.items`, mirroring `PackHierarchyResponse`.","properties":{"items":{"items":{"$ref":"#/components/schemas/ContainerTreeItem"},"type":"array"}},"required":["items"],"title":"ContainerHierarchyResponse","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"items":[{"atp":1.5,"code":"<code>","created":"<created>","group":false,"hierarchyLevel":1,"hierarchyPath":["<hierarchyPath>"],"id":1,"owner_id":1,"qty":1.5,"qty_allocated":1.5,"sku_count":1}]}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_inventory_hold_detail":{"post":{"operationId":"list_inventory_hold_detail","summary":"List inventory_hold_detail — CRUD.","description":"List inventory_hold_detail — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["integration"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"inventory","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_inventory_hold_detail"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_inventory_hold_detail"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/InventoryHoldDetail"},"title":"Array_of_InventoryHoldDetail","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"code":"<code>","id":1,"is_hold_on":false,"qty":1.5,"scope":"<scope>","status":"<status>"}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_inventory_hold_detail":{"post":{"operationId":"count_inventory_hold_detail","summary":"Count inventory_hold_detail — CRUD.","description":"Count inventory_hold_detail — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["integration"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"inventory","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_inventory_hold_detail"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_inventory_hold_detail"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_serial_capture_episode_open":{"post":{"operationId":"list_serial_capture_episode_open","summary":"List serial_capture_episode_open — CRUD.","description":"List serial_capture_episode_open — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["integration"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"inventory","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_serial_capture_episode_open"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_serial_capture_episode_open"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/SerialCaptureEpisodeOpen"},"title":"Array_of_SerialCaptureEpisodeOpen","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"age_minutes":1,"business_operation":"<business_operation>","captured_qty":1,"expected_qty":1,"id":1,"idempotency_key":"<idempotency_key>","opened_at":"<opened_at>","owner_id":1,"progress_pct":1,"sku_code":"<sku_code>","status":"<status>"}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_serial_capture_episode_open":{"post":{"operationId":"count_serial_capture_episode_open","summary":"Count serial_capture_episode_open — CRUD.","description":"Count serial_capture_episode_open — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["integration"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"inventory","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_serial_capture_episode_open"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_serial_capture_episode_open"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_inventory_balance_kpi":{"post":{"operationId":"list_inventory_balance_kpi","summary":"List inventory_balance_kpi — CRUD.","description":"List inventory_balance_kpi — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["integration"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"inventory","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_inventory_balance_kpi"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_inventory_balance_kpi"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/InventoryBalanceKpi"},"title":"Array_of_InventoryBalanceKpi","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"allocated":1.5,"atp":1.5,"expected":1.5,"hold_count":1,"id":1,"on_hold":1.5,"row_count":1,"total_qty":1.5}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_inventory_pending_move_in_ui":{"post":{"operationId":"list_inventory_pending_move_in_ui","summary":"List inventory_pending_move_in_ui — CRUD.","description":"List inventory_pending_move_in_ui — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["integration"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"inventory","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_inventory_pending_move_in_ui"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_inventory_pending_move_in_ui"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/InventoryPendingMoveInUi"},"title":"Array_of_InventoryPendingMoveInUi","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"container_id":1,"expires_at":"<expires_at>","id":1,"location":"<location>","source":"<source>","status":"<status>"}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_inventory_pending_move_in_ui":{"post":{"operationId":"count_inventory_pending_move_in_ui","summary":"Count inventory_pending_move_in_ui — CRUD.","description":"Count inventory_pending_move_in_ui — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, SUPERVISOR, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["integration"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","SUPERVISOR","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"inventory","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_inventory_pending_move_in_ui"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_inventory_pending_move_in_ui"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#search_inventory_balances":{"post":{"operationId":"search_inventory_balances","summary":"RF stock search by any of lot / location / LPN / serial / SKU / owner. At least one filter is required; refuses rather than truncates past 200 rows.","description":"RF stock search by any of lot / location / LPN / serial / SKU / owner. At least one filter is required; refuses rather than truncates past 200 rows.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["integration"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"inventory_search","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"search_inventory_balances"},"params":{"type":"object","properties":{"data":{"description":"The six filters, exactly as the RF screen sends them.\n\nEvery field is optional and an empty or whitespace-only string means \"not filtering on this\" — the screen always sends all six keys, because a missing key makes rf-go's picker silently refuse to open (design spec §3.2).","properties":{"loc":{"type":["string","null"]},"lot":{"type":["string","null"]},"lpn":{"type":["string","null"]},"owner":{"description":"Owner id (all digits) or a company-name fragment. One screen field, because an operator has one thing written on the paperwork.","type":["string","null"]},"serial":{"type":["string","null"]},"sku":{"type":["string","null"]}},"title":"InquiryFilters","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"search_inventory_balances","params":{"data":{"loc":"<loc>","lot":"<lot>","lpn":"<lpn>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/InventoryBalanceAtp"},"title":"Array_of_InventoryBalanceAtp","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"atp":1.5,"id":1,"location":"<location>","lot":"<lot>","mod_when":"<mod_when>","mod_who":1,"owner_id":1,"pack_id":1,"qty":1.5,"qty_allocated":1.5,"qty_expected":1.5,"qty_on_hold":1.5,"qty_picked":1.5,"sku_code":"<sku_code>","uom":"<uom>"}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_position_serials":{"post":{"operationId":"list_position_serials","summary":"Serial numbers on one inventory position (container or loose location + sku/lot/owner). Truncates past 200 rather than refusing — an operator cannot narrow 'what is in this location'.","description":"Serial numbers on one inventory position (container or loose location + sku/lot/owner). Truncates past 200 rather than refusing — an operator cannot narrow 'what is in this location'.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["integration"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"inventory_search","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_position_serials"},"params":{"type":"object","properties":{"data":{"description":"The picked position's identity, exactly as the RF card holds it.","properties":{"container_id":{"description":"Set for a containerized position; `None` + `loc` for a loose one.","format":"int64","type":["integer","null"]},"loc":{"type":["string","null"]},"lot":{"type":["string","null"]},"owner_id":{"format":"int64","type":"integer"},"sku_code":{"type":"string"}},"required":["owner_id","sku_code"],"title":"PositionSerialQuery","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_position_serials","params":{"data":{"owner_id":1,"sku_code":"<sku_code>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"Wire shape: a flat list plus the honest \"there are more\" flag.","properties":{"serials":{"items":{"type":"string"},"type":"array"},"truncated":{"description":"True when the position holds more units than were returned. The screen says so rather than letting the operator read a partial list as complete.","type":"boolean"}},"required":["serials","truncated"],"title":"PositionSerialsResult","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"serials":["<serials>"],"truncated":false}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_expected_sgtins":{"post":{"operationId":"get_expected_sgtins","summary":"Marking: get expected SGTINs","description":"Marking: get expected SGTINs\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["integration"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"marking","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_expected_sgtins"},"params":{"type":"object","properties":{"params":{"additionalProperties":true,"description":"Marking flow inputs differ per operation and evolve with regulator documents. Preserve the complete object at this transport boundary.","title":"MarkingRequest","type":"object"}},"required":["params"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_expected_sgtins","params":{"params":{}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"title":"AnyValue"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":null}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_shipment_sgtins":{"post":{"operationId":"get_shipment_sgtins","summary":"Marking: get shipment SGTINs","description":"Marking: get shipment SGTINs\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["integration"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"marking","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_shipment_sgtins"},"params":{"type":"object","properties":{"params":{"additionalProperties":true,"description":"Marking flow inputs differ per operation and evolve with regulator documents. Preserve the complete object at this transport boundary.","title":"MarkingRequest","type":"object"}},"required":["params"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_shipment_sgtins","params":{"params":{}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"title":"AnyValue"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":null}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_box_sgtins":{"post":{"operationId":"get_box_sgtins","summary":"Marking: get box SGTINs","description":"Marking: get box SGTINs\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["integration"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"marking","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_box_sgtins"},"params":{"type":"object","properties":{"params":{"additionalProperties":true,"description":"Marking flow inputs differ per operation and evolve with regulator documents. Preserve the complete object at this transport boundary.","title":"MarkingRequest","type":"object"}},"required":["params"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_box_sgtins","params":{"params":{}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"title":"AnyValue"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":null}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_withdrawal_codes":{"post":{"operationId":"get_withdrawal_codes","summary":"Marking: get withdrawal codes","description":"Marking: get withdrawal codes\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["integration"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"marking","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_withdrawal_codes"},"params":{"type":"object","properties":{"params":{"additionalProperties":true,"description":"Marking flow inputs differ per operation and evolve with regulator documents. Preserve the complete object at this transport boundary.","title":"MarkingRequest","type":"object"}},"required":["params"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_withdrawal_codes","params":{"params":{}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"title":"AnyValue"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":null}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_pharma_sgtins":{"post":{"operationId":"get_pharma_sgtins","summary":"Marking: get pharma SGTINs","description":"Marking: get pharma SGTINs\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["integration"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"marking","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_pharma_sgtins"},"params":{"type":"object","properties":{"params":{"additionalProperties":true,"description":"Marking flow inputs differ per operation and evolve with regulator documents. Preserve the complete object at this transport boundary.","title":"MarkingRequest","type":"object"}},"required":["params"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_pharma_sgtins","params":{"params":{}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"title":"AnyValue"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":null}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_kz_inbound_codes":{"post":{"operationId":"get_kz_inbound_codes","summary":"Marking: get ИС МПТ inbound codes","description":"Marking: get ИС МПТ inbound codes\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["integration"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"marking","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_kz_inbound_codes"},"params":{"type":"object","properties":{"params":{"additionalProperties":true,"description":"Marking flow inputs differ per operation and evolve with regulator documents. Preserve the complete object at this transport boundary.","title":"MarkingRequest","type":"object"}},"required":["params"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_kz_inbound_codes","params":{"params":{}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"title":"AnyValue"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":null}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#confirm_inbound":{"post":{"operationId":"confirm_inbound","summary":"Marking: confirm inbound regulator acknowledgement","description":"Marking: confirm inbound regulator acknowledgement\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["integration"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"marking","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"confirm_inbound"},"params":{"type":"object","properties":{"params":{"additionalProperties":true,"description":"Marking flow inputs differ per operation and evolve with regulator documents. Preserve the complete object at this transport boundary.","title":"MarkingRequest","type":"object"}},"required":["params"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"confirm_inbound","params":{"params":{}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"title":"AnyValue"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":null}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#confirm_outbound":{"post":{"operationId":"confirm_outbound","summary":"Marking: confirm outbound regulator acknowledgement","description":"Marking: confirm outbound regulator acknowledgement\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["integration"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"marking","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"confirm_outbound"},"params":{"type":"object","properties":{"params":{"additionalProperties":true,"description":"Marking flow inputs differ per operation and evolve with regulator documents. Preserve the complete object at this transport boundary.","title":"MarkingRequest","type":"object"}},"required":["params"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"confirm_outbound","params":{"params":{}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"title":"AnyValue"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":null}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#confirm_aggregation":{"post":{"operationId":"confirm_aggregation","summary":"Marking: confirm regulator aggregation acknowledgement","description":"Marking: confirm regulator aggregation acknowledgement\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["integration"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"marking","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"confirm_aggregation"},"params":{"type":"object","properties":{"params":{"additionalProperties":true,"description":"Marking flow inputs differ per operation and evolve with regulator documents. Preserve the complete object at this transport boundary.","title":"MarkingRequest","type":"object"}},"required":["params"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"confirm_aggregation","params":{"params":{}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"title":"AnyValue"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":null}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#confirm_pharma_inbound":{"post":{"operationId":"confirm_pharma_inbound","summary":"Marking: confirm МДЛП inbound acknowledgement","description":"Marking: confirm МДЛП inbound acknowledgement\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["integration"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"marking","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"confirm_pharma_inbound"},"params":{"type":"object","properties":{"params":{"additionalProperties":true,"description":"Marking flow inputs differ per operation and evolve with regulator documents. Preserve the complete object at this transport boundary.","title":"MarkingRequest","type":"object"}},"required":["params"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"confirm_pharma_inbound","params":{"params":{}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"title":"AnyValue"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":null}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#confirm_kz_inbound":{"post":{"operationId":"confirm_kz_inbound","summary":"Marking: confirm ИС МПТ inbound acknowledgement","description":"Marking: confirm ИС МПТ inbound acknowledgement\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["integration"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"marking","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"confirm_kz_inbound"},"params":{"type":"object","properties":{"params":{"additionalProperties":true,"description":"Marking flow inputs differ per operation and evolve with regulator documents. Preserve the complete object at this transport boundary.","title":"MarkingRequest","type":"object"}},"required":["params"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"confirm_kz_inbound","params":{"params":{}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"title":"AnyValue"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":null}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#create_attribute_def":{"post":{"operationId":"create_attribute_def","summary":"Create a new attribute_def — CRUD.","description":"Create a new attribute_def — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["integration"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"UNIQUE_VIOLATION or INVALID_DATA","when":"The code already exists, or a value breaks a rule."}],"x-quark-module":"entity_attribute","x-quark-operation":"create","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"create_attribute_def"},"params":{"type":"object","properties":{"data":{"properties":{"active":{"type":["boolean","null"]},"code":{"type":"string"},"data_type":{"anyOf":[{"$ref":"#/components/schemas/AttrDataType"},{"type":"null"}],"description":"`From<AttrDataType> for sea_query::Value` binds the label as text, and Postgres has no implicit text → `attr_data_type` cast (42804), so the value is cast in the INSERT itself — as every other enum column written through `Fields` is (`sku`, `user`, `task`, …).\n\nUntil the 2026-09-23 squash this one column was carried instead by a database-wide `CREATE CAST (text AS attr_data_type) … AS IMPLICIT` (archived migration 058). `pg_dump` does not emit casts, so the baseline dropped it and every `create` here began failing with 42804. The cast was never restored: it was a workaround for the missing attribute below, and an implicit cast would let any stray text land in the enum for the whole database."},"default_value":{"type":["string","null"]},"display_order":{"format":"int32","type":["integer","null"]},"entity_type":{"type":"string"},"is_required":{"type":["boolean","null"]},"label":{"type":"string"},"owner_id":{"format":"int64","type":["integer","null"]}},"required":["code","entity_type","label"],"title":"AttributeDefForCreate","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"create_attribute_def","params":{"data":{"code":"<code>","entity_type":"<entity_type>","label":"<label>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"active":{"type":"boolean"},"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"data_type":{"$ref":"#/components/schemas/AttrDataType"},"default_value":{"type":["string","null"]},"display_order":{"format":"int32","type":"integer"},"entity_type":{"type":"string"},"id":{"format":"int64","type":"integer"},"is_required":{"type":"boolean"},"label":{"type":"string"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"owner_id":{"format":"int64","type":["integer","null"]}},"required":["active","add_when","add_who","code","data_type","display_order","entity_type","id","is_required","label","mod_when","mod_who"],"title":"AttributeDef","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"active":false,"add_when":"<add_when>","add_who":1,"code":"<code>","data_type":"Text","display_order":1,"entity_type":"<entity_type>","id":1,"is_required":false,"label":"<label>","mod_when":"<mod_when>","mod_who":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_attribute_def":{"post":{"operationId":"get_attribute_def","summary":"Get a attribute_def by ID — CRUD.","description":"Get a attribute_def by ID — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["integration"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"entity_attribute","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_attribute_def"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_attribute_def","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"active":{"type":"boolean"},"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"data_type":{"$ref":"#/components/schemas/AttrDataType"},"default_value":{"type":["string","null"]},"display_order":{"format":"int32","type":"integer"},"entity_type":{"type":"string"},"id":{"format":"int64","type":"integer"},"is_required":{"type":"boolean"},"label":{"type":"string"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"owner_id":{"format":"int64","type":["integer","null"]}},"required":["active","add_when","add_who","code","data_type","display_order","entity_type","id","is_required","label","mod_when","mod_who"],"title":"AttributeDef","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"active":false,"add_when":"<add_when>","add_who":1,"code":"<code>","data_type":"Text","display_order":1,"entity_type":"<entity_type>","id":1,"is_required":false,"label":"<label>","mod_when":"<mod_when>","mod_who":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_attribute_def":{"post":{"operationId":"list_attribute_def","summary":"List attribute_def — CRUD.","description":"List attribute_def — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["integration"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"entity_attribute","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_attribute_def"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_attribute_def"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/AttributeDef"},"title":"Array_of_AttributeDef","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"active":false,"add_when":"<add_when>","add_who":1,"code":"<code>","data_type":"Text","display_order":1,"entity_type":"<entity_type>","id":1,"is_required":false,"label":"<label>","mod_when":"<mod_when>","mod_who":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_attribute_def":{"post":{"operationId":"count_attribute_def","summary":"Count attribute_def — CRUD.","description":"Count attribute_def — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["integration"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"entity_attribute","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_attribute_def"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_attribute_def"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#update_attribute_def":{"post":{"operationId":"update_attribute_def","summary":"Update an attribute definition with strict nullable-field semantics.","description":"Update an attribute definition with strict nullable-field semantics.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["integration"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"INVALID_DATA","when":"A value breaks a rule."}],"x-quark-module":"entity_attribute","x-quark-operation":"update","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"update_attribute_def"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"},"data":{"additionalProperties":false,"properties":{"active":{"type":"boolean"},"data_type":{"enum":["Text","Integer","Decimal","Boolean","Date"],"type":"string"},"default_value":{"type":["string","null"]},"display_order":{"format":"int32","type":"integer"},"is_required":{"type":"boolean"},"label":{"type":"string"}},"title":"AttributeDefUpdateApi","type":"object"}},"required":["id","data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"update_attribute_def","params":{"id":1,"data":{"active":false,"data_type":"Text","default_value":"<default_value>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"active":{"type":"boolean"},"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"data_type":{"$ref":"#/components/schemas/AttrDataType"},"default_value":{"type":["string","null"]},"display_order":{"format":"int32","type":"integer"},"entity_type":{"type":"string"},"id":{"format":"int64","type":"integer"},"is_required":{"type":"boolean"},"label":{"type":"string"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"owner_id":{"format":"int64","type":["integer","null"]}},"required":["active","add_when","add_who","code","data_type","display_order","entity_type","id","is_required","label","mod_when","mod_who"],"title":"AttributeDef","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"active":false,"add_when":"<add_when>","add_who":1,"code":"<code>","data_type":"Text","display_order":1,"entity_type":"<entity_type>","id":1,"is_required":false,"label":"<label>","mod_when":"<mod_when>","mod_who":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_attribute_def":{"post":{"operationId":"delete_attribute_def","summary":"Delete a attribute_def by ID — CRUD.","description":"Delete a attribute_def by ID — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["integration"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"DEPENDENT_DATA_EXIST","when":"Other rows still use this row."}],"x-quark-module":"entity_attribute","x-quark-operation":"delete","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_attribute_def"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_attribute_def","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"active":{"type":"boolean"},"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"data_type":{"$ref":"#/components/schemas/AttrDataType"},"default_value":{"type":["string","null"]},"display_order":{"format":"int32","type":"integer"},"entity_type":{"type":"string"},"id":{"format":"int64","type":"integer"},"is_required":{"type":"boolean"},"label":{"type":"string"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"owner_id":{"format":"int64","type":["integer","null"]}},"required":["active","add_when","add_who","code","data_type","display_order","entity_type","id","is_required","label","mod_when","mod_who"],"title":"AttributeDef","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"active":false,"add_when":"<add_when>","add_who":1,"code":"<code>","data_type":"Text","display_order":1,"entity_type":"<entity_type>","id":1,"is_required":false,"label":"<label>","mod_when":"<mod_when>","mod_who":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#create_attribute_value":{"post":{"operationId":"create_attribute_value","summary":"Create a new attribute_value — CRUD.","description":"Create a new attribute_value — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["integration"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"entity_attribute","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"create_attribute_value"},"params":{"type":"object","properties":{"data":{"properties":{"attribute_def_id":{"format":"int64","type":"integer"},"entity_id":{"format":"int64","type":"integer"},"entity_type":{"description":"Required, and deliberately not defaulted: a caller that does not know whose row it is writing does not know enough to write it. See [`AttributeValue::entity_type`].","type":"string"},"value_bool":{"type":["boolean","null"]},"value_date":{"type":["string","null"]},"value_float":{"format":"double","type":["number","null"]},"value_int":{"format":"int64","type":["integer","null"]},"value_text":{"type":["string","null"]}},"required":["attribute_def_id","entity_id","entity_type"],"title":"AttributeValueForCreate","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"create_attribute_value","params":{"data":{"attribute_def_id":1,"entity_id":1,"entity_type":"<entity_type>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"attribute_def_id":{"format":"int64","type":"integer"},"entity_id":{"format":"int64","type":"integer"},"entity_type":{"description":"Which KIND of entity `entity_id` names — `'sku'`, `'location'`, …\n\n`attribute_value` is a generic EAV table and `entity_id` alone does not identify anything: SKU ids and location ids are independent sequences, so `entity_id = 7` is both SKU 7 and location 7. This is the discriminator that tells them apart, and migration 219's composite FK onto `attribute_def (id, entity_type)` makes it impossible for it to disagree with the definition the row points at.","type":"string"},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"value_bool":{"type":["boolean","null"]},"value_date":{"type":["string","null"]},"value_float":{"format":"double","type":["number","null"]},"value_int":{"format":"int64","type":["integer","null"]},"value_text":{"type":["string","null"]}},"required":["add_when","add_who","attribute_def_id","entity_id","entity_type","id","mod_when","mod_who"],"title":"AttributeValue","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"attribute_def_id":1,"entity_id":1,"entity_type":"<entity_type>","id":1,"mod_when":"<mod_when>","mod_who":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_attribute_value":{"post":{"operationId":"get_attribute_value","summary":"Get a attribute_value by ID — CRUD.","description":"Get a attribute_value by ID — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["integration"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"entity_attribute","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_attribute_value"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_attribute_value","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"attribute_def_id":{"format":"int64","type":"integer"},"entity_id":{"format":"int64","type":"integer"},"entity_type":{"description":"Which KIND of entity `entity_id` names — `'sku'`, `'location'`, …\n\n`attribute_value` is a generic EAV table and `entity_id` alone does not identify anything: SKU ids and location ids are independent sequences, so `entity_id = 7` is both SKU 7 and location 7. This is the discriminator that tells them apart, and migration 219's composite FK onto `attribute_def (id, entity_type)` makes it impossible for it to disagree with the definition the row points at.","type":"string"},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"value_bool":{"type":["boolean","null"]},"value_date":{"type":["string","null"]},"value_float":{"format":"double","type":["number","null"]},"value_int":{"format":"int64","type":["integer","null"]},"value_text":{"type":["string","null"]}},"required":["add_when","add_who","attribute_def_id","entity_id","entity_type","id","mod_when","mod_who"],"title":"AttributeValue","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"attribute_def_id":1,"entity_id":1,"entity_type":"<entity_type>","id":1,"mod_when":"<mod_when>","mod_who":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_attribute_value":{"post":{"operationId":"list_attribute_value","summary":"List attribute_value — CRUD.","description":"List attribute_value — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["integration"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"entity_attribute","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_attribute_value"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_attribute_value"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/AttributeValue"},"title":"Array_of_AttributeValue","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"attribute_def_id":1,"entity_id":1,"entity_type":"<entity_type>","id":1,"mod_when":"<mod_when>","mod_who":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_attribute_value":{"post":{"operationId":"count_attribute_value","summary":"Count attribute_value — CRUD.","description":"Count attribute_value — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["integration"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"entity_attribute","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_attribute_value"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_attribute_value"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#update_attribute_value":{"post":{"operationId":"update_attribute_value","summary":"Update an attribute value with explicit keep, clear and set semantics.","description":"Update an attribute value with explicit keep, clear and set semantics.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["integration"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"entity_attribute","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"update_attribute_value"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"},"data":{"additionalProperties":false,"properties":{"value_bool":{"type":["boolean","null"]},"value_date":{"type":["string","null"]},"value_float":{"format":"double","type":["number","null"]},"value_int":{"format":"int64","type":["integer","null"]},"value_text":{"type":["string","null"]}},"title":"AttributeValueUpdateApi","type":"object"}},"required":["id","data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"update_attribute_value","params":{"id":1,"data":{"value_bool":false,"value_date":"<value_date>","value_float":1.5}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"attribute_def_id":{"format":"int64","type":"integer"},"entity_id":{"format":"int64","type":"integer"},"entity_type":{"description":"Which KIND of entity `entity_id` names — `'sku'`, `'location'`, …\n\n`attribute_value` is a generic EAV table and `entity_id` alone does not identify anything: SKU ids and location ids are independent sequences, so `entity_id = 7` is both SKU 7 and location 7. This is the discriminator that tells them apart, and migration 219's composite FK onto `attribute_def (id, entity_type)` makes it impossible for it to disagree with the definition the row points at.","type":"string"},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"value_bool":{"type":["boolean","null"]},"value_date":{"type":["string","null"]},"value_float":{"format":"double","type":["number","null"]},"value_int":{"format":"int64","type":["integer","null"]},"value_text":{"type":["string","null"]}},"required":["add_when","add_who","attribute_def_id","entity_id","entity_type","id","mod_when","mod_who"],"title":"AttributeValue","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"attribute_def_id":1,"entity_id":1,"entity_type":"<entity_type>","id":1,"mod_when":"<mod_when>","mod_who":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_attribute_value":{"post":{"operationId":"delete_attribute_value","summary":"Delete a attribute_value by ID — CRUD.","description":"Delete a attribute_value by ID — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["integration"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"entity_attribute","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_attribute_value"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_attribute_value","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"attribute_def_id":{"format":"int64","type":"integer"},"entity_id":{"format":"int64","type":"integer"},"entity_type":{"description":"Which KIND of entity `entity_id` names — `'sku'`, `'location'`, …\n\n`attribute_value` is a generic EAV table and `entity_id` alone does not identify anything: SKU ids and location ids are independent sequences, so `entity_id = 7` is both SKU 7 and location 7. This is the discriminator that tells them apart, and migration 219's composite FK onto `attribute_def (id, entity_type)` makes it impossible for it to disagree with the definition the row points at.","type":"string"},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"value_bool":{"type":["boolean","null"]},"value_date":{"type":["string","null"]},"value_float":{"format":"double","type":["number","null"]},"value_int":{"format":"int64","type":["integer","null"]},"value_text":{"type":["string","null"]}},"required":["add_when","add_who","attribute_def_id","entity_id","entity_type","id","mod_when","mod_who"],"title":"AttributeValue","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"attribute_def_id":1,"entity_id":1,"entity_type":"<entity_type>","id":1,"mod_when":"<mod_when>","mod_who":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_entity_attributes":{"post":{"operationId":"get_entity_attributes","summary":"Get all attribute definitions with values for a specific entity","description":"Get all attribute definitions with values for a specific entity\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["integration"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"entity_attribute","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_entity_attributes"},"params":{"type":"object","properties":{"entity_id":{"format":"int64","type":"integer"},"entity_type":{"type":"string"},"owner_id":{"format":"int64","type":["integer","null"]}},"required":["entity_id","entity_type"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_entity_attributes","params":{"entity_id":1,"entity_type":"<entity_type>"}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/EntityAttributeRow"},"title":"Array_of_EntityAttributeRow","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"code":"<code>","data_type":"Text","def_id":1,"display_order":1,"is_required":false,"label":"<label>"}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_entity_attribute_row":{"post":{"operationId":"get_entity_attribute_row","summary":"Get single entity attribute row by def_id","description":"Get single entity attribute row by def_id\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["integration"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."}],"x-quark-module":"entity_attribute","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_entity_attribute_row"},"params":{"type":"object","properties":{"def_id":{"format":"int64","type":"integer"},"entity_id":{"format":"int64","type":"integer"}},"required":["def_id","entity_id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_entity_attribute_row","params":{"def_id":1,"entity_id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"Row returned by get_entity_attributes — attribute def + current value","properties":{"code":{"type":"string"},"data_type":{"$ref":"#/components/schemas/AttrDataType"},"def_id":{"format":"int64","type":"integer"},"default_value":{"type":["string","null"]},"display_order":{"format":"int32","type":"integer"},"is_required":{"type":"boolean"},"label":{"type":"string"},"value_bool":{"type":["boolean","null"]},"value_date":{"type":["string","null"]},"value_float":{"format":"double","type":["number","null"]},"value_id":{"format":"int64","type":["integer","null"]},"value_int":{"format":"int64","type":["integer","null"]},"value_text":{"type":["string","null"]}},"required":["code","data_type","def_id","display_order","is_required","label"],"title":"EntityAttributeRow","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"code":"<code>","data_type":"Text","def_id":1,"display_order":1,"is_required":false,"label":"<label>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_attribute_value_enriched":{"post":{"operationId":"get_attribute_value_enriched","summary":"Get enriched attribute_value by id (with attribute_def fields)","description":"Get enriched attribute_value by id (with attribute_def fields)\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["integration"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"entity_attribute","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_attribute_value_enriched"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_attribute_value_enriched","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"Enriched attribute_value row for form load — includes attribute_def fields. Field names match form_normal_details in migration 037.","properties":{"attribute_def_id":{"format":"int64","type":"integer"},"code":{"type":"string"},"data_type":{"$ref":"#/components/schemas/AttrDataType"},"entity_id":{"format":"int64","type":"integer"},"entity_type":{"description":"Carried through the form load so the edit form round-trips it: the bio's `entity_type` field is what its `rpc_filter` scopes on, and a record that came back without it would be saved back without it.","type":"string"},"id":{"format":"int64","type":"integer"},"label":{"type":"string"},"value_bool":{"type":["boolean","null"]},"value_date":{"type":["string","null"]},"value_float":{"format":"double","type":["number","null"]},"value_int":{"format":"int64","type":["integer","null"]},"value_text":{"type":["string","null"]}},"required":["attribute_def_id","code","data_type","entity_id","entity_type","id","label"],"title":"AttributeValueEnriched","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"attribute_def_id":1,"code":"<code>","data_type":"Text","entity_id":1,"entity_type":"<entity_type>","id":1,"label":"<label>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#save_entity_attributes":{"post":{"operationId":"save_entity_attributes","summary":"Bulk upsert attribute values for an entity","description":"Bulk upsert attribute values for an entity\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["integration"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"RF_ERROR (other return codes)","when":"A business rule refused the command. Read `detail.message`, `detail.return_code` and `detail.class`."}],"x-quark-module":"entity_attribute","x-quark-operation":"execute","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"save_entity_attributes"},"params":{"type":"object","properties":{"data":{"description":"Params for save_entity_attributes","properties":{"entity_id":{"format":"int64","type":"integer"},"values":{"items":{"$ref":"#/components/schemas/AttributeValueInput"},"type":"array"}},"required":["entity_id","values"],"title":"SaveEntityAttributesParams","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"save_entity_attributes","params":{"data":{"entity_id":1,"values":[{"attribute_def_id":1}]}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"uint64","minimum":0,"title":"uint64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#create_event_registry":{"post":{"operationId":"create_event_registry","summary":"Create a new event_registry — CRUD.","description":"Create a new event_registry — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["integration"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"UNIQUE_VIOLATION or INVALID_DATA","when":"The code already exists, or a value breaks a rule."}],"x-quark-module":"event_registry","x-quark-operation":"create","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"create_event_registry"},"params":{"type":"object","properties":{"data":{"properties":{"category":{"type":["string","null"]},"code":{"type":"string"},"description":{"type":["string","null"]},"is_active":{"type":["boolean","null"]},"is_builtin":{"type":["boolean","null"]},"name":{"type":"string"}},"required":["code","name"],"title":"EventRegistryForCreate","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"create_event_registry","params":{"data":{"code":"<code>","name":"<name>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"category":{"type":"string"},"code":{"type":"string"},"description":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"is_active":{"type":"boolean"},"is_builtin":{"type":"boolean"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"name":{"type":"string"}},"required":["add_when","add_who","category","code","id","is_active","is_builtin","mod_when","mod_who","name"],"title":"EventRegistry","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"category":"<category>","code":"<code>","id":1,"is_active":false,"is_builtin":false,"mod_when":"<mod_when>","mod_who":1,"name":"<name>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_event_registry":{"post":{"operationId":"get_event_registry","summary":"Get a event_registry by ID — CRUD.","description":"Get a event_registry by ID — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["integration"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"event_registry","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_event_registry"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_event_registry","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"category":{"type":"string"},"code":{"type":"string"},"description":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"is_active":{"type":"boolean"},"is_builtin":{"type":"boolean"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"name":{"type":"string"}},"required":["add_when","add_who","category","code","id","is_active","is_builtin","mod_when","mod_who","name"],"title":"EventRegistry","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"category":"<category>","code":"<code>","id":1,"is_active":false,"is_builtin":false,"mod_when":"<mod_when>","mod_who":1,"name":"<name>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_event_registry":{"post":{"operationId":"list_event_registry","summary":"List event_registry — CRUD.","description":"List event_registry — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["integration"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"event_registry","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_event_registry"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_event_registry"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/EventRegistry"},"title":"Array_of_EventRegistry","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"category":"<category>","code":"<code>","id":1,"is_active":false,"is_builtin":false,"mod_when":"<mod_when>","mod_who":1,"name":"<name>"}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_event_registry":{"post":{"operationId":"count_event_registry","summary":"Count event_registry — CRUD.","description":"Count event_registry — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["integration"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"event_registry","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_event_registry"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_event_registry"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#update_event_registry":{"post":{"operationId":"update_event_registry","summary":"Update mutable event-catalog metadata; code/builtin identity is immutable.","description":"Update mutable event-catalog metadata; code/builtin identity is immutable.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["integration"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"INVALID_DATA","when":"A value breaks a rule."}],"x-quark-module":"event_registry","x-quark-operation":"update","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"update_event_registry"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"},"data":{"additionalProperties":false,"description":"Event code and builtin ownership are stable catalog identity.","properties":{"category":{"type":"string"},"description":{"type":["string","null"]},"is_active":{"type":"boolean"},"name":{"type":"string"}},"title":"EventRegistryUpdateApi","type":"object"}},"required":["id","data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"update_event_registry","params":{"id":1,"data":{"category":"<category>","description":"<description>","is_active":false}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"category":{"type":"string"},"code":{"type":"string"},"description":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"is_active":{"type":"boolean"},"is_builtin":{"type":"boolean"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"name":{"type":"string"}},"required":["add_when","add_who","category","code","id","is_active","is_builtin","mod_when","mod_who","name"],"title":"EventRegistry","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"category":"<category>","code":"<code>","id":1,"is_active":false,"is_builtin":false,"mod_when":"<mod_when>","mod_who":1,"name":"<name>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_event_registry":{"post":{"operationId":"delete_event_registry","summary":"Delete a event_registry by ID — CRUD.","description":"Delete a event_registry by ID — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["integration"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"DEPENDENT_DATA_EXIST","when":"Other rows still use this row."}],"x-quark-module":"event_registry","x-quark-operation":"delete","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_event_registry"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_event_registry","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"category":{"type":"string"},"code":{"type":"string"},"description":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"is_active":{"type":"boolean"},"is_builtin":{"type":"boolean"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"name":{"type":"string"}},"required":["add_when","add_who","category","code","id","is_active","is_builtin","mod_when","mod_who","name"],"title":"EventRegistry","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"category":"<category>","code":"<code>","id":1,"is_active":false,"is_builtin":false,"mod_when":"<mod_when>","mod_who":1,"name":"<name>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_integration_event":{"post":{"operationId":"get_integration_event","summary":"Get a integration_event by ID — CRUD.","description":"Get a integration_event by ID — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["integration"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"integration_event","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_integration_event"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_integration_event","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"description":"Per Decisions Log D-22: extended Rust struct matching the DDL `enterprise.integration_event` (existing migration `wms-enterprise/005_integration_event_system.sql`). The `payload`, `key2`, `key3`, `internal_result` fields are present in the DDL but were previously missing from the Rust struct — this blocked `EventPublisher::publish_typed_in_txn`.","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"entity_name":{"type":"string"},"event_category":{"type":"string"},"event_code":{"type":"string"},"event_status":{"type":"string"},"failure_count":{"format":"int32","type":"integer"},"id":{"format":"int64","type":"integer"},"internal_result":{"description":"Per D-22. Results of internal processing (Decision Tables, Rules, Lua)."},"internal_status":{"type":"string"},"key1":{"type":"string"},"key2":{"description":"Per D-22. Secondary identifier (e.g. line_number).","type":"string"},"key3":{"description":"Per D-22. Tertiary identifier.","type":"string"},"last_error":{"type":["string","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"payload":{"description":"Per D-22. Full typed event payload (JSON Schema described in event_registry)."},"tenant_id":{"format":"int64","type":["integer","null"]},"warehouse":{"type":["string","null"]}},"required":["add_when","add_who","entity_name","event_category","event_code","event_status","failure_count","id","internal_status","key1","key2","key3","mod_when","mod_who"],"title":"IntegrationEvent","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"entity_name":"<entity_name>","event_category":"<event_category>","event_code":"<event_code>","event_status":"<event_status>","failure_count":1,"id":1,"internal_status":"<internal_status>","key1":"<key1>","key2":"<key2>","key3":"<key3>","mod_when":"<mod_when>","mod_who":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_integration_event":{"post":{"operationId":"list_integration_event","summary":"List integration_event — CRUD.","description":"List integration_event — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["integration"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"integration_event","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_integration_event"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_integration_event"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/IntegrationEvent"},"title":"Array_of_IntegrationEvent","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"entity_name":"<entity_name>","event_category":"<event_category>","event_code":"<event_code>","event_status":"<event_status>","failure_count":1,"id":1,"internal_status":"<internal_status>","key1":"<key1>","key2":"<key2>","key3":"<key3>","mod_when":"<mod_when>","mod_who":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_integration_event":{"post":{"operationId":"count_integration_event","summary":"Count integration_event — CRUD.","description":"Count integration_event — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["integration"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"integration_event","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_integration_event"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_integration_event"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#create_integration_subscriber":{"post":{"operationId":"create_integration_subscriber","summary":"Create a validated integration event subscriber.","description":"Create a validated integration event subscriber.\n\n**Category:** `stateless_command`. Changes data. Requires `meta.idempotency_key`. No version check.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog does not say whether this method needs an idempotency key.\n- There is no version check.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["integration"],"x-quark-category":"stateless_command","x-quark-category-declared":true,"x-quark-requires-idempotency":true,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"UNIQUE_VIOLATION or INVALID_DATA","when":"The code already exists, or a value breaks a rule."}],"x-quark-module":"integration_event","x-quark-operation":"create","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"create_integration_subscriber"},"params":{"type":"object","properties":{"data":{"properties":{"code":{"type":"string"},"delivery":{"type":"string"},"description":{"type":["string","null"]},"event_filter":true,"max_retries":{"format":"int32","type":["integer","null"]},"name":{"type":"string"},"retry_delay_sec":{"format":"int32","type":["integer","null"]},"warehouse_filter":true,"webhook_headers":true,"webhook_url":{"type":["string","null"]}},"required":["code","delivery","name"],"title":"IntegrationSubscriberForCreate","type":"object"}},"required":["data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"create_integration_subscriber","params":{"meta":{"idempotency_key":"7f1c2d4e-5a6b-4c8d-9e0f-1a2b3c4d5e6f"},"data":{"code":"<code>","delivery":"<delivery>","name":"<name>"}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"delivery":{"type":"string"},"description":{"type":["string","null"]},"event_filter":true,"id":{"format":"int64","type":"integer"},"is_active":{"type":"boolean"},"max_retries":{"format":"int32","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"name":{"type":"string"},"retry_delay_sec":{"format":"int32","type":"integer"},"warehouse_filter":true,"webhook_url":{"type":["string","null"]}},"required":["add_when","add_who","code","delivery","event_filter","id","is_active","max_retries","mod_when","mod_who","name","retry_delay_sec"],"title":"IntegrationSubscriber","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","delivery":"<delivery>","event_filter":null,"id":1,"is_active":false,"max_retries":1,"mod_when":"<mod_when>","mod_who":1,"name":"<name>","retry_delay_sec":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_integration_subscriber":{"post":{"operationId":"get_integration_subscriber","summary":"Get a integration_subscriber by ID — CRUD.","description":"Get a integration_subscriber by ID — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["integration"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"integration_event","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_integration_subscriber"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_integration_subscriber","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"delivery":{"type":"string"},"description":{"type":["string","null"]},"event_filter":true,"id":{"format":"int64","type":"integer"},"is_active":{"type":"boolean"},"max_retries":{"format":"int32","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"name":{"type":"string"},"retry_delay_sec":{"format":"int32","type":"integer"},"warehouse_filter":true,"webhook_url":{"type":["string","null"]}},"required":["add_when","add_who","code","delivery","event_filter","id","is_active","max_retries","mod_when","mod_who","name","retry_delay_sec"],"title":"IntegrationSubscriber","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","delivery":"<delivery>","event_filter":null,"id":1,"is_active":false,"max_retries":1,"mod_when":"<mod_when>","mod_who":1,"name":"<name>","retry_delay_sec":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_integration_subscriber":{"post":{"operationId":"list_integration_subscriber","summary":"List integration_subscriber — CRUD.","description":"List integration_subscriber — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["integration"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"integration_event","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_integration_subscriber"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_integration_subscriber"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/IntegrationSubscriber"},"title":"Array_of_IntegrationSubscriber","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"code":"<code>","delivery":"<delivery>","event_filter":null,"id":1,"is_active":false,"max_retries":1,"mod_when":"<mod_when>","mod_who":1,"name":"<name>","retry_delay_sec":1}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_integration_subscriber":{"post":{"operationId":"count_integration_subscriber","summary":"Count integration_subscriber — CRUD.","description":"Count integration_subscriber — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["integration"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"integration_event","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_integration_subscriber"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_integration_subscriber"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#update_integration_subscriber":{"post":{"operationId":"update_integration_subscriber","summary":"Update integration subscriber configuration with explicit webhook clearing.","description":"Update integration subscriber configuration with explicit webhook clearing.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["integration"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"INVALID_DATA","when":"A value breaks a rule."}],"x-quark-module":"integration_event","x-quark-operation":"update","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"update_integration_subscriber"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"},"data":{"additionalProperties":false,"description":"Subscriber code is stable binding identity. A webhook may be cleared when delivery switches back to polling.","properties":{"delivery":{"type":"string"},"description":{"type":["string","null"]},"event_filter":true,"is_active":{"type":"boolean"},"max_retries":{"format":"int32","type":"integer"},"name":{"type":"string"},"retry_delay_sec":{"format":"int32","type":"integer"},"warehouse_filter":true,"webhook_headers":true,"webhook_url":{"type":["string","null"]}},"title":"IntegrationSubscriberUpdateApi","type":"object"}},"required":["id","data"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"update_integration_subscriber","params":{"id":1,"data":{"delivery":"<delivery>","description":"<description>","event_filter":null}}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"delivery":{"type":"string"},"description":{"type":["string","null"]},"event_filter":true,"id":{"format":"int64","type":"integer"},"is_active":{"type":"boolean"},"max_retries":{"format":"int32","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"name":{"type":"string"},"retry_delay_sec":{"format":"int32","type":"integer"},"warehouse_filter":true,"webhook_url":{"type":["string","null"]}},"required":["add_when","add_who","code","delivery","event_filter","id","is_active","max_retries","mod_when","mod_who","name","retry_delay_sec"],"title":"IntegrationSubscriber","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","delivery":"<delivery>","event_filter":null,"id":1,"is_active":false,"max_retries":1,"mod_when":"<mod_when>","mod_who":1,"name":"<name>","retry_delay_sec":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#delete_integration_subscriber":{"post":{"operationId":"delete_integration_subscriber","summary":"Delete a integration_subscriber by ID — CRUD.","description":"Delete a integration_subscriber by ID — CRUD.\n\n**Category:** `not_declared` (inferred). The catalog gives no command type for this write method. Send an idempotency key to be safe.\n\n**Default roles:** ADMIN, MANAGER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- The catalog gives no command type for this method. It does not say whether an idempotency key or a version is needed.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["integration"],"x-quark-category":"not_declared","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."},{"http":"400","error":"DEPENDENT_DATA_EXIST","when":"Other rows still use this row."}],"x-quark-module":"integration_event","x-quark-operation":"delete","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"delete_integration_subscriber"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"delete_integration_subscriber","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"delivery":{"type":"string"},"description":{"type":["string","null"]},"event_filter":true,"id":{"format":"int64","type":"integer"},"is_active":{"type":"boolean"},"max_retries":{"format":"int32","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"name":{"type":"string"},"retry_delay_sec":{"format":"int32","type":"integer"},"warehouse_filter":true,"webhook_url":{"type":["string","null"]}},"required":["add_when","add_who","code","delivery","event_filter","id","is_active","max_retries","mod_when","mod_who","name","retry_delay_sec"],"title":"IntegrationSubscriber","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"code":"<code>","delivery":"<delivery>","event_filter":null,"id":1,"is_active":false,"max_retries":1,"mod_when":"<mod_when>","mod_who":1,"name":"<name>","retry_delay_sec":1}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#get_integration_event_delivery":{"post":{"operationId":"get_integration_event_delivery","summary":"Get a integration_event_delivery by ID — CRUD.","description":"Get a integration_event_delivery by ID — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["integration"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"400","error":"ENTITY_NOT_FOUND","when":"No row has this id."}],"x-quark-module":"integration_event_delivery","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"get_integration_event_delivery"},"params":{"type":"object","properties":{"id":{"format":"int64","type":"integer","description":"Record ID"}},"required":["id"]}}},"example":{"jsonrpc":"2.0","id":1,"method":"get_integration_event_delivery","params":{"id":1}}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"attempts":{"format":"int32","type":"integer"},"event_id":{"format":"int64","type":"integer"},"id":{"format":"int64","type":"integer"},"last_attempt":{"default":null,"type":["string","null"]},"last_error":{"type":["string","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"next_attempt":{"default":null,"type":["string","null"]},"response_code":{"format":"int32","type":["integer","null"]},"subscriber_id":{"format":"int64","type":"integer"},"transmit_batch":{"type":["string","null"]},"transmit_status":{"type":"string"}},"required":["add_when","add_who","attempts","event_id","id","mod_when","mod_who","subscriber_id","transmit_status"],"title":"IntegrationEventDelivery","type":"object"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":{"add_when":"<add_when>","add_who":1,"attempts":1,"event_id":1,"id":1,"mod_when":"<mod_when>","mod_who":1,"subscriber_id":1,"transmit_status":"<transmit_status>"}}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#list_integration_event_delivery":{"post":{"operationId":"list_integration_event_delivery","summary":"List integration_event_delivery — CRUD.","description":"List integration_event_delivery — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["integration"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"integration_event_delivery","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"list_integration_event_delivery"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"list_integration_event_delivery"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/IntegrationEventDelivery"},"title":"Array_of_IntegrationEventDelivery","type":"array"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":[{"add_when":"<add_when>","add_who":1,"attempts":1,"event_id":1,"id":1,"mod_when":"<mod_when>","mod_who":1,"subscriber_id":1,"transmit_status":"<transmit_status>"}]}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rpc#count_integration_event_delivery":{"post":{"operationId":"count_integration_event_delivery","summary":"Count integration_event_delivery — CRUD.","description":"Count integration_event_delivery — CRUD.\n\n**Category:** `query` (inferred). Reads data. No idempotency key, no version.\n\n**Default roles:** ADMIN, MANAGER, OPERATOR, VIEWER. An administrator can change the grants.\n\n\n\n**Notes**\n\n- This method only reads. It changes nothing and needs no idempotency key.\n- In `filters`, a plain value means equals. An object such as `{\"$gt\": 5}` uses an operator. See 03-request-and-response-format.md.\n\n_Errors are not standard JSON-RPC 2.0 error objects. See the `Error` response._","tags":["integration"],"x-quark-category":"query","x-quark-category-declared":false,"x-quark-requires-idempotency":false,"x-quark-default-roles":["ADMIN","MANAGER","OPERATOR","VIEWER"],"x-quark-versioned-entities":[],"x-quark-errors":[{"http":"400","error":"RPC_PARAMS_INVALID","when":"A parameter is missing or has the wrong type."},{"http":"401","error":"NO_AUTH","when":"No valid cookie, API key or service token."},{"http":"403","error":"RBAC_FORBIDDEN / RBAC_NO_ROLE","when":"Your role may not call this method, or you have no role in the warehouse."},{"http":"400 / 403","error":"WAREHOUSE_REQUIRED, WAREHOUSE_NOT_AVAILABLE, WAREHOUSE_SELECTOR_INVALID","when":"The `X-Warehouse-Id` header is missing, wrong or not yours."},{"http":"500","error":"SERVICE_ERROR","when":"`list_options.limit` is above 5000 (the code maps this refusal to the general error)."}],"x-quark-module":"integration_event_delivery","x-quark-operation":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"description":"Any JSON value. Returned in the answer.","type":["integer","string"]},"method":{"const":"count_integration_event_delivery"},"params":{"type":"object","properties":{"filters":{"items":{"type":"object"},"type":"array","description":"Filter criteria"},"list_options":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"type":"object","description":"Pagination/sorting"}}}}},"example":{"jsonrpc":"2.0","id":1,"method":"count_integration_event_delivery"}}}},"responses":{"200":{"description":"Success. A failed business rule can also answer HTTP 200 with an error body (APPLICATION_RETURN): always check for `error`.","content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"result":{"type":"object","properties":{"data":{"format":"int64","title":"int64","type":"integer"}}}}},"example":{"jsonrpc":"2.0","id":1,"result":{"data":1}}}}},"default":{"description":"Error (HTTP 400, 401, 403, 500 or 503). Not a JSON-RPC 2.0 error object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"Error":{"type":"object","description":"Error body. This is NOT the JSON-RPC 2.0 error object: there is no `jsonrpc` key and no numeric `code`. Switch on `error.message`. See the Errors page of the API guide.","required":["error"],"properties":{"id":{"description":"The id of your request. null when the server refused the call before it ran the method.","type":["integer","string","null"]},"error":{"type":"object","required":["message"],"properties":{"message":{"type":"string","description":"The error name in capital letters, for example RPC_PARAMS_INVALID."},"data":{"type":"object","properties":{"req_uuid":{"type":"string","description":"Request id in the server log. Give it to support."},"detail":{"description":"More information: null, a text, a number or an object."}}}}}}},"AbcRotationSpeed":{"description":"Loc/Sku Abc - dependent type, code_list_value\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`) because `CandidateFilter::loc_abc` (phase 2a) holds a `PropRule<AbcRotationSpeed>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.","enum":["A","B","C"],"type":"string"},"AckToken":{"description":"One acknowledgement unit on the move / directed-putaway override contract: a `(code, subject)` pair. `code` is the dimension — a `move_warning_codes` constant (source-loc hold 83, dest-loc hold 84, source-stock hold 80, …), or for receipt a bare `ReceiptValidationReturnCode`. `subject` is WHAT was overridden: the hold code string (`QcQuarantine`), or a rule id (directed putaway). The pair is atomic — `(83, X) != (84, X)` — so acking a hold on the source location never clears the same code on the destination.\n\nWire tolerance (contract `docs/superpowers/plans/2026-07-27-move-ack-override-contract.md`): the shared `CommandMeta.acknowledged_overrides` carries acks for BOTH receipt (bare integer codes, no subject) and move (pairs). This type deserializes EITHER form — a bare `27` becomes `{code: 27, subject: \"\"}`; an object `{\"code\":83,\"subject\":\"QcQuarantine\"}` keeps both — so an existing receipt client sending `[27, 71]` is unaffected while move sends `[{code, subject}]`. Serialization is always the canonical object form (the error envelope's `context.pairs`). Subject `\"\"` is the receipt / dimensionless convention.","properties":{"code":{"format":"int16","type":"integer"},"subject":{"type":"string"}},"required":["code","subject"],"type":"object"},"ActiveCodeListValue":{"description":"One offerable value of a code list: what to send, what to show, where it sits in the list. The three columns a picker needs — deliberately not the whole [`CodeListValue`] row, whose audit columns and ids no caller of [`CodeListValueBmc::list_active_by_list_code`] has any use for.","properties":{"code":{"type":"string"},"description":{"type":"string"},"display_order":{"format":"int16","type":"integer"}},"required":["code","description","display_order"],"type":"object"},"AdjustmentLinePreview":{"description":"A line as the grid shows it (§23). Before POST: CURRENT and EFFECT are a live forecast — the same rules POST applies, read without locks — and a line that would be refused says why. After POST: BEFORE / DELTA / AFTER are what the ledger recorded.","properties":{"comment":{"type":["string","null"]},"container_code":{"type":["string","null"]},"container_id":{"format":"int64","type":["integer","null"]},"current_qty":{"description":"Live: the identity's quantity now (0 when it has no row). `None` when the forecast refuses the line, or once the document is posted.","format":"double","type":["number","null"]},"effect_qty":{"description":"Live: TARGET − CURRENT.","format":"double","type":["number","null"]},"error_code":{"type":["string","null"]},"error_message":{"type":["string","null"]},"forecast_code":{"description":"Live: why POST would refuse this line now; `None` if it would not.","type":["string","null"]},"forecast_message":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"inventory_adjustment_id":{"format":"int64","type":"integer"},"line_no":{"format":"int32","type":"integer"},"location":{"type":"string"},"lot":{"type":"string"},"owner_code":{"description":"The owner and the container by code, as the operator names them.","type":["string","null"]},"owner_id":{"format":"int64","type":"integer"},"pack_id":{"format":"int64","type":"integer"},"qty_after":{"format":"double","type":["number","null"]},"qty_before":{"description":"Posted: what the ledger recorded (NoChange: before = after = target).","format":"double","type":["number","null"]},"qty_delta":{"format":"double","type":["number","null"]},"reason_code":{"type":["string","null"]},"sku_code":{"type":"string"},"status":{"$ref":"#/components/schemas/InventoryAdjustmentLineStatus"},"target_mode":{"$ref":"#/components/schemas/InventoryAdjustmentTargetMode"},"target_qty":{"format":"double","type":"number"},"transaction_log_code":{"type":["string","null"]},"uom":{"type":"string"},"version":{"format":"int32","type":"integer"}},"required":["id","inventory_adjustment_id","line_no","location","lot","owner_id","pack_id","sku_code","status","target_mode","target_qty","uom","version"],"type":"object"},"AdjustReasonRow":{"description":"One reason with its policy — a row of the settings screen.","properties":{"active":{"type":"boolean"},"allow_negative":{"type":"boolean"},"allow_positive":{"type":"boolean"},"code":{"type":"string"},"count_after_post":{"type":"boolean"},"description":{"type":"string"},"id":{"format":"int64","type":"integer"},"requires_approval":{"type":"boolean"},"requires_comment":{"type":"boolean"}},"required":["active","allow_negative","allow_positive","code","count_after_post","description","id","requires_approval","requires_comment"],"type":"object"},"AggregatedPlace":{"description":"One place of an [`AssignmentStep::AggregatedPick`]: the pick that fills it, and what it takes — each place commits or shorts on its own, under its own task version (spec §6, R3).","properties":{"order_number":{"type":"string"},"pick_detail_id":{"format":"int64","type":"integer"},"position_no":{"format":"int16","type":"integer"},"qty":{"description":"Still to pick for this place: `qty - qty_picked`.","format":"double","type":"number"},"target_container_code":{"description":"The box bound to the place — where its goods go.","type":"string"},"task_id":{"format":"int64","type":"integer"},"task_version":{"description":"Echo it as `expected_task_version` on this place's pick commands.","format":"int32","type":"integer"}},"required":["order_number","pick_detail_id","position_no","qty","target_container_code","task_id","task_version"],"type":"object"},"AllocatedPosition":{"description":"One position [`plan_line_allocation`] found for a line — the wire-facing projection of [`crate::allocation::PlannedDraw`]. Its own type, not a re-export: `balance_id`'s internal-engine framing is implementation detail a caller of a *preview* should not have to know exists as a separate concept from `take`; here it is just \"how much, from where.\"\n\n`uom` (проход 2, задача 5) IS surfaced, though — it is the STEP's unit [`plan_line_allocation`] planned this draw under, the exact value [`reserve_draw`] writes onto `pick_detail.uom` when the real command reserves it. A multi-step policy plans the same line's need across several uoms (spec §4.2's PL/CS/IP/EA cascade); a caller of the preview needs to see which unit each position will pick in, not just the line's own (order-level) `uom` on [`LineAllocationPreview`] — that field answers \"what did the customer order in,\" this one answers \"what will THIS pick be counted in.\"","properties":{"allocation_policy_detail_id":{"format":"int64","type":"integer"},"allocation_policy_detail_version":{"format":"int32","type":"integer"},"allocation_policy_id":{"format":"int64","type":"integer"},"allocation_policy_version":{"format":"int32","type":"integer"},"balance_id":{"format":"int64","type":"integer"},"container_id":{"format":"int64","type":["integer","null"]},"location":{"type":"string"},"lot":{"type":"string"},"qty":{"format":"double","type":"number"},"uom":{"type":"string"}},"required":["allocation_policy_detail_id","allocation_policy_detail_version","allocation_policy_id","allocation_policy_version","balance_id","location","lot","qty","uom"],"type":"object"},"AllocateShipmentOrderResult":{"properties":{"allocated":{"format":"double","type":"number"},"blocked_by_dropped_step":{"description":"Sum, across every line, of [`crate::allocation::LineAllocationPlan::blocked_by_dropped_step`] — base units `short` includes that were never searched for at all, because the only step of some line's policy naming that UOM rung failed to parse (round-2 review finding: without this, a broken policy step and a genuinely empty warehouse produced the identical `short` number). Zero on the common path.","format":"double","type":"number"},"cartonization":{"anyOf":[{"$ref":"#/components/schemas/WrittenPlan"},{"type":"null"}],"default":null,"description":"Что посчитала картонизация: номер плана и сколько в нём коробок, размещений и неразмещённого. `None`, когда считать было нечего или когда заказ уже запущен.\n\n`default`, чтобы сохранённый идемпотентный повтор, записанный до появления поля, продолжал разбираться."},"cartonization_error":{"default":null,"description":"`Some`, когда картонизация не удалась. Резервирование при этом УСПЕШНО: план — подсказка складу, а не условие отгрузки. Но молчать нельзя — иначе экран покажет успех, а склад обнаружит отсутствие коробок в момент отбора.","type":["string","null"]},"contention_deferred":{"default":0,"description":"Quantity deferred because another transaction held the inventory lock. Default preserves idempotent results stored by older builds.","format":"double","type":"number"},"dispatched_tasks":{"default":[],"description":"Tasks THIS pass handed out — one per live pick of the order that had none yet (see the dispatch comment in [`allocate_order_lines`]). Empty before launch: a pre-launch Allocate reserves, it does not dispatch.\n\nThe screen's toast reads it. A second Release on a `PartiallyReleased` order reserves nothing new — `allocated 0, short 0` — and its whole point is the tasks, which the toast could not name while the generator's answer was thrown away here (owner, 2026-09-12). `default`, so an idempotent replay stored before the field existed still deserializes.","items":{"format":"int64","type":"integer"},"type":"array"},"new_version":{"format":"int32","type":"integer"},"order_id":{"format":"int64","type":"integer"},"order_number":{"type":"string"},"picks":{"items":{"format":"int64","type":"integer"},"type":"array"},"short":{"description":"Quantity that could not be reserved because the eligible stock did not exist (as opposed to being temporarily locked).","format":"double","type":"number"},"status":{"allOf":[{"$ref":"#/components/schemas/OrderStatus"}],"description":"The header status AS DERIVED after the pass — `Allocated` / `PartiallyAllocated` before launch, `Released` / `PartiallyReleased` on a launched order (release's own nested pass runs after `released_at` is already written, so it reads the same ladder). The screen patches its copy of the order from this (spec §6.3)."}},"required":["allocated","blocked_by_dropped_step","new_version","order_id","order_number","picks","short","status"],"type":"object"},"AllocationPolicy":{"properties":{"active":{"type":"boolean"},"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"allow_overallocation":{"type":"boolean"},"code":{"type":"string"},"descr":{"type":"string"},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"name":{"type":["string","null"]},"published_at":{"default":null,"type":["string","null"]},"retired_at":{"default":null,"type":["string","null"]},"speed_pick_by_uom":{"type":"boolean"},"strict_lot_rotation":{"type":"boolean"},"version":{"description":"Optimistic lock (migration 344). Absent from `ForUpdate` — a caller must never write it; it moves only through [`AllocationPolicyBmc::bump_version_checked`].","format":"int32","type":"integer"}},"required":["active","add_when","add_who","allow_overallocation","code","descr","id","mod_when","mod_who","speed_pick_by_uom","strict_lot_rotation","version"],"type":"object"},"AllocationPolicyDetail":{"description":"A rule row of an allocation policy — migration 266's `sequence`/`active` plus the eight-column predicate (`allocation_type` … `qty_fit_rule`) and the four-deep `sort_1..sort_4` ordering. `sequence` is the execution order, never `rule_num`: `rule_num` is varchar(5) and sorts lexicographically ('10' before '2'), the same reasoning as `PutawayPolicyDetail::sequence` vs `step_num`.\n\n`Deserialize` mirrors `PutawayPolicyDetail`'s own derive, and for the same reason (see that struct's doc): the allocation step page in `web-ui-server` has no warehouse database of its own and reads this row back over `get_allocation_policy_detail`/`list_allocation_policy_detail`, needing the eight predicate axes and the four sort ranks as TYPES — not as strings it would otherwise have to re-parse from a generic `serde_json::Value`.","properties":{"active":{"type":"boolean"},"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"allocation_policy_id":{"format":"int64","type":"integer"},"allocation_type":{"$ref":"#/components/schemas/AllocationType"},"id":{"format":"int64","type":"integer"},"location_abc":{"anyOf":[{"$ref":"#/components/schemas/AbcRotationSpeed"},{"type":"null"}]},"location_category":{"anyOf":[{"$ref":"#/components/schemas/LocCategory"},{"type":"null"}]},"location_type":{"anyOf":[{"$ref":"#/components/schemas/LocType"},{"type":"null"}]},"lpn_quantity_rule":{"$ref":"#/components/schemas/LpnQtyRule"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"one_pick_per_uom_location":{"type":"boolean"},"putawayzone":{"type":["string","null"]},"qty_fit_rule":{"anyOf":[{"$ref":"#/components/schemas/QtyFit"},{"type":"null"}]},"rule_num":{"type":"string"},"sequence":{"format":"int32","type":"integer"},"sort_1":{"$ref":"#/components/schemas/AllocSort"},"sort_2":{"anyOf":[{"$ref":"#/components/schemas/AllocSort"},{"type":"null"}]},"sort_3":{"anyOf":[{"$ref":"#/components/schemas/AllocSort"},{"type":"null"}]},"sort_4":{"anyOf":[{"$ref":"#/components/schemas/AllocSort"},{"type":"null"}]},"uom_code":{"type":"string"},"version":{"description":"Optimistic lock (migration 344). Absent from `ForUpdate` — a caller must never write it; it moves only through [`AllocationPolicyDetailBmc::update_checked`], which bumps it in the same statement as the write.","format":"int32","type":"integer"}},"required":["active","add_when","add_who","allocation_policy_id","allocation_type","id","lpn_quantity_rule","mod_when","mod_who","one_pick_per_uom_location","rule_num","sequence","sort_1","uom_code","version"],"type":"object"},"AllocationPolicyLifecycle":{"enum":["Draft","Published","Retired"],"type":"string"},"AllocationTraceDetail":{"description":"Cost level for planner explainability. Normal allocation always uses `Summary`; only an explicitly requested diagnostic preview uses `Full`.","enum":["summary","full"],"type":"string"},"AllocationType":{"enum":["Firm","Soft","SoftCartonization"],"type":"string"},"AllocSort":{"enum":["LotRotation","Location","LpnQuantity","Lpn","LpnRotationInLoc","LocationAbc"],"type":"string"},"AllowError":{"enum":["Allow","HardError","Warning"],"type":"string"},"AllStock":{"description":"Stock item for feed export (includes zero-qty SKUs).","properties":{"allocated_qty":{"format":"double","type":"number"},"available_qty":{"format":"double","type":"number"},"sku_code":{"type":"string"},"total_qty":{"format":"double","type":"number"}},"required":["allocated_qty","available_qty","sku_code","total_qty"],"type":"object"},"AsnCase":{"properties":{"case_label":{"description":"Case-level container code. Operator scans this to commit receipt for the case. Must be unique within the receipt.","type":"string"},"expected_qty":{"format":"double","type":"number"}},"required":["case_label","expected_qty"],"type":"object"},"AsnHeader":{"properties":{"completion":{"type":"string"},"expected_receipt_date":{"description":"RFC 3339 in UTC; RF shows it in the viewer's own zone.","format":"date-time","type":["string","null"]},"external_receipt_number":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"owner_code":{"type":"string"},"owner_company":{"type":"string"},"owner_id":{"format":"int64","type":"integer"},"receipt_number":{"type":"string"},"status":{"type":"string"}},"required":["completion","id","owner_code","owner_company","owner_id","receipt_number","status"],"type":"object"},"AsnLine":{"properties":{"external_lot":{"type":["string","null"]},"lot_attributes":{"additionalProperties":{"type":"string"},"default":{},"description":"12-attribute lot snapshot at the SKU-line level. Defaults to empty when absent. Per-case overrides allowed — see `AsnCase`.","type":"object"},"pack_id":{"format":"int64","type":["integer","null"]},"pallets":{"default":[],"description":"One entry per physical pallet. Each pallet groups cases of this SKU. A line with zero pallets is allowed — degenerate \"header-only\" ASN line for compatibility with aggregate-style ERP payloads — but receive-time scanning won't find any cases.","items":{"$ref":"#/components/schemas/AsnPallet"},"type":"array"},"sku_code":{"type":"string"},"uom":{"type":["string","null"]}},"required":["sku_code"],"type":"object"},"AsnPallet":{"properties":{"cases":{"items":{"$ref":"#/components/schemas/AsnCase"},"type":"array"},"lpn_code":{"description":"LPN of the pallet container — the operator scans this code on arrival to identify the pallet. Must be unique within this receipt; uniqueness across receipts depends on owner config (D-69e).","type":"string"}},"required":["cases","lpn_code"],"type":"object"},"AssetOwnerKind":{"description":"Whose property the new units are. Flat on the wire (a kind plus an optional `owner_id`) because the web modal can only send scalars; the combination is checked by [`RegisterHandlingUnits::asset_owner_choice`].","oneOf":[{"description":"The warehouse that registers them.","enum":["ThisWarehouse"],"type":"string"},{"description":"A client of the warehouse, named by `owner_id`.","enum":["Owner"],"type":"string"}]},"AssignmentDispatch":{"description":"What the operator does with a carrier.","oneOf":[{"description":"The operator's live assignment — or their carrier dissolved with goods and never delivered (R13): continue it.","properties":{"assignment":{"$ref":"#/components/schemas/PickAssignmentView"},"kind":{"enum":["Resume"],"type":"string"}},"required":["assignment","kind"],"type":"object"},{"description":"The named area works with a carrier for this equipment and the operator holds nothing: scan a carrier to start an assignment. No task was claimed.","properties":{"kind":{"enum":["ScanCarrier"],"type":"string"},"max_targets":{"description":"At most this many targets go on the carrier.","format":"int16","type":"integer"},"policy_id":{"format":"int64","type":"integer"},"work_area_code":{"type":"string"},"work_area_id":{"format":"int64","type":"integer"}},"required":["kind","max_targets","policy_id","work_area_code","work_area_id"],"type":"object"}]},"AssignmentStep":{"description":"The next step of an assignment.","oneOf":[{"description":"Put a box on this position: the lowest-numbered `Open` one (on the route: the lowest `Open` one with picks, before any pick).","properties":{"kind":{"enum":["BindPosition"],"type":"string"},"order_id":{"format":"int64","type":"integer"},"order_number":{"description":"The order's own number — what the operator reads on paperwork.","type":"string"},"planned_box":{"anyOf":[{"$ref":"#/components/schemas/PlannedBoxView"},{"type":"null"}],"description":"The box the cartonization plan sized for this position: the carton's policy candidate. `None` when the position has no planned carton (`Bypassed`) or the candidate row is gone."},"planned_carton_code":{"type":["string","null"]},"planned_carton_id":{"format":"int64","type":["integer","null"]},"planned_target_kind":{"$ref":"#/components/schemas/PickPlannedTargetKind"},"position_no":{"format":"int16","type":"integer"}},"required":["kind","order_id","order_number","planned_target_kind","position_no"],"type":"object"},{"description":"The next stop of the route (R1). Also what a `Ready` assignment shows: the status tells the screen the route has not started.","properties":{"base_uom":{"description":"Historical base UOM of `qty`, or null when it cannot be established.","type":["string","null"]},"blocked_reason":{"description":"Why this stop cannot be committed now — the pick's cartonization facts say no (`CARTONIZATION_PENDING` / `CARTONIZATION_BLOCKED` / `CARTONIZATION_INVALID`, e.g. a ShipAsIs pick without its factory package's proof). The stop is still shown, so the operator can skip or reject it; commit and short are not offered. `None`: the stop can be picked.","type":["string","null"]},"instructions":{"description":"What the picker must read before the pick commits (`picking::instructions`): the route card shows them; Enter on the card is the acknowledgement the commit needs. Empty while the stop is blocked.","items":{"type":"string"},"type":"array"},"kind":{"enum":["Pick"],"type":"string"},"location":{"type":"string"},"lot":{"type":"string"},"lot_display":{"description":"The reserved lot's attributes and dates the SKU's Lot Policy marks \"show on pick\" (`PickSourceView::lot_display`).","items":{"$ref":"#/components/schemas/PickLotAttributeView"},"type":"array"},"lot_summary":{"description":"`lot_display` in one line; empty when nothing is shown.","type":"string"},"order_id":{"format":"int64","type":"integer"},"order_number":{"type":"string"},"pick_detail_id":{"format":"int64","type":"integer"},"position_no":{"format":"int16","type":"integer"},"qty":{"description":"Still to pick in base units: `qty - qty_picked`.","format":"double","type":"number"},"serials_required":{"description":"The SKU needs a serial episode.","type":"boolean"},"skipped":{"description":"The operator skipped this stop before (it came round again).","type":"boolean"},"sku_code":{"type":"string"},"source_container_code":{"description":"The source LPN when the stock stands in a container.","type":["string","null"]},"stops_left":{"description":"Route steps left, this one included: a summary step is ONE stop, however many places it holds (controller ruling, replaces R9's count of picks). On a per-pick cart every step is one pick. The count is of the route's steps as grouped by the route rule, so a group the card then splits (a blocked place shown alone, a place outside the episode that comes later as its own stop) is still counted as one.","format":"int16","type":"integer"},"target_container_code":{"type":"string"},"target_container_id":{"description":"The box bound to the position — where the goods go (R5).","format":"int64","type":"integer"},"task_id":{"format":"int64","type":"integer"},"task_version":{"description":"Echo it as `expected_task_version` on the pick commands.","format":"int32","type":"integer"},"uom":{"description":"Allocation step UOM; preserved for existing consumers.","type":"string"},"verification":{"allOf":[{"$ref":"#/components/schemas/VerificationView"}],"description":"What must be proven about the source before the stop commits, and how far the operator has got (`PickWorkView::verification`). Its `blocked` is NOT `blocked_reason`: a source that cannot be identified keeps the stop on the card with skip, short (zero only) and reject, never commit."}},"required":["instructions","kind","location","lot","lot_display","lot_summary","order_id","order_number","pick_detail_id","position_no","qty","serials_required","skipped","sku_code","stops_left","target_container_code","target_container_id","task_id","task_version","uom","verification"],"type":"object"},{"description":"Consecutive stops of one source on a cart that confirms quantities `Aggregated` (slice 5 §3, §4): the source is confirmed once, then each place takes its own quantity into its own box.","properties":{"base_uom":{"description":"Historical base UOM of `qty`, or null when it cannot be established.","type":["string","null"]},"blocked_reason":{"description":"Why this stop cannot be committed now — the pick's cartonization facts say no (`CARTONIZATION_PENDING` / `CARTONIZATION_BLOCKED` / `CARTONIZATION_INVALID`, e.g. a ShipAsIs pick without its factory package's proof). The stop is still shown, so the operator can skip or reject it; commit and short are not offered. `None`: the stop can be picked.","type":["string","null"]},"instructions":{"description":"What the picker must read before the pick commits (`picking::instructions`): the route card shows them; Enter on the card is the acknowledgement the commit needs. Empty while the stop is blocked.","items":{"type":"string"},"type":"array"},"kind":{"enum":["AggregatedPick"],"type":"string"},"location":{"type":"string"},"lot":{"type":"string"},"lot_display":{"description":"The reserved lot's attributes and dates the SKU's Lot Policy marks \"show on pick\" (`PickSourceView::lot_display`).","items":{"$ref":"#/components/schemas/PickLotAttributeView"},"type":"array"},"lot_summary":{"description":"`lot_display` in one line; empty when nothing is shown.","type":"string"},"order_id":{"format":"int64","type":"integer"},"order_number":{"type":"string"},"pick_detail_id":{"format":"int64","type":"integer"},"places":{"description":"The places still to fill, by place number (R10); the current first.","items":{"$ref":"#/components/schemas/AggregatedPlace"},"type":"array"},"position_no":{"format":"int16","type":"integer"},"qty":{"description":"Still to pick in base units: `qty - qty_picked`.","format":"double","type":"number"},"serials_required":{"description":"The SKU needs a serial episode.","type":"boolean"},"skipped":{"description":"The operator skipped this stop before (it came round again).","type":"boolean"},"sku_code":{"type":"string"},"source_container_code":{"description":"The source LPN when the stock stands in a container.","type":["string","null"]},"stops_left":{"description":"Route steps left, this one included: a summary step is ONE stop, however many places it holds (controller ruling, replaces R9's count of picks). On a per-pick cart every step is one pick. The count is of the route's steps as grouped by the route rule, so a group the card then splits (a blocked place shown alone, a place outside the episode that comes later as its own stop) is still counted as one.","format":"int16","type":"integer"},"target_container_code":{"type":"string"},"target_container_id":{"description":"The box bound to the position — where the goods go (R5).","format":"int64","type":"integer"},"task_id":{"format":"int64","type":"integer"},"task_version":{"description":"Echo it as `expected_task_version` on the pick commands.","format":"int32","type":"integer"},"total_qty":{"description":"What the remaining places take together — information only (§6).","format":"double","type":"number"},"uom":{"description":"Allocation step UOM; preserved for existing consumers.","type":"string"},"verification":{"allOf":[{"$ref":"#/components/schemas/VerificationView"}],"description":"What must be proven about the source before the stop commits, and how far the operator has got (`PickWorkView::verification`). Its `blocked` is NOT `blocked_reason`: a source that cannot be identified keeps the stop on the card with skip, short (zero only) and reject, never commit."}},"required":["instructions","kind","location","lot","lot_display","lot_summary","order_id","order_number","pick_detail_id","places","position_no","qty","serials_required","skipped","sku_code","stops_left","target_container_code","target_container_id","task_id","task_version","total_qty","uom","verification"],"type":"object"},{"description":"The repair after `CARTON_FULL` failed (`RecoveryRequired`) and the position still holds picks: hand them over to recovery before the route goes on (ruling T12).","properties":{"error_code":{"description":"Why the repair failed.","type":"string"},"exception_id":{"format":"int64","type":"integer"},"kind":{"enum":["RecoveryHandover"],"type":"string"},"picks_left":{"description":"Open stops the position still holds.","format":"int16","type":"integer"},"position_no":{"format":"int16","type":"integer"}},"required":["error_code","exception_id","kind","picks_left","position_no"],"type":"object"},{"description":"The route is exhausted (or the carrier was dissolved with goods): deliver it (R11, R12, R13).","properties":{"completion":{"allOf":[{"$ref":"#/components/schemas/PickingCompletion"}],"description":"What the holder does: `ConfirmAtLocation` — scan `delivery_location`; `Complete` — finish in place. The frozen policy's `completion`, except that a `Complete` carrier a supervisor retargeted (`pick_destination_retarget`, ruling D3) says `ConfirmAtLocation`: it is delivered to the named location, scanned (`finishes_in_place`, the rule `pick_assignment_complete` judges by)."},"delivery_location":{"description":"`None`: an assignment built before slice 4 whose tasks disagreed. After a supervisor's retarget: the location they named.","type":["string","null"]},"kind":{"enum":["Deliver"],"type":"string"}},"required":["completion","kind"],"type":"object"}]},"AttrDataType":{"enum":["Text","Integer","Decimal","Boolean","Date"],"type":"string"},"AttributeDef":{"properties":{"active":{"type":"boolean"},"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"data_type":{"$ref":"#/components/schemas/AttrDataType"},"default_value":{"type":["string","null"]},"display_order":{"format":"int32","type":"integer"},"entity_type":{"type":"string"},"id":{"format":"int64","type":"integer"},"is_required":{"type":"boolean"},"label":{"type":"string"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"owner_id":{"format":"int64","type":["integer","null"]}},"required":["active","add_when","add_who","code","data_type","display_order","entity_type","id","is_required","label","mod_when","mod_who"],"type":"object"},"AttributeValue":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"attribute_def_id":{"format":"int64","type":"integer"},"entity_id":{"format":"int64","type":"integer"},"entity_type":{"description":"Which KIND of entity `entity_id` names — `'sku'`, `'location'`, …\n\n`attribute_value` is a generic EAV table and `entity_id` alone does not identify anything: SKU ids and location ids are independent sequences, so `entity_id = 7` is both SKU 7 and location 7. This is the discriminator that tells them apart, and migration 219's composite FK onto `attribute_def (id, entity_type)` makes it impossible for it to disagree with the definition the row points at.","type":"string"},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"value_bool":{"type":["boolean","null"]},"value_date":{"type":["string","null"]},"value_float":{"format":"double","type":["number","null"]},"value_int":{"format":"int64","type":["integer","null"]},"value_text":{"type":["string","null"]}},"required":["add_when","add_who","attribute_def_id","entity_id","entity_type","id","mod_when","mod_who"],"type":"object"},"AttributeValueInput":{"description":"Single attribute value for save_entity_attributes","properties":{"attribute_def_id":{"format":"int64","type":"integer"},"value_bool":{"type":["boolean","null"]},"value_date":{"type":["string","null"]},"value_float":{"format":"double","type":["number","null"]},"value_int":{"format":"int64","type":["integer","null"]},"value_text":{"type":["string","null"]}},"required":["attribute_def_id"],"type":"object"},"AuditLog":{"description":"Read-only audit log entry — **selected from `enterprise.audit_log_view`** (see ADR-025), not the raw `audit_log` table. The view LEFT JOINs user / role / warehouse / target entities so the Audit Log grid can render human labels (`username`, `role_code`, `warehouse_code`, `target_label`) instead of opaque numeric ids.\n\nInserts still go via `wms_lib_auth::authorization::audit::log_event` which writes directly to `enterprise.audit_log` with raw SQL — BMC is read-only for audit.","properties":{"detail":true,"event_kind":{"type":"string"},"event_time":{"type":"string"},"id":{"format":"int64","type":"integer"},"required_bit":{"type":["string","null"]},"resource_code":{"type":["string","null"]},"resource_label":{"description":"Alias of `resource_code` until the resource_catalog lands (ADR-025 §D4).","type":["string","null"]},"resource_type":{"type":["string","null"]},"role_code":{"description":"Resolved via LEFT JOIN on `enterprise.role`.","type":["string","null"]},"role_id":{"format":"int64","type":["integer","null"]},"target_extra":{"type":["string","null"]},"target_id":{"description":"Extracted from `detail->'target_pk'` (JSON — scalar for single-PK tables, array for composite). Grid renders the raw JSON."},"target_label":{"description":"Human label for the target row (`r.code`, `u.username`, …) joined from the six RBAC entity types (ADR-025 §D2). NULL for unknown / composite-PK targets — the UI renders em-dash.","type":["string","null"]},"target_type":{"description":"Extracted from `detail->>'target_table'` — which entity was mutated.","type":["string","null"]},"user_id":{"format":"int64","type":["integer","null"]},"username":{"description":"Resolved via LEFT JOIN on `enterprise.\"user\"`. NULL if user deleted.","type":["string","null"]},"warehouse_code":{"description":"Resolved via LEFT JOIN on `enterprise.warehouse`.","type":["string","null"]},"warehouse_id":{"format":"int64","type":["integer","null"]},"warehouse_name":{"description":"Resolved via LEFT JOIN on `enterprise.warehouse`.","type":["string","null"]}},"required":["event_kind","event_time","id"],"type":"object"},"AutoCloseReason":{"description":"Why a pallet closed itself.","oneOf":[{"description":"No box of the pallet's key is still coming: every one is on it.","enum":["AllCollected"],"type":"string"},{"description":"Its weight reached its pallet type's maximum gross weight.","enum":["WeightLimit"],"type":"string"}]},"AvailableStock":{"description":"Aggregated stock per SKU for a given owner.","properties":{"allocated_qty":{"format":"double","type":"number"},"available_qty":{"format":"double","type":"number"},"location_count":{"format":"int64","type":"integer"},"sku_code":{"type":"string"},"total_qty":{"format":"double","type":"number"}},"required":["allocated_qty","available_qty","location_count","sku_code","total_qty"],"type":"object"},"BarcodeFormat":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"auto_detect_identifier":{"type":"boolean"},"barcode_identifier":{"type":["string","null"]},"chars_to_trim":{"format":"int32","type":"integer"},"check_digit_algorithm":{"description":"Slice S5 — per-format check-digit algorithm. Stored as TEXT (\"None\" / \"Mod10\" / \"Mod43\") so adding new algorithms doesn't require a column enum migration. The business-logic `CheckDigitAlgorithm::from_str` parses it; unknown values surface as typed errors at validation time.","type":"string"},"default_ending_delimiter":{"type":["string","null"]},"descr":{"type":"string"},"format_group":{"type":"string"},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"name":{"type":"string"},"notes":{"type":["string","null"]},"parsing_rules":{"type":"string"}},"required":["add_when","add_who","auto_detect_identifier","chars_to_trim","check_digit_algorithm","descr","format_group","id","mod_when","mod_who","name","parsing_rules"],"type":"object"},"BarcodeFormatDetail":{"properties":{"add_decimal_at_place":{"format":"int32","type":"integer"},"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"barcode_format_id":{"format":"int64","type":"integer"},"data_app_identifier":{"type":["string","null"]},"data_element_name":{"type":["string","null"]},"data_group_name":{"type":["string","null"]},"data_length":{"format":"int32","type":["integer","null"]},"data_length_type":{"type":["string","null"]},"date_field_format":{"type":["string","null"]},"delimiter_after":{"type":["string","null"]},"delimiter_before":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"lot_policy_id":{"format":"int64","type":["integer","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"prefix_trim_number":{"format":"int32","type":"integer"},"repeats_until_end":{"type":"boolean"},"sequence":{"format":"int32","type":"integer"},"start_position":{"format":"int32","type":"integer"},"stop_position":{"format":"int32","type":"integer"},"suffix_trim_number":{"format":"int32","type":"integer"},"validation":{"type":["string","null"]}},"required":["add_decimal_at_place","add_when","add_who","barcode_format_id","id","mod_when","mod_who","prefix_trim_number","repeats_until_end","sequence","start_position","stop_position","suffix_trim_number"],"type":"object"},"BreakdownLevel":{"description":"Single level in the breakdown result","properties":{"hierarchyLevel":{"format":"int32","type":"integer"},"qty":{"format":"int32","type":"integer"},"uom":{"type":"string"}},"required":["hierarchyLevel","qty","uom"],"type":"object"},"CancelBlocker":{"properties":{"code":{"description":"Stable code: `\"already_terminal\"`, `\"completion_not_pending\"`, `\"received_qty_present\"`. Per Decisions Log D-19: cancel is allowed only when nothing has been received against the receipt yet.","type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"Capture":{"description":"How an operator may give one piece of evidence.","enum":["Scan","ScanOrManual"],"type":"string"},"CartonFullReason":{"oneOf":[{"enum":["MASTER_DATA_DIMENSIONS","PROTECTIVE_PACKAGING","ORIENTATION_NOT_FEASIBLE","PRODUCT_OR_CARTON_DEFORMED","SOLVER_LAYOUT_NOT_FEASIBLE"],"type":"string"},{"description":"Needs a comment (`chk_ptee_other_needs_comment`).","enum":["OTHER"],"type":"string"}]},"CartonizationAlgorithm":{"enum":["ExtremePoints"],"type":"string"},"CartonizationCartonDraft":{"additionalProperties":false,"properties":{"active":{"type":"boolean"},"code":{"type":"string"},"descr":{"type":"string"},"handling_unit_type_id":{"default":null,"description":"The tare type this candidate plans; `None` = any box that fits. `default`: an editor that never sends it keeps saving.","format":"int64","type":["integer","null"]},"id":{"default":null,"description":"Existing row identity. `None` means add one carton.","format":"int64","type":["integer","null"]},"inner_height":{"format":"double","type":"number"},"inner_length":{"format":"double","type":"number"},"inner_width":{"format":"double","type":"number"},"max_gross_weight":{"format":"double","type":"number"},"max_units":{"format":"int32","type":"integer"},"tare_weight":{"format":"double","type":"number"}},"required":["active","code","descr","inner_height","inner_length","inner_width","max_gross_weight","max_units","tare_weight"],"type":"object"},"CartonizationExceptionAction":{"oneOf":[{"description":"Legacy database value, retained for reading old policies only. New saves reject it: factory ShipAsIs is a pack-level property, not an exception fallback.","enum":["ShipAsIs"],"type":"string"},{"description":"Остановиться: без человека дальше нельзя.","enum":["Stop"],"type":"string"}]},"CartonizationObjective":{"oneOf":[{"enum":["MinUnusedVolume","MinPickSplits","BalanceWeight"],"type":"string"},{"description":"Единственная цель, которую движок считает.","enum":["MinCartons"],"type":"string"}]},"CartonizationPolicy":{"properties":{"active":{"type":"boolean"},"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"algorithm":{"$ref":"#/components/schemas/CartonizationAlgorithm"},"code":{"type":"string"},"descr":{"type":"string"},"id":{"format":"int64","type":"integer"},"iterations_per_unit_sq":{"format":"int32","type":"integer"},"max_candidates":{"format":"int32","type":"integer"},"max_iterations_cap":{"format":"int32","type":"integer"},"min_iterations":{"format":"int32","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"name":{"type":["string","null"]},"objective":{"$ref":"#/components/schemas/CartonizationObjective"},"on_no_carton_candidates":{"$ref":"#/components/schemas/CartonizationExceptionAction"},"on_no_carton_fits":{"$ref":"#/components/schemas/CartonizationExceptionAction"},"on_no_dimensions":{"$ref":"#/components/schemas/CartonizationExceptionAction"},"on_no_weight":{"$ref":"#/components/schemas/CartonizationExceptionAction"},"on_split_prevented":{"$ref":"#/components/schemas/CartonizationExceptionAction"},"on_weight_exceeded":{"$ref":"#/components/schemas/CartonizationExceptionAction"},"solver":{"$ref":"#/components/schemas/CartonizationSolver"},"split_rule":{"$ref":"#/components/schemas/PickSplitRule"},"version":{"description":"Generation of the complete header + carton set.","format":"int32","type":"integer"}},"required":["active","add_when","add_who","algorithm","code","descr","id","iterations_per_unit_sq","max_candidates","max_iterations_cap","min_iterations","mod_when","mod_who","objective","on_no_carton_candidates","on_no_carton_fits","on_no_dimensions","on_no_weight","on_split_prevented","on_weight_exceeded","solver","split_rule","version"],"type":"object"},"CartonizationPolicyAggregateDraft":{"additionalProperties":false,"properties":{"cartons":{"description":"The vector order becomes `sequence = 10, 20, ...` on save.","items":{"$ref":"#/components/schemas/CartonizationCartonDraft"},"type":"array"},"policy":{"$ref":"#/components/schemas/CartonizationPolicyRootDraft"}},"required":["cartons","policy"],"type":"object"},"CartonizationPolicyDetail":{"properties":{"active":{"type":"boolean"},"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"cartonization_policy_id":{"format":"int64","type":"integer"},"descr":{"type":"string"},"handling_unit_type_id":{"description":"Тип тары, который этот кандидат планирует (`enterprise.handling_unit_type.id`, срез 7 отбора). `None` — любая подходящая по размеру коробка. Без FK: ссылки в enterprise держит сервис (wms-app 041).","format":"int64","type":["integer","null"]},"id":{"format":"int64","type":"integer"},"inner_height":{"format":"double","type":"number"},"inner_length":{"description":"ВНУТРЕННИЕ габариты: солвер укладывает внутрь. Ноль — «неизвестно», и такая строка не может быть активной.","format":"double","type":"number"},"inner_width":{"format":"double","type":"number"},"max_gross_weight":{"description":"Предел перевозчика на коробку ЦЕЛИКОМ, вместе с её тарой. Ноль — предела нет.","format":"double","type":"number"},"max_units":{"description":"Предел по числу вложенных единиц. Ноль — предела нет.","format":"int32","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"sequence":{"description":"Порядок рассмотрения солвером. Не уникален; ничью доопределяет `id`.","format":"int32","type":"integer"},"step_num":{"description":"Код коробки-кандидата: `BOX-S`, `BOX-M`. Уникален в пределах политики.","type":"string"},"tare_weight":{"description":"Вес пустой коробки. Ноль — «тара не учтена», допустимо только когда предела брутто нет вовсе.","format":"double","type":"number"}},"required":["active","add_when","add_who","cartonization_policy_id","descr","id","inner_height","inner_length","inner_width","max_gross_weight","max_units","mod_when","mod_who","sequence","step_num","tare_weight"],"type":"object"},"CartonizationPolicyRootDraft":{"additionalProperties":false,"properties":{"active":{"type":"boolean"},"algorithm":{"$ref":"#/components/schemas/CartonizationAlgorithm"},"descr":{"type":"string"},"iterations_per_unit_sq":{"format":"int32","type":"integer"},"max_candidates":{"format":"int32","type":"integer"},"max_iterations_cap":{"format":"int32","type":"integer"},"min_iterations":{"format":"int32","type":"integer"},"name":{"type":["string","null"]},"objective":{"$ref":"#/components/schemas/CartonizationObjective"},"on_no_carton_candidates":{"$ref":"#/components/schemas/CartonizationExceptionAction"},"on_no_carton_fits":{"$ref":"#/components/schemas/CartonizationExceptionAction"},"on_no_dimensions":{"$ref":"#/components/schemas/CartonizationExceptionAction"},"on_no_weight":{"$ref":"#/components/schemas/CartonizationExceptionAction"},"on_split_prevented":{"$ref":"#/components/schemas/CartonizationExceptionAction"},"on_weight_exceeded":{"$ref":"#/components/schemas/CartonizationExceptionAction"},"solver":{"$ref":"#/components/schemas/CartonizationSolver"},"split_rule":{"$ref":"#/components/schemas/PickSplitRule"}},"required":["active","algorithm","descr","iterations_per_unit_sq","max_candidates","max_iterations_cap","min_iterations","objective","on_no_carton_candidates","on_no_carton_fits","on_no_dimensions","on_no_weight","on_split_prevented","on_weight_exceeded","solver","split_rule"],"type":"object"},"CartonizationSolver":{"enum":["BinPacking3d"],"type":"string"},"CatalogueMetric":{"description":"One catalogue metric for a picker: its key, its English default name, and whether a module stands behind it.","properties":{"key":{"type":"string"},"label":{"type":"string"},"live":{"type":"boolean"}},"required":["key","label","live"],"type":"object"},"Clause":{"description":"One clause of a sentence, with the band that owns it.\n\n`topic` is a plain string rather than the typed [`StepTopic`]: the consumer is a TypeScript component, and a lowercase band name is what it keys its three bands by. [`topic_name`] is the one place the mapping lives.","properties":{"runs":{"items":{"$ref":"#/components/schemas/Run"},"type":"array"},"text":{"type":"string"},"topic":{"type":"string"}},"required":["runs","text","topic"],"type":"object"},"Clause_81ae80":{"description":"One clause of a sentence, with the band that owns it.\n\n`topic` is a plain string rather than the typed [`AllocationStepTopic`]: the consumer is a TypeScript component, and a lowercase band name is what it keys its four bands by. [`topic_name`] is the one place the mapping lives.","properties":{"runs":{"items":{"$ref":"#/components/schemas/Run"},"type":"array"},"text":{"type":"string"},"topic":{"type":"string"}},"required":["runs","text","topic"],"type":"object"},"CloseBlocker":{"description":"Reasons why CloseReceipt would reject a request right now. Each element is a discrete blocker — UI shows a checklist so the operator can clear them one by one. Empty Vec = receipt is currently closeable (the actual close still goes through the CloseReceipt command, which honours `ALLOW_CLOSE_WITH_DISCREPANCY` and supervisor-override D-21; this endpoint is a *hint* for the UI, not the authoritative gate).","properties":{"code":{"description":"Stable code: `\"already_terminal\"`, `\"open_serial_episode\"`, `\"qty_mismatch\"`, `\"pending_damage\"`. Lets UI render a localized label without parsing the message.","type":"string"},"count":{"description":"Optional count when the blocker is plural (for example, three unresolved episodes).","format":"int64","type":["integer","null"]},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"CodeList":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"description":{"type":"string"},"editable":{"type":"boolean"},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"}},"required":["add_when","add_who","code","description","editable","id","mod_when","mod_who"],"type":"object"},"CodeListEntry":{"properties":{"code":{"type":"string"},"description":{"type":"string"},"display_order":{"format":"int16","type":"integer"}},"required":["code","description","display_order"],"type":"object"},"CodeListValue":{"properties":{"active":{"type":"boolean"},"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"code_list_id":{"format":"int64","type":"integer"},"color":{"type":["string","null"]},"description":{"type":"string"},"display_order":{"format":"int16","type":"integer"},"editable":{"type":"boolean"},"icon":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"short_description":{"type":["string","null"]}},"required":["active","add_when","add_who","code","code_list_id","description","display_order","editable","id","mod_when","mod_who"],"type":"object"},"ConsolidationBoardPallet":{"description":"A pallet on the supervisor's board: open, or closed and still standing at the station — with its order, route and `target_version`, the version a close or a reopen is decided on.","properties":{"boxes":{"format":"int64","type":"integer"},"closed_at":{"default":null,"type":["string","null"]},"dispatch_code":{"description":"The route: the dispatch's code and the stop's sequence and destination; `None` while the boxes have no assignment.","type":["string","null"]},"order_number":{"description":"The orders of the boxes on the pallet, comma-separated.","type":"string"},"pallet_code":{"type":"string"},"station_location":{"type":"string"},"status":{"$ref":"#/components/schemas/ConsolidationTargetStatus"},"stop_destination":{"type":["string","null"]},"stop_sequence":{"format":"int32","type":["integer","null"]},"target_id":{"format":"int64","type":"integer"},"target_version":{"format":"int32","type":"integer"}},"required":["boxes","order_number","pallet_code","station_location","status","target_id","target_version"],"type":"object"},"ConsolidationBox":{"description":"A box on a station's consolidation list (`consolidation_queue_list`) or on a pallet (`consolidation_target_get`).","properties":{"container_code":{"type":"string"},"container_id":{"format":"int64","type":"integer"},"dispatch_id":{"description":"The route the box goes on (its assignment); `None` without one.","format":"int64","type":["integer","null"]},"order_id":{"format":"int64","type":"integer"},"order_number":{"type":"string"},"owner_id":{"description":"The owner of the box's container.","format":"int64","type":"integer"},"pallet_code":{"type":["string","null"]},"station_location":{"description":"The consolidation station the box waits at (its unit's destination).","type":["string","null"]},"stop_id":{"format":"int64","type":["integer","null"]},"target_id":{"description":"The pallet the box stands on, when it is a target's.","format":"int64","type":["integer","null"]},"unit_id":{"format":"int64","type":"integer"},"unit_version":{"format":"int32","type":"integer"}},"required":["container_code","container_id","order_id","order_number","owner_id","unit_id","unit_version"],"type":"object"},"ConsolidationPallet":{"description":"An open pallet of a station, with how many boxes stand on it.","properties":{"boxes":{"format":"int64","type":"integer"},"dispatch_id":{"format":"int64","type":["integer","null"]},"order_id":{"description":"The one order of a pallet with no route; `None` for a routed one.","format":"int64","type":["integer","null"]},"order_number":{"description":"The orders of the boxes on the pallet, comma-separated (H2: a routed pallet may carry several).","type":"string"},"owner_id":{"description":"The owner every box on the pallet belongs to.","format":"int64","type":"integer"},"pallet_code":{"type":"string"},"status":{"$ref":"#/components/schemas/ConsolidationTargetStatus"},"stop_id":{"format":"int64","type":["integer","null"]},"target_id":{"format":"int64","type":"integer"},"target_version":{"format":"int32","type":"integer"}},"required":["boxes","order_number","owner_id","pallet_code","status","target_id","target_version"],"type":"object"},"ConsolidationPalletView":{"description":"An open pallet as a screen lists it.","properties":{"boxes":{"format":"int64","type":"integer"},"order_number":{"type":"string"},"pallet_code":{"type":"string"},"target_id":{"format":"int64","type":"integer"},"target_version":{"format":"int32","type":"integer"}},"required":["boxes","order_number","pallet_code","target_id","target_version"],"type":"object"},"ConsolidationStationSummary":{"description":"A consolidation location on the supervisor's board: the work areas that name it and what stands there — boxes waiting for a pallet, open pallets, closed pallets not yet taken away.","properties":{"boxes_waiting":{"description":"Boxes waiting at the station that stand on no pallet yet.","format":"int64","type":"integer"},"closed_pallets":{"description":"Closed pallets whose container still stands at the station.","format":"int64","type":"integer"},"open_pallets":{"format":"int64","type":"integer"},"station_location":{"type":"string"},"work_areas":{"description":"The work areas whose consolidation station this is, comma-separated; `None` when no area names it (no box is sent there).","type":["string","null"]}},"required":["boxes_waiting","closed_pallets","open_pallets","station_location"],"type":"object"},"ConsolidationTargetStatus":{"oneOf":[{"description":"Boxes are put on and taken off.","enum":["Open"],"type":"string"},{"description":"Closed explicitly (D-29): the pallet is a unit of its own; only a supervisor reopens it.","enum":["Closed"],"type":"string"}]},"Container":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"asset_owner_id":{"description":"Владелец имущества — клиент склада (`owners`).","format":"int64","type":["integer","null"]},"asset_warehouse_id":{"description":"Владелец имущества — склад предприятия. Ровно одно из двух с `asset_owner_id` (ck_container_asset_owner_is_one).","format":"int64","type":["integer","null"]},"cartonization_policy_detail_id":{"description":"Строка политики картонизации, по которой создана эта коробка.\n\n`None` — тара родилась не из картонизации, ЛИБО той строки политики больше нет: ссылка обнуляется вместе с кандидатом, потому что запрет удалять кандидата из-за прошлогодней отгрузки — не та цена.","format":"int64","type":["integer","null"]},"code":{"type":"string"},"container_type":{"$ref":"#/components/schemas/ContainerType"},"current_loc":{"type":["string","null"]},"disposable":{"type":"boolean"},"handling_unit_type_id":{"description":"Тип тары, если контейнер — её экземпляр (enterprise.handling_unit_type; ссылку держит сервис регистрации, FK в enterprise нет).","format":"int64","type":["integer","null"]},"id":{"format":"int64","type":"integer"},"is_reusable":{"type":"boolean"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"origin":{"$ref":"#/components/schemas/ContainerOrigin"},"origin_context_id":{"format":"int64","type":["integer","null"]},"owner_id":{"format":"int64","type":"integer"},"pack_id":{"format":"int64","type":["integer","null"]},"parent_id":{"format":"int64","type":["integer","null"]},"planned_at_receipt_id":{"description":"ADR-046 — non-NULL when this container was minted by `CreateCaseLevelAsn` ahead of physical arrival (planned case or planned pallet); NULL for the dominant post-receive creation path. Populated from migration 128.","format":"int64","type":["integer","null"]},"sscc":{"type":["string","null"]},"status":{"$ref":"#/components/schemas/ContainerStatus"},"usage_policy_override":{"anyOf":[{"$ref":"#/components/schemas/HandlingUnitUsagePolicy"},{"type":"null"}],"description":"Исключение из `default_usage_policy` типа для этого экземпляра."}},"required":["add_when","add_who","code","container_type","disposable","id","is_reusable","mod_when","mod_who","origin","owner_id","status"],"type":"object"},"ContainerOrigin":{"oneOf":[{"enum":["Receipt","Manual","Production","System"],"type":"string"},{"description":"The container arrived from another facility of the same company.","enum":["InterFacilityTransfer"],"type":"string"},{"description":"Тару породил план картонизации, а не человек и не приёмка.","enum":["Cartonization"],"type":"string"}]},"ContainerStatus":{"oneOf":[{"enum":["Active","Empty","Disposed","InTransit"],"type":"string"},{"description":"Container has been minted by CreateCaseLevelAsn (ASN load) but the physical goods haven't arrived yet. Flipped to `Active` by ReceiveCaseLevelLine on first deposit. Container ops (Move/Restructure/Pick) should reject this status — the inventory_balances-empty guard is the de-facto enforcement until those commands gain explicit checks. See migration 164.","enum":["Planned"],"type":"string"}]},"ContainerTreeItem":{"description":"One tree row as the pf_table tree renderer expects it: the by-container display fields (snake_case — form 236 reuses the flat By-Container columns) plus `hierarchyLevel` and `hierarchyPath` (camelCase — the keys the generic tree machinery reads). `hierarchyPath` is the chain of container codes from root to this node, inclusive; it drives lazy expand (`matches_group_keys`).","properties":{"atp":{"format":"double","type":"number"},"code":{"type":"string"},"container_type":{"type":["string","null"]},"created":{"type":"string"},"group":{"description":"True iff this container actually has child containers in the cut. Drives the tree expander — set explicitly so leaf containers don't show a (dead) chevron the way the depth heuristic would.","type":"boolean"},"hierarchyLevel":{"format":"int32","type":"integer"},"hierarchyPath":{"items":{"type":"string"},"type":"array"},"id":{"format":"int64","type":"integer"},"location":{"type":["string","null"]},"origin":{"type":["string","null"]},"owner_id":{"format":"int64","type":"integer"},"parent_code":{"type":["string","null"]},"qty":{"format":"double","type":"number"},"qty_allocated":{"format":"double","type":"number"},"sku_count":{"format":"int64","type":"integer"},"status":{"type":["string","null"]}},"required":["atp","code","created","group","hierarchyLevel","hierarchyPath","id","owner_id","qty","qty_allocated","sku_count"],"type":"object"},"ContainerType":{"oneOf":[{"enum":["Pallet","Case","Tote","Generic"],"type":"string"},{"description":"Коробка отгрузки, созданная картонизацией. Физика берётся не из мастера типов, а из строки политики, по которой её создали (`cartonization_policy_detail_id`).","enum":["Carton"],"type":"string"}]},"CountResultLine":{"description":"One result line of a counted location, as the supervisor's card reads it (spec §32 v0.3): which attempt, what identity — the lot with its dates and attributes, the LPN by its code — expected, counted, the difference, the verdict, and the adjustment it went into.","properties":{"adjustment_id":{"format":"int64","type":["integer","null"]},"adjustment_number":{"type":["string","null"]},"attempt_no":{"format":"int32","type":"integer"},"best_by_date":{"type":["string","null"]},"delivery_by_date":{"type":["string","null"]},"difference":{"format":"double","type":"number"},"expected_qty":{"format":"double","type":"number"},"expiration_date":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"location":{"type":"string"},"lot":{"type":"string"},"lot_attributes":{"description":"`CODE value, …` — the lot policy's attributes of the lot.","type":["string","null"]},"lpn":{"type":["string","null"]},"manufactured_date":{"type":["string","null"]},"movement_qty":{"description":"The part of `expected_qty` stock movements made (a `Soft` count).","format":"double","type":"number"},"observed_qty":{"format":"double","type":"number"},"owner_code":{"type":["string","null"]},"pack_id":{"format":"int64","type":"integer"},"result_type":{"type":"string"},"sku_code":{"type":"string"},"task_id":{"format":"int64","type":"integer"},"task_status":{"type":"string"},"uom":{"type":"string"}},"required":["attempt_no","difference","expected_qty","id","location","lot","movement_qty","observed_qty","pack_id","result_type","sku_code","task_id","task_status","uom"],"type":"object"},"CountSerialLine":{"description":"One serial result of a counted location, as the location card lists it (count spec Appendix K.5): which attempt, which serial, where the count puts it and what it made of it, and where the system held it.","properties":{"attempt_no":{"format":"int32","type":"integer"},"id":{"format":"int64","type":"integer"},"lot":{"type":"string"},"lpn":{"type":["string","null"]},"outcome":{"description":"`Found` / `Missing` / `Relocated` / `Registered`.","type":"string"},"seen_location":{"description":"Where the system held it when the count judged it.","type":["string","null"]},"seen_lpn":{"type":["string","null"]},"seen_status":{"type":["string","null"]},"serial_number":{"type":"string"},"sku_code":{"type":"string"},"task_id":{"format":"int64","type":"integer"}},"required":["attempt_no","id","lot","outcome","serial_number","sku_code","task_id"],"type":"object"},"CountTaskRow":{"description":"A task as the supervisor's grid and the location card show it: the task, how many identities its count found different, and whether it may be counted again. What differs is not squeezed into a line of text — the card lists it line by line ([`count_location_results`], spec §32 v0.3).","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"adjustment_id":{"format":"int64","type":["integer","null"]},"attempt_no":{"format":"int32","type":"integer"},"auto_accepted":{"default":false,"type":"boolean"},"counted_at":{"default":null,"type":["string","null"]},"counted_by":{"format":"int64","type":["integer","null"]},"decided_at":{"default":null,"type":["string","null"]},"decided_by":{"format":"int64","type":["integer","null"]},"differences":{"description":"Identities that did not match; 0 until the task is counted.","format":"int32","type":"integer"},"empty_confirmed":{"type":"boolean"},"id":{"format":"int64","type":"integer"},"inventory_count_id":{"format":"int64","type":"integer"},"location":{"type":"string"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"recount_allowed":{"description":"Whether the count's `max_recounts` still lets this location be counted again — what greys «Пересчитать» before the server refuses.","type":"boolean"},"recount_of_task_id":{"format":"int64","type":["integer","null"]},"snapshot_at":{"type":"string"},"status":{"$ref":"#/components/schemas/InventoryCountTaskStatus"},"variance_cause":{"default":null,"description":"ADR-093 (wms-app 132): why the accepted variance happened — a code of the `count_variance_cause` list — with what the supervisor added, and whether the accept was the system's own within tolerance.","type":["string","null"]},"variance_comment":{"default":null,"type":["string","null"]},"version":{"format":"int32","type":"integer"}},"required":["add_when","add_who","attempt_no","differences","empty_confirmed","id","inventory_count_id","location","mod_when","mod_who","recount_allowed","snapshot_at","status","version"],"type":"object"},"CriterionProperty":{"oneOf":[{"enum":["LocationType","LocationStatus","LocationCategory","LocationProcessingType","LocationFlag","LocationAbc","MixSku","MixLot","SkuAbc","SkuGroup","SkuClass","PutawayClass","Rotation","LotAttribute","SkuAttribute","LocationAttribute"],"type":"string"},{"description":"Is the pallet a full pallet of its pack, or a part of one (`SPEC_putaway_assigned_slot.md` §5)? A `Product` property: it decides whether the step applies to the pallet.","enum":["PalletFullness"],"type":"string"}]},"CriterionRow":{"description":"One condition on a step, as the card reads it and as a save states it.\n\n`id` is `Some` for a stored row and `None` for one the operator has just added — which is what lets the same shape serve the read and the write (`SavePutawaySteps` sends a DESIRED SET of these).\n\n`subject` is absent on purpose: it follows from `property` and from nothing else (`CriterionProperty::subject`), so the server derives it and a wire that carried one would be inviting a caller to be wrong.","properties":{"attribute_code":{"description":"Set for exactly the three EAV properties, NULL for the other thirteen (`CriterionProperty::needs_attribute_code`).","type":["string","null"]},"id":{"format":"int64","type":["integer","null"]},"property":{"$ref":"#/components/schemas/CriterionProperty"},"rule":{"allOf":[{"$ref":"#/components/schemas/CriterionRule"}],"description":"The negation: `Include` or `Exclude`. Not a boolean flag."},"values":{"items":{"type":"string"},"type":"array"}},"required":["property","rule","values"],"type":"object"},"CriterionRule":{"enum":["Include","Exclude"],"type":"string"},"CriterionSubject":{"oneOf":[{"description":"The row narrows what the STEP APPLIES TO — the incoming pallet.","enum":["Product"],"type":"string"},{"description":"The row narrows the candidate locations.","enum":["Location"],"type":"string"}]},"DamageAction":{"description":"Per Decisions Log D-26 + T-062 (migration 148). Action triggered by ReportDamage based on severity + OwnerConfig. The first three are the original on-report actions (just-record / hold-LPN / bump-qty-damaged). The four added in T-062 represent owner policy for auto-routing damage to a final disposition without manual intervention: * WriteOff  — auto-call WriteOffDamage on report (decrement inventory). * RTV       — auto-call MoveDamageToRtv on report (move to RTV staging). * Repurpose — flag disposition='Repurpose' (Phase 2 wires SKU substitute). * Destroy   — flag disposition='Destroyed' (Phase 3 wires regulated paths).","enum":["None","Hold","Reject","WriteOff","RTV","Repurpose","Destroy"],"type":"string"},"DamageContext":{"description":"The line a damage report is about, and how much of it is still reportable.","properties":{"already_damaged":{"description":"Everything already reported damaged on this line, whatever each report then did to the line's own columns.","format":"double","type":"number"},"arrived":{"description":"How much physically ARRIVED on this line — see [`LineQtyBuckets::arrived`]. Not `qty_received`.","format":"double","type":"number"},"available":{"description":"What may still be reported: [`available`].","format":"double","type":"number"},"line_number":{"type":"string"},"receipt_detail_id":{"format":"int64","type":"integer"},"receipt_id":{"format":"int64","type":"integer"},"receipt_no":{"description":"The receipt's own number — what the operator calls the paperwork.","type":"string"},"sku_code":{"type":"string"},"sku_descr":{"description":"The SKU's description, as the owner's catalogue holds it.","type":"string"},"uom":{"description":"The line's unit of measure. Empty when the line names none.","type":"string"}},"required":["already_damaged","arrived","available","line_number","receipt_detail_id","receipt_id","receipt_no","sku_code","sku_descr","uom"],"type":"object"},"DamageInfo":{"properties":{"reason_code":{"type":"string"},"reason_description":{"default":null,"type":["string","null"]},"severity":{"$ref":"#/components/schemas/DamageSeverity"},"vendor_responsibility":{"default":false,"type":"boolean"}},"required":["reason_code","severity"],"type":"object"},"DamagePhotoViewLink":{"properties":{"expires_in_secs":{"format":"uint64","minimum":0,"type":"integer"},"object_key":{"type":"string"},"view_url":{"description":"Подписанная ссылка на `GET`. Тоже доверенность.","type":"string"}},"required":["expires_in_secs","object_key","view_url"],"type":"object"},"DamageSeverity":{"description":"Per migration 084 + D-26. Damage classification.","oneOf":[{"enum":["Minor","Major","Total"],"type":"string"},{"description":"Migration 160 — cosmetic damage (scratch / dent on the packaging); the goods are sold without a discount. Default action on this severity is `None` — the goods go into normal stock with an audit-record for statistics.","enum":["Cosmetic"],"type":"string"}]},"DamageVocabularyItem":{"description":"One thing the picker may offer.","properties":{"code":{"description":"What lands in the row and what the server compares — exactly, and case-sensitively.","type":"string"},"display":{"description":"What a human reads. Never sent back in place of [`Self::code`].","type":"string"}},"required":["code","display"],"type":"object"},"DashboardMetricThreshold":{"description":"A metric's alert and critical levels in this warehouse.","properties":{"alert_at":{"format":"double","type":["number","null"]},"bad_when":{"description":"`Above` or `Below` — which side of the levels is bad.","type":"string"},"critical_at":{"format":"double","type":["number","null"]},"id":{"format":"int64","type":"integer"},"metric_key":{"type":"string"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"version":{"format":"int32","type":"integer"}},"required":["bad_when","id","metric_key","mod_when","mod_who","version"],"type":"object"},"DeleteTaskResult":{"properties":{"launch_cleared":{"description":"Удалена последняя задача заказа, и запуск снят: снова выдать работу — «Release». Тот же флаг и тот же смысл, что у `CancelOrderAllocationResult::launch_cleared`.","type":"boolean"},"line_status":{"$ref":"#/components/schemas/OrderLineStatus"},"new_version":{"description":"Версия шапки после команды. Эхо прежней, пока шапку не трогали; сдвигается, когда удаление последней задачи сняло запуск (`launch_cleared`) — это запись в шапку от команды пользователя.","format":"int32","type":"integer"},"order_id":{"format":"int64","type":"integer"},"order_number":{"description":"Номер заказа — для сообщения на экране: супервайзер знает заказ по номеру, а не по id.","type":"string"},"order_status":{"allOf":[{"$ref":"#/components/schemas/OrderStatus"}],"description":"Статус заказа ПОСЛЕ пересчёта в этой же транзакции — экрану не с чего гадать (тот же контракт, что у `DeletePickDetailResult`)."},"pick_detail_id":{"format":"int64","type":"integer"},"task_id":{"format":"int64","type":"integer"}},"required":["launch_cleared","line_status","new_version","order_id","order_number","order_status","pick_detail_id","task_id"],"type":"object"},"Dispatch":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"cancelled_at":{"default":null,"type":["string","null"]},"carrier_id":{"format":"int64","type":["integer","null"]},"code":{"type":"string"},"door_location_id":{"format":"int64","type":["integer","null"]},"external_ref":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"planned_at":{"default":null,"type":["string","null"]},"planned_departure_at":{"default":null,"type":["string","null"]},"status":{"$ref":"#/components/schemas/DispatchStatus"},"version":{"format":"int32","type":"integer"}},"required":["add_when","add_who","code","id","mod_when","mod_who","status","version"],"type":"object"},"DispatchDiagnostic":{"properties":{"code":{"type":"string"},"phase":{"$ref":"#/components/schemas/DispatchPhase"},"task_id":{"format":"int64","type":["integer","null"]}},"required":["code","phase"],"type":"object"},"DispatchOrder":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"dispatch_id":{"format":"int64","type":"integer"},"id":{"format":"int64","type":"integer"},"lane_ref":{"type":["string","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"order_id":{"format":"int64","type":"integer"},"preferred_stage_location_id":{"format":"int64","type":["integer","null"]},"removed_at":{"default":null,"type":["string","null"]},"removed_by":{"format":"int64","type":["integer","null"]},"stop_id":{"format":"int64","type":"integer"}},"required":["add_when","add_who","dispatch_id","id","mod_when","mod_who","order_id","stop_id"],"type":"object"},"DispatchPhase":{"enum":["Assigned","CurrentArea","PermittedAreas"],"type":"string"},"DispatchStatus":{"enum":["Draft","Planned","Shipped","Cancelled"],"type":"string"},"DispatchStop":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"destination_ref":{"type":"string"},"dispatch_id":{"format":"int64","type":"integer"},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"planned_arrival_at":{"default":null,"type":["string","null"]},"planned_departure_at":{"default":null,"type":["string","null"]},"sequence":{"format":"int32","type":"integer"},"stop_type":{"type":"string"}},"required":["add_when","add_who","destination_ref","dispatch_id","id","mod_when","mod_who","sequence","stop_type"],"type":"object"},"DryRunCandidate":{"description":"One predicate's verdict on one candidate location.","properties":{"detail":{"description":"What that outcome said: the measurement that refused, its limit, what was attempted. `None` for a pass.","type":["string","null"]},"location":{"type":"string"},"outcome":{"description":"`offered`, or `refused (<code>)` — worded here so the panel never parses a rejection code.","type":"string"},"predicate":{"description":"Which rule spoke.","type":"string"}},"required":["location","outcome","predicate"],"type":"object"},"DryRunOutcome":{"description":"How one step of the pipeline answered.\n\nAn enum and not a string: the panel styles these four differently and a string would make that styling a client-side parse of engine vocabulary — the one thing this whole module exists to stop.","oneOf":[{"description":"This step offered the location the engine took.","enum":["Matched"],"type":"string"},{"description":"This step ran its candidate scan and reserved nothing.","enum":["Evaluated"],"type":"string"},{"description":"This step was not about this pallet, or had nowhere to look.","enum":["Skipped"],"type":"string"},{"description":"The engine returned before this step: an earlier one matched, or the walk stopped. No trace entry exists for it at all.","enum":["NotReached"],"type":"string"}]},"DryRunPallet":{"description":"The pallet an LPN carries.","properties":{"container_id":{"description":"What the engine was actually asked about — `container.id`, which is what `explain_location` takes.","format":"int64","type":"integer"},"lines":{"items":{"$ref":"#/components/schemas/DryRunPalletLine"},"type":"array"},"location":{"description":"Where the pallet is standing now.","type":"string"},"note":{"description":"Anything that needs saying about the LIST rather than about the pallet — today, the two ways [`lines`](Self::lines) can hold fewer rows than the LPN's stock did: it was cut at [`PALLET_LINES_CAP`], or rows under this LPN sit on a different container and are not on this pallet.\n\nNot in the plan's interface sketch. It is here because a supervisor counting a short list must never have to wonder which of those happened — a report that quietly showed 200 of 201 lines, or half a pallet, would be the one thing this module is built not to do.","type":["string","null"]}},"required":["container_id","lines","location"],"type":"object"},"DryRunPalletLine":{"description":"One SKU line on the pallet.","properties":{"qty":{"format":"double","type":"number"},"sku_code":{"type":"string"},"uom":{"type":"string"}},"required":["qty","sku_code","uom"],"type":"object"},"DryRunStep":{"description":"One step of the pipeline, as the dry run found it.","properties":{"candidates":{"description":"Only for the step that MATCHED. Every other step's candidate list is the story of a scan that led nowhere, and a panel drawing all of them would bury the one that answered.","items":{"$ref":"#/components/schemas/DryRunCandidate"},"type":"array"},"candidates_seen":{"format":"int64","type":"integer"},"explanation":{"description":"The outcome in words, including the pipeline position, so one line of the report reads on its own.","type":"string"},"outcome":{"$ref":"#/components/schemas/DryRunOutcome"},"searched_location":{"description":"The single location this step searched, when its scope named one.","type":["string","null"]},"step_num":{"description":"The step's own `step_num`, exactly as the policy stores it — the panel matches its cards on this.","type":"string"},"zone":{"description":"The zone this step searched. For a `Location` scope this is the zone the searched LOCATION sits in, not the space that was searched — read [`Self::searched_location`] first.","type":["string","null"]}},"required":["candidates","candidates_seen","explanation","outcome","step_num"],"type":"object"},"EntityAttributeRow":{"description":"Row returned by get_entity_attributes — attribute def + current value","properties":{"code":{"type":"string"},"data_type":{"$ref":"#/components/schemas/AttrDataType"},"def_id":{"format":"int64","type":"integer"},"default_value":{"type":["string","null"]},"display_order":{"format":"int32","type":"integer"},"is_required":{"type":"boolean"},"label":{"type":"string"},"value_bool":{"type":["boolean","null"]},"value_date":{"type":["string","null"]},"value_float":{"format":"double","type":["number","null"]},"value_id":{"format":"int64","type":["integer","null"]},"value_int":{"format":"int64","type":["integer","null"]},"value_text":{"type":["string","null"]}},"required":["code","data_type","def_id","display_order","is_required","label"],"type":"object"},"EpisodeBusinessOperation":{"enum":["Receive","Putaway","Move","Pick","Pack","Ship","Return","Adjust","Inventory"],"type":"string"},"EpisodeForceCloseRow":{"description":"Denormalised row returned by [`SerialCaptureEpisodeBmc::list_force_close_candidates_for_warehouse`]. Sibling of [`OperatorOpenEpisodeRow`] tailored for the supervisor force-close screen (slice B):\n\n- Adds `operator_id` so the supervisor knows whose episode they're about to terminate. - Status filter is broader — also includes `Abandoned` (TTL- terminated, needs supervisor decision per slice 3f). - No operator filter — supervisor sees every blocking episode in the warehouse, not just their own.\n\n- Covers Receive AND Pick episodes. An Abandoned Pick episode blocks moves of its stock through the movement service (`move_execute`; ADR-090 `EpisodeMoveGuard`) until a supervisor resolves it, so the supervisor must be able to find it here.\n\nDisplay fields are joined in, so the picker renders without N+1 lookups.","properties":{"business_operation":{"description":"`Receive` or `Pick`.","type":"string"},"captured_qty":{"format":"int32","type":"integer"},"document_number":{"description":"The document the episode works on: the receipt number for Receive, the shipment order number for Pick.","type":"string"},"episode_id":{"format":"int64","type":"integer"},"expected_qty":{"format":"int32","type":"integer"},"location":{"description":"Where the scanned units are. Always set for Pick; Receive episodes usually have none.","type":["string","null"]},"opened_at":{"type":"string"},"operator_id":{"format":"int64","type":"integer"},"owner_code":{"type":"string"},"owner_company":{"type":"string"},"owner_id":{"format":"int64","type":"integer"},"receipt_detail_id":{"description":"Receive only.","format":"int64","type":["integer","null"]},"receipt_id":{"description":"Receive only.","format":"int64","type":["integer","null"]},"receipt_number":{"description":"Receive only.","type":["string","null"]},"sku_code":{"type":"string"},"status":{"type":"string"},"task_id":{"description":"Pick only: the task the episode belongs to.","format":"int64","type":["integer","null"]}},"required":["business_operation","captured_qty","document_number","episode_id","expected_qty","opened_at","operator_id","owner_code","owner_company","owner_id","sku_code","status"],"type":"object"},"EpisodeStatus":{"enum":["Open","InProgress","AwaitingConfirmation","Committed","Cancelled","Abandoned"],"type":"string"},"EquipmentProfile":{"description":"<Strong>Equipment profile</Strong> — the machine an operator drives, how much it lifts, and (through [`EquipmentProfileZoneExclusion`]) the putaway zones it cannot enter (task-manager pass 2, step 3, `docs/superpowers/specs/2026-08-27-work-areas-operator-profile-design.md` §2.3). An operator points here through `operator.equipment_profile_id`; no profile means on foot.\n\nStep 5 narrows an operator's zones by its exclusions; its weights limit which tasks dispatch hands them ([`LiftCapacity`]).","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"description":{"type":"string"},"id":{"format":"int64","type":"integer"},"is_active":{"type":"boolean"},"max_weight":{"description":"What the machine lifts at ground level; `0` = no limit, the putaway engine's convention for every capacity column.","format":"double","type":"number"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"weight_reduction_per_level":{"description":"Lost per location level: up there the machine lifts `max_weight - weight_reduction_per_level * location.level`.","format":"double","type":"number"}},"required":["add_when","add_who","code","description","id","is_active","max_weight","mod_when","mod_who","weight_reduction_per_level"],"type":"object"},"EquipmentProfileZoneExclusion":{"description":"One putaway zone the profile's machine may NOT enter. Exclusions, not permissions (spec §2.4): a zone nobody listed is open to the whole fleet.","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"equipment_profile_id":{"format":"int64","type":"integer"},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"putawayzone":{"type":"string"}},"required":["add_when","add_who","equipment_profile_id","id","mod_when","mod_who","putawayzone"],"type":"object"},"EventRegistry":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"category":{"type":"string"},"code":{"type":"string"},"description":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"is_active":{"type":"boolean"},"is_builtin":{"type":"boolean"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"name":{"type":"string"}},"required":["add_when","add_who","category","code","id","is_active","is_builtin","mod_when","mod_who","name"],"type":"object"},"EvidenceKey":{"description":"One thing the plan asks to be proven: a kind, and — for a lot attribute — its lower-cased Lot Policy code. Also the business key of a stored fact.","properties":{"code":{"type":["string","null"]},"kind":{"$ref":"#/components/schemas/EvidenceKind"}},"required":["kind"],"type":"object"},"EvidenceKind":{"description":"What a plan can ask for. `Quantity` and `Target` are facts too (audit), but the plan never requires them, so they are not here.","enum":["Location","Item","Lpn","InternalLot","LotAttribute"],"type":"string"},"EvidenceSource":{"description":"Where the question was asked.","oneOf":[{"description":"After a pick that emptied the location (`pick_to_zero = Confirm`); `source_id` is the pick.","enum":["PickCommit"],"type":"string"},{"description":"After a manual move that emptied its source location, when the moved stock's owner asks (`owner_config.confirm_empty_on_move`); `source_id` is the move's first `transaction_log` row.","enum":["Move"],"type":"string"},{"description":"The operator's own report of unexpected stock (Appendix M); no operation asked, `source_id` is empty.","enum":["Report"],"type":"string"}]},"ExpectedShipmentLotAttributeInput":{"properties":{"attribute_code":{"type":"string"},"attribute_value":{"type":"string"}},"required":["attribute_code","attribute_value"],"type":"object"},"FlowCapability":{"oneOf":[{"description":"Verify / Repack at a pack station.","enum":["Pack"],"type":"string"},{"description":"Gather the order's units before shipment.","enum":["Consolidate"],"type":"string"},{"description":"Stand the unit in a staging location.","enum":["Stage"],"type":"string"},{"description":"Commit warehouse exit of the unit through Goods Issue, not a Load scan.","enum":["Ship"],"type":"string"},{"description":"Nothing next: the normal outbound flow of the unit is finished.","enum":["None"],"type":"string"}]},"FlowSubjectKind":{"oneOf":[{"description":"A box off a carrier: already a shipping package — packing verifies it.","enum":["Box"],"type":"string"},{"description":"A discrete pick pallet: a source packing repacks into cartons.","enum":["Pallet"],"type":"string"},{"description":"A carton packing produced: released, `Pack` done, when it closed (post-pick spec §8.1).","enum":["Package"],"type":"string"}]},"FlowUnitStatus":{"oneOf":[{"description":"Waits for `next_capability`.","enum":["Pending"],"type":"string"},{"description":"The normal flow is finished; `next_capability` is `None`.","enum":["Completed"],"type":"string"},{"description":"The physical subject was used by Repack or left via receipt-backed GI. A shipped subject has None next and the actual Ship capability marker.","enum":["Consumed"],"type":"string"}]},"HandlingUnitTracking":{"description":"How a unit of this type is told apart. Only `ByInstance` is built: a carrier is a physical object with its own identity, not a SKU quantity.","enum":["ByInstance"],"type":"string"},"HandlingUnitType":{"properties":{"active":{"type":"boolean"},"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"code_prefix":{"type":["string","null"]},"default_usage_policy":{"anyOf":[{"$ref":"#/components/schemas/HandlingUnitUsagePolicy"},{"type":"null"}]},"holds_containers":{"type":"boolean"},"holds_inventory":{"type":"boolean"},"id":{"format":"int64","type":"integer"},"inner_height":{"format":"double","type":"number"},"inner_length":{"format":"double","type":"number"},"inner_width":{"format":"double","type":"number"},"max_gross_weight":{"format":"double","type":"number"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"name":{"type":"string"},"positions":{"format":"int16","type":["integer","null"]},"return_inspection":{"type":"boolean"},"returnable":{"type":"boolean"},"shippable":{"type":"boolean"},"tare_weight":{"format":"double","type":"number"},"tracking":{"$ref":"#/components/schemas/HandlingUnitTracking"}},"required":["active","add_when","add_who","code","holds_containers","holds_inventory","id","inner_height","inner_length","inner_width","max_gross_weight","mod_when","mod_who","name","return_inspection","returnable","shippable","tare_weight","tracking"],"type":"object"},"HandlingUnitUsagePolicy":{"description":"To whom an instance may be handed out by default.","enum":["OwnOnly","WarehouseShared"],"type":"string"},"HoldInfo":{"description":"Per Decisions Log D-28. Auto-hold instruction emitted by validators (NOT an error). Returned to RF in command Output structs so client knows what holds were applied.","properties":{"code":{"type":"string"},"reason":{"type":"string"},"scope":{"$ref":"#/components/schemas/HoldScope"}},"required":["code","reason","scope"],"type":"object"},"HoldScope":{"oneOf":[{"properties":{"kind":{"enum":["Lpn"],"type":"string"},"value":{"type":"string"}},"required":["kind","value"],"type":"object"},{"properties":{"kind":{"enum":["Lot"],"type":"string"},"value":{"type":"string"}},"required":["kind","value"],"type":"object"},{"properties":{"kind":{"enum":["Loc"],"type":"string"},"value":{"type":"string"}},"required":["kind","value"],"type":"object"}]},"IntegrationEvent":{"description":"Per Decisions Log D-22: extended Rust struct matching the DDL `enterprise.integration_event` (existing migration `wms-enterprise/005_integration_event_system.sql`). The `payload`, `key2`, `key3`, `internal_result` fields are present in the DDL but were previously missing from the Rust struct — this blocked `EventPublisher::publish_typed_in_txn`.","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"entity_name":{"type":"string"},"event_category":{"type":"string"},"event_code":{"type":"string"},"event_status":{"type":"string"},"failure_count":{"format":"int32","type":"integer"},"id":{"format":"int64","type":"integer"},"internal_result":{"description":"Per D-22. Results of internal processing (Decision Tables, Rules, Lua)."},"internal_status":{"type":"string"},"key1":{"type":"string"},"key2":{"description":"Per D-22. Secondary identifier (e.g. line_number).","type":"string"},"key3":{"description":"Per D-22. Tertiary identifier.","type":"string"},"last_error":{"type":["string","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"payload":{"description":"Per D-22. Full typed event payload (JSON Schema described in event_registry)."},"tenant_id":{"format":"int64","type":["integer","null"]},"warehouse":{"type":["string","null"]}},"required":["add_when","add_who","entity_name","event_category","event_code","event_status","failure_count","id","internal_status","key1","key2","key3","mod_when","mod_who"],"type":"object"},"IntegrationEventDelivery":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"attempts":{"format":"int32","type":"integer"},"event_id":{"format":"int64","type":"integer"},"id":{"format":"int64","type":"integer"},"last_attempt":{"default":null,"type":["string","null"]},"last_error":{"type":["string","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"next_attempt":{"default":null,"type":["string","null"]},"response_code":{"format":"int32","type":["integer","null"]},"subscriber_id":{"format":"int64","type":"integer"},"transmit_batch":{"type":["string","null"]},"transmit_status":{"type":"string"}},"required":["add_when","add_who","attempts","event_id","id","mod_when","mod_who","subscriber_id","transmit_status"],"type":"object"},"IntegrationSubscriber":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"delivery":{"type":"string"},"description":{"type":["string","null"]},"event_filter":true,"id":{"format":"int64","type":"integer"},"is_active":{"type":"boolean"},"max_retries":{"format":"int32","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"name":{"type":"string"},"retry_delay_sec":{"format":"int32","type":"integer"},"warehouse_filter":true,"webhook_url":{"type":["string","null"]}},"required":["add_when","add_who","code","delivery","event_filter","id","is_active","max_retries","mod_when","mod_who","name","retry_delay_sec"],"type":"object"},"InventoryAdjustment":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"adjustment_number":{"type":"string"},"approved_at":{"default":null,"type":["string","null"]},"approved_by":{"format":"int64","type":["integer","null"]},"comment":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"posted_at":{"default":null,"type":["string","null"]},"posted_by":{"format":"int64","type":["integer","null"]},"reason_code":{"type":"string"},"reversal_of_adjustment_id":{"format":"int64","type":["integer","null"]},"source_id":{"format":"int64","type":["integer","null"]},"source_type":{"type":"string"},"status":{"$ref":"#/components/schemas/InventoryAdjustmentStatus"},"validated_at":{"default":null,"type":["string","null"]},"validated_by":{"format":"int64","type":["integer","null"]},"version":{"format":"int32","type":"integer"}},"required":["add_when","add_who","adjustment_number","id","mod_when","mod_who","reason_code","source_type","status","version"],"type":"object"},"InventoryAdjustmentDetail":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"comment":{"type":["string","null"]},"container_id":{"format":"int64","type":["integer","null"]},"error_code":{"type":["string","null"]},"error_message":{"type":["string","null"]},"error_spoken":{"description":"The same refusal as `{template, args}` (wms-app 107), said in the reader's language when the line is read."},"expected_qty":{"description":"What the identity held when the stock was observed — set only by an inventory count (wms-app 056). POST refuses the line when the stock no longer holds it: the observation is about THAT stock, and applying its target over later movements would erase them.","format":"double","type":["number","null"]},"id":{"format":"int64","type":"integer"},"inventory_adjustment_id":{"format":"int64","type":"integer"},"line_no":{"format":"int32","type":"integer"},"location":{"type":"string"},"lot":{"type":"string"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"owner_id":{"format":"int64","type":"integer"},"pack_id":{"format":"int64","type":"integer"},"reason_code":{"type":["string","null"]},"sku_code":{"type":"string"},"status":{"$ref":"#/components/schemas/InventoryAdjustmentLineStatus"},"target_mode":{"$ref":"#/components/schemas/InventoryAdjustmentTargetMode"},"target_qty":{"format":"double","type":"number"},"transaction_log_code":{"type":["string","null"]},"uom":{"type":"string"},"version":{"format":"int32","type":"integer"}},"required":["add_when","add_who","id","inventory_adjustment_id","line_no","location","lot","mod_when","mod_who","owner_id","pack_id","sku_code","status","target_mode","target_qty","uom","version"],"type":"object"},"InventoryAdjustmentLineStatus":{"enum":["Pending","Valid","Invalid","Posted","NoChange"],"type":"string"},"InventoryAdjustmentStatus":{"enum":["Draft","Validated","Approved","Posted"],"type":"string"},"InventoryAdjustmentTargetMode":{"enum":["Existing","CreateIfMissing"],"type":"string"},"InventoryBalanceAtp":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"atp":{"description":"Computed: Available-to-promise = `GREATEST(qty − allocated − picked − on_hold, 0)`.","format":"double","type":"number"},"container_id":{"format":"int64","type":["integer","null"]},"container_type":{"anyOf":[{"$ref":"#/components/schemas/ContainerType"},{"type":"null"}],"description":"Display (migration 178): `container.container_type` (Pallet/Case/…) — drives the type-glyph badge on the Container column, paired with `lpn`. Native enum (sqlx::Type); serializes to its label (\"Pallet\"/…) so the grid renderer reads the type string."},"hold_detail":{"description":"VIRTUAL: reason + scope of the matching hold, e.g. `'Damaged · Location'`; `''` when the row is not held.","type":["string","null"]},"hold_status":{"description":"VIRTUAL: `'On hold'` when an active hold matches this row's lot / loc / lpn, else `''` (empty → the grid renders no chip). Derived live, never stored.","type":["string","null"]},"id":{"format":"int64","type":"integer"},"location":{"type":"string"},"lot":{"type":"string"},"lpn":{"description":"Display (migration 178): `container.code` (LPN) for `container_id`; `None` for loose stock. Lets the grid filter the Container column by text and the Hard-Move drill-in show the real LPN instead of \"loose stock\".","type":["string","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"owner_id":{"format":"int64","type":"integer"},"owner_name":{"description":"Display (migration 178): `owners.company` for `owner_id` (vs the raw `#id`).","type":["string","null"]},"pack_id":{"format":"int64","type":"integer"},"qty":{"format":"double","type":"number"},"qty_allocated":{"format":"double","type":"number"},"qty_expected":{"description":"Computed: Σ open-ASN remaining (`qty_expected − qty_received`) for this sku+owner.","format":"double","type":"number"},"qty_on_hold":{"description":"Computed: `qty` when an active hold matches this row's lot / loc / lpn, else `0`.","format":"double","type":"number"},"qty_picked":{"format":"double","type":"number"},"serial_tracked":{"default":false,"description":"Whether this row's SKU is configured for end-to-end serial capture. NOT a view column — the view knows nothing about serial config. Filled in by `search_balances` after the query (`SkuSerialConfigBmc:: serial_tracked_skus`), so the RF Move screen can decide whether a PARTIAL move needs the units scanned. `#[field(skip)]` keeps it out of the sea-query projection; `#[sqlx(default)]` keeps `FromRow` from demanding a column that isn't selected — it comes back `false` and the enrichment step sets it.","type":"boolean"},"sku_code":{"type":"string"},"sku_descr":{"description":"Display (migration 178): `sku.descr` (item name) for `(sku_code, owner_id)`.","type":["string","null"]},"uom":{"type":"string"}},"required":["add_when","add_who","atp","id","location","lot","mod_when","mod_who","owner_id","pack_id","qty","qty_allocated","qty_expected","qty_on_hold","qty_picked","sku_code","uom"],"type":"object"},"InventoryBalanceByContainer":{"properties":{"atp":{"format":"double","type":"number"},"code":{"type":"string"},"container_type":{"type":["string","null"]},"created":{"type":"string"},"id":{"format":"int64","type":"integer"},"location":{"type":["string","null"]},"origin":{"type":["string","null"]},"owner_id":{"format":"int64","type":"integer"},"parent_code":{"type":["string","null"]},"qty":{"format":"double","type":"number"},"qty_allocated":{"format":"double","type":"number"},"sku_count":{"format":"int64","type":"integer"},"status":{"type":["string","null"]}},"required":["atp","code","created","id","owner_id","qty","qty_allocated","sku_count"],"type":"object"},"InventoryBalanceByLot":{"properties":{"atp":{"format":"double","type":"number"},"best_by_date_source":{"anyOf":[{"$ref":"#/components/schemas/LotDateSource"},{"type":"null"}]},"days_left":{"description":"Expiration minus the warehouse day (`warehouse_today()`).","format":"int32","type":["integer","null"]},"delivery_by_date_source":{"anyOf":[{"$ref":"#/components/schemas/LotDateSource"},{"type":"null"}]},"expiration_date":{"type":["string","null"]},"expiration_date_source":{"anyOf":[{"$ref":"#/components/schemas/LotDateSource"},{"type":"null"}],"description":"Where each date came from; `None` when the lot has no such date."},"expired":{"description":"The lot expires today or earlier.","type":"boolean"},"id":{"format":"int64","type":"integer"},"locs":{"format":"int64","type":"integer"},"lot":{"type":"string"},"manufactured_date":{"type":["string","null"]},"owner_id":{"format":"int64","type":"integer"},"qty":{"format":"double","type":"number"},"qty_allocated":{"format":"double","type":"number"},"sku_code":{"type":"string"},"status":{"type":"string"}},"required":["atp","expired","id","locs","lot","owner_id","qty","qty_allocated","sku_code","status"],"type":"object"},"InventoryBalanceBySku":{"properties":{"atp":{"format":"double","type":"number"},"descr":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"locs":{"format":"int64","type":"integer"},"owner_id":{"format":"int64","type":"integer"},"qty":{"format":"double","type":"number"},"qty_allocated":{"format":"double","type":"number"},"qty_expected":{"format":"double","type":"number"},"qty_on_hold":{"format":"double","type":"number"},"sku_code":{"type":"string"}},"required":["atp","id","locs","owner_id","qty","qty_allocated","qty_expected","qty_on_hold","sku_code"],"type":"object"},"InventoryBalanceKpi":{"properties":{"allocated":{"format":"double","type":"number"},"atp":{"format":"double","type":"number"},"expected":{"format":"double","type":"number"},"hold_count":{"format":"int64","type":"integer"},"id":{"format":"int64","type":"integer"},"on_hold":{"format":"double","type":"number"},"row_count":{"format":"int64","type":"integer"},"total_qty":{"format":"double","type":"number"}},"required":["allocated","atp","expected","hold_count","id","on_hold","row_count","total_qty"],"type":"object"},"InventoryBalanceLot":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"best_by_date":{"type":["string","null"]},"best_by_date_source":{"anyOf":[{"$ref":"#/components/schemas/LotDateSource"},{"type":"null"}]},"delivery_by_date":{"type":["string","null"]},"delivery_by_date_source":{"anyOf":[{"$ref":"#/components/schemas/LotDateSource"},{"type":"null"}]},"expiration_date":{"type":["string","null"]},"expiration_date_source":{"anyOf":[{"$ref":"#/components/schemas/LotDateSource"},{"type":"null"}],"description":"Where each date came from; `None` when the lot has no such date."},"id":{"format":"int64","type":"integer"},"lot":{"type":"string"},"manufactured_date":{"type":["string","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"owner_id":{"format":"int64","type":"integer"},"receipt_number":{"type":["string","null"]},"sku_code":{"type":"string"}},"required":["add_when","add_who","id","lot","mod_when","mod_who","owner_id","sku_code"],"type":"object"},"InventoryBalanceSerial":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"anomaly_flags":true,"capture_method":{"$ref":"#/components/schemas/SerialCaptureMethod"},"container_id":{"format":"int64","type":["integer","null"]},"customer_id":{"format":"int64","type":["integer","null"]},"damage_id":{"format":"int64","type":["integer","null"]},"disposal_reason":{"type":["string","null"]},"disposed_at":{"default":null,"type":["string","null"]},"has_planned_line":{"type":"boolean"},"hold_id":{"format":"int64","type":["integer","null"]},"id":{"format":"int64","type":"integer"},"last_moved_at":{"default":null,"type":["string","null"]},"last_moved_by":{"format":"int64","type":["integer","null"]},"location":{"type":["string","null"]},"lot":{"type":["string","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"owner_id":{"format":"int64","type":"integer"},"picked_via":{"format":"int64","type":["integer","null"]},"previous_status":{"anyOf":[{"$ref":"#/components/schemas/SerialStatus"},{"type":"null"}]},"received_at":{"type":"string"},"received_by":{"format":"int64","type":"integer"},"received_via":{"description":"`receipt_detail.id` of the line that captured it; `None` for a serial a count registered (`registered_via_count`).","format":"int64","type":["integer","null"]},"registered_via_adjustment":{"description":"The adjustment that registered one (adjustment spec Appendix D).","format":"int64","type":["integer","null"]},"registered_via_count":{"description":"The count task that registered a serial no receipt brought (count spec Appendix K).","format":"int64","type":["integer","null"]},"reserved_for":{"format":"int64","type":["integer","null"]},"return_via":{"format":"int64","type":["integer","null"]},"returned_at":{"default":null,"type":["string","null"]},"serial_format":{"type":["string","null"]},"serial_number":{"type":"string"},"shipped_at":{"default":null,"type":["string","null"]},"shipped_via":{"format":"int64","type":["integer","null"]},"sku_code":{"type":"string"},"status":{"$ref":"#/components/schemas/SerialStatus"}},"required":["add_when","add_who","capture_method","has_planned_line","id","mod_when","mod_who","owner_id","received_at","received_by","serial_number","sku_code","status"],"type":"object"},"InventoryCount":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"cancelled_at":{"default":null,"type":["string","null"]},"closed_at":{"default":null,"type":["string","null"]},"comment":{"type":["string","null"]},"count_mode":{"$ref":"#/components/schemas/InventoryCountMode"},"count_number":{"type":"string"},"count_type":{"$ref":"#/components/schemas/InventoryCountType"},"freeze_mode":{"$ref":"#/components/schemas/InventoryCountFreeze"},"id":{"format":"int64","type":"integer"},"item_containers":{"items":{"format":"int64","type":"integer"},"type":"array"},"item_lots":{"items":{"type":"string"},"type":"array"},"item_skus":{"description":"The count's item (Appendix G): an empty list is \"not named\".","items":{"type":"string"},"type":"array"},"max_recounts":{"description":"How many times one location may be recounted (attempts = 1 + this).","format":"int16","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"recount_by_other_counter":{"type":"boolean"},"scope_mode":{"$ref":"#/components/schemas/InventoryCountScope"},"source_id":{"format":"int64","type":["integer","null"]},"source_type":{"type":"string"},"status":{"$ref":"#/components/schemas/InventoryCountStatus"},"version":{"format":"int32","type":"integer"}},"required":["add_when","add_who","count_mode","count_number","count_type","freeze_mode","id","item_containers","item_lots","item_skus","max_recounts","mod_when","mod_who","recount_by_other_counter","scope_mode","source_type","status","version"],"type":"object"},"InventoryCountFreeze":{"enum":["Hard","Soft"],"type":"string"},"InventoryCountIntentStatus":{"description":"Whether the short's reason has its source location counted (spec count Appendix C): the count itself is requested by the remediation that follows (`remediate_pick_discrepancy`), once the residual is in Lost.","oneOf":[{"enum":["NotConfigured"],"type":"string"},{"description":"Results recorded before counts were made say `ConfiguredNotImplemented`.","enum":["Requested"],"type":"string"}]},"InventoryCountMode":{"enum":["Blind","Informed"],"type":"string"},"InventoryCountObservation":{"description":"One scan or entry of the counter. Append-only; voided, never edited.","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"container_id":{"description":"`None` = loose stock.","format":"int64","type":["integer","null"]},"id":{"format":"int64","type":"integer"},"inventory_count_task_id":{"format":"int64","type":"integer"},"lot":{"type":"string"},"observed_qty":{"format":"double","type":"number"},"owner_id":{"format":"int64","type":"integer"},"pack_id":{"format":"int64","type":"integer"},"sku_code":{"type":"string"},"uom":{"type":"string"},"voided_at":{"default":null,"type":["string","null"]},"voided_by":{"format":"int64","type":["integer","null"]}},"required":["add_when","add_who","id","inventory_count_task_id","lot","observed_qty","owner_id","pack_id","sku_code","uom"],"type":"object"},"InventoryCountPolicy":{"properties":{"abc":{"anyOf":[{"$ref":"#/components/schemas/AbcRotationSpeed"},{"type":"null"}]},"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"aisle":{"type":["string","null"]},"basis":{"$ref":"#/components/schemas/InventoryCountPolicyBasis"},"code":{"type":"string"},"count_mode":{"$ref":"#/components/schemas/InventoryCountMode"},"daily_limit":{"format":"int32","type":"integer"},"description":{"type":["string","null"]},"freeze_mode":{"allOf":[{"$ref":"#/components/schemas/InventoryCountFreeze"}],"description":"`Hard` freezes the locations the policy's counts count; `Soft` lets stock move (count spec Appendix F)."},"frequency_days":{"format":"int32","type":"integer"},"id":{"format":"int64","type":"integer"},"is_active":{"type":"boolean"},"last_run_on":{"type":["string","null"]},"loc_type":{"anyOf":[{"$ref":"#/components/schemas/LocType"},{"type":"null"}]},"max_recounts":{"format":"int16","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"putawayzone":{"type":["string","null"]},"sku_abc":{"anyOf":[{"$ref":"#/components/schemas/AbcRotationSpeed"},{"type":"null"}],"description":"`Items`: the SKUs of this ABC class (`sku.abc`)."},"sku_group":{"description":"`Items`: the SKUs of this group (`sku.sku_group`).","type":["string","null"]},"trust_empty_confirmation":{"description":"A location confirmed empty in passing counts as checked then (count spec Appendix L.6). Only a policy over locations reads it.","type":"boolean"},"version":{"format":"int32","type":"integer"}},"required":["add_when","add_who","basis","code","count_mode","daily_limit","freeze_mode","frequency_days","id","is_active","max_recounts","mod_when","mod_who","trust_empty_confirmation","version"],"type":"object"},"InventoryCountPolicyBasis":{"enum":["Locations","Items"],"type":"string"},"InventoryCountResult":{"description":"What completing the task found for one identity.","properties":{"container_id":{"description":"`None` = loose stock.","format":"int64","type":["integer","null"]},"expected_qty":{"format":"double","type":"number"},"id":{"format":"int64","type":"integer"},"inventory_count_task_id":{"format":"int64","type":"integer"},"lot":{"type":"string"},"movement_qty":{"description":"The part of `expected_qty` the stock deltas between the snapshot and the completion made (a `Soft` count); 0 otherwise.","format":"double","type":"number"},"observed_qty":{"format":"double","type":"number"},"owner_id":{"format":"int64","type":"integer"},"pack_id":{"format":"int64","type":"integer"},"result_type":{"$ref":"#/components/schemas/InventoryCountResultType"},"sku_code":{"type":"string"},"uom":{"type":"string"}},"required":["expected_qty","id","inventory_count_task_id","lot","movement_qty","observed_qty","owner_id","pack_id","result_type","sku_code","uom"],"type":"object"},"InventoryCountResultType":{"enum":["Match","QtyVariance","ExpectedButMissing","UnexpectedFound","SerialMismatch"],"type":"string"},"InventoryCountScope":{"enum":["LocationFull","IdentitySubset"],"type":"string"},"InventoryCountSnapshot":{"description":"One identity the task is counted against.","properties":{"container_id":{"description":"`None` = loose stock.","format":"int64","type":["integer","null"]},"expected_qty":{"format":"double","type":"number"},"id":{"format":"int64","type":"integer"},"inventory_count_task_id":{"format":"int64","type":"integer"},"lot":{"type":"string"},"owner_id":{"format":"int64","type":"integer"},"pack_id":{"format":"int64","type":"integer"},"sku_code":{"type":"string"},"uom":{"type":"string"}},"required":["expected_qty","id","inventory_count_task_id","lot","owner_id","pack_id","sku_code","uom"],"type":"object"},"InventoryCountStatus":{"enum":["Open","Closed","Cancelled"],"type":"string"},"InventoryCountTask":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"adjustment_id":{"format":"int64","type":["integer","null"]},"attempt_no":{"format":"int32","type":"integer"},"auto_accepted":{"default":false,"type":"boolean"},"counted_at":{"default":null,"type":["string","null"]},"counted_by":{"format":"int64","type":["integer","null"]},"decided_at":{"default":null,"type":["string","null"]},"decided_by":{"format":"int64","type":["integer","null"]},"empty_confirmed":{"type":"boolean"},"id":{"format":"int64","type":"integer"},"inventory_count_id":{"format":"int64","type":"integer"},"location":{"type":"string"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"recount_of_task_id":{"format":"int64","type":["integer","null"]},"snapshot_at":{"type":"string"},"status":{"$ref":"#/components/schemas/InventoryCountTaskStatus"},"variance_cause":{"default":null,"description":"ADR-093 (wms-app 132): why the accepted variance happened — a code of the `count_variance_cause` list — with what the supervisor added, and whether the accept was the system's own within tolerance.","type":["string","null"]},"variance_comment":{"default":null,"type":["string","null"]},"version":{"format":"int32","type":"integer"}},"required":["add_when","add_who","attempt_no","empty_confirmed","id","inventory_count_id","location","mod_when","mod_who","snapshot_at","status","version"],"type":"object"},"InventoryCountTaskStatus":{"enum":["Open","Variance","Closed","Recounted","Cancelled"],"type":"string"},"InventoryCountTolerance":{"description":"One ABC class's tolerance. Every rule is optional: `None` does not apply.","properties":{"abc":{"$ref":"#/components/schemas/AbcRotationSpeed"},"approval_value":{"description":"A task's variance worth more than this is accepted only with `inventory_count.accept_large_variance`.","format":"double","type":["number","null"]},"auto_pct":{"description":"…and by at most this percent of what was expected…","format":"double","type":["number","null"]},"auto_qty":{"description":"Accepted on its own when the line differs by at most this many units…","format":"double","type":["number","null"]},"auto_value":{"description":"…and its value is at most this.","format":"double","type":["number","null"]},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"version":{"format":"int32","type":"integer"}},"required":["abc","id","mod_when","mod_who","version"],"type":"object"},"InventoryCountType":{"enum":["Full","Cycle","Selective","Event"],"type":"string"},"InventoryCountView":{"description":"A count with its tasks, as the count-level commands answer.","properties":{"header":{"$ref":"#/components/schemas/InventoryCount"},"summary":{"description":"Where the count stands, in words.","type":"string"},"tasks":{"items":{"$ref":"#/components/schemas/InventoryCountTask"},"type":"array"}},"required":["header","summary","tasks"],"type":"object"},"InventoryHold":{"description":"Represents a hold placed on inventory, supporting lot, location, or LPN-based holds.\n\nThis struct is designed for detailed tracking and auditing of inventory holds in a warehouse management system. It supports flexible hold types (lot, location, LPN), status management, and full audit trails.\n\n# Fields - `id`: Unique identifier for the hold record. - `code`: Business code for the hold (may be used for grouping or referencing). - `lot`: Optional lot number, if the hold is placed at the lot level. - `loc`: Optional location code, if the hold is placed at the location level. - `lpn`: Optional License Plate Number, if the hold is placed on a movable unit. - `is_hold_on`: `true` if the hold is currently active, `false` if released. - `status`: The current status of the hold (custom enum). - `date_on`: Timestamp when the hold was placed. - `who_on`: User ID or actor who placed the hold. - `date_off`: Timestamp when the hold was released (if applicable). - `who_off`: User ID or actor who released the hold (if applicable). - `comments`: Optional comments or notes about the hold. - `hours_to_hold`: Optional planned duration (in hours) for the hold. - `auto_release_date`: Optional date when the hold should be automatically released. - `add_who`: User ID who created the record. - `add_when`: Timestamp when the record was created. - `mod_who`: User ID who last modified the record. - `mod_when`: Timestamp when the record was last modified.\n\n# Serialization - Uses RFC3339 datetime format for all timestamps. - Designed for use with Serde and SQLx for seamless database and API integration.\n\n# Example ``` let hold = InventoryHold { id: 1, code: \"HOLD-2025-001\".to_string(), lot: Some(\"LOT-123\".to_string()), loc: None, lpn: None, is_hold_on: true, status: InventoryStatusHold::Active, date_on: OffsetDateTime::now_utc(), who_on: 42, date_off: OffsetDateTime::now_utc(), who_off: 0, comments: Some(\"Quality check pending\".to_string()), hours_to_hold: Some(24.0), auto_release_date: OffsetDateTime::now_utc(), add_who: 42, add_when: OffsetDateTime::now_utc(), mod_who: 42, mod_when: OffsetDateTime::now_utc(), }; ```","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"auto_release_date":{"default":null,"type":["string","null"]},"code":{"type":"string"},"comments":{"type":["string","null"]},"date_off":{"default":null,"type":["string","null"]},"date_on":{"default":null,"type":["string","null"]},"hours_to_hold":{"format":"double","type":["number","null"]},"id":{"format":"int64","type":"integer"},"is_hold_on":{"type":"boolean"},"loc":{"type":["string","null"]},"lot":{"type":["string","null"]},"lpn":{"type":["string","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"status":{"$ref":"#/components/schemas/InventoryStatusHold"},"who_off":{"format":"int64","type":["integer","null"]},"who_on":{"format":"int64","type":["integer","null"]}},"required":["add_when","add_who","code","id","is_hold_on","mod_when","mod_who","status"],"type":"object"},"InventoryHoldCode":{"properties":{"active":{"type":"boolean"},"block_inbound_flow":{"description":"Does this hold forbid PUTTING stock into the place it covers?\n\nSeparate from [`Self::block_outbound_flow`] because the warehouse asks two different questions of one hold, and one flag used to answer both. The dedicated damage bay carries a permanent `Damaged` hold so its contents never reach an order — that is a PICKING ban — and the same flag was read as \"nothing may be put here\", which refused the damaged return the bay exists to receive. `enforce` / `overridable` stay the STRENGTH of the ban; these two say what it applies TO.","type":"boolean"},"block_outbound_flow":{"description":"Does this hold forbid TAKING stock out of the place it covers?\n\nRead by the availability view (`inventory_balance_atp`), by the reservation re-check (`InventoryHoldBmc::covers_position`) and by the source side of a move. See [`Self::block_inbound_flow`].","type":"boolean"},"code":{"type":"string"},"description":{"type":["string","null"]},"enforce":{"type":"boolean"},"id":{"format":"int64","type":"integer"},"overridable":{"type":"boolean"},"rank":{"description":"Intended as the dropdown sort order (low rank on top, migration 142).\n\n**Nothing reads it.** It did NOT set loc_status precedence, whatever this comment claimed before: `derive_loc_status` (`wms-inventory::hold`) ranks a location by matching the literal code `\"Damaged\"`, so renumbering ranks changes no behaviour — and the admin form (migration 189) nevertheless demands a value for it. Kept as-is rather than dropped because that is the owner's call, not a cleanup: see migration 199, which dropped `ack_code` for exactly this reason once the same question was answered.","format":"int64","type":"integer"}},"required":["active","block_inbound_flow","block_outbound_flow","code","enforce","id","overridable","rank"],"type":"object"},"InventoryHoldDetail":{"properties":{"auto_release_date":{"default":null,"type":["string","null"]},"code":{"type":"string"},"comments":{"type":["string","null"]},"date_on":{"default":null,"type":["string","null"]},"id":{"format":"int64","type":"integer"},"is_hold_on":{"type":"boolean"},"qty":{"format":"double","type":"number"},"scope":{"type":"string"},"status":{"type":"string"},"target":{"type":["string","null"]},"who_on":{"format":"int64","type":["integer","null"]}},"required":["code","id","is_hold_on","qty","scope","status"],"type":"object"},"InventoryHoldRowDto":{"properties":{"code":{"type":"string"},"comments":{"type":["string","null"]},"date_on":{"description":"ISO-8601 / RFC-3339 string (serde-default for `time::OffsetDateTime`).","type":"string"},"id":{"format":"int64","type":"integer"},"is_hold_on":{"type":"boolean"},"loc":{"type":["string","null"]},"lot":{"type":["string","null"]},"lpn":{"type":["string","null"]}},"required":["code","date_on","id","is_hold_on"],"type":"object"},"InventoryPendingMoveIn":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"container_id":{"description":"The pallet whose space this is. A pallet may hold several live reservations at once — one per position an oversized load spans — but never two for the SAME location: `uq_inventory_pending_move_in_active_container_location` enforces one live row per (container, location). A multi-position group is tied together by `share_of`.","format":"int64","type":"integer"},"cube":{"description":"Cube and weight are 0 by default and 0 is a legitimate footprint, not a placeholder: `sku.cube` is NOT NULL DEFAULT 0, so an item whose dimensions were never captured genuinely promises nothing.","format":"double","type":"number"},"expires_at":{"description":"TTL resolution order: `owner_config.putaway_reservation_ttl_min` → `system_settings.PUTAWAY_RESERVATION_TTL_MIN` → its `default_value`.","type":"string"},"id":{"format":"int64","type":"integer"},"location":{"description":"`location.code` — the location being held.","type":"string"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"share_of":{"description":"Номер главной записи, если эта строка держит соседнюю ячейку под негабарит. Пусто у обычных назначений и у самой главной — главная и есть та, куда идёт кладовщик, и наружу показывается только её номер.","format":"int64","type":["integer","null"]},"source":{"$ref":"#/components/schemas/PendingMoveInSource"},"status":{"$ref":"#/components/schemas/PendingMoveInStatus"},"weight":{"format":"double","type":"number"}},"required":["add_when","add_who","container_id","cube","expires_at","id","location","mod_when","mod_who","source","status","weight"],"type":"object"},"InventoryPendingMoveInUi":{"description":"Строка экрана назначений: то же назначение, но с подтянутыми паллетой и товаром. Только чтение — вид.","properties":{"container_id":{"format":"int64","type":"integer"},"cube":{"format":"double","type":["number","null"]},"expires_at":{"type":"string"},"id":{"format":"int64","type":"integer"},"location":{"type":"string"},"lpn":{"type":["string","null"]},"share_of":{"format":"int64","type":["integer","null"]},"skus":{"type":["string","null"]},"source":{"type":"string"},"status":{"type":"string"},"weight":{"format":"double","type":["number","null"]}},"required":["container_id","expires_at","id","location","source","status"],"type":"object"},"InventoryStatusHold":{"description":"Mirror of the PostgreSQL `inv_hold_code` enum (15 values after migration 142).\n\nMigration 142 renamed and extended the DB enum: - `QCRec` → `QcQuarantine` (semantic clarity: not just \"at receive\") - `Return` → `CustomerReturn` (disambiguate from `Rtv`) - Added: `Rtv`, `Destroy`, `QcRequired`, `NewItem`, `NotHold`","oneOf":[{"enum":["None","Ok","PIHold","QcRequired","NewItem","NotHold","QcQuarantine","Customs","CustomerReturn","Expired","Damaged","Rtv","Destroy","Lost","Other"],"type":"string"},{"description":"Administrative location block — hard, non-overridable. Carries the legacy `location.status='Hold'` block preserved by migration 194 (F8). A varchar-only `inventory_hold.code` value; it is never written to the `inv_hold_code` DB enum column (`inventory_hold.status`), so it needs no DB-enum `ALTER`.","enum":["LocBlocked"],"type":"string"}]},"InventoryTrackingGranularity":{"description":"ADR-046 D-69b — per-receipt inventory tracking granularity. Frozen at receipt creation, never changes after.\n\n- **Aggregate** (default) — pre-case-level behaviour: scan pallet, type qty, single inventory_balances row per pallet. Status quo for non-regulated owners. - **Pallet** — operator scans every case (audit trail in receipt_detail_case) but inventory_balances stays per-pallet. - **Case** — every case becomes its own inventory_balances row. Full case-level traceability for pharma / food / regulated industries.\n\nStored as PG enum `inventory_tracking_granularity` (created in migration 126).","enum":["Aggregate","Pallet","Case"],"type":"string"},"LabelDefinition":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"category":{"type":"string"},"code":{"type":"string"},"description":{"type":["string","null"]},"dpi":{"format":"int32","type":"integer"},"height_mm":{"format":"double","type":"number"},"id":{"format":"int64","type":"integer"},"is_active":{"type":"boolean"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"name":{"type":"string"},"template_id":{"format":"int64","type":["integer","null"]},"width_mm":{"format":"double","type":"number"}},"required":["add_when","add_who","category","code","dpi","height_mm","id","is_active","mod_when","mod_who","name","width_mm"],"type":"object"},"LabelPrinter":{"description":"The printer a label goes to, as the station shows it and the close answers it.","properties":{"code":{"type":"string"},"id":{"format":"int64","type":"integer"},"name":{"type":"string"}},"required":["code","id","name"],"type":"object"},"LabelTemplate":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"config_json":true,"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"name":{"type":"string"},"version_status":{"type":"string"}},"required":["add_when","add_who","code","config_json","id","mod_when","mod_who","name","version_status"],"type":"object"},"LineAllocationPreview":{"description":"One line's slice of an [`AllocationPreview`].","properties":{"allocated":{"description":"Sum of `positions[].qty` — what the plan found, not a guarantee (see [`AllocationPreview`]'s own doc comment).","format":"double","type":"number"},"allocation_policy_id":{"description":"Frozen policy snapshot used by the shared planner. Absent only for a line with no remaining demand and no historical snapshot.","format":"int64","type":["integer","null"]},"allocation_policy_version":{"format":"int32","type":["integer","null"]},"blocked_by_dropped_step":{"description":"This line's own [`crate::allocation::LineAllocationPlan:: blocked_by_dropped_step`] — a subset of `short` a caller can use to tell \"the policy needs fixing\" apart from \"there is no stock.\" Zero on the common path.","format":"double","type":"number"},"line_no":{"format":"int32","type":"integer"},"need":{"description":"`qty_to_allocate()` at read time, floored at zero.","format":"double","type":"number"},"positions":{"items":{"$ref":"#/components/schemas/AllocatedPosition"},"type":"array"},"short":{"format":"double","type":"number"},"sku_code":{"type":"string"},"steps":{"description":"Typed step-by-step explanation. Full detail adds aggregate rejection counts to each evaluated step; it never returns inventory rows.","items":{"$ref":"#/components/schemas/StepDecision"},"type":"array"},"uom":{"type":"string"}},"required":["allocated","blocked_by_dropped_step","line_no","need","positions","short","sku_code","steps","uom"],"type":"object"},"LoadingSequencePolicy":{"enum":["ReverseStop","ForwardStop","StopGroup","Explicit","Unrestricted"],"type":"string"},"LoadManifestUnit":{"properties":{"assignment_version":{"format":"int32","type":"integer"},"container_ids":true,"load_id":{"format":"int64","type":"integer"},"order_id":{"description":"`None` for a consolidated pallet of several orders (H2): its orders are its unit's (`outbound_flow_unit_order`).","format":"int64","type":["integer","null"]},"outbound_flow_unit_id":{"format":"int64","type":"integer"},"planned_sequence":{"format":"int32","type":"integer"},"root_code":{"type":"string"},"root_container_id":{"format":"int64","type":"integer"},"stop_id":{"format":"int64","type":"integer"},"stop_sequence":{"format":"int32","type":"integer"},"unit_version":{"format":"int32","type":"integer"}},"required":["assignment_version","container_ids","load_id","outbound_flow_unit_id","planned_sequence","root_code","root_container_id","stop_id","stop_sequence","unit_version"],"type":"object"},"LoadPlan":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"dispatch_id":{"format":"int64","type":"integer"},"frozen_at":{"default":null,"type":["string","null"]},"generated_at":{"default":null,"type":["string","null"]},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"mode":{"$ref":"#/components/schemas/LoadPlanMode"},"sequence_policy":{"$ref":"#/components/schemas/LoadingSequencePolicy"},"status":{"$ref":"#/components/schemas/LoadPlanStatus"},"version":{"format":"int32","type":"integer"}},"required":["add_when","add_who","code","dispatch_id","id","mod_when","mod_who","mode","sequence_policy","status","version"],"type":"object"},"LoadPlanEntry":{"properties":{"dispatch_id":{"format":"int64","type":"integer"},"frozen_order_id":{"format":"int64","type":["integer","null"]},"frozen_unit_version":{"format":"int32","type":["integer","null"]},"load_plan_id":{"format":"int64","type":"integer"},"outbound_flow_unit_id":{"format":"int64","type":"integer"},"position":{"type":["string","null"]},"sequence":{"format":"int32","type":"integer"},"stop_id":{"format":"int64","type":"integer"},"unit_assignment_version":{"format":"int32","type":"integer"}},"required":["dispatch_id","load_plan_id","outbound_flow_unit_id","sequence","stop_id","unit_assignment_version"],"type":"object"},"LoadPlanGroup":{"properties":{"load_order":{"format":"int32","type":["integer","null"]},"stop":{"$ref":"#/components/schemas/DispatchStop"},"units":{"items":{"$ref":"#/components/schemas/LoadPlanUnit"},"type":"array"}},"required":["stop","units"],"type":"object"},"LoadPlanMode":{"enum":["StopBased","ExplicitUnit"],"type":"string"},"LoadPlanStatus":{"enum":["Draft","Planned","Frozen","Completed"],"type":"string"},"LoadPlanUnit":{"properties":{"assignment":{"$ref":"#/components/schemas/OutboundUnitAssignment"},"container_code":{"type":["string","null"]},"current_location":{"type":["string","null"]},"nested_units":{"type":"boolean"},"packing_open":{"type":"boolean"},"unit":{"$ref":"#/components/schemas/OutboundFlowUnit"}},"required":["assignment","nested_units","packing_open","unit"],"type":"object"},"LoadPlanUnitEntry":{"properties":{"current":{"anyOf":[{"$ref":"#/components/schemas/LoadPlanUnit"},{"type":"null"}],"description":"None for a missing/Consumed/child/foreign-dispatch subject. Its saved identity remains visible, rather than silently shrinking the plan."},"entry":{"$ref":"#/components/schemas/LoadPlanEntry"},"matches_assignment":{"type":"boolean"}},"required":["entry","matches_assignment"],"type":"object"},"LoadPlanUnitExpectation":{"description":"Reviewed membership and versions; checked as a complete collection.","properties":{"expected_assignment_version":{"format":"int32","type":"integer"},"expected_unit_version":{"format":"int32","type":"integer"},"outbound_flow_unit_id":{"format":"int64","type":"integer"}},"required":["expected_assignment_version","expected_unit_version","outbound_flow_unit_id"],"type":"object"},"LoadStatus":{"enum":["Open","Loading","Loaded","Shipped","Cancelled"],"type":"string"},"LoadUnitFact":{"properties":{"actual_sequence":{"format":"int32","type":"integer"},"content_snapshot":true,"id":{"format":"int64","type":"integer"},"load_id":{"format":"int64","type":"integer"},"loaded_at":{"type":"string"},"loaded_by":{"format":"int64","type":"integer"},"order_id":{"description":"`None` for a pallet of several orders.","format":"int64","type":["integer","null"]},"outbound_flow_unit_id":{"format":"int64","type":"integer"},"result":true,"root_code":{"type":"string"},"root_container_id":{"format":"int64","type":"integer"},"stop_id":{"format":"int64","type":"integer"}},"required":["actual_sequence","content_snapshot","id","load_id","loaded_at","loaded_by","outbound_flow_unit_id","result","root_code","root_container_id","stop_id"],"type":"object"},"Loc":{"description":"Basic location model description CRUDs","properties":{"abc":{"anyOf":[{"$ref":"#/components/schemas/AbcRotationSpeed"},{"type":"null"}]},"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"aisle":{"type":"string"},"bay":{"format":"int32","type":"integer"},"check_digit":{"type":["string","null"]},"code":{"type":"string"},"cube":{"format":"double","type":["number","null"]},"discard_lpn":{"type":["boolean","null"]},"footprint":{"description":"How many pallets stand on the floor here, and how high they stack. Their product is the location's capacity in PALLET POSITIONS — the only capacity a bulk bay really has. `0` on either means \"not configured\", the same reading the two capacities above get, and it is reported rather than treated as unlimited.","format":"int16","type":"integer"},"height":{"format":"double","type":["number","null"]},"id":{"format":"int64","type":"integer"},"length":{"format":"double","type":["number","null"]},"level":{"format":"int32","type":["integer","null"]},"loc_category":{"$ref":"#/components/schemas/LocCategory"},"loc_flag":{"$ref":"#/components/schemas/LocFlag"},"loc_processing_type":{"$ref":"#/components/schemas/LocProcessingType"},"loc_type":{"$ref":"#/components/schemas/LocType"},"max_cube_capacity":{"format":"double","type":["number","null"]},"max_qty_capacity":{"description":"How much stock this location holds before it is full, in its own UOM. `0` = not configured, read the same way as the two capacities above.","format":"double","type":"number"},"max_weight_capacity":{"format":"double","type":["number","null"]},"mix_lot":{"type":["boolean","null"]},"mix_sku":{"type":["boolean","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"putawayzone":{"type":"string"},"route_sequence":{"type":["string","null"]},"section":{"description":"The run of positions this location belongs to — locations with no beam between them. `None` means it is its own section.","type":["string","null"]},"stack_limit":{"format":"int16","type":"integer"},"status":{"$ref":"#/components/schemas/LocStatus"},"width":{"format":"double","type":["number","null"]},"x_coord":{"format":"double","type":"number"},"y_coord":{"format":"double","type":"number"},"z_coord":{"format":"double","type":"number"}},"required":["add_when","add_who","aisle","bay","code","footprint","id","loc_category","loc_flag","loc_processing_type","loc_type","max_qty_capacity","mod_when","mod_who","putawayzone","stack_limit","status","x_coord","y_coord","z_coord"],"type":"object"},"LocationCheck":{"description":"One check of a location.","properties":{"check_kind":{"description":"`Count`, or what the answer was against the stock: `ConfirmedEmpty` / `DeniedEmpty` / `EmptyAgainstStock`; or `UnexpectedStock`, an operator's report (Appendix M).","type":"string"},"checked_at":{"type":"string"},"id":{"description":"`C<task id>` for a count, `E<evidence id>` for an answer: one key across both.","type":"string"},"location":{"type":"string"},"operator":{"description":"The operator's login, or `#<id>` for one the warehouse no longer has.","type":["string","null"]},"outcome":{"description":"A count: its task's status (`Closed`, `Variance`, `Recounted` …). An answer the stock contradicted: `CountRequested`.","type":["string","null"]},"source":{"description":"Which operation: the count's number and attempt (`INV-12 / 2`), the one that asked (`PickCommit #701`), or a report with what it named (`Report: LPN L-7 / SKU SKU002`).","type":"string"},"system_qty":{"description":"An answer: what the location held when it came (`SUM(qty)`).","format":"double","type":["number","null"]}},"required":["check_kind","checked_at","id","location","source"],"type":"object"},"LocationCodeGenRange":{"properties":{"end":{"format":"uint","minimum":0,"type":"integer"},"start":{"format":"uint","minimum":0,"type":"integer"}},"required":["end","start"],"type":"object"},"LocationEvidenceKind":{"oneOf":[{"description":"\"Empty\", and the stock holds nothing there.","enum":["ConfirmedEmpty"],"type":"string"},{"description":"\"Not empty\", while the stock holds nothing there.","enum":["DeniedEmpty"],"type":"string"},{"description":"\"Empty\", while the stock holds something there.","enum":["EmptyAgainstStock"],"type":"string"},{"description":"The operator reports stock the system does not show there (Appendix M).","enum":["UnexpectedStock"],"type":"string"}]},"LocationGeneratorAttributes":{"properties":{"aisle_pfx":{"type":["string","null"]},"aisle_sfx":{"type":["string","null"]},"aisles":{"$ref":"#/components/schemas/LocationCodeGenRange"},"level_pfx":{"type":["string","null"]},"level_sfx":{"type":["string","null"]},"levels":{"$ref":"#/components/schemas/LocationCodeGenRange"},"loc_pfx":{"type":["string","null"]},"loc_sfx":{"type":["string","null"]},"locs":{"$ref":"#/components/schemas/LocationCodeGenRange"}},"required":["aisles","levels","locs"],"type":"object"},"LocCategory":{"description":"LocCategory - dependent type, code_list_value\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`): `CandidateFilter::loc_category` (phase 2a) holds a `PropRule<LocCategory>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.","enum":["None","NoPalletization","Asrs","CantileverRack","CartonFlow","DenseStorage","DoubleDeepRack","DriveInRack","DriveThroughRack","HorizontalCarousel","Other","PalletFlowRack","PalletCarousel","PushBackRack","SelectiveShelving","ShelvingStorage","WorkCenter"],"type":"string"},"LocFlag":{"description":"LocFlag — operational temporary state (NOT location status). Migration 144 repurposed: dropped dead {Hold, Damage} (duplicated status, never used); replaced with operational state for PI hold use cases.","enum":["None","CycleCountActive","SanitationActive","MaintenanceActive","ReceivingHoldoff"],"type":"string"},"LocForCreate":{"properties":{"abc":{"anyOf":[{"$ref":"#/components/schemas/AbcRotationSpeed"},{"type":"null"}]},"aisle":{"type":["string","null"]},"bay":{"format":"int32","type":["integer","null"]},"check_digit":{"type":["string","null"]},"code":{"type":"string"},"cube":{"format":"double","type":["number","null"]},"discard_lpn":{"type":["boolean","null"]},"footprint":{"format":"int16","type":["integer","null"]},"height":{"format":"double","type":["number","null"]},"length":{"format":"double","type":["number","null"]},"level":{"format":"int32","type":["integer","null"]},"loc_category":{"anyOf":[{"$ref":"#/components/schemas/LocCategory"},{"type":"null"}]},"loc_flag":{"anyOf":[{"$ref":"#/components/schemas/LocFlag"},{"type":"null"}]},"loc_processing_type":{"anyOf":[{"$ref":"#/components/schemas/LocProcessingType"},{"type":"null"}]},"loc_type":{"anyOf":[{"$ref":"#/components/schemas/LocType"},{"type":"null"}]},"max_cube_capacity":{"format":"double","type":["number","null"]},"max_qty_capacity":{"format":"double","type":["number","null"]},"max_weight_capacity":{"format":"double","type":["number","null"]},"mix_lot":{"type":["boolean","null"]},"mix_sku":{"type":["boolean","null"]},"putawayzone":{"type":["string","null"]},"route_sequence":{"type":["string","null"]},"section":{"type":["string","null"]},"stack_limit":{"format":"int16","type":["integer","null"]},"status":{"anyOf":[{"$ref":"#/components/schemas/LocStatus"},{"type":"null"}]},"width":{"format":"double","type":["number","null"]},"x_coord":{"format":"double","type":["number","null"]},"y_coord":{"format":"double","type":["number","null"]},"z_coord":{"format":"double","type":["number","null"]}},"required":["code"],"type":"object"},"LocLotCommingle":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"allow_mix":{"type":"boolean"},"attrib_code":{"type":"string"},"id":{"format":"int64","type":"integer"},"location_code":{"type":"string"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"}},"required":["add_when","add_who","allow_mix","attrib_code","id","location_code","mod_when","mod_who"],"type":"object"},"LocProcessingType":{"description":"LocProcessingType represents the multiselect values for the location handling field\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`): `CandidateFilter::loc_processing_type` (phase 2a) holds a `PropRule<LocProcessingType>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.","enum":["None","Pallet","Case","Piece"],"type":"string"},"LocStatus":{"description":"LocStatus - dependent type, code_list_value\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`): `CandidateFilter::loc_status` (phase 2a) holds a `PropRule<LocStatus>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.","enum":["Ok","Hold","Damage"],"type":"string"},"LocType":{"description":"LocType — dependent type, mirrors PostgreSQL `loc_type` enum. Migration 143 added 7 hold-stage zone purposes (QC/Damage/Rtv/Destroy/ Returns/Stage/Lost) used by Move primitive §3.2.1 destination authorization.","oneOf":[{"enum":["None","Other","Case","Pick","Pnd","Door","Pickto","Sort","SpeedPick","QC","Damage","Rtv","Destroy","Returns","Stage","Lost"],"type":"string"},{"description":"The location of open discrete pick pallets (the pick-pallet wms-app migrations): goods on an operator's forks between the pick and the pallet's close. One per warehouse schema, seeded as `INTRANSIT`; outside every other door — allocation, putaway, move, adjustment, receiving, the location advisory.","enum":["InTransit"],"type":"string"},{"description":"A pack station (post-pick spec §6, D-47, D-49; wms-app 066/067): the location where picked units wait for Verify / Repack. Goods arrive only by the Outbound Flow Router's decision, so no putaway, manual move or allocation targets it; picked stock is delivered into it.","enum":["Pack"],"type":"string"},{"description":"A consolidation station (consolidation H1; wms-app 20261021191020/1): the location where packed boxes are put onto outbound pallets. Goods arrive only by the router's decision; never allocated from.","enum":["Consolidation"],"type":"string"}]},"LotAttrCheckMode":{"description":"Per-line lot-attributes validation mode. Replaces the legacy pair of `match_lot_attributes: Option<bool>` (D-27) and `match_lot_attributes_strict: bool` (D-65 / ADR-050) with a single 3-state enum so the four-flag-combinations (one of which was a nonsensical `null + strict`) are no longer representable.\n\n- `Disabled` — no validation; any scanned lot_attrs accepted as-is. Cascade tier 1 also stays lenient: an empty expected set on a candidate accumulates the operator's scan into that line. - `Advisory` — validation runs against expected lot_attrs; per-attribute supervisor overrides through `lot_policy_attribute.override_allowed` (D-27 / RPV code 36) are honoured. - `Strict` — ASN-pre-bound lot (pharma, EDI 856 contracts). `set_equal(expected, scanned)` is required. No overrides (RPV code 34, non-overridable).","enum":["Disabled","Advisory","Strict"],"type":"string"},"LotAttributePrompt":{"description":"One operator-facing lot-attribute slot on a receive line screen, with the ASN-expected pre-fill and strict-lock resolved (ADR-050). Wire DTO — not a `lot_policy_attribute` row.","properties":{"attrib_code":{"type":"string"},"descr":{"type":["string","null"]},"is_date":{"description":"`true` → this slot is a DATE, not free text: one of the four date columns `lot_policy` carries (`DATE_ATTRIBUTE_CODES`), folded in as a synthetic slot so RF and the web prompt for it alongside the custom attributes.\n\nThe server has always known this and never said it, so every renderer drew a text box and the operator typed a date into it by hand — `parse_date` then accepted or silently dropped whatever arrived. The flag does not change what is sent (still a string in `lot_attributes`); it lets a screen offer the right control for it.","type":"boolean"},"label":{"type":["string","null"]},"readonly":{"description":"`true` → operator may not edit. The line is strict-match (D-65) AND there is an expected value to enforce. Blank slots stay editable even on a strict line (nothing to lock).","type":"boolean"},"required":{"type":"boolean"},"value":{"description":"ASN-expected value for this attribute on the scanned line, when the line carries one. `None` → blank input.","type":["string","null"]}},"required":["attrib_code","is_date","readonly","required"],"type":"object"},"LotCreationPolicy":{"oneOf":[{"description":"Как было до миграции 351: искать партию по атрибутам, и завести новую только если ничего не подошло. Два физически разных прихода с одинаковыми атрибутами попадают в ОДНУ партию.","enum":["Existing"],"type":"string"},{"description":"Одна партия на приёмку: все приёмы одного документа кладутся в неё.","enum":["PerReceipt"],"type":"string"},{"description":"Своя партия на КАЖДЫЙ физический приход. Остатки разных приходов не сольются: партия входит в ключ слияния наравне с владельцем, товаром, упаковкой, единицей, ячейкой и контейнером.","enum":["PerReceiveEvent"],"type":"string"}]},"LotDateSource":{"description":"Where a lot's date came from: typed in by a person, or worked out from the manufactured date and the SKU's day counts. Stored as `lot_date_source`; a lot without the date has no source.","enum":["Explicit","Derived"],"type":"string"},"LotFound":{"description":"One lot of the SKU: its number and everything that identifies it on the goods. No quantity — the count that searches for it is blind.","properties":{"attributes":{"additionalProperties":{"type":"string"},"type":"object"},"best_by_date":{"type":["string","null"]},"delivery_by_date":{"type":["string","null"]},"expiration_date":{"type":["string","null"]},"label":{"description":"One line for a picker: the number, the receipt and its day, then each attribute the lot has.","type":"string"},"lot":{"type":"string"},"manufactured_date":{"type":["string","null"]},"other_receipts":{"description":"How many other receipts brought it.","format":"int64","type":"integer"},"owner_id":{"format":"int64","type":"integer"},"receipt":{"description":"The receipt the lot came in on — the one searched by, else its latest: what tells apart lots of the same attributes under a «lot per receipt» / «lot per receive event» policy (and the only thing that does for a SKU without any).","type":["string","null"]},"received_on":{"description":"The day `receipt` brought it.","type":["string","null"]},"sku_code":{"type":"string"}},"required":["attributes","label","lot","other_receipts","owner_id","sku_code"],"type":"object"},"LotPhysicalVerification":{"oneOf":[{"description":"The operator cannot check this value on the floor; the card may show it, nothing is asked.","enum":["NotVerifiable"],"type":"string"},{"description":"The operator compares the value printed on the goods with the card.","enum":["Visual"],"type":"string"},{"description":"The value is read from a barcode on the goods.","enum":["Barcode"],"type":"string"},{"description":"Either of the two.","enum":["VisualOrBarcode"],"type":"string"}]},"LotPolicy":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"descr":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"label_best_by_date":{"type":["string","null"]},"label_delivery_by_date":{"type":["string","null"]},"label_expiration_date":{"type":["string","null"]},"label_manufactured_date":{"type":["string","null"]},"lot_creation":{"allOf":[{"$ref":"#/components/schemas/LotCreationPolicy"}],"description":"КОГДА рождается новая партия (миграция 351).\n\nЭто единственное место, где такое решение записано. До 351 его не принимал никто: партия бралась по совпадению атрибутов, и совпадение молча означало «это тот же товар из того же прихода»."},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"required_best_by_date":{"type":"boolean"},"required_delivery_by_date":{"type":"boolean"},"required_expiration_date":{"type":"boolean"},"required_manufactured_date":{"type":"boolean"},"show_best_by_date":{"type":"boolean"},"show_delivery_by_date":{"type":"boolean"},"show_expiration_date":{"type":"boolean"},"show_manufactured_date":{"type":"boolean"},"show_on_pick_best_by_date":{"type":"boolean"},"show_on_pick_delivery_by_date":{"type":"boolean"},"show_on_pick_expiration_date":{"type":"boolean"},"show_on_pick_manufactured_date":{"description":"Shown on the pick card (spec 2026-10-04 §8). Only a date captured on receipt can be shown: `chk_lot_policy_pick_dates_need_receipt`.","type":"boolean"},"verification_best_by_date":{"$ref":"#/components/schemas/LotPhysicalVerification"},"verification_delivery_by_date":{"$ref":"#/components/schemas/LotPhysicalVerification"},"verification_expiration_date":{"$ref":"#/components/schemas/LotPhysicalVerification"},"verification_manufactured_date":{"allOf":[{"$ref":"#/components/schemas/LotPhysicalVerification"}],"description":"How the operator can check the date on the goods. Anything but `NotVerifiable` needs the date shown on pick: `chk_lot_policy_verified_dates_are_shown`."},"version":{"format":"int32","type":"integer"}},"required":["add_when","add_who","code","id","lot_creation","mod_when","mod_who","required_best_by_date","required_delivery_by_date","required_expiration_date","required_manufactured_date","show_best_by_date","show_delivery_by_date","show_expiration_date","show_manufactured_date","show_on_pick_best_by_date","show_on_pick_delivery_by_date","show_on_pick_expiration_date","show_on_pick_manufactured_date","verification_best_by_date","verification_delivery_by_date","verification_expiration_date","verification_manufactured_date","version"],"type":"object"},"LotPolicyAggregateDraft":{"additionalProperties":false,"properties":{"attributes":{"items":{"$ref":"#/components/schemas/LotPolicyAttributeDraft"},"type":"array"},"policy":{"$ref":"#/components/schemas/LotPolicyRootDraft"}},"required":["attributes","policy"],"type":"object"},"LotPolicyAttribute":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"attrib_code":{"type":"string"},"descr":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"label":{"type":["string","null"]},"lot_policy_id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"override_allowed":{"description":"Phase 1 (migration 083). Per Decisions Log D-27.","type":"boolean"},"physical_verification":{"allOf":[{"$ref":"#/components/schemas/LotPhysicalVerification"}],"description":"How the operator can check the value on the goods. Anything but `NotVerifiable` needs `show_on_pick`: `chk_lot_policy_attribute_verified_is_shown`."},"required":{"type":"boolean"},"show":{"type":"boolean"},"show_on_pick":{"description":"Shown on the pick card (spec 2026-10-04 §8). Needs `show`: `chk_lot_policy_attribute_pick_needs_receipt`.","type":"boolean"}},"required":["add_when","add_who","attrib_code","id","lot_policy_id","mod_when","mod_who","override_allowed","physical_verification","required","show","show_on_pick"],"type":"object"},"LotPolicyAttributeDraft":{"additionalProperties":false,"properties":{"attrib_code":{"type":"string"},"descr":{"type":["string","null"]},"id":{"default":null,"description":"Existing row identity. `None` means add a new custom attribute.","format":"int64","type":["integer","null"]},"label":{"type":["string","null"]},"override_allowed":{"type":"boolean"},"physical_verification":{"allOf":[{"$ref":"#/components/schemas/LotPhysicalVerification"}],"default":"NotVerifiable"},"required":{"type":"boolean"},"show":{"type":"boolean"},"show_on_pick":{"default":false,"description":"Optional on the wire, like the root's pick fields.","type":"boolean"}},"required":["attrib_code","override_allowed","required","show"],"type":"object"},"LotPolicyRootDraft":{"additionalProperties":false,"properties":{"descr":{"type":["string","null"]},"label_best_by_date":{"type":["string","null"]},"label_delivery_by_date":{"type":["string","null"]},"label_expiration_date":{"type":["string","null"]},"label_manufactured_date":{"type":["string","null"]},"lot_creation":{"$ref":"#/components/schemas/LotCreationPolicy"},"required_best_by_date":{"type":"boolean"},"required_delivery_by_date":{"type":"boolean"},"required_expiration_date":{"type":"boolean"},"required_manufactured_date":{"type":"boolean"},"show_best_by_date":{"type":"boolean"},"show_delivery_by_date":{"type":"boolean"},"show_expiration_date":{"type":"boolean"},"show_manufactured_date":{"type":"boolean"},"show_on_pick_best_by_date":{"default":false,"type":"boolean"},"show_on_pick_delivery_by_date":{"default":false,"type":"boolean"},"show_on_pick_expiration_date":{"default":false,"type":"boolean"},"show_on_pick_manufactured_date":{"default":false,"type":"boolean"},"verification_best_by_date":{"allOf":[{"$ref":"#/components/schemas/LotPhysicalVerification"}],"default":"NotVerifiable"},"verification_delivery_by_date":{"allOf":[{"$ref":"#/components/schemas/LotPhysicalVerification"}],"default":"NotVerifiable"},"verification_expiration_date":{"allOf":[{"$ref":"#/components/schemas/LotPhysicalVerification"}],"default":"NotVerifiable"},"verification_manufactured_date":{"allOf":[{"$ref":"#/components/schemas/LotPhysicalVerification"}],"default":"NotVerifiable"}},"required":["lot_creation","required_best_by_date","required_delivery_by_date","required_expiration_date","required_manufactured_date","show_best_by_date","show_delivery_by_date","show_expiration_date","show_manufactured_date"],"type":"object"},"LotPrompt":{"description":"One attribute to prompt for. The RF dynamic widget draws a field per prompt (`attrib_code` ending in `_date` → a date field) and sends the values as one map.","properties":{"attrib_code":{"type":"string"},"descr":{"type":["string","null"]},"label":{"type":["string","null"]},"required":{"type":"boolean"},"show":{"type":"boolean"}},"required":["attrib_code","required","show"],"type":"object"},"LotProof":{"description":"What proves WHICH LOT is at the source.","oneOf":[{"description":"The policy asks nothing about the lot.","enum":["NotRequired"],"type":"string"},{"description":"The operator scans the lot label.","enum":["InternalLot"],"type":"string"},{"description":"The reserved LPN holds one lot.","enum":["SingleLotLpn"],"type":"string"},{"description":"The location holds one lot.","enum":["SingleLotLocation"],"type":"string"},{"additionalProperties":false,"description":"The operator confirms the lot's checkable attributes, and only the reserved lot has them.","properties":{"Attributes":{"properties":{"codes":{"items":{"type":"string"},"type":"array"}},"required":["codes"],"type":"object"}},"required":["Attributes"],"type":"object"}]},"LotTransfer":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"comment":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"posted_at":{"default":null,"type":["string","null"]},"posted_by":{"format":"int64","type":["integer","null"]},"status":{"$ref":"#/components/schemas/LotTransferStatus"},"transfer_number":{"type":"string"},"version":{"format":"int32","type":"integer"}},"required":["add_when","add_who","id","mod_when","mod_who","status","transfer_number","version"],"type":"object"},"LotTransferAttributeRow":{"description":"An attribute of a line as the grid shows it: the stored row flat, and the grid's primary key — `detail_id:attribute_code`, one cell per line and code. The row carries the line's version (`line_version`), which an edit of the cell is made against, and the line's status (`line_status`): the grid edits a row only while it is `Pending` (spec §8, `editable_when`) — a line is `Pending` exactly while its document is a Draft, Post moves every line to `Posted`.","properties":{"attribute_code":{"type":"string"},"detail_id":{"format":"int64","type":"integer"},"from_value":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"label":{"type":["string","null"]},"line_status":{"$ref":"#/components/schemas/LotTransferLineStatus"},"line_version":{"format":"int32","type":"integer"},"lot_policy_attribute_id":{"description":"`None` for the four dates (they are lot_policy columns, not rows).","format":"int64","type":["integer","null"]},"pk":{"type":"string"},"required":{"type":"boolean"},"sort_order":{"format":"int32","type":"integer"},"to_value":{"type":["string","null"]}},"required":["attribute_code","detail_id","id","line_status","line_version","pk","required","sort_order"],"type":"object"},"LotTransferDetail":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"container_id":{"format":"int64","type":["integer","null"]},"from_lot":{"type":"string"},"id":{"format":"int64","type":"integer"},"line_no":{"format":"int32","type":"integer"},"location":{"type":"string"},"lot_policy_id":{"description":"The SKU's lot policy when the line was added; POST refuses the line when the policy is another one now.","format":"int64","type":"integer"},"lot_transfer_id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"owner_id":{"format":"int64","type":"integer"},"pack_id":{"format":"int64","type":"integer"},"qty":{"format":"double","type":"number"},"sku_code":{"type":"string"},"status":{"$ref":"#/components/schemas/LotTransferLineStatus"},"to_lot":{"type":["string","null"]},"to_lot_created":{"type":["boolean","null"]},"transaction_log_code":{"type":["string","null"]},"uom":{"type":"string"},"version":{"format":"int32","type":"integer"}},"required":["add_when","add_who","from_lot","id","line_no","location","lot_policy_id","lot_transfer_id","mod_when","mod_who","owner_id","pack_id","qty","sku_code","status","uom","version"],"type":"object"},"LotTransferLineRow":{"description":"A line as its grid shows it: the line flat, and the names the operator knows the stock by — the owner's code, the container's code (LPN) and the SKU's description.","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"container_id":{"format":"int64","type":["integer","null"]},"from_lot":{"type":"string"},"id":{"format":"int64","type":"integer"},"line_no":{"format":"int32","type":"integer"},"location":{"type":"string"},"lot_policy_id":{"description":"The SKU's lot policy when the line was added; POST refuses the line when the policy is another one now.","format":"int64","type":"integer"},"lot_transfer_id":{"format":"int64","type":"integer"},"lpn":{"type":["string","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"owner_code":{"type":["string","null"]},"owner_id":{"format":"int64","type":"integer"},"pack_id":{"format":"int64","type":"integer"},"qty":{"format":"double","type":"number"},"sku_code":{"type":"string"},"sku_descr":{"type":["string","null"]},"status":{"$ref":"#/components/schemas/LotTransferLineStatus"},"to_lot":{"type":["string","null"]},"to_lot_created":{"type":["boolean","null"]},"transaction_log_code":{"type":["string","null"]},"uom":{"type":"string"},"version":{"format":"int32","type":"integer"}},"required":["add_when","add_who","from_lot","id","line_no","location","lot_policy_id","lot_transfer_id","mod_when","mod_who","owner_id","pack_id","qty","sku_code","status","uom","version"],"type":"object"},"LotTransferLineStatus":{"enum":["Pending","Posted"],"type":"string"},"LotTransferListRow":{"description":"A document as its list shows it: the header flat, and who posted it by name (spec §8 «Провёл») — `posted_by` is a user id, which says nothing to the reader.","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"comment":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"posted_at":{"default":null,"type":["string","null"]},"posted_by":{"format":"int64","type":["integer","null"]},"posted_by_name":{"description":"The poster's full name, else their login; `None` for a Draft.","type":["string","null"]},"status":{"$ref":"#/components/schemas/LotTransferStatus"},"transfer_number":{"type":"string"},"version":{"format":"int32","type":"integer"}},"required":["add_when","add_who","id","mod_when","mod_who","status","transfer_number","version"],"type":"object"},"LotTransferStatus":{"enum":["Draft","Posted"],"type":"string"},"LpnQtyRule":{"enum":["Any","EqPackPallet","NePackPallet"],"type":"string"},"ManualLotAttribute":{"description":"One lot attribute value the operator typed.","properties":{"code":{"description":"The Lot Policy code (any case).","type":"string"},"value":{"type":"string"}},"required":["code","value"],"type":"object"},"ManualPickSourceInput":{"properties":{"internal_lot":{"default":null,"type":["string","null"]},"internal_lot_typed":{"default":false,"type":"boolean"},"item_scan":{"default":null,"type":["string","null"]},"location_scan":{"default":null,"type":["string","null"]},"lot_attribute_scan":{"default":null,"type":["string","null"]},"lot_attribute_scans":{"default":[],"description":"Separate human scans, in addition to the legacy single-scan field.","items":{"type":"string"},"type":"array"},"lot_attributes":{"default":[],"items":{"$ref":"#/components/schemas/ManualLotAttribute"},"type":"array"},"source_lpn_scan":{"default":null,"type":["string","null"]}},"type":"object"},"MatrixCell":{"properties":{"d":{"type":"boolean"},"r":{"type":"boolean"},"resource_code":{"type":"string"},"resource_type":{"type":"string"},"role_id":{"format":"int64","type":"integer"},"w":{"type":"boolean"},"x":{"type":"boolean"}},"required":["d","r","resource_code","resource_type","role_id","w","x"],"type":"object"},"MatrixResource":{"properties":{"label":{"type":["string","null"]},"module":{"type":["string","null"]},"resource_code":{"type":"string"},"resource_type":{"type":"string"}},"required":["resource_code","resource_type"],"type":"object"},"MatrixRole":{"properties":{"role_code":{"type":"string"},"role_id":{"format":"int64","type":"integer"},"role_label":{"type":"string"}},"required":["role_code","role_id","role_label"],"type":"object"},"MoveContext":{"additionalProperties":false,"description":"Input contract for `MoveCommand`. Caller fills exactly one source pattern (container_id / lpn / loc), exactly one destination pattern, and optional qty (None = full move; Some = partial — only valid when `source_type.allows_partial_qty()`).\n\nPer ADR-055 §D-9: MoveCommand is a dumb primitive — it does NOT resolve destinations from `owner_config.default_*_loc` or any allocation policy. Caller is responsible for providing the final `dest_loc` / `dest_lpn` / `dest_container_id` ready-to-use. `deny_unknown_fields` is load-bearing, not tidiness (F6).\n\nThis struct just LOST `acknowledged_overrides` and `authorized_by`. Serde's default is to ignore fields it does not know, so a client still sending them would have its acknowledgement silently dropped: the supervisor types a password, the ack goes nowhere, the move refuses again, and nothing anywhere says why. That is the precise failure mode this whole feature exists to remove — an authorization that looks accepted and is not.\n\nWith this, a client that has not adopted `override_grant_id` fails loudly at the parse, naming the field it should not be sending.","properties":{"dest_container_id":{"format":"int64","type":["integer","null"]},"dest_loc":{"type":["string","null"]},"dest_lpn":{"type":["string","null"]},"dest_lpn_auto":{"default":false,"description":"When `true` and no `dest_lpn`/`dest_container_id` is given, the primitive GENERATES a fresh LPN (`ContainerService::generate_container_code`) and lands the stock in that NEW container at `dest_loc`, instead of landing loose. The caller (Hard-Move \"New → Auto\") sets this; the primitive stays dumb — it just resolves \"a new container, you pick the code\". Ignored when `dest_lpn` is set (that names the container) or the dest location is `discard_lpn` (which forces loose).","type":"boolean"},"idempotency_key":{"default":"00000000-0000-0000-0000-000000000000","description":"The move's idempotency key.\n\nRequired by every layer below the RPC boundary — `transaction_log` rows and the idempotency store both assume it is real. On the WIRE it may be omitted, because a client whose key is derived from the payload hash (rf-go, `submit_state.go:78`) cannot put the key inside the payload without circularity; such clients send it in the ADR-058 `meta` envelope instead, and `move_execute` fills it in before the pipeline runs. A context still holding [`IdempotencyKey::unset`] past the boundary is a bug the boundary is required to have rejected.\n\nThe default is NAMED on purpose: bare `#[serde(default)]` would invent a fresh random key (that is what `Default` for this type does), so an omitted key would silently become a real one and its retry would double-execute rather than dedupe.","format":"uuid","type":"string"},"lot":{"type":["string","null"]},"override_grant_id":{"default":null,"description":"The server-minted grant authorizing this move's overrides (`supervisor_override_grant`, F6). The acknowledged pairs AND the authorizer are read from that row — neither is a field the client can assert, which is the whole of F6: before it, an operator could post `acknowledged_overrides` + any `authorized_by` and move stock off a held pallet, and `transaction_log` recorded the forged authorizer.\n\n`None` for the overwhelming majority of moves, which need no override at all — that case must stay the cheap one, with no extra round trip.","format":"uuid","type":["string","null"]},"owner_id":{"format":"int64","type":["integer","null"]},"pending_move_in_id":{"default":null,"description":"The reservation (`inventory_pending_move_in.id`) the putaway engine took when it chose this location. Set ONLY when the SYSTEM directed the move — it switches the primitive into directed mode, where a landing conflict on the directed location resolves as an acknowledgeable deviation or a redirect instead of a bare refusal, and where a successful move retires the reservation.\n\nIt is a HANDLE, never a promise: `putaway_suggest_location` is idempotent for days while a reservation lives for minutes, so a replayed response can carry an id whose reservation has already expired. The executor re-reads the row (`movement::directed::open`) and refuses a stale one rather than trusting the caller.","format":"int64","type":["integer","null"]},"qty":{"description":"`None` = full move; `Some(n)` = partial. Only valid when `source_type.allows_partial_qty()` returns `true`.","format":"double","type":["number","null"]},"reason_code":{"description":"Free-form audit hint, ≤80 chars (mirrors `transaction_log.reason_code` VARCHAR(80) constraint per migration 144).","type":["string","null"]},"recursive":{"description":"Subtree move (existing `MoveContainer.recursive` flag): when `true`, child containers move with the root.","type":"boolean"},"serial_numbers":{"default":null,"description":"Operator-scanned unit serials for a serial-tracked PARTIAL move — the specific units to move, from the RF terminal. `None`/empty for a full move (all serials follow the qty) or for non-serial stock. The primitive never chooses which serials move, so a partial move of serial-tracked stock must name them.","items":{"type":"string"},"type":["array","null"]},"sku_code":{"type":["string","null"]},"source_container_id":{"format":"int64","type":["integer","null"]},"source_loc":{"type":["string","null"]},"source_lpn":{"type":["string","null"]},"source_type":{"$ref":"#/components/schemas/MoveSourceType"}},"required":["recursive","source_type"],"type":"object"},"MoveSourceType":{"oneOf":[{"enum":["putaway","putaway_correction","post_pick","load_shipment","pick_reversal","replenishment","let_down","manual","repack","consolidation","decant","move_to_qc","release_from_qc","move_to_damage","move_to_rtv","move_to_bgrade","move_to_return","move_to_destroy","regulated_destroy","zone_move"],"type":"string"},{"description":"Audit discriminator ONLY — `transaction_log.source_type = \"pick\"` and the validation-matrix row for an outbound-style move of FREE stock.\n\nIt is **not** the Pick operation and **never** proof of a right to consume reserved stock: a Generic Move with this source type still runs in `AvailableMove` accounting, refuses `qty_allocated` / `qty_picked` like every other move, and never touches a `pick_detail`, its reservation or its task. Executing a Pick is `picking::execute_reserved_pick` (the stock-move kernel's `ReservedPick` accounting, entered only after the pick is proved under lock) — never `MovementService::execute` with this variant, and never \"release the reservation, then Move\".\n\nThe wire value `\"pick\"` is kept as is; changing it needs its own compatibility decision (stock-move-kernel debt, slice 5).","enum":["pick"],"type":"string"}]},"MoveWarning":{"oneOf":[{"description":"Code 80 acknowledged: source LPN had active hold, override applied.","properties":{"hold_code":{"$ref":"#/components/schemas/InventoryStatusHold"},"hold_id":{"format":"int64","type":"integer"},"kind":{"enum":["hold_on_source_lpn_acknowledged"],"type":"string"}},"required":["hold_code","hold_id","kind"],"type":"object"},{"description":"Code 81 acknowledged: source location had `loc_flag != None`, override applied.","properties":{"flag":{"type":"string"},"kind":{"enum":["src_loc_on_hold_acknowledged"],"type":"string"},"loc_code":{"type":"string"}},"required":["flag","kind","loc_code"],"type":"object"},{"description":"Code 82 acknowledged: destination location had `loc_flag != None`, override applied.","properties":{"flag":{"type":"string"},"kind":{"enum":["dst_loc_on_hold_acknowledged"],"type":"string"},"loc_code":{"type":"string"}},"required":["flag","kind","loc_code"],"type":"object"},{"description":"Code 85 acknowledged: the SYSTEM directed this location, a soft rule refused it, and the operator confirmed the placement anyway.\n\n`subject` is the rule that was overruled (`capacity`, `sku_mixing`, …) — the OTHER half of the `(code, subject)` ack pair the operator actually authorized, so the audit record names the same thing the prompt did. `detail` is the refusal in full (which SKU, which limit), which neither the code nor the subject can carry.","properties":{"code":{"format":"int16","type":"integer"},"detail":{"type":"string"},"kind":{"enum":["directed_deviation_acknowledged"],"type":"string"},"loc_code":{"type":"string"},"subject":{"type":"string"}},"required":["code","detail","kind","loc_code","subject"],"type":"object"},{"description":"The directed move landed, but its reservation was no longer `Active` by the time the executor retired it — the TTL sweeper or a re-suggest got there first. Not a failure (the stock did arrive), but it means the location was released and possibly re-promised while the operator was walking, so it is surfaced rather than swallowed.","properties":{"kind":{"enum":["directed_reservation_already_retired"],"type":"string"},"pending_move_in_id":{"format":"int64","type":"integer"}},"required":["kind","pending_move_in_id"],"type":"object"}]},"NewAdjustmentLine":{"description":"A line as a client adds it: an identity and what it should hold (§5).","properties":{"comment":{"type":["string","null"]},"container_id":{"description":"`None` = loose stock.","format":"int64","type":["integer","null"]},"location":{"type":"string"},"lot":{"type":"string"},"owner_id":{"format":"int64","type":"integer"},"pack_id":{"format":"int64","type":"integer"},"reason_code":{"description":"`None` = the document's reason.","type":["string","null"]},"serials_in":{"default":[],"items":{"type":"string"},"type":"array"},"serials_out":{"default":[],"description":"A serial-tracked SKU's serials to write off and to add (Appendix D); then the server works out the target. Empty for any other SKU.","items":{"type":"string"},"type":"array"},"sku_code":{"type":"string"},"target_mode":{"allOf":[{"$ref":"#/components/schemas/InventoryAdjustmentTargetMode"}],"default":"Existing","description":"EXISTING unless the line is stock the system does not have (§6, A.1)."},"target_qty":{"format":"double","type":"number"},"uom":{"type":"string"}},"required":["location","lot","owner_id","pack_id","sku_code","target_qty","uom"],"type":"object"},"NewOrderLine":{"properties":{"external_line_no":{"type":["string","null"]},"pack_id":{"description":"The pack the customer ordered: the line is then reserved only from stock of it. Absent: the line takes the SKU's pack and is reserved from stock of any pack of the SKU. Absent from the wire when empty, so the idempotency hash of a request without it is what it always was.","format":"int64","type":["integer","null"]},"pick_instruction":{"description":"One-off pick instruction for this line (wms-app 044), shown and acknowledged on its picks. Absent from the wire when empty, so the idempotency hash of a request without it is what it always was.","type":["string","null"]},"qty":{"description":"Quantity in BASE units.","format":"double","type":"number"},"sku_code":{"type":"string"},"uom":{"description":"Entry UOM. `uom_factor` is resolved from `pack_item` and snapshotted.","type":"string"}},"required":["qty","sku_code","uom"],"type":"object"},"NewTargetOutcome":{"description":"One new target the rest of the full box became.","properties":{"carton_code":{"type":["string","null"]},"carton_id":{"description":"`PlannedCarton`: the new planned carton.","format":"int64","type":["integer","null"]},"continuation_id":{"description":"`Bypassed`: the continuation.","format":"int64","type":["integer","null"]},"picks":{"description":"How many picks it carries.","format":"int16","type":"integer"},"position_no":{"description":"The free place on this carrier; `None`: it waits for the next assignment.","format":"int16","type":["integer","null"]},"target_kind":{"$ref":"#/components/schemas/PickTargetKind"}},"required":["picks","target_kind"],"type":"object"},"OpenEpisodeBrief":{"description":"Minimal episode shape — only the fields RF needs for the resume branch (id + detail context + progress counters).","properties":{"captured_qty":{"format":"int32","type":"integer"},"episode_id":{"format":"int64","type":"integer"},"expected_qty":{"format":"int32","type":"integer"},"receipt_detail_id":{"format":"int64","type":"integer"},"sku_code":{"type":"string"}},"required":["captured_qty","episode_id","expected_qty","receipt_detail_id","sku_code"],"type":"object"},"OpenEpisodeRow":{"description":"One row per still-open episode attached to any detail of `receipt_id`. Trimmed to the fields RF needs for the resume / blocker prompts.","properties":{"captured_qty":{"format":"int32","type":"integer"},"episode_id":{"format":"int64","type":"integer"},"expected_qty":{"format":"int32","type":"integer"},"location":{"description":"Where the capture's goods are — the scan page sends it back as `to_location`.","type":["string","null"]},"receipt_detail_id":{"format":"int64","type":"integer"},"sku_code":{"type":"string"},"status":{"type":"string"}},"required":["captured_qty","episode_id","expected_qty","receipt_detail_id","sku_code","status"],"type":"object"},"OpenEpisodeState":{"description":"The capture episode as it stands after this receive folded into it.\n\nNamed like the shapes the wire already carries for exactly this purpose — `OpenEpisodeBrief` on `get_asn_by_number` and `OpenEpisodeRow` on `list_open_episodes_for_receipt` — so a client reads one vocabulary wherever it meets an episode. Those two live in app-server, which a domain crate may not depend on, so the names travel rather than the type.\n\n**Why the result must carry it.** `serials_to_collect_qty` is what THIS call owes. A second receive on the same line folds into the same episode (`ensure_open_episode_for_deferred_receive`), so the episode's total is the sum and its `captured_qty` may already be non-zero. A client drawing a progress panel from the receive answer had only the increment to read, and the web dialog opened it on \"0 of <increment>\" — an invented zero and the wrong total, both healing on the first scan because `capture_serial` answers with the episode's own numbers.","properties":{"captured_qty":{"description":"Serials already captured against this episode.","format":"int32","type":"integer"},"episode_id":{"format":"int64","type":"integer"},"expected_qty":{"description":"Serials the episode expects in total — the sum across every receive that folded into it, not this call's share.","format":"int32","type":"integer"}},"required":["captured_qty","episode_id","expected_qty"],"type":"object"},"OpenLpn":{"description":"One plate as the receive dialog's picker draws it.\n\nThree fields, and only three on purpose. The picker used to receive the parts — location, SKUs, quantity — and join them itself, which meant the dialog held the separator, and a separator is text a person reads. The line is composed in SQL now (`lpn::search_open`), beside the one the location source composes, so the two lists in this dialog read alike. `lots` travelled the wire and nothing ever read it.","properties":{"code":{"type":"string"},"display":{"description":"The plate in one line; `None` when it has nothing to say about itself.","type":["string","null"]},"residents_refuse_another_lot":{"description":"The plate already holds stock whose SKU is configured to refuse a second lot on one plate. A PREDICTION, not the verdict — see `lpn::search_open`.","type":"boolean"}},"required":["code","residents_refuse_another_lot"],"type":"object"},"OpenOutputCarton":{"description":"An open output carton of the job (§36): where goods may go next.","properties":{"carton_id":{"format":"int64","type":"integer"},"container_code":{"type":"string"},"container_id":{"format":"int64","type":"integer"},"version":{"description":"What `packing_carton_close` sends back as `expected_version`.","format":"int32","type":"integer"}},"required":["carton_id","container_code","container_id","version"],"type":"object"},"OpenPackingException":{"description":"An open blocking exception as the supervisor's screen lists it ([`PackingExceptionBmc::open_blocking`]): what was reported, on which order, carton and station.","properties":{"carton_code":{"type":["string","null"]},"carton_id":{"format":"int64","type":["integer","null"]},"code":{"$ref":"#/components/schemas/PackingExceptionCode"},"id":{"format":"int64","type":"integer"},"note":{"type":["string","null"]},"order_id":{"format":"int64","type":"integer"},"order_number":{"type":["string","null"]},"reported_at":{"type":"string"},"reported_by":{"format":"int64","type":"integer"},"station_location":{"type":"string"},"version":{"format":"int32","type":"integer"}},"required":["code","id","order_id","reported_at","reported_by","station_location","version"],"type":"object"},"OpenPickDropBoardRow":{"description":"One open pick pallet as the supervisor's list shows it.","properties":{"destination_location":{"description":"The frozen destination; `None` while it holds nothing.","type":["string","null"]},"destination_takes_it":{"description":"That destination would take the closed pallet now (a type its policy revision allows, `Ok`, no flag, no hold against outbound); `None` while it has none. `false` is what a retarget is for.","type":["boolean","null"]},"drop_code":{"type":"string"},"drop_id":{"description":"The pallet's CONTAINER id (the commit's `drop_id`).","format":"int64","type":"integer"},"has_goods":{"description":"Stock anywhere in the pallet's tree.","type":"boolean"},"id":{"description":"The pallet's record id — the row's selection identity, what a metadata list ticks and rereads the row by. The same value as `pick_drop_id`.","format":"int64","type":"integer"},"opened_at":{"type":"string"},"operator_id":{"description":"Who holds it: the operator it is open for.","format":"int64","type":"integer"},"operator_name":{"type":["string","null"]},"operator_username":{"type":"string"},"order_code":{"type":"string"},"order_id":{"format":"int64","type":"integer"},"pick_drop_id":{"description":"The pallet's record — the retarget's `pick_drop_id`.","format":"int64","type":"integer"},"routed":{"description":"The router froze a pack station as its destination.","type":"boolean"},"version":{"description":"The record's version — the retarget's `expected_version`.","format":"int32","type":"integer"}},"required":["drop_code","drop_id","has_goods","id","opened_at","operator_id","operator_username","order_code","order_id","pick_drop_id","routed","version"],"type":"object"},"OpenPickDropView":{"description":"The caller's open pick pallet.","properties":{"destination_location":{"description":"Where F2 puts it — frozen by its first deposit; `None` while it holds nothing.","type":["string","null"]},"drop_code":{"type":"string"},"drop_id":{"description":"The pallet's CONTAINER id (the commit's `drop_id`).","format":"int64","type":"integer"},"has_goods":{"description":"Stock anywhere in the pallet's tree.","type":"boolean"},"opened_at":{"type":"string"},"order_code":{"type":"string"},"order_id":{"format":"int64","type":"integer"},"pick_drop_id":{"description":"The pallet's record.","format":"int64","type":"integer"},"version":{"description":"The record's version (every write of it bumps it).","format":"int32","type":"integer"}},"required":["drop_code","drop_id","has_goods","opened_at","order_code","order_id","pick_drop_id","version"],"type":"object"},"Operator":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"equipment_profile_id":{"description":"The machine this operator drives (`equipment_profile`, wms-app 320); `None` = on foot. Set by hand — `sync_from_enterprise` writes only the three columns it projects and never touches this one.","format":"int64","type":["integer","null"]},"full_name":{"type":["string","null"]},"id":{"description":"Equals `enterprise.user.id` — see the module doc comment.","format":"int64","type":"integer"},"is_active":{"type":"boolean"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"synced_at":{"type":"string"},"username":{"type":"string"}},"required":["add_when","add_who","id","is_active","mod_when","mod_who","synced_at","username"],"type":"object"},"OperatorAction":{"description":"What the operator does next.","oneOf":[{"description":"A new box goes on a free place of the carrier: bind it.","enum":["BindNewBox"],"type":"string"},{"description":"Picks are left on this carrier's route.","enum":["ContinueRoute"],"type":"string"},{"description":"Nothing is left to pick: deliver the carrier.","enum":["Deliver"],"type":"string"},{"description":"The rest could not be replanned: hand it over to recovery.","enum":["HandOverToRecovery"],"type":"string"}]},"OperatorOpenEpisodeRow":{"description":"Denormalised row returned by [`SerialCaptureEpisodeBmc::list_open_for_operator_with_receipt_info`]. Pre-joins receipt + owner so the RF recovery screen can render rows like `\"ASN-0000003 / OWNER001 / SKU005 / 2/3 / opened 14:32\"` without an extra round-trip per row.\n\nKept distinct from `SerialCaptureEpisode` because callers want the flat shape (one row = one display line) and shouldn't pay for the full audit row. Add fields only when the UI actually needs them.","properties":{"captured_qty":{"format":"int32","type":"integer"},"episode_id":{"format":"int64","type":"integer"},"expected_qty":{"format":"int32","type":"integer"},"opened_at":{"type":"string"},"owner_code":{"type":"string"},"owner_company":{"type":"string"},"owner_id":{"format":"int64","type":"integer"},"receipt_detail_id":{"format":"int64","type":"integer"},"receipt_id":{"format":"int64","type":"integer"},"receipt_number":{"type":"string"},"sku_code":{"type":"string"},"status":{"type":"string"}},"required":["captured_qty","episode_id","expected_qty","opened_at","owner_code","owner_company","owner_id","receipt_detail_id","receipt_id","receipt_number","sku_code","status"],"type":"object"},"OperatorTaskPermission":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"operator_id":{"format":"int64","type":"integer"},"pick_execution_enabled":{"description":"Rollout gate for the dedicated source-owned Pick RF flow. The row is still the generic permission; this flag only controls new Pick issue.","type":"boolean"},"task_type":{"$ref":"#/components/schemas/TaskType"},"work_area_id":{"format":"int64","type":"integer"}},"required":["add_when","add_who","id","mod_when","mod_who","operator_id","pick_execution_enabled","task_type","work_area_id"],"type":"object"},"OrderLineStatus":{"description":"The line's status ladder (migration 285, spec 2026-08-19 §1.2). A line with no reservations is `NotAllocated` — including after an unallocate — so the status honestly answers \"is there stock under this line?\". Variant order matches the Postgres enum's own order, which IS the ladder.\n\nDerived, like the header's: `wms_outbound::domain::shipment_order:: derive_line_status` recomputes it from the counters inside every mutating transaction. The `Released` rung is measured by picks handed to a task (`pick_detail.status = 'Released'`) — `wms_tasks::service::generate:: generate_tasks_for_picks` (task 7) is that writer. On a LAUNCHED order it dispatches, in the SAME transaction, every live pick of the order that does not carry a task yet — not just the ones the current `release` / `Allocate` pass reserved itself, which would forever skip a pick that a pre-launch `Allocate` (spec §3.1) had already reserved before the gate let dispatch happen. So this rung is reached routinely, not merely a future special case of the picking phase.","enum":["NotAllocated","PartiallyAllocated","Allocated","PartiallyReleased","Released","PartiallyPicked","Picked","PartiallyShipped","Shipped","Closed","Cancelled"],"type":"string"},"OrderSource":{"enum":["Ui","Api"],"type":"string"},"OrderStatus":{"description":"The header's status ladder (migration 285, spec 2026-08-19 §1.1): `New → Allocated → Released → Picked → Closed`, every working rung with a `Partially` form, `Cancelled` reachable until things are picked. Variant order matches the Postgres enum's own order, which IS the ladder.\n\nStatus is a DERIVED column: the truth lives in the lines' counters and the header's markers (`released_at`/`cancelled_at`/`closed_at`); `wms_outbound::domain::shipment_order::derive_order_status` recomputes it inside every mutating transaction.","enum":["New","PartiallyAllocated","Allocated","PartiallyReleased","Released","PartiallyPicked","Picked","PartiallyShipped","Shipped","Closed","Cancelled"],"type":"string"},"OrderType":{"properties":{"active":{"type":"boolean"},"allows_partial_ship":{"description":"Read by Phase 3 shipping. Here because a boolean on a type table has a KNOWN shape and only a missing consumer (ADR-072 §1).","type":"boolean"},"code":{"type":"string"},"id":{"format":"int64","type":"integer"},"name":{"type":"string"},"requires_release":{"type":"boolean"}},"required":["active","allows_partial_ship","code","id","name","requires_release"],"type":"object"},"OutboundFlowUnit":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"assigned_destination":{"type":["string","null"]},"completed_at":{"default":null,"type":["string","null"]},"completed_normal_capabilities":{"items":{"$ref":"#/components/schemas/FlowCapability"},"type":"array"},"created_at":{"type":"string"},"handoff_location":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"next_capability":{"$ref":"#/components/schemas/FlowCapability"},"order_id":{"description":"The unit's one order — `None` only for a consolidated pallet carrying several (H2): its orders are [`OutboundFlowUnitBmc::orders_of`].","format":"int64","type":["integer","null"]},"status":{"$ref":"#/components/schemas/FlowUnitStatus"},"subject_container_id":{"format":"int64","type":"integer"},"subject_kind":{"allOf":[{"$ref":"#/components/schemas/FlowSubjectKind"}],"description":"What the subject is; it decides packing's action (spec §8.4)."},"version":{"format":"int32","type":"integer"}},"required":["add_when","add_who","completed_normal_capabilities","created_at","id","mod_when","mod_who","next_capability","status","subject_container_id","subject_kind","version"],"type":"object"},"OutboundLoad":{"properties":{"active_stop_id":{"format":"int64","type":["integer","null"]},"code":{"type":"string"},"completed_at":{"default":null,"type":["string","null"]},"dispatch_id":{"format":"int64","type":"integer"},"door_location_code":{"type":["string","null"]},"frozen_plan_version":{"format":"int32","type":"integer"},"id":{"format":"int64","type":"integer"},"last_actual_sequence":{"format":"int32","type":"integer"},"load_plan_id":{"format":"int64","type":"integer"},"opened_at":{"type":"string"},"opened_by":{"format":"int64","type":"integer"},"require_staged":{"type":"boolean"},"sequence_policy":{"$ref":"#/components/schemas/LoadingSequencePolicy"},"shipped_at":{"default":null,"type":["string","null"]},"started_at":{"default":null,"type":["string","null"]},"status":{"$ref":"#/components/schemas/LoadStatus"},"transport_confirmed":{"type":"boolean"},"transport_external_ref":{"type":"string"},"transport_unit_id":{"format":"int64","type":"integer"},"version":{"format":"int32","type":"integer"}},"required":["code","dispatch_id","frozen_plan_version","id","last_actual_sequence","load_plan_id","opened_at","opened_by","require_staged","sequence_policy","status","transport_confirmed","transport_external_ref","transport_unit_id","version"],"type":"object"},"OutboundUnitAssignment":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"dispatch_id":{"format":"int64","type":"integer"},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"outbound_flow_unit_id":{"format":"int64","type":"integer"},"preferred_stage_location_id":{"description":"A planning hint, not the unit's physical location.","format":"int64","type":["integer","null"]},"source_order_intent_id":{"format":"int64","type":"integer"},"status":{"$ref":"#/components/schemas/UnitAssignmentStatus"},"stop_id":{"format":"int64","type":"integer"},"version":{"format":"int32","type":"integer"}},"required":["add_when","add_who","dispatch_id","id","mod_when","mod_who","outbound_flow_unit_id","source_order_intent_id","status","stop_id","version"],"type":"object"},"OutboundUnitAssignmentChange":{"properties":{"after_assignment":true,"assignment_version":{"format":"int32","type":"integer"},"before_assignment":true,"changed_at":{"type":"string"},"changed_by":{"format":"int64","type":"integer"},"id":{"format":"int64","type":"integer"},"outbound_flow_unit_id":{"format":"int64","type":"integer"},"reason":{"type":"string"}},"required":["after_assignment","assignment_version","changed_at","changed_by","id","outbound_flow_unit_id","reason"],"type":"object"},"OutboundUnitAssignmentView":{"properties":{"assignment":{"$ref":"#/components/schemas/OutboundUnitAssignment"},"flow_status":{"$ref":"#/components/schemas/FlowUnitStatus"},"is_current_root":{"type":"boolean"},"subject_container_id":{"format":"int64","type":"integer"}},"required":["assignment","flow_status","is_current_root","subject_container_id"],"type":"object"},"Owner":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"company":{"type":"string"},"credit_limit":{"format":"double","type":["number","null"]},"currency_code":{"type":["string","null"]},"description":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"locale":{"type":["string","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"owner_type":{"$ref":"#/components/schemas/OwnerType"},"parent_id":{"format":"int64","type":["integer","null"]},"picking_toloc":{"description":"Delivery location of this owner's orders for a pick carrier (ADR-091).","type":["string","null"]},"status":{"type":["string","null"]},"timezone":{"type":["string","null"]},"vat":{"type":["string","null"]}},"required":["add_when","add_who","code","company","id","mod_when","mod_who","owner_type"],"type":"object"},"OwnerAddress":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"address1":{"type":["string","null"]},"address2":{"type":["string","null"]},"address3":{"type":["string","null"]},"address4":{"type":["string","null"]},"address_type":{"type":"string"},"city":{"type":["string","null"]},"company":{"type":["string","null"]},"contact1":{"type":["string","null"]},"contact2":{"type":["string","null"]},"country":{"type":["string","null"]},"email":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"is_default":{"type":"boolean"},"iso_country_code":{"type":["string","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"owner_id":{"format":"int64","type":"integer"},"phone1":{"type":["string","null"]},"phone2":{"type":["string","null"]},"state":{"type":["string","null"]},"zip":{"type":["string","null"]}},"required":["add_when","add_who","address_type","id","is_default","mod_when","mod_who","owner_id"],"type":"object"},"OwnerAddressForCreateInner":{"additionalProperties":false,"properties":{"address1":{"type":["string","null"]},"address2":{"type":["string","null"]},"address3":{"type":["string","null"]},"address4":{"type":["string","null"]},"address_type":{"type":"string"},"city":{"type":["string","null"]},"company":{"type":["string","null"]},"contact1":{"type":["string","null"]},"contact2":{"type":["string","null"]},"country":{"type":["string","null"]},"email":{"type":["string","null"]},"is_default":{"type":["boolean","null"]},"iso_country_code":{"type":["string","null"]},"phone1":{"type":["string","null"]},"phone2":{"type":["string","null"]},"state":{"type":["string","null"]},"zip":{"type":["string","null"]}},"required":["address_type"],"type":"object"},"OwnerAddressUpdate":{"additionalProperties":false,"properties":{"data":{"$ref":"#/components/schemas/OwnerAddressUpdateApi"},"id":{"format":"int64","type":"integer"}},"required":["data","id"],"type":"object"},"OwnerAddressUpdateApi":{"additionalProperties":false,"properties":{"address1":{"type":["string","null"]},"address2":{"type":["string","null"]},"address3":{"type":["string","null"]},"address4":{"type":["string","null"]},"address_type":{"type":"string"},"city":{"type":["string","null"]},"company":{"type":["string","null"]},"contact1":{"type":["string","null"]},"contact2":{"type":["string","null"]},"country":{"type":["string","null"]},"email":{"type":["string","null"]},"is_default":{"type":"boolean"},"iso_country_code":{"type":["string","null"]},"phone1":{"type":["string","null"]},"phone2":{"type":["string","null"]},"state":{"type":["string","null"]},"zip":{"type":["string","null"]}},"type":"object"},"OwnerBankAccount":{"properties":{"account":{"type":"string"},"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"bank_name":{"type":"string"},"bic":{"type":"string"},"corr_account":{"type":["string","null"]},"currency":{"type":"string"},"description":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"is_active":{"type":"boolean"},"is_default":{"type":"boolean"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"owner_id":{"format":"int64","type":"integer"}},"required":["account","add_when","add_who","bank_name","bic","currency","id","is_active","is_default","mod_when","mod_who","owner_id"],"type":"object"},"OwnerConfig":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"allow_commingled_lpn":{"type":["boolean","null"]},"allow_duplicate_lpn":{"type":["boolean","null"]},"allow_mixed_lpn":{"type":["boolean","null"]},"allow_system_generated_lpn":{"type":["boolean","null"]},"auto_close_asn":{"type":["boolean","null"]},"auto_close_po":{"type":["boolean","null"]},"auto_print_lpn_on_receive":{"type":"boolean"},"carton_group":{"type":["string","null"]},"confirm_empty_on_move":{"description":"Count spec Appendix L (wms-app 116): a manual move that takes the last stock of this owner out of its source location asks the operator whether the location is empty.","type":"boolean"},"cube_uom":{"type":["string","null"]},"damage_major_action":{"$ref":"#/components/schemas/DamageAction"},"damage_minor_action":{"$ref":"#/components/schemas/DamageAction"},"damage_total_action":{"$ref":"#/components/schemas/DamageAction"},"default_allocation_policy_id":{"format":"int64","type":["integer","null"]},"default_cartonization_policy_id":{"format":"int64","type":["integer","null"]},"default_discard_loc":{"description":"E.2 (migration 162). Discard-condition returns deposit destination. NULL → write-off without deposit (current behavior, no inventory row); set → deposit through DepositService into this loc.","type":["string","null"]},"default_inventory_tracking_granularity":{"anyOf":[{"$ref":"#/components/schemas/InventoryTrackingGranularity"},{"type":"null"}]},"default_lot_policy_id":{"format":"int64","type":["integer","null"]},"default_putaway_policy_id":{"format":"int64","type":["integer","null"]},"default_qc_loc":{"type":["string","null"]},"default_receipt_policy_id":{"format":"int64","type":["integer","null"]},"default_receiving_loc":{"description":"Миграция 350. Ячейка, которую окно приёмки подставляет по умолчанию. NULL = не задана: оператор выбирает сам, как выбирал до 350.","type":["string","null"]},"default_replenishment_policy_id":{"format":"int64","type":["integer","null"]},"default_returns_loc":{"type":["string","null"]},"default_rtv_loc":{"description":"T-062 (migration 148). Falls back to `default_returns_loc` when NULL; if both NULL, MoveDamageToRtv returns NoRtvLocConfigured error.","type":["string","null"]},"default_sku_rotation":{"anyOf":[{"$ref":"#/components/schemas/SkuRotation"},{"type":"null"}]},"default_unplanned_case_on_asn":{"anyOf":[{"$ref":"#/components/schemas/AllowError"},{"type":"null"}]},"dimension_uom":{"type":["string","null"]},"hide_expected_qty_from_operator":{"type":"boolean"},"id":{"format":"int64","type":"integer"},"lpn_length":{"format":"int32","type":["integer","null"]},"lpn_rollback_number":{"format":"int64","type":["integer","null"]},"lpn_start_number":{"format":"int64","type":["integer","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"next_lpn_number":{"format":"int64","type":["integer","null"]},"owner_id":{"format":"int64","type":"integer"},"pick_code":{"type":["string","null"]},"putaway_reservation_ttl_min":{"description":"Minutes a directed-putaway location reservation (`inventory_pending_move_in`) is held for this owner's stock before the TTL sweeper releases it.\n\n`None` is not \"no TTL\": it means INHERIT, and `PendingMoveInBmc::resolve_ttl_minutes` falls through to the `system_settings` key `PUTAWAY_RESERVATION_TTL_MIN`. Owner-level because the number is really a walking distance — a deep warehouse needs a longer hold than a two-aisle one.\n\n`chk_owner_config_putaway_ttl` forbids 0 and negatives: a reservation born already expired is not a short hold, it is an insert that always fails (`chk_inventory_pending_move_in_expiry_after_add`).","format":"int32","type":["integer","null"]},"roll_receipt":{"type":["boolean","null"]},"rtv_gl_account_hint":{"description":"T-062 (migration 148). ERP GL account hint passed in `damage.rtv_initiated` outbox event (e.g. SAP `1450-RTV-Receivable`).","type":["string","null"]},"shelf_life_warning_multiplier_pct":{"format":"int32","type":"integer"},"track_inventory_by":{"type":["string","null"]},"weight_uom":{"type":["string","null"]},"write_off_gl_account_hint":{"description":"T-062 (migration 148). ERP GL account hint passed in `damage.written_off` outbox event. ERP may use directly or map through its own table.","type":["string","null"]}},"required":["add_when","add_who","auto_print_lpn_on_receive","confirm_empty_on_move","damage_major_action","damage_minor_action","damage_total_action","hide_expected_qty_from_operator","id","mod_when","mod_who","owner_id","shelf_life_warning_multiplier_pct"],"type":"object"},"OwnerConfigForCreateInner":{"additionalProperties":false,"properties":{"allow_commingled_lpn":{"type":["boolean","null"]},"allow_duplicate_lpn":{"type":["boolean","null"]},"allow_mixed_lpn":{"type":["boolean","null"]},"allow_system_generated_lpn":{"type":["boolean","null"]},"auto_close_asn":{"type":["boolean","null"]},"auto_close_po":{"type":["boolean","null"]},"auto_print_lpn_on_receive":{"type":["boolean","null"]},"carton_group":{"type":["string","null"]},"confirm_empty_on_move":{"type":["boolean","null"]},"cube_uom":{"type":["string","null"]},"damage_major_action":{"anyOf":[{"$ref":"#/components/schemas/DamageAction"},{"type":"null"}]},"damage_minor_action":{"anyOf":[{"$ref":"#/components/schemas/DamageAction"},{"type":"null"}]},"damage_total_action":{"anyOf":[{"$ref":"#/components/schemas/DamageAction"},{"type":"null"}]},"default_allocation_policy_id":{"format":"int64","type":["integer","null"]},"default_cartonization_policy_id":{"format":"int64","type":["integer","null"]},"default_discard_loc":{"type":["string","null"]},"default_lot_policy_id":{"format":"int64","type":["integer","null"]},"default_putaway_policy_id":{"format":"int64","type":["integer","null"]},"default_qc_loc":{"type":["string","null"]},"default_receipt_policy_id":{"format":"int64","type":["integer","null"]},"default_receiving_loc":{"type":["string","null"]},"default_replenishment_policy_id":{"format":"int64","type":["integer","null"]},"default_returns_loc":{"type":["string","null"]},"default_rtv_loc":{"type":["string","null"]},"default_sku_rotation":{"anyOf":[{"$ref":"#/components/schemas/SkuRotation"},{"type":"null"}]},"dimension_uom":{"type":["string","null"]},"hide_expected_qty_from_operator":{"type":["boolean","null"]},"lpn_length":{"format":"int32","type":["integer","null"]},"lpn_rollback_number":{"format":"int64","type":["integer","null"]},"lpn_start_number":{"format":"int64","type":["integer","null"]},"next_lpn_number":{"format":"int64","type":["integer","null"]},"pick_code":{"type":["string","null"]},"putaway_reservation_ttl_min":{"format":"int32","type":["integer","null"]},"roll_receipt":{"type":["boolean","null"]},"rtv_gl_account_hint":{"type":["string","null"]},"shelf_life_warning_multiplier_pct":{"format":"int32","type":["integer","null"]},"track_inventory_by":{"type":["string","null"]},"weight_uom":{"type":["string","null"]},"write_off_gl_account_hint":{"type":["string","null"]}},"type":"object"},"OwnerConfigMutation":{"anyOf":[{"$ref":"#/components/schemas/OwnerConfigForCreateInner"},{"properties":{"data":{"$ref":"#/components/schemas/OwnerConfigUpdateApi"},"id":{"format":"int64","type":"integer"}},"required":["data","id"],"type":"object"}]},"OwnerConfigUpdateApi":{"additionalProperties":false,"properties":{"allow_commingled_lpn":{"type":["boolean","null"]},"allow_duplicate_lpn":{"type":["boolean","null"]},"allow_mixed_lpn":{"type":["boolean","null"]},"allow_system_generated_lpn":{"type":["boolean","null"]},"auto_close_asn":{"type":["boolean","null"]},"auto_close_po":{"type":["boolean","null"]},"auto_print_lpn_on_receive":{"type":"boolean"},"carton_group":{"type":["string","null"]},"confirm_empty_on_move":{"type":"boolean"},"cube_uom":{"type":["string","null"]},"damage_major_action":{"description":"Per Decisions Log D-26 + T-062 (migration 148). Action triggered by ReportDamage based on severity + OwnerConfig. The first three are the original on-report actions (just-record / hold-LPN / bump-qty-damaged). The four added in T-062 represent owner policy for auto-routing damage to a final disposition without manual intervention: * WriteOff  — auto-call WriteOffDamage on report (decrement inventory). * RTV       — auto-call MoveDamageToRtv on report (move to RTV staging). * Repurpose — flag disposition='Repurpose' (Phase 2 wires SKU substitute). * Destroy   — flag disposition='Destroyed' (Phase 3 wires regulated paths).","enum":["None","Hold","Reject","WriteOff","RTV","Repurpose","Destroy"],"type":"string"},"damage_minor_action":{"description":"Per Decisions Log D-26 + T-062 (migration 148). Action triggered by ReportDamage based on severity + OwnerConfig. The first three are the original on-report actions (just-record / hold-LPN / bump-qty-damaged). The four added in T-062 represent owner policy for auto-routing damage to a final disposition without manual intervention: * WriteOff  — auto-call WriteOffDamage on report (decrement inventory). * RTV       — auto-call MoveDamageToRtv on report (move to RTV staging). * Repurpose — flag disposition='Repurpose' (Phase 2 wires SKU substitute). * Destroy   — flag disposition='Destroyed' (Phase 3 wires regulated paths).","enum":["None","Hold","Reject","WriteOff","RTV","Repurpose","Destroy"],"type":"string"},"damage_total_action":{"description":"Per Decisions Log D-26 + T-062 (migration 148). Action triggered by ReportDamage based on severity + OwnerConfig. The first three are the original on-report actions (just-record / hold-LPN / bump-qty-damaged). The four added in T-062 represent owner policy for auto-routing damage to a final disposition without manual intervention: * WriteOff  — auto-call WriteOffDamage on report (decrement inventory). * RTV       — auto-call MoveDamageToRtv on report (move to RTV staging). * Repurpose — flag disposition='Repurpose' (Phase 2 wires SKU substitute). * Destroy   — flag disposition='Destroyed' (Phase 3 wires regulated paths).","enum":["None","Hold","Reject","WriteOff","RTV","Repurpose","Destroy"],"type":"string"},"default_allocation_policy_id":{"format":"int64","type":["integer","null"]},"default_cartonization_policy_id":{"format":"int64","type":["integer","null"]},"default_discard_loc":{"type":["string","null"]},"default_inventory_tracking_granularity":{"anyOf":[{"$ref":"#/components/schemas/InventoryTrackingGranularity"},{"type":"null"}]},"default_lot_policy_id":{"format":"int64","type":["integer","null"]},"default_putaway_policy_id":{"format":"int64","type":["integer","null"]},"default_qc_loc":{"type":["string","null"]},"default_receipt_policy_id":{"format":"int64","type":["integer","null"]},"default_receiving_loc":{"type":["string","null"]},"default_replenishment_policy_id":{"format":"int64","type":["integer","null"]},"default_returns_loc":{"type":["string","null"]},"default_rtv_loc":{"type":["string","null"]},"default_sku_rotation":{"anyOf":[{"$ref":"#/components/schemas/SkuRotation"},{"type":"null"}]},"default_unplanned_case_on_asn":{"anyOf":[{"$ref":"#/components/schemas/AllowError"},{"type":"null"}]},"dimension_uom":{"type":["string","null"]},"hide_expected_qty_from_operator":{"type":"boolean"},"lpn_length":{"format":"int32","type":["integer","null"]},"lpn_rollback_number":{"format":"int64","type":["integer","null"]},"lpn_start_number":{"format":"int64","type":["integer","null"]},"next_lpn_number":{"format":"int64","type":["integer","null"]},"pick_code":{"type":["string","null"]},"putaway_reservation_ttl_min":{"format":"int32","type":["integer","null"]},"roll_receipt":{"type":["boolean","null"]},"rtv_gl_account_hint":{"type":["string","null"]},"shelf_life_warning_multiplier_pct":{"format":"int32","type":"integer"},"track_inventory_by":{"type":["string","null"]},"weight_uom":{"type":["string","null"]},"write_off_gl_account_hint":{"type":["string","null"]}},"type":"object"},"OwnerDamagePolicy":{"description":"Damage routing policy for an owner's incoming inventory.\n\nSourced from `owner_config.damage_{minor|major|total}_action`. ReportDamage (Catalog 10) consults this row to decide what to do with a damaged unit: `None` (keep), `Hold` (release-blocked), or `Reject` (return to vendor).\n\nReturned as a flat shape (no nested `OwnerConfig`) so RF clients don't pay the deserialization cost of fields they ignore.","properties":{"damage_major_action":{"$ref":"#/components/schemas/DamageAction"},"damage_minor_action":{"$ref":"#/components/schemas/DamageAction"},"damage_total_action":{"$ref":"#/components/schemas/DamageAction"},"owner_id":{"format":"int64","type":"integer"}},"required":["damage_major_action","damage_minor_action","damage_total_action","owner_id"],"type":"object"},"OwnerForCreate":{"additionalProperties":false,"properties":{"code":{"type":"string"},"company":{"type":"string"},"credit_limit":{"format":"double","type":["number","null"]},"currency_code":{"type":["string","null"]},"description":{"type":["string","null"]},"locale":{"type":["string","null"]},"owner_type":{"$ref":"#/components/schemas/OwnerType"},"parent_id":{"format":"int64","type":["integer","null"]},"picking_toloc":{"type":["string","null"]},"status":{"type":["string","null"]},"timezone":{"type":["string","null"]},"vat":{"type":["string","null"]}},"required":["code","company","owner_type"],"type":"object"},"OwnerSummary":{"description":"Compact owner row shape for the picker — id is what the widget writes back into `display.owner_id`, `code` / `company` are what the operator sees in the overlay. Mirrors the `AsnHeader` pattern from `lookup_asn` / `search_asns` so rf-go's `lookupValues` parser handles both endpoints identically.","properties":{"code":{"type":"string"},"company":{"type":"string"},"id":{"format":"int64","type":"integer"}},"required":["code","company","id"],"type":"object"},"OwnerType":{"enum":["Sup","Cus","Trn","Rec","Con","Own","Man","Dst","Vnd","Brk"],"type":"string"},"OwnerUpdateApi":{"additionalProperties":false,"properties":{"company":{"type":"string"},"credit_limit":{"format":"double","type":["number","null"]},"currency_code":{"type":["string","null"]},"description":{"type":["string","null"]},"locale":{"type":["string","null"]},"owner_type":{"enum":["Sup","Cus","Trn","Rec","Con","Own","Man","Dst","Vnd","Brk"],"type":"string"},"parent_id":{"format":"int64","type":["integer","null"]},"picking_toloc":{"type":["string","null"]},"status":{"type":["string","null"]},"timezone":{"type":["string","null"]},"vat":{"type":["string","null"]}},"type":"object"},"Pack":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"descr":{"type":"string"},"id":{"format":"int64","type":"integer"},"items":{"items":{"$ref":"#/components/schemas/PackItem"},"type":"array"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"}},"required":["add_when","add_who","code","descr","id","items","mod_when","mod_who"],"type":"object"},"PackageShortedPick":{"description":"One pick the write-off shorted.","properties":{"pick_id":{"format":"int64","type":"integer"},"qty":{"format":"double","type":"number"},"remediation_id":{"description":"The discrepancy event the remediation runs from.","format":"int64","type":"integer"},"shorted_pick_id":{"description":"`pick_id` when the whole pick was shorted; the split-off part otherwise.","format":"int64","type":"integer"}},"required":["pick_id","qty","remediation_id","shorted_pick_id"],"type":"object"},"PackingAction":{"oneOf":[{"description":"Move the unit's goods into output cartons (slice C).","enum":["Repack"],"type":"string"},{"description":"Check the unit as the package it already is (slice B).","enum":["Verify"],"type":"string"}]},"PackingCarton":{"properties":{"closed_at":{"default":null,"type":["string","null"]},"closed_by":{"format":"int64","type":["integer","null"]},"completion_reason":{"description":"Why the carton closed, when not simply done: `CartonFull` (§19).","type":["string","null"]},"container_id":{"format":"int64","type":"integer"},"execution_expected_weight":{"format":"double","type":["number","null"]},"handling_unit_type_snapshot":true,"id":{"format":"int64","type":"integer"},"job_id":{"format":"int64","type":"integer"},"measured_gross_weight":{"format":"double","type":["number","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"obligation_id":{"description":"`Verify`: the obligation this package satisfies when it closes (§11.3, rule 5). `None` for a `Repack` output carton.","format":"int64","type":["integer","null"]},"opened_at":{"type":"string"},"opened_by":{"format":"int64","type":"integer"},"plan_expected_weight":{"format":"double","type":["number","null"]},"planned_carton_ref":{"format":"int64","type":["integer","null"]},"produced_flow_unit_id":{"description":"A `Repack` output carton: the router unit its first close released (wms-app 088, §8.1); `None` until then and for a `Verify` package.","format":"int64","type":["integer","null"]},"sscc":{"type":["string","null"]},"status":{"$ref":"#/components/schemas/PackingCartonStatus"},"tracking_ref":{"type":["string","null"]},"version":{"format":"int32","type":"integer"},"voided_at":{"default":null,"type":["string","null"]},"voided_by":{"format":"int64","type":["integer","null"]},"weight_verdict":{"anyOf":[{"$ref":"#/components/schemas/PackingWeightVerdict"},{"type":"null"}]}},"required":["container_id","id","job_id","mod_when","mod_who","opened_at","opened_by","status","version"],"type":"object"},"PackingCartonStatus":{"oneOf":[{"enum":["Open","Closed"],"type":"string"},{"description":"Given up while open; its container is free for another carton.","enum":["Voided"],"type":"string"}]},"PackingExceptionCode":{"oneOf":[{"description":"`PACK_SOURCE_SHORT`: less stock than the unit should carry (§21.1).","enum":["SourceShort"],"type":"string"},{"description":"`PACK_UNEXPECTED_ITEM`: stock that is not the order's (§21.2).","enum":["UnexpectedItem"],"type":"string"},{"description":"`PACK_CARTON_FULL`: an output carton was physically full before the plan said (§19). Recorded, not blocking; cartonization is not redone.","enum":["CartonFull"],"type":"string"}]},"PackingExceptionResolution":{"oneOf":[{"description":"The goods were found, or the report was a mistake (wms-app 115).","enum":["NoDiscrepancy"],"type":"string"},{"description":"The stock was corrected by a count or an adjustment, outside packing — packing corrects no stock (P-15, P-16).","enum":["CorrectedByAccounting"],"type":"string"},{"description":"A `PACK_SOURCE_SHORT` on a package under verification: the missing picked goods were written off the package to Lost and the picks shorted (slice E, part 2; `packing_exception_resolve_short` alone records it, with its rows in `packing_exception_short`).","enum":["WrittenOffToLost"],"type":"string"},{"description":"A `PACK_UNEXPECTED_ITEM`: the item was set aside into a location the supervisor named, the fact recorded in `packing_excess` and a count of that location requested — no balance written (P-16; slice E, part 2; `packing_exception_resolve_unexpected` alone records it).","enum":["SetAsideForCount"],"type":"string"}]},"PackingExceptionStatus":{"enum":["Open","Resolved"],"type":"string"},"PackingJob":{"properties":{"cancelled_at":{"default":null,"type":["string","null"]},"cancelled_by":{"format":"int64","type":["integer","null"]},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"opened_at":{"type":"string"},"opened_by":{"format":"int64","type":"integer"},"order_id":{"format":"int64","type":"integer"},"packed_at":{"default":null,"type":["string","null"]},"policy_id":{"description":"Reserved for a packing policy, which does not exist yet: every job is opened with `None` (B4-37). Nothing reads it.","format":"int64","type":["integer","null"]},"policy_snapshot":{"description":"Reserved with `policy_id`: `{}` on every job today. Nothing reads it."},"release_mode":{"allOf":[{"$ref":"#/components/schemas/PackingReleaseMode"}],"description":"Reserved with `policy_id`: `PerUnit` on every job today (§10.3, the MVP default); `WholeOrder` is not built. Nothing reads it."},"station_location":{"type":"string"},"status":{"$ref":"#/components/schemas/PackingJobStatus"},"version":{"format":"int32","type":"integer"}},"required":["id","mod_when","mod_who","opened_at","opened_by","order_id","policy_snapshot","release_mode","station_location","status","version"],"type":"object"},"PackingJobStatus":{"oneOf":[{"description":"Packing goes on.","enum":["Open"],"type":"string"},{"description":"Every obligation satisfied, every carton closed, no blocking exception (§14); a controlled reopen takes it back to `Open`.","enum":["Packed"],"type":"string"},{"description":"Given up before any physical execution (§9.3).","enum":["Cancelled"],"type":"string"}]},"PackingObligation":{"properties":{"action":{"$ref":"#/components/schemas/PackingAction"},"created_at":{"type":"string"},"created_by":{"format":"int64","type":"integer"},"id":{"format":"int64","type":"integer"},"job_id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"satisfied_at":{"default":null,"type":["string","null"]},"source_flow_unit_id":{"format":"int64","type":"integer"},"status":{"$ref":"#/components/schemas/PackingObligationStatus"},"version":{"format":"int32","type":"integer"}},"required":["action","created_at","created_by","id","job_id","mod_when","mod_who","source_flow_unit_id","status","version"],"type":"object"},"PackingObligationStatus":{"oneOf":[{"description":"Still owed.","enum":["Open"],"type":"string"},{"description":"Done: `Verify` — its package closed (back to `Open` on a controlled reopen); `Repack` — the source completed, monotonically (§11.3).","enum":["Satisfied"],"type":"string"}]},"PackingReleaseMode":{"oneOf":[{"description":"A closed package goes on to the router at once (§10.1; MVP).","enum":["PerUnit"],"type":"string"},{"description":"Closed packages wait for the job to be `Packed` (§10.2).","enum":["WholeOrder"],"type":"string"}]},"PackingWeightVerdict":{"oneOf":[{"description":"The measured weight was recorded beside the expected one (policy `Record`, §24.3).","enum":["Recorded"],"type":"string"},{"description":"No expected weight can be computed (catch-weight, an item without a weight).","enum":["NotComparable"],"type":"string"}]},"PackInner":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"descr":{"type":"string"},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"}},"required":["add_when","add_who","code","descr","id","mod_when","mod_who"],"type":"object"},"PackItem":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"base_qty":{"format":"double","type":"number"},"cartonize":{"type":"boolean"},"catch_weight_uom":{"type":["string","null"]},"child_pack_item_id":{"format":"int64","type":["integer","null"]},"cube":{"format":"double","type":"number"},"height":{"format":"double","type":"number"},"hierarchy_level":{"format":"int32","type":"integer"},"id":{"format":"int64","type":"integer"},"is_active":{"description":"ADR-045 §3 — append-only convention. UI dropdowns filter to `is_active=true`; FK lookups from receipt_detail / inventory_balances* continue to resolve regardless. Editing a pack means inserting a new row + flipping the old one's flag, not UPDATE-ing master values.","type":"boolean"},"is_catch_weight":{"type":"boolean"},"is_dual_uom":{"type":"boolean"},"length":{"format":"double","type":"number"},"max_weight":{"format":"double","type":["number","null"]},"min_weight":{"format":"double","type":["number","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"nominal_weight":{"format":"double","type":["number","null"]},"pack_id":{"format":"int64","type":"integer"},"pack_revision_id":{"format":"int64","type":"integer"},"pallet_hi":{"format":"double","type":"number"},"pallet_ti":{"format":"double","type":"number"},"pallet_wood_height":{"format":"double","type":"number"},"pallet_wood_length":{"format":"double","type":"number"},"pallet_wood_width":{"format":"double","type":"number"},"qty_per_child":{"format":"double","type":["number","null"]},"replenish":{"type":"boolean"},"rotation_rule":{"allOf":[{"$ref":"#/components/schemas/RotationRule"}],"description":"Как этот уровень разрешено поворачивать при укладке в коробку. Правило стоит здесь, а не на товаре: в коробку кладут упаковку, и «этой стороной вверх» пишут на ней."},"secondary_uom":{"type":["string","null"]},"ship_as_is":{"description":"Explicit factory packaging. Mutually exclusive with `cartonize`.","type":"boolean"},"uom":{"type":"string"},"weight":{"format":"double","type":"number"},"width":{"format":"double","type":"number"}},"required":["add_when","add_who","base_qty","cartonize","cube","height","hierarchy_level","id","is_active","is_catch_weight","is_dual_uom","length","mod_when","mod_who","pack_id","pack_revision_id","pallet_hi","pallet_ti","pallet_wood_height","pallet_wood_length","pallet_wood_width","replenish","rotation_rule","ship_as_is","uom","weight","width"],"type":"object"},"PackItemForCreate":{"properties":{"cartonize":{"type":["boolean","null"]},"catch_weight_uom":{"type":["string","null"]},"child_uom":{"type":["string","null"]},"cube":{"format":"double","type":["number","null"]},"height":{"format":"double","type":["number","null"]},"is_active":{"description":"ADR-045 §3 — defaults to true on INSERT.","type":["boolean","null"]},"is_catch_weight":{"type":["boolean","null"]},"is_dual_uom":{"type":["boolean","null"]},"length":{"format":"double","type":["number","null"]},"max_weight":{"format":"double","type":["number","null"]},"min_weight":{"format":"double","type":["number","null"]},"nominal_weight":{"format":"double","type":["number","null"]},"pallet_hi":{"format":"double","type":["number","null"]},"pallet_ti":{"format":"double","type":["number","null"]},"pallet_wood_height":{"format":"double","type":["number","null"]},"pallet_wood_length":{"format":"double","type":["number","null"]},"pallet_wood_width":{"format":"double","type":["number","null"]},"qty_per_child":{"format":"double","type":["number","null"]},"replenish":{"type":["boolean","null"]},"rotation_rule":{"anyOf":[{"$ref":"#/components/schemas/RotationRule"},{"type":"null"}],"description":"Как этот уровень разрешено поворачивать. Не прислали — `All90`, умолчание колонки: пока правила не было, класть упаковку как угодно ничто не запрещало."},"secondary_uom":{"type":["string","null"]},"ship_as_is":{"type":["boolean","null"]},"uom":{"type":"string"},"weight":{"format":"double","type":["number","null"]},"width":{"format":"double","type":["number","null"]}},"required":["uom"],"type":"object"},"PackItemForUpdate":{"properties":{"cartonize":{"type":["boolean","null"]},"catch_weight_uom":{"type":["string","null"]},"cube":{"format":"double","type":["number","null"]},"height":{"format":"double","type":["number","null"]},"id":{"format":"int64","type":["integer","null"]},"is_active":{"description":"ADR-045 §3 — flip to false to retire (don't UPDATE other fields).","type":["boolean","null"]},"is_catch_weight":{"type":["boolean","null"]},"is_dual_uom":{"type":["boolean","null"]},"length":{"format":"double","type":["number","null"]},"max_weight":{"format":"double","type":["number","null"]},"min_weight":{"format":"double","type":["number","null"]},"nominal_weight":{"format":"double","type":["number","null"]},"pallet_hi":{"format":"double","type":["number","null"]},"pallet_ti":{"format":"double","type":["number","null"]},"pallet_wood_height":{"format":"double","type":["number","null"]},"pallet_wood_length":{"format":"double","type":["number","null"]},"pallet_wood_width":{"format":"double","type":["number","null"]},"qty_per_child":{"format":"double","type":["number","null"]},"replenish":{"type":["boolean","null"]},"rotation_rule":{"anyOf":[{"$ref":"#/components/schemas/RotationRule"},{"type":"null"}],"description":"Как этот уровень разрешено поворачивать. Не прислали — `All90`, умолчание колонки: пока правила не было, класть упаковку как угодно ничто не запрещало."},"secondary_uom":{"type":["string","null"]},"ship_as_is":{"type":["boolean","null"]},"uom":{"type":["string","null"]},"weight":{"format":"double","type":["number","null"]},"width":{"format":"double","type":["number","null"]}},"type":"object"},"PackItemInner":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"base_qty":{"format":"double","type":"number"},"cartonize":{"type":"boolean"},"catch_weight_uom":{"type":["string","null"]},"child_pack_item_id":{"format":"int64","type":["integer","null"]},"cube":{"format":"double","type":"number"},"height":{"format":"double","type":"number"},"hierarchy_level":{"format":"int32","type":"integer"},"id":{"format":"int64","type":"integer"},"is_catch_weight":{"type":"boolean"},"is_dual_uom":{"type":"boolean"},"length":{"format":"double","type":"number"},"max_weight":{"format":"double","type":["number","null"]},"min_weight":{"format":"double","type":["number","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"nominal_weight":{"format":"double","type":["number","null"]},"pack_id":{"format":"int64","type":"integer"},"pack_revision_id":{"description":"Эпоха лестницы, которой принадлежит эта ступень (миграция 347).","format":"int64","type":"integer"},"pallet_hi":{"format":"double","type":"number"},"pallet_ti":{"format":"double","type":"number"},"pallet_wood_height":{"format":"double","type":"number"},"pallet_wood_length":{"format":"double","type":"number"},"pallet_wood_width":{"format":"double","type":"number"},"qty_per_child":{"format":"double","type":["number","null"]},"replenish":{"type":"boolean"},"rotation_rule":{"$ref":"#/components/schemas/RotationRule"},"secondary_uom":{"type":["string","null"]},"ship_as_is":{"type":"boolean"},"uom":{"type":"string"},"weight":{"format":"double","type":"number"},"width":{"format":"double","type":"number"}},"required":["add_when","add_who","base_qty","cartonize","cube","height","hierarchy_level","id","is_catch_weight","is_dual_uom","length","mod_when","mod_who","pack_id","pack_revision_id","pallet_hi","pallet_ti","pallet_wood_height","pallet_wood_length","pallet_wood_width","replenish","rotation_rule","ship_as_is","uom","weight","width"],"type":"object"},"PackItemTreeView":{"description":"Tree view representation for UI display","properties":{"baseQty":{"format":"double","type":"number"},"cartonize":{"type":"boolean"},"catchWeightUom":{"type":["string","null"]},"childPackItemId":{"format":"int64","type":["integer","null"]},"cube":{"format":"double","type":"number"},"height":{"format":"double","type":"number"},"hierarchyLevel":{"format":"int32","type":"integer"},"hierarchyPath":{"items":{"type":"string"},"type":"array"},"id":{"format":"int64","type":"integer"},"isBaseUnit":{"type":"boolean"},"isCatchWeight":{"type":"boolean"},"isDualUom":{"type":"boolean"},"length":{"format":"double","type":"number"},"maxWeight":{"format":"double","type":"number"},"minWeight":{"format":"double","type":"number"},"nominalWeight":{"format":"double","type":"number"},"packId":{"format":"int64","type":"integer"},"palletHi":{"format":"double","type":"number"},"palletTi":{"format":"double","type":"number"},"qtyPerChild":{"format":"double","type":["number","null"]},"replenish":{"type":"boolean"},"secondaryUom":{"type":["string","null"]},"shipAsIs":{"type":"boolean"},"uom":{"type":"string"},"weight":{"format":"double","type":"number"},"width":{"format":"double","type":"number"}},"required":["baseQty","cartonize","cube","height","hierarchyLevel","hierarchyPath","id","isBaseUnit","isCatchWeight","isDualUom","length","maxWeight","minWeight","nominalWeight","packId","palletHi","palletTi","replenish","shipAsIs","uom","weight","width"],"type":"object"},"PackUnit":{"description":"One unit the SKU can be received in; `factor` base units make one.","properties":{"factor":{"format":"double","type":"number"},"uom":{"type":"string"}},"required":["factor","uom"],"type":"object"},"ParsedField":{"properties":{"app_identifier":{"type":["string","null"]},"data_element_name":{"type":"string"},"sequence":{"format":"int32","type":"integer"},"value":{"type":"string"}},"required":["data_element_name","sequence","value"],"type":"object"},"PendingMoveInSource":{"oneOf":[{"description":"Held by the directed-putaway engine for a suggested location.","enum":["Putaway"],"type":"string"},{"description":"Held by replenishment for the pick face it is topping up.","enum":["Replenishment"],"type":"string"},{"description":"Held by an operator-driven move.","enum":["Move"],"type":"string"}]},"PendingMoveInStatus":{"oneOf":[{"description":"Holding space. The ONLY status that counts toward promised space.","enum":["Active"],"type":"string"},{"description":"The stock arrived — the space is now real occupancy in `inventory_balances`, so this row must stop counting or the location is charged twice. That is literal on the ANCHOR row: the load landed in exactly that location. A NEIGHBOUR row (`share_of` set) never receives stock itself — `retire_group` still stamps it `Consumed`, one status for the whole group rather than the group disagreeing about one event — and there it means the promise ended because the load it was holding a position FOR has arrived; from that moment the position is held by the section holds landing places (`putaway::section_holds`), not by this reservation any more.","enum":["Consumed"],"type":"string"},{"description":"The suggestion was withdrawn (re-suggest, operator refusal).","enum":["Cancelled"],"type":"string"},{"description":"The TTL ran out before the stock arrived; the sweeper flipped it.","enum":["Expired"],"type":"string"}]},"PermissionChange":{"properties":{"can_delete":{"type":"boolean"},"can_execute":{"type":"boolean"},"can_read":{"type":"boolean"},"can_write":{"type":"boolean"},"resource_code":{"type":"string"},"resource_type":{"type":"string"},"role_id":{"format":"int64","type":"integer"}},"required":["can_delete","can_execute","can_read","can_write","resource_code","resource_type","role_id"],"type":"object"},"PickAction":{"oneOf":[{"enum":["ConfirmLocation","ConfirmItem","ConfirmSourceLpn","ConfirmInternalLot","ConfirmLotAttributes","ConfirmQuantity","Commit","Short","Reject"],"type":"string"},{"description":"Scan a pallet label (`pick_drop_open`): the caller has no open pallet of this order.","enum":["OpenDrop"],"type":"string"}]},"PickAssignmentAction":{"description":"What the operator may do with the assignment at this step.","oneOf":[{"enum":["BindPosition","Commit","Skip","Short","Reject","Complete","Dissolve"],"type":"string"},{"description":"Hand the stops of a held position over to recovery (`pick_assignment_position_hand_over`, ruling T12).","enum":["HandOver"],"type":"string"}]},"PickAssignmentBoardRow":{"description":"One assignment as the board lists it (`pick_assignment_board` view).","properties":{"assignee":{"format":"int64","type":"integer"},"assignee_name":{"type":["string","null"]},"assignee_username":{"type":"string"},"awaits_delivery":{"description":"The cart waits to be delivered: `Delivering`, or dissolved with a box still on its carrier and never delivered — what the supervisor's delivery and retarget act on (ruling R6).","type":"boolean"},"carrier_code":{"type":["string","null"]},"carrier_container_id":{"format":"int64","type":["integer","null"]},"code":{"type":"string"},"completed_at":{"default":null,"type":["string","null"]},"created_at":{"type":"string"},"delivery_location":{"description":"Where the cart goes — frozen at start, moved only by a retarget; `None` for a cart that never froze one.","type":["string","null"]},"dissolved_at":{"default":null,"type":["string","null"]},"grouping_unit":{"type":"string"},"id":{"format":"int64","type":"integer"},"positions_bound":{"description":"Positions holding a box now (Bound) or to the end (Closed).","format":"int32","type":"integer"},"positions_total":{"format":"int32","type":"integer"},"ready_at":{"default":null,"type":["string","null"]},"status":{"description":"`pick_assignment_status` as text.","type":"string"},"version":{"format":"int32","type":"integer"},"work_area_code":{"type":"string"},"work_area_id":{"format":"int64","type":"integer"}},"required":["assignee","assignee_username","awaits_delivery","code","created_at","grouping_unit","id","positions_bound","positions_total","status","version","work_area_code","work_area_id"],"type":"object"},"PickAssignmentPositionBoardRow":{"description":"One position of an assignment (`pick_assignment_position_board` view).","properties":{"assignment_id":{"format":"int64","type":"integer"},"bound_at":{"default":null,"type":["string","null"]},"box_code":{"description":"The box the operator put on the position.","type":["string","null"]},"closed_at":{"default":null,"type":["string","null"]},"id":{"format":"int64","type":"integer"},"order_id":{"format":"int64","type":"integer"},"order_number":{"type":"string"},"planned_carton_code":{"type":["string","null"]},"planned_target_kind":{"type":"string"},"position_no":{"format":"int16","type":"integer"},"status":{"description":"`pick_position_status` as text.","type":"string"}},"required":["assignment_id","id","order_id","order_number","planned_target_kind","position_no","status"],"type":"object"},"PickAssignmentStatus":{"oneOf":[{"enum":["Picking","Delivering","Completed","Dissolved"],"type":"string"},{"description":"Positions are being bound to physical boxes.","enum":["Building"],"type":"string"},{"description":"Every position is bound; the route may start.","enum":["Ready"],"type":"string"}]},"PickAssignmentView":{"properties":{"allowed_actions":{"items":{"$ref":"#/components/schemas/PickAssignmentAction"},"type":"array"},"assignment_id":{"format":"int64","type":"integer"},"carrier_code":{"type":["string","null"]},"carrier_container_id":{"format":"int64","type":["integer","null"]},"code":{"type":"string"},"positions_bound":{"format":"int16","type":"integer"},"positions_total":{"description":"Positions that hold (or will hold) a box: `Open`, `Bound`, and a box closed full — it stays on the carrier until delivery.","format":"int16","type":"integer"},"status":{"$ref":"#/components/schemas/PickAssignmentStatus"},"step":{"$ref":"#/components/schemas/AssignmentStep"},"version":{"description":"Echo it back on `pick_assignment_dissolve` (a `stateful_command`).","format":"int32","type":"integer"},"work_area_id":{"format":"int64","type":"integer"}},"required":["allowed_actions","assignment_id","code","positions_bound","positions_total","status","step","version","work_area_id"],"type":"object"},"PickConfirmationField":{"enum":["Location","Item","SourceLpn","Quantity","InternalLot","LotAttributes"],"type":"string"},"PickDepositMode":{"enum":["CollectToDrop"],"type":"string"},"PickDetailStatus":{"oneOf":[{"enum":["Picked"],"type":"string"},{"description":"A live reservation — the qty this row carries is set aside and must be released by cancel/short before the balance can be reused.","enum":["Allocated"],"type":"string"},{"description":"Handed to a picker/task; still counts as reserved.","enum":["Released"],"type":"string"},{"description":"DEAD VALUE — nothing assigns it anymore (status-machine arc, owner decision 2026-08-19 §8.5): a released reservation is DELETED, its audit is the `process.order.line_allocation_released` event. The label stays here and in SQL only because Postgres cannot `ALTER TYPE ... DROP VALUE`, and rows written before the arc may still carry it.","enum":["Cancelled"],"type":"string"},{"description":"Closed with `qty_picked < qty` — the short-pick outcome. Kept as a ROW (unlike Cancelled): a short records an actual pick that happened, not an intention that was withdrawn. Where the shortfall was found is the row's `short_place` (set exactly while `Shorted`): [`PickShortPlace::Shelf`] — at the source location, nothing of the shortfall was picked (`qty - qty_picked` never left the shelf); [`PickShortPlace::Tote`] — in a tote at a station (S0 §7.4): all of `qty` WAS picked from the shelf and went to Lost with the short, and `qty_picked` is 0 because none of it is the order's any more. Alike otherwise; the balance per root (§7.7) counts only the tote's.","enum":["Shorted"],"type":"string"},{"description":"Taken from the shelf into a tote bound for a station (spec 2026-10-11 picking S0, §7 О-3): the task's work is done (П-3) — its task is closed — but the pick is not: the wall places it into a position's box through `picking::placement` (`Picked`), or closes it there (`Shorted`, `Returned`). Its goods lie in `held_in_container_id`. Never a dispatch / cart / continuation candidate; not a live reservation (`qty_allocated` left the source at the commit).","enum":["AwaitingPlacement"],"type":"string"},{"description":"Returned to storage (spec S0 §7.5, О-5): the wall took the pick back off picking (`record_unstaged`, R-14) — its goods became free where the wall put them. Terminal; `qty_picked = 0`. The row stays — the work physically happened (its task closed, journal rows name it) — unlike a released reservation, which is deleted (see `Cancelled`).","enum":["Returned"],"type":"string"}]},"PickDispatchPackaging":{"oneOf":[{"enum":["Bypassed"],"type":"string"},{"additionalProperties":false,"properties":{"PlannedCarton":{"properties":{"carton_id":{"format":"int64","type":"integer"}},"required":["carton_id"],"type":"object"}},"required":["PlannedCarton"],"type":"object"},{"additionalProperties":false,"properties":{"FactoryPackage":{"properties":{"pack_item_id":{"format":"int64","type":"integer"},"pack_revision_id":{"format":"int64","type":"integer"}},"required":["pack_item_id","pack_revision_id"],"type":"object"}},"required":["FactoryPackage"],"type":"object"}]},"PickDispatchWork":{"properties":{"blocked":{"description":"The caller's own held task whose source turned unusable under them — the location not `Ok` or flagged other than by a count (`LOCATION_BLOCKED`), an inventory hold (`INVENTORY_HOLD`): the code (ruling D13). The card, the commit and a short refuse it as before; the holder rejects it (`pick_reject` with this `task.version`) instead of being locked out of every Pick. ABSENT otherwise, so every other answer serializes exactly as before.","type":["string","null"]},"order_id":{"format":"int64","type":"integer"},"packaging":{"$ref":"#/components/schemas/PickDispatchPackaging"},"phase":{"$ref":"#/components/schemas/DispatchPhase"},"pick_detail_id":{"format":"int64","type":"integer"},"task":{"$ref":"#/components/schemas/Task"}},"required":["order_id","packaging","phase","pick_detail_id","task"],"type":"object"},"PickingCompletion":{"enum":["Complete","ConfirmAtLocation"],"type":"string"},"PickingDepositMode":{"enum":["CollectToRoot","DirectToTarget"],"type":"string"},"PickingGroupingUnit":{"enum":["Order","PlannedTarget"],"type":"string"},"PickingItemConfirmation":{"oneOf":[{"description":"The card shows the item; nothing is asked of the operator.","enum":["DisplayOnly"],"type":"string"},{"description":"The operator confirms the item by scanning it.","enum":["Scan"],"type":"string"}]},"PickingLooseLotConfirmation":{"oneOf":[{"enum":["NoConfirmation","ScanInternalLot","ConfirmLotAttributes"],"type":"string"},{"description":"The server picks the proof from the physical structure of the source.","enum":["Automatic"],"type":"string"},{"description":"One lot per location is the proof.","enum":["ExclusiveLocation"],"type":"string"}]},"PickingLotAttributeCapture":{"enum":["ScanOnly","ScanOrManual"],"type":"string"},"PickingPalletDropSuggestion":{"oneOf":[{"description":"`owners.picking_toloc`, else the order's tasks' `to_location` when they agree (ADR-091) — the only chain today.","enum":["OwnerThenTask"],"type":"string"}]},"PickingPolicy":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"carrier_required":{"type":"boolean"},"code":{"type":"string"},"completion":{"$ref":"#/components/schemas/PickingCompletion"},"deposit_mode":{"$ref":"#/components/schemas/PickingDepositMode"},"description":{"type":"string"},"grouping_unit":{"$ref":"#/components/schemas/PickingGroupingUnit"},"id":{"format":"int64","type":"integer"},"item_confirmation":{"$ref":"#/components/schemas/PickingItemConfirmation"},"loose_lot_confirmation":{"$ref":"#/components/schemas/PickingLooseLotConfirmation"},"lot_attribute_capture":{"$ref":"#/components/schemas/PickingLotAttributeCapture"},"max_targets":{"format":"int16","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"pallet_drop_suggestion":{"allOf":[{"$ref":"#/components/schemas/PickingPalletDropSuggestion"}],"description":"Where the suggested location for a closed pick pallet comes from."},"pallet_drop_types":{"description":"Location types (`LocType` labels) a closed discrete pick pallet may be put into (the pick-pallet wms-app migration, `chk_picking_policy_pallet_drop_types`). `text[]` like `putaway_step_criterion.values`; the domain parses the labels.","items":{"type":"string"},"type":"array"},"pick_to_zero":{"allOf":[{"$ref":"#/components/schemas/PickToZeroMode"}],"description":"What a full pick that leaves its source location holding no stock does (wms-app 111, count spec Appendices D and L)."},"published_at":{"default":null,"type":["string","null"]},"qty_confirmation":{"$ref":"#/components/schemas/PickingQtyConfirmation"},"reserved_lpn_confirmation":{"$ref":"#/components/schemas/PickingReservedLpnConfirmation"},"retired_at":{"default":null,"type":["string","null"]},"revision_no":{"format":"int32","type":"integer"},"source_location_confirmation":{"$ref":"#/components/schemas/PickingSourceLocationConfirmation"},"status":{"$ref":"#/components/schemas/PickingPolicyStatus"},"target_binding":{"$ref":"#/components/schemas/PickingTargetBinding"},"target_confirmation":{"$ref":"#/components/schemas/PickingTargetConfirmation"},"version":{"format":"int32","type":"integer"}},"required":["add_when","add_who","carrier_required","code","completion","deposit_mode","description","grouping_unit","id","item_confirmation","loose_lot_confirmation","lot_attribute_capture","max_targets","mod_when","mod_who","pallet_drop_suggestion","pallet_drop_types","pick_to_zero","qty_confirmation","reserved_lpn_confirmation","revision_no","source_location_confirmation","status","target_binding","target_confirmation","version"],"type":"object"},"PickingPolicySections":{"description":"Every field is required on the wire: an update that left the pallet-drop list out would otherwise reset a narrowed list without a word, and one that left a Confirmation value out would loosen what the operator proves at the source. Only an assignment snapshot taken before those settings existed reads them as their defaults ([`PickingPolicySections::deserialize_snapshot`]).","properties":{"carrier_required":{"type":"boolean"},"completion":{"$ref":"#/components/schemas/PickingCompletion"},"deposit_mode":{"$ref":"#/components/schemas/PickingDepositMode"},"grouping_unit":{"$ref":"#/components/schemas/PickingGroupingUnit"},"item_confirmation":{"$ref":"#/components/schemas/PickingItemConfirmation"},"loose_lot_confirmation":{"$ref":"#/components/schemas/PickingLooseLotConfirmation"},"lot_attribute_capture":{"$ref":"#/components/schemas/PickingLotAttributeCapture"},"max_targets":{"format":"int16","type":"integer"},"pallet_drop_suggestion":{"allOf":[{"$ref":"#/components/schemas/PickingPalletDropSuggestion"}],"description":"Where the location suggested for a closed pallet comes from."},"pallet_drop_types":{"description":"The location types a closed discrete pick pallet may be put into (section «Завершение»): at least one, none twice, all from [`PALLET_DROP_ADMISSIBLE`], ordered as it is once saved.","items":{"$ref":"#/components/schemas/LocType"},"type":"array"},"pick_to_zero":{"allOf":[{"$ref":"#/components/schemas/PickToZeroMode"}],"description":"What a full pick that leaves its source location holding no stock does (section «Завершение»): nothing, count the location (count spec Appendix D, PICK_TO_ZERO) or ask the operator whether it is empty (Appendix L, ZERO_CONFIRMATION)."},"qty_confirmation":{"$ref":"#/components/schemas/PickingQtyConfirmation"},"reserved_lpn_confirmation":{"$ref":"#/components/schemas/PickingReservedLpnConfirmation"},"source_location_confirmation":{"allOf":[{"$ref":"#/components/schemas/PickingSourceLocationConfirmation"}],"description":"Spec §7, section «Подтверждение»: what the operator proves at the source. Not part of the grouping shape (`shape_eq` ignores them)."},"target_binding":{"$ref":"#/components/schemas/PickingTargetBinding"},"target_confirmation":{"$ref":"#/components/schemas/PickingTargetConfirmation"}},"required":["carrier_required","completion","deposit_mode","grouping_unit","item_confirmation","loose_lot_confirmation","lot_attribute_capture","max_targets","pallet_drop_suggestion","pallet_drop_types","pick_to_zero","qty_confirmation","reserved_lpn_confirmation","source_location_confirmation","target_binding","target_confirmation"],"type":"object"},"PickingPolicyStatus":{"enum":["Draft","Published","Retired"],"type":"string"},"PickingQtyConfirmation":{"enum":["PerPick","Aggregated"],"type":"string"},"PickingReservedLpnConfirmation":{"oneOf":[{"enum":["DoNotConfirm"],"type":"string"},{"description":"The operator scans the reserved LPN whenever the source has one.","enum":["ScanWhenPresent"],"type":"string"}]},"PickingSourceLocationConfirmation":{"oneOf":[{"description":"The card shows the source location; nothing is asked of the operator.","enum":["DisplayOnly"],"type":"string"},{"description":"The operator confirms the location by scanning it.","enum":["Scan"],"type":"string"}]},"PickingTargetBinding":{"enum":["Unbound","BeforeRoute"],"type":"string"},"PickingTargetConfirmation":{"enum":["ScanContainer","PositionNumber"],"type":"string"},"PickLocationType":{"enum":["Each","InnerPack","Case","Pallet"],"type":"string"},"PickLotAttributeView":{"description":"One attribute of the reserved lot the card shows.","properties":{"code":{"description":"Lower-cased attribute code; the four dates are `DATE_ATTRIBUTE_CODES`.","type":"string"},"label":{"description":"The policy's label for the operator.","type":"string"},"value":{"description":"Dates as `YYYY-MM-DD`.","type":"string"},"verification":{"allOf":[{"$ref":"#/components/schemas/LotPhysicalVerification"}],"description":"How the operator can check the value on the goods."}},"required":["code","label","value","verification"],"type":"object"},"PickPackagingView":{"oneOf":[{"enum":["Bypassed"],"type":"string"},{"additionalProperties":false,"properties":{"PlannedCarton":{"properties":{"carton_id":{"format":"int64","type":"integer"},"code":{"type":"string"}},"required":["carton_id","code"],"type":"object"}},"required":["PlannedCarton"],"type":"object"},{"additionalProperties":false,"properties":{"ShipAsIs":{"properties":{"pack_item_id":{"format":"int64","type":"integer"},"pack_revision_id":{"format":"int64","type":"integer"}},"required":["pack_item_id","pack_revision_id"],"type":"object"}},"required":["ShipAsIs"],"type":"object"}]},"PickPlannedTargetKind":{"oneOf":[{"enum":["ShipAsIs"],"type":"string"},{"description":"A carton the cartonization plan named (`planned_carton_id`).","enum":["PlannedCarton"],"type":"string"},{"description":"Every Bypassed pick of one order: no planned carton, one position.","enum":["Bypassed"],"type":"string"}]},"PickReconciliationCount":{"properties":{"code":{"$ref":"#/components/schemas/PickReconciliationIssueCode"},"count":{"format":"uint","minimum":0,"type":"integer"}},"required":["code","count"],"type":"object"},"PickReconciliationIssue":{"properties":{"code":{"$ref":"#/components/schemas/PickReconciliationIssueCode"},"detail":{"type":"string"},"pick_detail_id":{"format":"int64","type":["integer","null"]},"task_id":{"format":"int64","type":["integer","null"]}},"required":["code","detail"],"type":"object"},"PickReconciliationIssueCode":{"enum":["ORPHAN_TASK","MISSING_TASK","DUPLICATE_LIVE_TASK","SOURCE_OUTCOME_MISSING","TASK_OUTCOME_MISSING","INVALID_TASK_STATE","SOURCE_NOT_ELIGIBLE"],"type":"string"},"PickSerialProgressView":{"properties":{"captured_base_qty":{"format":"double","type":["number","null"]},"captured_qty":{"format":"int32","type":"integer"},"episode_id":{"format":"int64","type":"integer"},"expected_qty":{"format":"int32","type":"integer"},"status":{"$ref":"#/components/schemas/EpisodeStatus"},"submitted_qty":{"format":"double","type":"number"}},"required":["captured_qty","episode_id","expected_qty","status","submitted_qty"],"type":"object"},"PickShortActionDraft":{"properties":{"action":{"$ref":"#/components/schemas/PickShortActionType"},"enabled":{"default":true,"type":"boolean"},"fixed_location":{"type":["string","null"]},"order_scope":{"anyOf":[{"$ref":"#/components/schemas/PickShortOrderScope"},{"type":"null"}]},"required":{"default":false,"type":"boolean"},"scope":{"anyOf":[{"$ref":"#/components/schemas/PickShortActionScope"},{"type":"null"}]},"supervisor_review":{"default":false,"type":"boolean"},"target_mode":{"anyOf":[{"$ref":"#/components/schemas/PickShortTargetMode"},{"type":"null"}]},"trigger_after":{"anyOf":[{"$ref":"#/components/schemas/PickShortTriggerAfter"},{"type":"null"}]}},"required":["action"],"type":"object"},"PickShortActionScope":{"enum":["CurrentPick","SameSourceStock","CurrentSkuAtLocation","EntireLocation"],"type":"string"},"PickShortActionType":{"enum":["ReleaseCurrentRemainder","BlockSourceLocation","ReleaseRelatedReservations","RelocateResidualToMissing","ReallocateReleasedDemand","CreateInventoryCount","HoldInventory","HoldContainer","RequestSupervisorReview"],"type":"string"},"PickShortOrderScope":{"enum":["CurrentOrder","OrdersWithReleasedReservations","CurrentAndAffectedOrders"],"type":"string"},"PickShortReason":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"allow_partial":{"type":"boolean"},"allow_zero":{"type":"boolean"},"code":{"type":"string"},"description":{"type":"string"},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"published_at":{"default":null,"type":["string","null"]},"retired_at":{"default":null,"type":["string","null"]},"revision_no":{"format":"int32","type":"integer"},"status":{"$ref":"#/components/schemas/PickShortReasonStatus"},"version":{"format":"int32","type":"integer"}},"required":["add_when","add_who","allow_partial","allow_zero","code","description","id","mod_when","mod_who","revision_no","status","version"],"type":"object"},"PickShortReasonAction":{"properties":{"action":{"$ref":"#/components/schemas/PickShortActionType"},"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"enabled":{"type":"boolean"},"fixed_location":{"type":["string","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"order_scope":{"anyOf":[{"$ref":"#/components/schemas/PickShortOrderScope"},{"type":"null"}]},"reason_revision_id":{"format":"int64","type":"integer"},"required":{"type":"boolean"},"scope":{"anyOf":[{"$ref":"#/components/schemas/PickShortActionScope"},{"type":"null"}]},"supervisor_review":{"type":"boolean"},"target_mode":{"anyOf":[{"$ref":"#/components/schemas/PickShortTargetMode"},{"type":"null"}]},"trigger_after":{"anyOf":[{"$ref":"#/components/schemas/PickShortTriggerAfter"},{"type":"null"}]}},"required":["action","add_when","add_who","enabled","mod_when","mod_who","reason_revision_id","required","supervisor_review"],"type":"object"},"PickShortReasonStatus":{"enum":["Draft","Published","Retired"],"type":"string"},"PickShortReasonView":{"properties":{"actions":{"items":{"$ref":"#/components/schemas/PickShortReasonAction"},"type":"array"},"reason":{"$ref":"#/components/schemas/PickShortReason"}},"required":["actions","reason"],"type":"object"},"PickShortTargetMode":{"enum":["ZoneMissingToLoc","FixedLocation"],"type":"string"},"PickShortTriggerAfter":{"enum":["AfterReservationRelease","AfterResidualRelocation","AfterCountCompletion"],"type":"string"},"PickSourceView":{"properties":{"base_uom":{"description":"Historical base UOM frozen from the drawn stock; unknown legacy rows stay null.","type":["string","null"]},"location":{"type":"string"},"lot":{"type":"string"},"lot_display":{"description":"The reserved lot's attributes and dates the SKU's Lot Policy marks \"show on pick\" — what the operator looks for on the goods. Empty when the pick has no lot or the policy shows nothing.","items":{"$ref":"#/components/schemas/PickLotAttributeView"},"type":"array"},"lot_summary":{"description":"`lot_display` in one line, \"Expiration date 2028-01-01 · Color BLUE\"; empty when nothing is shown.","type":"string"},"owner_id":{"format":"int64","type":"integer"},"qty":{"description":"Quantity in base units.","format":"double","type":"number"},"sku_code":{"type":"string"},"source_container_code":{"type":["string","null"]},"source_container_id":{"format":"int64","type":["integer","null"]},"uom":{"description":"Allocation step UOM; `qty` is not expressed in this unit.","type":"string"}},"required":["location","lot","lot_display","lot_summary","owner_id","qty","sku_code","uom"],"type":"object"},"PickSplitRule":{"oneOf":[{"description":"Один пик можно разложить по нескольким коробкам.","enum":["Allow"],"type":"string"},{"description":"Пик не дробится: не влез целиком — не влез.","enum":["Prevent"],"type":"string"}]},"PickTargetKind":{"oneOf":[{"description":"A carton the cartonization plan named.","enum":["PlannedCarton"],"type":"string"},{"description":"The `Bypassed` picks of one order: no planned carton.","enum":["Bypassed"],"type":"string"}]},"PickTargetView":{"properties":{"deposit_container_id":{"format":"int64","type":"integer"},"deposit_mode":{"$ref":"#/components/schemas/PickDepositMode"},"drop_code":{"type":"string"},"drop_id":{"format":"int64","type":"integer"},"instruction":{"type":"string"},"packaging":{"$ref":"#/components/schemas/PickPackagingView"}},"required":["deposit_container_id","deposit_mode","drop_code","drop_id","instruction","packaging"],"type":"object"},"PickToZeroMode":{"oneOf":[{"description":"A pick that empties its location does nothing more.","enum":["Off"],"type":"string"},{"description":"The emptied location is counted (count spec Appendix D, PICK_TO_ZERO).","enum":["Count"],"type":"string"},{"description":"The operator is asked whether the location is empty; an answer the stock contradicts asks for a count (count spec Appendix L).","enum":["Confirm"],"type":"string"}]},"PipelineStep":{"description":"One step of the pipeline: its fields, its words, and every verdict about it.","properties":{"active":{"type":"boolean"},"clauses":{"description":"The running sentence, in the pieces the card's four bands need. A step the engine would skip gets only the sentence saying so — that is `narrate_allocation_step`'s rule, not this file's.","items":{"$ref":"#/components/schemas/Clause_81ae80"},"type":"array"},"closed_by":{"description":"The `rule_num` of the earlier step that leaves this one nothing to reserve, when there is one. A rule_num, not an id: it is what the operator reads on the card.","type":["string","null"]},"fields":{"$ref":"#/components/schemas/StepFields"},"id":{"format":"int64","type":"integer"},"never_reserves":{"description":"What this step can never reserve even though the engine loads and runs it — a measured unit against a rule written for counted ones.\n\nA SEPARATE list from `skip_reasons` and never to be merged with it: the card owes the operator two different sentences (\"the engine skips this step\" and \"this step runs, but it can never fill anything\"), and a reader told the first about a step the engine in fact ran would go looking for a refusal that does not exist.","items":{"$ref":"#/components/schemas/Clause_81ae80"},"type":"array"},"rule_num":{"type":"string"},"sequence":{"format":"int32","type":"integer"},"skip_reasons":{"description":"Why the engine would refuse this step when it LOADS the policy. Empty for a step that runs.","items":{"$ref":"#/components/schemas/Clause_81ae80"},"type":"array"},"switched_off":{"description":"The sentence for a step the engine never loads because somebody switched it off, in the core's own words (`allocation_step_switched_off`) — `None` for a step that is on.\n\nA sentence and not the bare `active` flag beside it: ADR-087 forbids the component to hold texts, so a screen handed only a boolean would have to author \"switched off — the engine does not run this step\" itself, and then there would be two authors of one line. `active` is still on the step for the toggle's own state.","type":["string","null"]},"version":{"description":"This step's own optimistic lock — per step, never per policy, because two supervisors editing two different steps must not collide.","format":"int32","type":"integer"}},"required":["active","clauses","fields","id","never_reserves","rule_num","sequence","skip_reasons","version"],"type":"object"},"PlacedPickView":{"description":"One pick the placement took.","properties":{"order_line_id":{"format":"int64","type":"integer"},"pick_id":{"format":"int64","type":"integer"},"placed_pick_id":{"description":"The pick now in the box: `pick_id` when it went whole, the split-off pick otherwise.","format":"int64","type":"integer"},"qty":{"format":"double","type":"number"},"remaining_qty":{"description":"What `pick_id` still awaits in the tote.","format":"double","type":"number"}},"required":["order_line_id","pick_id","placed_pick_id","qty","remaining_qty"],"type":"object"},"PlannedBoxView":{"description":"The box a planned carton was sized as (`cartonization_policy_detail`): its candidate code and inner dimensions. A dimension of 0 is \"unknown\".","properties":{"code":{"description":"The candidate's code (`step_num`, e.g. `BOX-M`).","type":"string"},"description":{"type":"string"},"inner_height":{"format":"double","type":"number"},"inner_length":{"format":"double","type":"number"},"inner_width":{"format":"double","type":"number"},"tare_type_code":{"description":"The tare type the candidate plans (slice 7); `None`: any box that fits.","type":["string","null"]},"tare_type_name":{"type":["string","null"]}},"required":["code","description","inner_height","inner_length","inner_width"],"type":"object"},"PlannedCaseDetail":{"description":"Detail projection for the case-level receive screens: the planned-case row joined with its parent line's SKU + owner and the pallet LPN. The case→line join lives here (model layer), so the RPC reads `find_planned_case` and `get_case_envelope` carry no SQL. Serialize + JsonSchema because it is returned on the wire by those Q-class endpoints.","properties":{"container_id":{"format":"int64","type":"integer"},"expected_qty":{"format":"double","type":"number"},"owner_id":{"description":"Owner the case's line belongs to (`receipt_detail.owner_id`).","format":"int64","type":"integer"},"pallet_lpn":{"description":"Pallet LPN (`container.parent_id` → `code`); `None` when the case sits without a pallet.","type":["string","null"]},"receipt_detail_case_id":{"format":"int64","type":"integer"},"receipt_detail_id":{"format":"int64","type":"integer"},"sku_code":{"description":"Parent SKU (`receipt_detail.sku`).","type":"string"},"status":{"type":"string"},"was_unplanned":{"type":"boolean"}},"required":["container_id","expected_qty","owner_id","receipt_detail_case_id","receipt_detail_id","sku_code","status","was_unplanned"],"type":"object"},"PolicyValidationIssue":{"properties":{"code":{"type":"string"},"message":{"type":"string"},"step_id":{"format":"int64","type":["integer","null"]}},"required":["code","message"],"type":"object"},"PositionCloseReason":{"description":"Why a position is closed on the route. Only one reason exists today; the wire names it so a later reason is a new value, not a new command.","oneOf":[{"description":"The box is physically full (`CARTON_FULL`).","enum":["CartonFull"],"type":"string"}]},"PrinterAssignment":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"id":{"format":"int64","type":"integer"},"is_active":{"type":"boolean"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"printer_id":{"format":"int64","type":"integer"},"priority":{"format":"int32","type":"integer"},"scope_id":{"description":"`user_id` | `zone_id` | `owner_id` | NULL for Warehouse default.","format":"int64","type":["integer","null"]},"scope_type":{"$ref":"#/components/schemas/PrinterScope"}},"required":["add_when","add_who","id","is_active","mod_when","mod_who","printer_id","priority","scope_type"],"type":"object"},"PrinterConfiguration":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"description":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"is_active":{"type":"boolean"},"is_default":{"type":"boolean"},"label_definition_id":{"format":"int64","type":["integer","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"name":{"type":"string"},"printer_host":{"type":"string"},"printer_model":{"type":["string","null"]},"printer_port":{"format":"int32","type":"integer"},"zone_code":{"type":["string","null"]}},"required":["add_when","add_who","code","id","is_active","is_default","mod_when","mod_who","name","printer_host","printer_port"],"type":"object"},"PrinterScope":{"description":"Per migration 085. Lookup priority: explicit (in command) → User → Zone → Owner → Warehouse default.","enum":["User","Zone","Owner","Warehouse"],"type":"string"},"PutawayClass":{"description":"`PartialEq`/`Eq` are unconditional (not `cfg(test)`): a putaway step now compares `PutawayClass` values outside tests too, via `PropRule::matches` (phase 2b product criteria).","enum":["None","NoMix"],"type":"string"},"PutawayGuard":{"oneOf":[{"description":"Step applies to any source.","enum":["None"],"type":"string"},{"description":"Step applies only when the stock comes from `from_zone`.","enum":["FromZone"],"type":"string"},{"description":"Step applies only when the stock comes from `from_location`.","enum":["FromLocation"],"type":"string"}]},"PutawayMode":{"oneOf":[{"description":"Any location that passes the suitability checks.","enum":["Suitable"],"type":"string"},{"description":"Locations already holding the same stock — consolidate into them.","enum":["Consolidate"],"type":"string"}]},"PutawayOrdering":{"oneOf":[{"description":"Candidates in warehouse route order.","enum":["Route"],"type":"string"},{"description":"Candidates by proximity to the SKU's assigned slot.","enum":["NearestToSlot"],"type":"string"}]},"PutawayPipelineStep":{"description":"One step of the pipeline: its fields, its conditions, its words, and every verdict about it.","properties":{"clauses":{"description":"The running sentence, in the pieces the card's three bands need (`narrate_step`'s own topics, not this file's).","items":{"$ref":"#/components/schemas/Clause"},"type":"array"},"criteria":{"description":"The step's conditions, in the order `list_for_step` returns them — the `property` enum's own declaration order.","items":{"$ref":"#/components/schemas/CriterionRow"},"type":"array"},"fields":{"$ref":"#/components/schemas/PutawayStepFields"},"id":{"format":"int64","type":"integer"},"never_runs_after":{"description":"The `step_num` of the earlier step that leaves this one nothing to place, when there is one. A `step_num` and not an id: it is what the operator reads on the card.","type":["string","null"]},"refusals":{"description":"Why this step, AS THE OPERATOR IS HOLDING IT, cannot be saved. Always empty for a stored step — see the module doc.","items":{"$ref":"#/components/schemas/Clause"},"type":"array"},"sequence":{"format":"int32","type":"integer"},"step_num":{"type":"string"},"version":{"description":"This step's own optimistic lock — per step, never per policy, because two supervisors editing two different steps must not collide.","format":"int32","type":"integer"}},"required":["clauses","criteria","fields","id","refusals","sequence","step_num","version"],"type":"object"},"PutawayPolicy":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"description":{"description":"What the policy is FOR, in the operator's words.\n\nNullable, and it stays nullable: the column arrived (migration 265) after policies already existed, and a default would have put text nobody wrote on every row in every warehouse — indistinguishable from text somebody did.","type":["string","null"]},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"version":{"description":"Optimistic lock (migration 349). Absent from `ForUpdate` — a caller must never write it; it moves only through [`PutawayPolicyBmc::bump_version_checked`].","format":"int32","type":"integer"}},"required":["add_when","add_who","code","id","mod_when","mod_who","version"],"type":"object"},"PutawayPolicyDetail":{"description":"`Deserialize` as well as `Serialize`, for the reason [`super::PutawayStepCriterion`] gives: the step editor's sentence is rendered by `web-ui-server`, which reads the step back over `get_putaway_policy_detail` and needs the four axis enums and the six booleans as TYPES, not as strings it re-parses.","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"allow_mixed_lot":{"type":["boolean","null"]},"allow_mixed_sku":{"description":"Whether the suggested location may already hold other SKUs / other lots, and whether it must be empty.\n\n`Some(true)` / `Some(true)` / `Some(false)` is the state a step is in when it says nothing about mixing: the location's own flags and the commingle rules decide. That is what `INHERIT` meant, and it is the column default — a step that says nothing about mixing must not start forbidding it.\n\n**`None` used to be that state too, and app migration 290 removed it.** `MixCheck::from_toggles` (`wms-inventory`) reads `None` and `Some(true)` on a mixing toggle into the SAME arm, so the two were already indistinguishable to the engine while the step card drew `None` as an UNTICKED box — which reads as \"mixing is not allowed\", the opposite of what the engine did. Filling the NULLs is what makes the box tell the truth. The columns stay nullable (nothing writes NULL today, and NOT NULL is its own decision), so this type keeps its `Option` and every reader here keeps reading three values.","type":["boolean","null"]},"fit_by_cube":{"description":"Which PHYSICAL checks this step applies (migration 231).\n\n`NOT NULL`, unlike the three mixing toggles above: those need a third \"no opinion\" state because the location's own flags can answer instead, and these have nothing to defer to. `fit_by_cube` / `fit_by_weight` default `true` because that is what the engine has always done; `fit_by_pallet_dims` defaults `false` because it is new arithmetic.\n\nRead as a set by [`crate::model::policies`]' consumer `putaway::space::FitToggles`, never one at a time — the whole point of three columns is that they are independent, and a caller that reads one of them alone is deciding for the other two.","type":"boolean"},"fit_by_pallet_dims":{"type":"boolean"},"fit_by_quantity":{"description":"What the location already holds, plus what is arriving, against `location.max_qty_capacity` — how a pick face is sized: it holds so many EACHes and then it is full.","type":"boolean"},"fit_by_stack_limit":{"description":"Refuse a location whose pallet POSITIONS are taken — `location.footprint × location.stack_limit`, the count Infor calls Fit by Stack Limit. The one capacity a bulk floor bay actually has, and the only one that binds in a warehouse keeping no cube on its items.","type":"boolean"},"fit_by_weight":{"type":"boolean"},"from_location":{"type":["string","null"]},"from_zone":{"type":["string","null"]},"guard":{"$ref":"#/components/schemas/PutawayGuard"},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"mode":{"$ref":"#/components/schemas/PutawayMode"},"ordering":{"$ref":"#/components/schemas/PutawayOrdering"},"putaway_policy_id":{"format":"int64","type":"integer"},"require_empty":{"type":["boolean","null"]},"respect_temperature":{"description":"Reject a location whose temperature range does not cover the SKU's. The numbers come from the SKU card, never retyped here, so the step cannot drift away from the product master.","type":"boolean"},"scope":{"$ref":"#/components/schemas/PutawayScope"},"sequence":{"description":"Execution order within the policy. Unique per policy (migration 191).","format":"int32","type":"integer"},"step_num":{"description":"User-facing step label. NOT an ordering key — see `sequence`.","type":"string"},"to_location":{"type":["string","null"]},"to_zone":{"type":["string","null"]},"version":{"description":"Optimistic lock (migration 349). Absent from `PutawayPolicyDetailForUpdate` — a caller must never write it; it moves only through [`PutawayPolicyDetailBmc::update_checked`], which bumps it in the same statement as the write.","format":"int32","type":"integer"}},"required":["add_when","add_who","fit_by_cube","fit_by_pallet_dims","fit_by_quantity","fit_by_stack_limit","fit_by_weight","guard","id","mod_when","mod_who","mode","ordering","putaway_policy_id","respect_temperature","scope","sequence","step_num","version"],"type":"object"},"PutawayScope":{"oneOf":[{"description":"Candidate zone named on the step itself (`to_zone`).","enum":["ZoneFromStep"],"type":"string"},{"description":"Candidate zone taken from the SKU's putaway zone.","enum":["ZoneFromSku"],"type":"string"},{"description":"Single candidate location named on the step (`to_location`).","enum":["LocationFromStep"],"type":"string"},{"description":"Single candidate location taken from the SKU.","enum":["LocationFromSku"],"type":"string"},{"description":"The SKU's assigned (slotted) location.","enum":["AssignedSlot"],"type":"string"}]},"PutawayStepCriterion":{"description":"`Deserialize` as well as `Serialize`, unlike most entities here: the step editor's sentence (`putaway_step_describe`) is rendered by `web-ui-server`, which has no database of its own and reads a step's criteria back over `list_putaway_step_criterion`. Reading them into the entity — rather than picking fields out of a `serde_json::Value` on the web side — is what keeps `describe_step`'s exhaustive matches meaningful: a hand-parsed row could carry a property spelling no `CriterionProperty` variant has, and the compiler would never notice.","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"attribute_code":{"description":"Which attribute the criterion narrows on (COLOR, SIZE) — set for exactly the three attribute properties (`LotAttribute`, `SkuAttribute`, `LocationAttribute`) and NULL for every other. `chk_step_criterion_attribute_code` (migration 209, widened by 218) enforces the pairing in both directions.","type":["string","null"]},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"property":{"$ref":"#/components/schemas/CriterionProperty"},"putaway_policy_detail_id":{"format":"int64","type":"integer"},"rule":{"$ref":"#/components/schemas/CriterionRule"},"subject":{"$ref":"#/components/schemas/CriterionSubject"},"values":{"description":"The `text[]` column (migration 209): one column serves every property kind (an enum's SQL label, `'true'`/`'false'`, or a one-element array for a scalar) because the resolver — not the storage — knows the type.\n\nA plain `Vec<String>`, carried by `Fields` like every other column: the workspace enables the `postgres-array` feature on both `sea-query` and `sea-query-binder`, so `Vec<String>` converts into a `sea_query::Value::Array` and binds as a real `text[]`. No cast-as is needed (the column is `text[]`, not an enum array), and no newtype — this field was `#[field(skip)]` until that feature was turned on, which is also why `putaway_policy_detail.rs` once wrapped its `loc_type[]` columns in a local `LocTypes` newtype with five hand-written trait impls. Both workarounds are gone; the whole entity now travels the generic CRUD path.\n\n**An empty array is not NULL, and is not a state a row can be in.** `chk_step_criterion_values_nonempty` (migration 209) rejects `cardinality(values) = 0` at this table, so \"no values\" is a write-time database refusal rather than something stored and later interpreted — a reader here never has to decide what an empty criterion means. (It would mean \"narrow the candidates to nothing\", indistinguishable in a trace from an exhausted zone. That is the refusal's whole point.)","items":{"type":"string"},"type":"array"}},"required":["add_when","add_who","id","mod_when","mod_who","property","putaway_policy_detail_id","rule","subject","values"],"type":"object"},"PutawayStepEdit":{"description":"One step's draft.\n\n`fields` is raw JSON on purpose, and this is the one place in the command that is not typed: serde folds `{\"allow_mixed_sku\": null}` and `{}` into the same `None`, so a typed struct alone cannot tell \"this step has no opinion about mixing\" from \"do not touch it\" — and the step card's visible symptom was exactly that (pick \"Any occupancy\", watch the old value come straight back). [`explicit_nulls_among`] reads the raw value BEFORE deserialization; the typed [`PutawayPolicyDetailForUpdate`] carries the rest.","properties":{"criteria":{"default":null,"description":"The conditions this step should END UP with, or `None` to leave them alone. `Some(vec![])` means \"no conditions at all\".","items":{"$ref":"#/components/schemas/CriterionRow"},"type":["array","null"]},"expected_version":{"format":"int32","type":"integer"},"fields":true,"step_id":{"format":"int64","type":"integer"}},"required":["expected_version","fields","step_id"],"type":"object"},"PutawayStepFields":{"description":"The seventeen card fields, under their own column names.\n\nSpelled out rather than embedding [`PutawayPolicyDetail`] whole: the card edits exactly these, and a wire shape that also carried `add_who` / `mod_when` / `putaway_policy_id` would invite a draft to send them back.","properties":{"allow_mixed_lot":{"type":["boolean","null"]},"allow_mixed_sku":{"description":"`None` is a meaning of its own — \"this step has no opinion about what the location may already hold\" — and not an absence. These three and the four anchors above are the columns a save may set back to NULL by sending an explicit `null` (`PUTAWAY_STEP_CLEARABLE_COLUMNS`); a null on any other field of the card is ignored, as it always was.","type":["boolean","null"]},"fit_by_cube":{"description":"All FIVE fit toggles. The mockup draws three; migration 447 added `fit_by_stack_limit` and `fit_by_quantity` after it was drawn, and a card that showed three would remove a capability the current screen already has.","type":"boolean"},"fit_by_pallet_dims":{"type":"boolean"},"fit_by_quantity":{"type":"boolean"},"fit_by_stack_limit":{"type":"boolean"},"fit_by_weight":{"type":"boolean"},"from_location":{"type":["string","null"]},"from_zone":{"type":["string","null"]},"guard":{"$ref":"#/components/schemas/PutawayGuard"},"mode":{"$ref":"#/components/schemas/PutawayMode"},"ordering":{"$ref":"#/components/schemas/PutawayOrdering"},"require_empty":{"type":["boolean","null"]},"respect_temperature":{"type":"boolean"},"scope":{"$ref":"#/components/schemas/PutawayScope"},"to_location":{"type":["string","null"]},"to_zone":{"type":["string","null"]}},"required":["fit_by_cube","fit_by_pallet_dims","fit_by_quantity","fit_by_stack_limit","fit_by_weight","guard","mode","ordering","respect_temperature","scope"],"type":"object"},"PutawayZone":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"auto_print_addr_label":{"type":["boolean","null"]},"auto_print_carton_label":{"type":["boolean","null"]},"code":{"type":"string"},"color":{"type":"string"},"default_label_printer":{"type":["string","null"]},"default_report_printer":{"type":["string","null"]},"description":{"type":"string"},"id":{"format":"int64","type":"integer"},"inbound_loc":{"type":"string"},"max_cases_count":{"format":"double","type":["number","null"]},"max_cube":{"format":"double","type":["number","null"]},"max_temperature":{"description":"Warmest temperature this zone holds. `None` = no constraint.","format":"double","type":["number","null"]},"max_weight":{"format":"double","type":["number","null"]},"min_temperature":{"description":"Coldest temperature this zone holds. `None` = no constraint — see migration 211: filled in for a handful of zones, never for thousands of locations, which is why the range lives here and not on `location`.","format":"double","type":["number","null"]},"missing_toloc":{"type":"string"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"outbound_loc":{"type":"string"},"picking_toloc":{"type":"string"},"replenishment_allowed":{"type":["boolean","null"]},"replenishment_threshold":{"format":"int32","type":["integer","null"]},"rf_pick_strategy":{"type":["string","null"]}},"required":["add_when","add_who","code","color","description","id","inbound_loc","missing_toloc","mod_when","mod_who","outbound_loc","picking_toloc"],"type":"object"},"PutawayzoneLotCommingle":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"allow_mix":{"type":"boolean"},"attrib_code":{"type":"string"},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"putawayzone_code":{"type":"string"}},"required":["add_when","add_who","allow_mix","attrib_code","id","mod_when","mod_who","putawayzone_code"],"type":"object"},"QtyFit":{"enum":["LowToHigh","ExactFit","BiggerFit","BestFit","HighToLow"],"type":"string"},"Receipt":{"description":"## 'RMA' Field: Return Merchandise Authorization, <p>In WMS terms, an RMA receipt refers to the process of receiving returned goods into the warehouse that were previously shipped to a customer. It is a structured way to handle customer returns.</p> # Key Aspects of RMA in WMS | Aspect            | Description                                                              | | ----------------- | ------------------------------------------------------------------------ | | **Purpose**       | To manage and track the return of products from customers or stores.     | | **Authorization** | Usually issued by a customer service or sales system before the return.  | | **Receipt Type**  | RMA receipts are often a **distinct type of inbound receipt**.           | | **Validation**    | WMS verifies returned items against the authorized RMA before receiving. | | **Disposition**   | Returned items may be **restocked**, **scrapped**, or **quarantined**.   |","properties":{"actual_ship_date":{"default":null,"type":["string","null"]},"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"arrival_date":{"default":null,"type":["string","null"]},"cancel_summary":{"description":"Per Decisions Log D-19. JSON snapshot at CancelReceipt time."},"carrier_id":{"format":"int64","type":["integer","null"]},"close_date":{"default":null,"type":["string","null"]},"close_summary":{"description":"Per Decisions Log D-18. JSON snapshot at CloseReceipt time. Immutable after close."},"completion":{"allOf":[{"$ref":"#/components/schemas/ReceiptCompletion"}],"description":"Per Decisions Log D-05. Live-updated from details on every receive command."},"door":{"type":["string","null"]},"driver_name":{"type":["string","null"]},"effective_date":{"default":null,"type":["string","null"]},"expected_receipt_date":{"default":null,"type":["string","null"]},"external_receipt_number":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"inventory_tracking_granularity":{"allOf":[{"$ref":"#/components/schemas/InventoryTrackingGranularity"}],"description":"ADR-046 D-69b — frozen at creation. Aggregate (default) preserves pre-case-level behaviour; Pallet/Case enable case-scanning flow."},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"owner_id":{"format":"int64","type":"integer"},"planned_ship_date":{"default":null,"type":["string","null"]},"po_id":{"format":"int64","type":["integer","null"]},"promised_ship_date":{"default":null,"type":["string","null"]},"receipt_date":{"default":null,"type":["string","null"]},"receipt_number":{"type":"string"},"receipt_type":{"$ref":"#/components/schemas/ReceiptType"},"rma":{"type":["string","null"]},"scheduled_ship_date":{"default":null,"type":["string","null"]},"status":{"$ref":"#/components/schemas/ReceiptStatus"},"supplier_id":{"format":"int64","type":["integer","null"]},"temperature":{"format":"double","type":["number","null"]},"total_volume":{"format":"double","type":["number","null"]},"total_weight":{"format":"double","type":["number","null"]},"trailer_plate":{"type":["string","null"]},"trailer_type":{"type":["string","null"]},"unplanned_case_on_asn":{"anyOf":[{"$ref":"#/components/schemas/AllowError"},{"type":"null"}],"description":"ADR-046 OQ-03 — what to do when scan hits a case not on ASN. NULL when granularity = Aggregate (cases not scanned)."},"vehicle_date":{"default":null,"type":["string","null"]},"vehicle_plate":{"type":["string","null"]},"version":{"description":"Per Decisions Log D-07. Optimistic-lock. Incremented via `ReceiptRepository::update_with_version`.","format":"int32","type":"integer"}},"required":["add_when","add_who","completion","id","inventory_tracking_granularity","mod_when","mod_who","owner_id","receipt_number","receipt_type","status","version"],"title":"General Receipt model","type":"object"},"ReceiptAudit":{"properties":{"changed_at":{"type":"string"},"changed_by":{"format":"int64","type":"integer"},"field_name":{"type":"string"},"id":{"format":"int64","type":"integer"},"new_value":{"type":["string","null"]},"old_value":{"type":["string","null"]},"receipt_id":{"format":"int64","type":"integer"}},"required":["changed_at","changed_by","field_name","id","receipt_id"],"type":"object"},"ReceiptCaseRow":{"properties":{"case_label":{"type":"string"},"container_id":{"format":"int64","type":"integer"},"expected_qty":{"format":"double","type":"number"},"pallet_lpn":{"type":["string","null"]},"receipt_detail_case_id":{"format":"int64","type":"integer"},"receipt_detail_id":{"format":"int64","type":"integer"},"sku_code":{"type":"string"},"status":{"type":"string"},"was_unplanned":{"type":"boolean"}},"required":["case_label","container_id","expected_qty","receipt_detail_case_id","receipt_detail_id","sku_code","status","was_unplanned"],"type":"object"},"ReceiptCompletion":{"description":"Receipt completion (qty fulfilment). Per Decisions Log D-05. **Separate** from status. Computed from the qty fields of the details and aggregated onto the header.\n\n- `Pending`  — nothing received - `Partial`  — received less than expected - `Full`     — exactly as expected (or Full with qty_rejected/qty_damaged) - `Over`     — received more than expected","enum":["Pending","Partial","Full","Over"],"type":"string"},"ReceiptDetail":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"barcode":{"type":["string","null"]},"best_by_date":{"type":["string","null"]},"completion":{"allOf":[{"$ref":"#/components/schemas/ReceiptCompletion"}],"description":"Per Decisions Log D-05. Live-updated in `ReceiptRepository::recompute_completion`."},"container_id":{"description":"The EXPECTED LPN — the container the supplier announced the goods on. Written when the line is planned, never by receive: it stays as the record of what was promised even when the operator receives onto a label of their own. Where the goods really are is `to_container_id`.","format":"int64","type":["integer","null"]},"delivery_by_date":{"type":["string","null"]},"effective_date":{"type":"string"},"expiration_date":{"type":["string","null"]},"external_lot":{"type":["string","null"]},"external_receipt_line_number":{"type":["string","null"]},"external_receipt_number":{"type":["string","null"]},"hold_code":{"description":"Hold code at receive time — VARCHAR mirroring `inv_hold_code` enum values (e.g. `Damaged`, `QcRequired`, `CustomerReturn`). NULL when the line carries no auto-hold. Filled by the receive command per flow: damage receive → `Damaged`, return condition=NeedsRefurb → `QcRequired`, etc. Audit-only on the line; the actual ATP-blocking hold lives in `inventory_hold` on the LPN / location.","type":["string","null"]},"id":{"format":"int64","type":"integer"},"lot_attr_check_mode":{"allOf":[{"$ref":"#/components/schemas/LotAttrCheckMode"}],"description":"Per-line lot-attributes validation policy. See `LotAttrCheckMode` for semantics. Replaces the legacy `match_lot_attributes` `Option<bool>` + `match_lot_attributes_strict` `bool` pair."},"manufactured_date":{"type":["string","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"owner_id":{"format":"int64","type":"integer"},"pack_id":{"format":"int64","type":["integer","null"]},"po_detail_id":{"format":"int64","type":["integer","null"]},"po_id":{"format":"int64","type":["integer","null"]},"qty_adjusted":{"format":"double","type":["number","null"]},"qty_damaged":{"description":"Per Decisions Log D-26 (ReportDamage Reject action) and D-05 (completion algorithm).","format":"double","type":["number","null"]},"qty_expected":{"format":"double","type":["number","null"]},"qty_received":{"format":"double","type":["number","null"]},"qty_rejected":{"format":"double","type":["number","null"]},"reason_code":{"type":["string","null"]},"receipt_id":{"format":"int64","type":"integer"},"receipt_line_number":{"type":"string"},"receipt_type":{"$ref":"#/components/schemas/ReceiptType"},"return_reason":{"type":["string","null"]},"return_type":{"type":["string","null"]},"rma":{"type":["string","null"]},"sku":{"type":"string"},"status":{"$ref":"#/components/schemas/ReceiptStatus"},"target_disposition":{"allOf":[{"$ref":"#/components/schemas/ReceiptTargetDisposition"}],"description":"Per Decisions Log D-36. Stock | CrossDock | Hold. Default Stock."},"temperature":{"format":"double","type":["number","null"]},"to_container_id":{"description":"The ACTUAL LPN — the container receive put the goods into (the supplier's, or one the operator minted). NULL until the first receive, and for loose stock. Anything that acts on the goods reads this, not `container_id`.","format":"int64","type":["integer","null"]},"to_loc":{"type":["string","null"]},"to_lot":{"type":["string","null"]},"uom":{"type":["string","null"]},"uom_received":{"description":"ADR-045 §1 — native UOM as entered by the operator at receive time (e.g. \"CS\" when receiving 10 cases of 24 EA each). `qty_received` always stays in base units. Native qty is derivable from `qty_received / pack_item.base_qty WHERE pack_id, uom = uom_received`.","type":["string","null"]},"version":{"description":"Per-line OCC version (Slice #2, migration 156). Independent of `receipt.version` (which guards header-level state transitions like close / cancel). `receipt_adjust_received_qty` checks this on submit; receive_* / report_damage / recompute paths bump it atomically without check. Default 1 on insert.","format":"int32","type":"integer"}},"required":["add_when","add_who","completion","effective_date","id","lot_attr_check_mode","mod_when","mod_who","owner_id","receipt_id","receipt_line_number","receipt_type","sku","status","target_disposition","version"],"type":"object"},"ReceiptDetailDamage":{"properties":{"applied_action":{"allOf":[{"$ref":"#/components/schemas/DamageAction"}],"description":"Migration 239 — the owner action that ACTUALLY ran when this row was written (`ReportDamage::handle_damage_action`).\n\nOnly `Reject` adds `damaged_qty` to `receipt_detail.qty_damaged`, so this is what tells a later reader which rows are echoed in that column and which are not — the distinction the line's damage ceiling stands on. Deriving it from today's `owner_config` instead would be wrong for history: the mapping is owner-configurable and can change between two reports on the same line.\n\n`None` on a row created through plain CRUD (`create_receipt_detail_damage`): no action ran, nothing was echoed."},"damaged_qty":{"format":"double","type":"number"},"disposition":{"description":"Final disposition decision. NULL = pending. Values: WrittenOff | RTV | Repurpose | Destroyed. VARCHAR (not enum) so Phase 2 vocabulary growth doesn't require ALTER TYPE.","type":["string","null"]},"disposition_decided_at":{"default":null,"type":["string","null"]},"disposition_decided_by":{"format":"int64","type":["integer","null"]},"disposition_reason":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"move_failed":{"description":"TRUE if auto-move to QC/Damage/RTV loc failed. Operator must resolve manually.","type":"boolean"},"photo_attachment_ids":{"description":"Phase 2+ attachments (see Spec 04 photo attachments)."},"reason_code":{"type":"string"},"reason_description":{"type":["string","null"]},"receipt_detail_id":{"format":"int64","type":"integer"},"receipt_id":{"format":"int64","type":"integer"},"reported_at":{"type":"string"},"reported_by":{"format":"int64","type":"integer"},"severity":{"$ref":"#/components/schemas/DamageSeverity"},"vendor_responsibility":{"description":"Migration 161 — operator's assessment at receive: true = vendor is responsible for the damage (drives vendor-claim event in ERP); false (default) = warehouse-eaten / undecided. Audit-only — no Quark business logic branches on it; ERP integration consumes via outbox.","type":"boolean"},"version":{"description":"Per-row OCC version (Slice #3, migration 157). Independent of `receipt.version` (header) and `receipt_detail.version` (line). `receipt_set_damage_disposition` OCC-checks this on submit; `write_off_damage` / `move_damage_to_rtv` bump it without check (they're stateless terminal actions). Default 1 on insert.","format":"int32","type":"integer"}},"required":["applied_action","damaged_qty","id","move_failed","reason_code","receipt_detail_id","receipt_id","reported_at","reported_by","severity","vendor_responsibility","version"],"type":"object"},"ReceiptDetailHistoryEvent":{"description":"One historical event for a receipt_detail line. Combines two upstream sources into a single timeline:\n\n- **`audit`**: `receipt_audit` row tied to the parent receipt. Header audit covers status changes (Open→InProgress→OnHold→Closed) and completion transitions that affect this line indirectly. - **`txn`**: `transaction_log` row whose `source_code` matches the parent receipt's `receipt_number` and whose `sku_code` matches the detail line's SKU. This is the inventory-level evidence (deposits into a bin, hold placements, etc.) that the detail line generated.\n\nWe do NOT have a `receipt_detail_audit` table today, so this is the closest thing to a per-line history. UI can group by `event_kind`.","properties":{"actor_user_id":{"format":"int64","type":["integer","null"]},"at":{"description":"RFC 3339 in UTC.","format":"date-time","type":"string"},"event_id":{"format":"int64","type":"integer"},"event_kind":{"description":"`\"audit\"` (header-level field change) or `\"txn\"` (inventory move).","type":"string"},"label":{"description":"For `audit`: the field that changed (e.g. `status`, `completion`). For `txn`: the transaction_type code (e.g. `Receive`, `Hold`).","type":"string"},"new_value":{"type":["string","null"]},"old_value":{"type":["string","null"]}},"required":["at","event_id","event_kind","label"],"type":"object"},"ReceiptDetailLotAttributes":{"description":"Per-`receipt_detail` expected lot-attribute snapshot.\n\nMigration 133 (T-034 step 1) collapsed this table to the synthetic FK link only — the legacy natural-key columns `(receipt_id, receipt_line_number, owner_id, sku)` were redundant and have been dropped. Callers that need the line/owner/sku context JOIN through `receipt_detail`.","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"attribute_value":{"type":"string"},"id":{"format":"int64","type":"integer"},"lot_policy_attribute_id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"receipt_detail_id":{"format":"int64","type":"integer"}},"required":["add_when","add_who","attribute_value","id","lot_policy_attribute_id","mod_when","mod_who","receipt_detail_id"],"type":"object"},"ReceiptHoldEvent":{"description":"Audit-trail entry surfaced for the receipt OnHold timeline.\n\nSourced from `receipt_audit` rows where `field_name='status'` and either `old_value='OnHold'` or `new_value='OnHold'` — i.e. transitions into or out of the hold state. Returned in chronological order so the UI can render a simple timeline (\"placed on hold by U at T1, released by V at T2\").\n\nNote: this surfaces *receipt-level* status changes, not the deeper per-balance `inventory_hold` rows (those are cross-cutting and hard to attribute to a single receipt without a transaction-log walk — out of scope here).","properties":{"audit_id":{"format":"int64","type":"integer"},"changed_at":{"description":"RFC 3339 in UTC.","format":"date-time","type":"string"},"changed_by":{"format":"int64","type":"integer"},"direction":{"description":"`\"placed\"` when transitioning *into* OnHold, `\"released\"` when transitioning *out of* OnHold. Lets the UI choose the right icon without re-checking old/new values client-side.","type":"string"},"new_value":{"type":["string","null"]},"old_value":{"type":["string","null"]}},"required":["audit_id","changed_at","changed_by","direction"],"type":"object"},"ReceiptLine":{"description":"A receipt line as the receipt screen lists it.","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"barcode":{"type":["string","null"]},"best_by_date":{"type":["string","null"]},"completion":{"allOf":[{"$ref":"#/components/schemas/ReceiptCompletion"}],"description":"Per Decisions Log D-05. Live-updated in `ReceiptRepository::recompute_completion`."},"container_id":{"description":"The EXPECTED LPN — the container the supplier announced the goods on. Written when the line is planned, never by receive: it stays as the record of what was promised even when the operator receives onto a label of their own. Where the goods really are is `to_container_id`.","format":"int64","type":["integer","null"]},"delivery_by_date":{"type":["string","null"]},"effective_date":{"type":"string"},"expiration_date":{"type":["string","null"]},"external_lot":{"type":["string","null"]},"external_receipt_line_number":{"type":["string","null"]},"external_receipt_number":{"type":["string","null"]},"hold_code":{"description":"Hold code at receive time — VARCHAR mirroring `inv_hold_code` enum values (e.g. `Damaged`, `QcRequired`, `CustomerReturn`). NULL when the line carries no auto-hold. Filled by the receive command per flow: damage receive → `Damaged`, return condition=NeedsRefurb → `QcRequired`, etc. Audit-only on the line; the actual ATP-blocking hold lives in `inventory_hold` on the LPN / location.","type":["string","null"]},"id":{"format":"int64","type":"integer"},"lot_attr_check_mode":{"allOf":[{"$ref":"#/components/schemas/LotAttrCheckMode"}],"description":"Per-line lot-attributes validation policy. See `LotAttrCheckMode` for semantics. Replaces the legacy `match_lot_attributes` `Option<bool>` + `match_lot_attributes_strict` `bool` pair."},"lpn":{"description":"Code of the EXPECTED LPN (`container_id`) — the one the supplier announced. `None` when the line announces none.","type":["string","null"]},"manufactured_date":{"type":["string","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"owner_id":{"format":"int64","type":"integer"},"pack_id":{"format":"int64","type":["integer","null"]},"po_detail_id":{"format":"int64","type":["integer","null"]},"po_id":{"format":"int64","type":["integer","null"]},"qty_adjusted":{"format":"double","type":["number","null"]},"qty_damaged":{"description":"Per Decisions Log D-26 (ReportDamage Reject action) and D-05 (completion algorithm).","format":"double","type":["number","null"]},"qty_expected":{"format":"double","type":["number","null"]},"qty_received":{"format":"double","type":["number","null"]},"qty_rejected":{"format":"double","type":["number","null"]},"reason_code":{"type":["string","null"]},"receipt_id":{"format":"int64","type":"integer"},"receipt_line_number":{"type":"string"},"receipt_type":{"$ref":"#/components/schemas/ReceiptType"},"return_reason":{"type":["string","null"]},"return_type":{"type":["string","null"]},"rma":{"type":["string","null"]},"serial_capture_open":{"description":"A serial capture is open on this line — it can be picked up again.","type":"boolean"},"sku":{"type":"string"},"status":{"$ref":"#/components/schemas/ReceiptStatus"},"target_disposition":{"allOf":[{"$ref":"#/components/schemas/ReceiptTargetDisposition"}],"description":"Per Decisions Log D-36. Stock | CrossDock | Hold. Default Stock."},"temperature":{"format":"double","type":["number","null"]},"to_container_id":{"description":"The ACTUAL LPN — the container receive put the goods into (the supplier's, or one the operator minted). NULL until the first receive, and for loose stock. Anything that acts on the goods reads this, not `container_id`.","format":"int64","type":["integer","null"]},"to_loc":{"type":["string","null"]},"to_lot":{"type":["string","null"]},"to_lpn":{"description":"Code of the ACTUAL LPN (`to_container_id`) — the one the goods were received into. `None` until the first receive, and for loose stock.","type":["string","null"]},"uom":{"type":["string","null"]},"uom_received":{"description":"ADR-045 §1 — native UOM as entered by the operator at receive time (e.g. \"CS\" when receiving 10 cases of 24 EA each). `qty_received` always stays in base units. Native qty is derivable from `qty_received / pack_item.base_qty WHERE pack_id, uom = uom_received`.","type":["string","null"]},"version":{"description":"Per-line OCC version (Slice #2, migration 156). Independent of `receipt.version` (which guards header-level state transitions like close / cancel). `receipt_adjust_received_qty` checks this on submit; receive_* / report_damage / recompute paths bump it atomically without check. Default 1 on insert.","format":"int32","type":"integer"}},"required":["add_when","add_who","completion","effective_date","id","lot_attr_check_mode","mod_when","mod_who","owner_id","receipt_id","receipt_line_number","receipt_type","serial_capture_open","sku","status","target_disposition","version"],"type":"object"},"ReceiptPolicy":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"asn_po_qty_discrepancy":{"$ref":"#/components/schemas/AllowError"},"code":{"type":"string"},"date_deviation_check":{"$ref":"#/components/schemas/AllowError"},"descr":{"type":["string","null"]},"excess_error":{"type":"boolean"},"excess_error_percent":{"format":"int32","type":["integer","null"]},"excess_message":{"type":"boolean"},"excess_override":{"type":"boolean"},"excess_override_percent":{"format":"int32","type":["integer","null"]},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"no_sku_on_asn":{"$ref":"#/components/schemas/AllowError"},"no_sku_on_po":{"$ref":"#/components/schemas/AllowError"},"po_excess_error":{"type":"boolean"},"po_excess_error_percent":{"format":"int32","type":["integer","null"]},"po_excess_message":{"type":"boolean"},"po_excess_override":{"type":"boolean"},"po_excess_override_percent":{"format":"int32","type":["integer","null"]},"po_qty_validation":{"type":"string"},"po_shortage_message":{"type":"boolean"},"po_shortage_override":{"type":"boolean"},"po_shortage_override_percent":{"format":"int32","type":["integer","null"]},"qty_pack_multiple_check":{"$ref":"#/components/schemas/AllowError"},"qty_validation":{"type":"string"},"receipt_without_asn":{"$ref":"#/components/schemas/AllowError"},"receipt_without_lpn":{"$ref":"#/components/schemas/AllowError"},"receipt_without_po":{"$ref":"#/components/schemas/AllowError"},"shortage_message":{"type":"boolean"},"shortage_override":{"type":"boolean"},"shortage_override_percent":{"format":"int32","type":["integer","null"]},"version":{"format":"int32","type":"integer"}},"required":["add_when","add_who","asn_po_qty_discrepancy","code","date_deviation_check","excess_error","excess_message","excess_override","id","mod_when","mod_who","no_sku_on_asn","no_sku_on_po","po_excess_error","po_excess_message","po_excess_override","po_qty_validation","po_shortage_message","po_shortage_override","qty_pack_multiple_check","qty_validation","receipt_without_asn","receipt_without_lpn","receipt_without_po","shortage_message","shortage_override","version"],"type":"object"},"ReceiptStatus":{"description":"Receipt lifecycle status — 5 clean values. Per Decisions Log D-02. The old 8 values (New|InTransit|Scheduled|InReceiving|Received|Verified|Closed|Cancelled) were removed together with the old `execute_*` flow.\n\nThe same enum is used for `Receipt.status` and `ReceiptDetail.status` (D-03). Completeness — a separate field `completion: ReceiptCompletion` (D-05).","enum":["Open","InProgress","OnHold","Closed","Cancelled"],"type":"string"},"ReceiptSummaryLine":{"properties":{"damaged":{"format":"double","type":"number"},"ordered":{"format":"double","type":"number"},"over":{"description":"max(0, received - ordered). Always >= 0.","format":"double","type":"number"},"receipt_detail_id":{"format":"int64","type":"integer"},"receipt_line_number":{"type":"string"},"received":{"format":"double","type":"number"},"rejected":{"format":"double","type":"number"},"short":{"description":"max(0, ordered - received). Always >= 0.","format":"double","type":"number"},"sku":{"type":"string"},"status":{"type":"string"}},"required":["damaged","ordered","over","receipt_detail_id","receipt_line_number","received","rejected","short","sku","status"],"type":"object"},"ReceiptTargetDisposition":{"description":"Target disposition for received goods. Per Decisions Log D-36. Phase 1: always default `Stock`. Phase 2 cross-dock detection sets `CrossDock`. `Hold` — for QC-quarantine when auto-hold conditions are triggered.","enum":["Stock","CrossDock","Hold"],"type":"string"},"ReceiptType":{"oneOf":[{"enum":["Normal","CustomerReturn","Sscc","CaseLevel"],"type":"string"},{"description":"Receiving Without ASN, assigned by the server.","enum":["NoAsn"],"type":"string"},{"description":"Goods arriving from another facility of the same company.","enum":["InterFacilityTransfer"],"type":"string"}]},"ReceiveLimits":{"description":"The over-receipt thresholds in THIS LINE's terms, in base units over the line's open quantity. `None` = no such threshold.","properties":{"approval_possible":{"description":"Between the two, a supervisor's approval (code 27) can clear it.","type":"boolean"},"block_over_base":{"description":"Beyond this, the owner refuses outright — no approval clears it.","format":"double","type":["number","null"]},"hard_percent":{"format":"double","type":["number","null"]},"soft_percent":{"description":"The policy's percents, for the words (\"within the +5% tolerance\").","format":"double","type":["number","null"]},"warn_over_base":{"description":"Up to this much over, the receive saves (amber when over at all).","format":"double","type":["number","null"]}},"required":["approval_possible"],"type":"object"},"RegisteredHandlingUnit":{"properties":{"code":{"type":"string"},"container_id":{"format":"int64","type":"integer"}},"required":["code","container_id"],"type":"object"},"RepackItem":{"properties":{"lot":{"type":["string","null"]},"qty":{"format":"double","type":"number"},"sku_code":{"type":"string"}},"required":["qty","sku_code"],"type":"object"},"RepackItemDelta":{"description":"Одна переехавшая строка остатка.\n\nРаньше здесь были только товар, партия и количество, и по событию нельзя было сказать ни чей это товар, ни чем он лежал: упаковка терялась ровно в тот момент, ради которого событие и читают (спека физических измерений, приложение A.48). Поля описывают строку ПОСЛЕ перепаковки — она вся, кроме носителя, остаётся на месте.","properties":{"balance_id":{"default":0,"description":"Строка остатка — по ней восстанавливают всё остальное.","format":"int64","type":"integer"},"location":{"default":"","description":"Ячейка, в которой всё это стоит: перепаковка её не меняет.","type":"string"},"lot":{"type":["string","null"]},"owner_id":{"default":0,"description":"Чей товар переехал.","format":"int64","type":"integer"},"pack_id":{"default":0,"description":"Упаковка и единица со строки остатка: то, чем товар лежит.","format":"int64","type":"integer"},"qty":{"format":"double","type":"number"},"sku_code":{"type":"string"},"uom":{"default":"","type":"string"}},"required":["qty","sku_code"],"type":"object"},"ReplacedContainerOutcome":{"oneOf":[{"description":"A disposable box (no handling-unit type): `Disposed`, no hold.","enum":["Disposed"],"type":"string"},{"description":"A reusable box: `Empty`, with a `Damaged` hold (`damage_hold_id`).","enum":["HeldDamaged"],"type":"string"}]},"Replenishment":{"description":"One row of `replenishment`.","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"container_id":{"format":"int64","type":["integer","null"]},"from_location":{"type":"string"},"id":{"format":"int64","type":"integer"},"lot":{"type":["string","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"owner_id":{"format":"int64","type":"integer"},"qty":{"format":"double","type":"number"},"qty_moved":{"format":"double","type":"number"},"short_reason":{"type":["string","null"]},"sku_code":{"type":"string"},"status":{"$ref":"#/components/schemas/ReplenishmentStatus"},"to_location":{"type":"string"},"uom":{"type":"string"},"uom_qty":{"format":"double","type":"number"},"urgency":{"format":"int16","type":"integer"},"version":{"format":"int32","type":"integer"}},"required":["add_when","add_who","from_location","id","mod_when","mod_who","owner_id","qty","qty_moved","sku_code","status","to_location","uom","uom_qty","urgency","version"],"type":"object"},"ReplenishmentPolicy":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"empty_is_urgent":{"type":"boolean"},"id":{"format":"int64","type":"integer"},"important_reserved_pct":{"format":"double","type":"number"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"urgent_reserved_pct":{"format":"double","type":"number"},"version":{"format":"int32","type":"integer"}},"required":["add_when","add_who","code","empty_is_urgent","id","important_reserved_pct","mod_when","mod_who","urgent_reserved_pct","version"],"type":"object"},"ReplenishmentPolicyDetail":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"replenishment_policy_id":{"format":"int64","type":"integer"},"step_num":{"type":"string"}},"required":["add_when","add_who","id","mod_when","mod_who","replenishment_policy_id","step_num"],"type":"object"},"ReplenishmentStatus":{"oneOf":[{"description":"Planned, not yet brought: counts as on its way to the pick location.","enum":["Open"],"type":"string"},{"description":"Brought in full.","enum":["Done"],"type":"string"},{"description":"Brought less than planned (the source held less); closed.","enum":["Shorted"],"type":"string"},{"description":"Called off by a supervisor before it was brought.","enum":["Cancelled"],"type":"string"}]},"ReportAlbumRow":{"properties":{"category":{"type":"string"},"code":{"type":"string"},"description":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"is_favorite":{"type":"boolean"},"last_run_at":{"default":null,"type":["string","null"]},"name":{"description":"The report's name in the locale the album was asked for, already resolved: a translation if there is one, the English `default_text` otherwise. The album screen renders this string as-is.","type":"string"},"origin":{"description":"`industry` for seeded/migrated definitions, `custom` for ones built here.","type":"string"},"parameters":true,"regulation":{"type":["string","null"]},"runs_12m":{"format":"int64","type":"integer"},"runs_monthly":{"description":"Exactly `SPARKLINE_MONTHS` integers, oldest month first."},"template_kind":{"type":["string","null"]},"tier":{"type":"string"}},"required":["category","code","id","is_favorite","name","origin","parameters","runs_12m","runs_monthly","tier"],"type":"object"},"ReportDefinition":{"description":"A report in the catalogue.\n\nThe user-visible name is NOT here: it is `label_id`, resolved per reader through [`LabelBmc::text`] or, for the album, in that read model's own query so it can sort by what it shows. Migration 242 replaced the Russian `name` column and its unread `name_localized` JSONB with this one FK.","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"category":{"type":"string"},"code":{"type":"string"},"config_json":true,"created_via":{"type":"string"},"description":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"is_active":{"type":"boolean"},"label_id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"module_id":{"format":"int64","type":["integer","null"]},"parameters":true,"template_id":{"format":"int64","type":["integer","null"]},"template_kind":{"type":["string","null"]},"tier":{"type":"string"},"version_status":{"type":"string"}},"required":["add_when","add_who","category","code","config_json","created_via","id","is_active","label_id","mod_when","mod_who","parameters","tier","version_status"],"type":"object"},"ReportRenderOptions":{"properties":{"orientation":{"type":"string"},"paper":{"type":"string"}},"required":["orientation","paper"],"type":"object"},"ReportTemplate":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"id":{"format":"int64","type":"integer"},"kind":{"type":"string"},"locale_default":{"type":["string","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"name":{"type":"string"},"orientation":{"type":["string","null"]},"paper":{"type":["string","null"]},"source":{"type":"string"},"version_status":{"type":"string"}},"required":["add_when","add_who","code","id","kind","mod_when","mod_who","name","source","version_status"],"type":"object"},"RequiredEvidence":{"description":"One thing the operator must prove, in the order the screen asks it.","properties":{"capture":{"$ref":"#/components/schemas/Capture"},"code":{"description":"The lower-cased Lot Policy code of a `LotAttribute`; `None` otherwise.","type":["string","null"]},"expected_display_value":{"description":"What the card shows the operator to compare with (a lot attribute's reserved value).","type":["string","null"]},"kind":{"$ref":"#/components/schemas/EvidenceKind"},"label":{"description":"The Lot Policy label of a `LotAttribute`.","type":["string","null"]}},"required":["capture","kind"],"type":"object"},"ReturnCondition":{"enum":["Resaleable","NeedsRefurb","Damaged","Discard"],"type":"string"},"Role":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"code":{"type":"string"},"description":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"is_active":{"type":"boolean"},"is_system":{"type":"boolean"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"name":{"type":"string"}},"required":["add_when","add_who","code","id","is_active","is_system","mod_when","mod_who","name"],"type":"object"},"RolePermission":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"can_delete":{"type":"boolean"},"can_execute":{"type":"boolean"},"can_read":{"type":"boolean"},"can_write":{"type":"boolean"},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"resource_code":{"type":"string"},"resource_type":{"type":"string"},"role_id":{"format":"int64","type":"integer"}},"required":["add_when","add_who","can_delete","can_execute","can_read","can_write","id","mod_when","mod_who","resource_code","resource_type","role_id"],"type":"object"},"RolePermissionTreeRow":{"description":"Flat tree row. `hierarchy_path` drives the grid's row-grouping. Field names that appear on the wire in camelCase carry explicit `serde(rename)` attributes because the AG Grid SSRM tree renderer expects those exact keys.\n\nLabel resolution (resource_code → human label) is delegated to the web-ui-server's `column_display_resolver` via `form_list_details.value_formatter`. This RPC ships `menu_code` / `form_code` set ONLY for rows whose `resource_type` matches, and two separate `lookup:` formatters on the list form resolve each one against its own metadata table (`public.menu_items`, `public.form_base`). `api` / `server_action` rows leave both code fields null and render the raw `resource_code`.","properties":{"can_delete":{"type":"boolean"},"can_execute":{"type":"boolean"},"can_read":{"type":"boolean"},"can_write":{"type":"boolean"},"child_count":{"description":"Only populated for group rows — total leaves under this branch.","format":"int64","type":["integer","null"]},"form_code":{"description":"Populated only when `resource_type = 'form'` — becomes the source field for `lookup:public.form_base:code:name:form_code`.","type":["string","null"]},"hierarchyLevel":{"format":"uint8","minimum":0,"type":"integer"},"hierarchyPath":{"items":{"type":"string"},"type":"array"},"id":{"description":"Synthetic negative id for group rows; real `role_permission.id` for leaves.","format":"int64","type":"integer"},"is_admin_only":{"type":"boolean"},"label":{"description":"Group-row display label (`\"Menu Items\"`, `\"Forms\"`, …) — only meaningful at `hierarchy_level = 0`. Leaf rows carry an empty string here and let the `lookup:` formatter produce the display value on the web-ui-server side.","type":"string"},"menu_code":{"description":"Populated only when `resource_type = 'menu_item'` — becomes the source field for `lookup:public.menu_items:code:label:menu_code`.","type":["string","null"]},"resource_code":{"type":"string"},"resource_type":{"type":"string"},"role_id":{"format":"int64","type":"integer"}},"required":["can_delete","can_execute","can_read","can_write","hierarchyLevel","hierarchyPath","id","is_admin_only","label","resource_code","resource_type","role_id"],"type":"object"},"RotationRule":{"oneOf":[{"description":"Все шесть ориентаций.","enum":["All90"],"type":"string"},{"description":"Только естественное положение.","enum":["None"],"type":"string"},{"description":"«Этой стороной вверх».","enum":["UprightOnly"],"type":"string"}]},"RouteProgress":{"description":"The assignment after a route command: its new version (echo it on the next assignment command) and status (`Picking`, or `Delivering` once no stop is left — R3).","properties":{"assignment_id":{"format":"int64","type":"integer"},"status":{"$ref":"#/components/schemas/PickAssignmentStatus"},"version":{"format":"int32","type":"integer"}},"required":["assignment_id","status","version"],"type":"object"},"RouteToteState":{"description":"Whether the route's operator still works it, as the supervised door judges it.","oneOf":[{"description":"A stop of the route is held under a live lease (the door refuses `STATION_ROUTE_HOLDER_PRESENT`), or the holder acted on the route within the warehouse's wait — e.g. collected the last stop and is carrying the tote to the station (`STATION_ROUTE_RECENTLY_ACTIVE`).","enum":["Worked"],"type":"string"},{"description":"No stop is held under a live lease and nothing happened on the route for the warehouse's wait: the supervisor may finish the tote.","enum":["Abandoned"],"type":"string"}]},"Run":{"description":"The clause's words, cut into the values the operator chose and the rest. Concatenated, `text` of every run is the clause's own `text`, byte for byte.","properties":{"bold":{"description":"A value the operator picked — the card sets these in bold.","type":"boolean"},"missing":{"description":"Words standing where a value the step NEEDS is not set — the card draws these amber, in place.\n\nA FLAG and not a marker to match, because the marker is a translated phrase: the card used to be expected to find the gap by looking for its words in the clause, which needed the words sent to it, and nothing ever sent them. Never `true` together with `bold`.","type":"boolean"},"text":{"type":"string"}},"required":["bold","missing","text"],"type":"object"},"ScanValue":{"description":"One value of a scan, normalized as the pick confirmations read it: dates `YYYY-MM-DD` (day `00` is the month's last day), text upper-cased, a GTIN or SSCC with its check digit verified.","properties":{"element":{"description":"`lpn`, `gtin`, `internal_lot`, `serial`, `location`, or a lot attribute's code.","type":"string"},"value":{"type":"string"}},"required":["element","value"],"type":"object"},"ScreenDefForSave":{"description":"Input for saving screens","properties":{"definition":true,"screen_id":{"type":"string"}},"required":["definition","screen_id"],"type":"object"},"ScreenDefRecord":{"description":"Screen definition record (screen_id + opaque JSON blob)","properties":{"definition":true,"screen_id":{"type":"string"}},"required":["definition","screen_id"],"type":"object"},"ScreenSummaryResponse":{"properties":{"category":{"type":["string","null"]},"id":{"type":"string"},"revision":{"format":"int64","type":"integer"},"title":{"type":"string"},"type":{"type":"string"}},"required":["id","revision","title","type"],"type":"object"},"SerialCaptureEpisodeOpen":{"properties":{"age_minutes":{"format":"int32","type":"integer"},"business_operation":{"type":"string"},"business_ref_id":{"format":"int64","type":["integer","null"]},"captured_qty":{"format":"int32","type":"integer"},"expected_qty":{"format":"int32","type":"integer"},"id":{"format":"int64","type":"integer"},"idempotency_key":{"type":"string"},"location":{"type":["string","null"]},"opened_at":{"type":"string"},"operator_id":{"format":"int64","type":["integer","null"]},"owner_id":{"format":"int64","type":"integer"},"progress_pct":{"format":"int32","type":"integer"},"sku_code":{"type":"string"},"status":{"type":"string"},"ttl_at":{"default":null,"type":["string","null"]}},"required":["age_minutes","business_operation","captured_qty","expected_qty","id","idempotency_key","opened_at","owner_id","progress_pct","sku_code","status"],"type":"object"},"SerialCaptureMethod":{"oneOf":[{"description":"Vendor pre-advised in ASN.","enum":["Asn"],"type":"string"},{"description":"Operator scanned at receive.","enum":["Receive"],"type":"string"},{"description":"Pre-applied by manufacturer (Phase 5+).","enum":["Manufacturer"],"type":"string"},{"description":"Manually entered by admin.","enum":["Manual"],"type":"string"}]},"SerialParseMode":{"description":"Per Decisions Log D-32. How serial is extracted from a scanned barcode.","enum":["None","Fixed","Bounded"],"type":"string"},"SerialStatus":{"oneOf":[{"enum":["Active","Reserved","Picked","Shipped","Returned","Damaged","Disposed","Held"],"type":"string"},{"description":"**Exists for DB compatibility only.** `serial_status` has had this label since the serial spec's phase 1 (`PackSerial`, `Picked → Packed → Shipped`), but the command and its transitions never landed. Without the variant a row carrying it would not decode, and every `SELECT *` over `inventory_balances_serial` would fail.\n\nPacking MUST NOT write this status: the FSM has no transition into or out of it, and `contract-tests::packed_serial_status` keeps every other file from naming it. A packed serial's place is its container (post-pick spec D-51); serial-aware packing is a later decision.","enum":["Packed"],"type":"string"},{"description":"A count expected it here and did not find it (count spec Appendix K): not in the warehouse, no location. A later count that finds it brings it back to `Active`.","enum":["Missing"],"type":"string"}]},"SetDamageDispositionKind":{"description":"Lightweight disposition kinds — explicit enum so callers can't accidentally pass arbitrary strings into the `disposition` column. WrittenOff/RTV land via the dedicated commands (WriteOffDamage / MoveDamageToRtv) since they have physical effects.","enum":["Repurpose","Destroyed"],"type":"string"},"SettingCard":{"description":"The settings card: the effective rail one slot a field, so a picker sits on each.","properties":{"expiring_within_days":{"format":"int32","type":"integer"},"id":{"format":"int64","type":"integer"},"rail_1":{"type":"string"},"rail_2":{"type":"string"},"rail_3":{"type":"string"},"rail_4":{"type":"string"},"rail_5":{"type":"string"},"rail_6":{"type":"string"},"show_demo":{"type":"boolean"},"throughput_plan_per_hour":{"format":"double","type":["number","null"]},"version":{"format":"int32","type":"integer"}},"required":["expiring_within_days","id","rail_1","rail_2","rail_3","rail_4","rail_5","rail_6","show_demo","version"],"type":"object"},"SharedPickRoute":{"properties":{"add_who":{"format":"int64","type":"integer"},"assignee":{"format":"int64","type":"integer"},"completed_at":{"default":null,"type":["string","null"]},"created_at":{"type":"string"},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"policy_snapshot":true,"station_location":{"type":"string"},"version":{"format":"int32","type":"integer"},"wave_id":{"format":"int64","type":"integer"},"work_area_id":{"format":"int64","type":"integer"}},"required":["add_who","assignee","created_at","id","mod_when","mod_who","policy_snapshot","station_location","version","wave_id","work_area_id"],"type":"object"},"SharedPickRouteView":{"description":"The caller's live route as the RF works it: the route, its stops the holder may still work (in route order, each with the task version the next stateful command echoes) and every tote it bound. A live route with no stop left still answers: its stops went back to the pool, and its live totes are delivered or released before the next portion.","properties":{"resumed":{"type":"boolean"},"route":{"$ref":"#/components/schemas/SharedPickRoute"},"stops":{"items":{"$ref":"#/components/schemas/SharedRouteStop"},"type":"array"},"task_ids":{"items":{"format":"int64","type":"integer"},"type":"array"},"totes":{"description":"Bound, delivered and released alike, in the order they were bound.","items":{"$ref":"#/components/schemas/SharedPickTote"},"type":"array"}},"required":["resumed","route","stops","task_ids","totes"],"type":"object"},"SharedPickTote":{"properties":{"bound_at":{"type":"string"},"container_id":{"format":"int64","type":"integer"},"delivered_at":{"default":null,"type":["string","null"]},"delivered_by":{"format":"int64","type":["integer","null"]},"id":{"format":"int64","type":"integer"},"released_at":{"default":null,"description":"Given back empty to the handling-unit registry; never together with `delivered_at` (CHECK).","type":["string","null"]},"route_id":{"format":"int64","type":"integer"}},"required":["bound_at","container_id","id","route_id"],"type":"object"},"SharedRouteStop":{"description":"One open stop of a route, in route order: its task (and the version the next stateful command on it echoes), its pick and what is left to collect there. A plain read; the stop's lease is judged by the caller.","properties":{"base_uom":{"type":["string","null"]},"location":{"type":"string"},"lot":{"type":["string","null"]},"pick_id":{"format":"int64","type":"integer"},"qty_remaining":{"description":"The pick's quantity still to collect (base units).","format":"double","type":"number"},"sku_code":{"type":"string"},"task_id":{"format":"int64","type":"integer"},"task_version":{"format":"int32","type":"integer"}},"required":["location","pick_id","qty_remaining","sku_code","task_id","task_version"],"type":"object"},"SharedRouteToteBoardRow":{"description":"One live tote of a live station route, as the supervisor's board shows it.","properties":{"bound_at":{"type":"string"},"holds_goods":{"description":"Picks await placement in the tote: the door delivers it to the station; otherwise it releases the empty tote.","type":"boolean"},"id":{"description":"The tote's ownership row — the board row's identity.","format":"int64","type":"integer"},"live_stops":{"description":"The route's stops still held under a live lease.","format":"int64","type":"integer"},"operator_id":{"description":"The route's holder.","format":"int64","type":"integer"},"operator_username":{"type":"string"},"route_id":{"description":"The door's `route_id`.","format":"int64","type":"integer"},"route_version":{"description":"The route's version — the door's `expected_version`.","format":"int32","type":"integer"},"state":{"allOf":[{"$ref":"#/components/schemas/RouteToteState"}],"description":"What the button gate reads."},"station_location":{"description":"The frozen station the goods go to.","type":"string"},"tote_code":{"description":"The tote's label — the door's `tote_code`.","type":"string"},"wave_code":{"type":"string"},"work_area_code":{"type":"string"}},"required":["bound_at","holds_goods","id","live_stops","operator_id","operator_username","route_id","route_version","state","station_location","tote_code","wave_code","work_area_code"],"type":"object"},"ShelfLife":{"properties":{"days":{"format":"int32","type":["integer","null"]},"min_on_receipt":{"format":"int32","type":["integer","null"]}},"type":"object"},"ShipmentFulfilmentLine":{"description":"All quantities are base units, regardless of the Order line's input UOM.","properties":{"id":{"format":"int64","type":"integer"},"line_no":{"format":"int32","type":"integer"},"order_id":{"format":"int64","type":"integer"},"owner_id":{"format":"int64","type":"integer"},"qty_cancelled":{"format":"double","type":"number"},"qty_ordered":{"format":"double","type":"number"},"qty_picked":{"format":"double","type":"number"},"qty_remaining":{"description":"Effective demand not yet shipped, including unreserved demand.","format":"double","type":"number"},"qty_shipped":{"format":"double","type":"number"},"sku_code":{"type":"string"},"status":{"type":"string"}},"required":["id","line_no","order_id","owner_id","qty_cancelled","qty_ordered","qty_picked","qty_remaining","qty_shipped","sku_code","status"],"type":"object"},"ShipmentHistoryLine":{"description":"One immutable receipt delta per commercial Order line, not per Pick. Line number/SKU are the referenced line's identity, not a lot snapshot.","properties":{"goods_issue_id":{"format":"int64","type":"integer"},"id":{"description":"Collision-free composite identity (receipt id : Order line id).","type":"string"},"line_no":{"format":"int32","type":"integer"},"load_id":{"format":"int64","type":["integer","null"]},"order_id":{"format":"int64","type":"integer"},"order_line_id":{"format":"int64","type":"integer"},"qty":{"format":"double","type":"number"},"shipped_at":{"type":"string"},"shipped_by":{"format":"int64","type":"integer"},"sku_code":{"type":"string"}},"required":["goods_issue_id","id","line_no","order_id","order_line_id","qty","shipped_at","shipped_by","sku_code"],"type":"object"},"ShipmentOrder":{"properties":{"cancel_reason":{"type":["string","null"]},"cancelled_at":{"default":null,"type":["string","null"]},"carrier_id":{"format":"int64","type":["integer","null"]},"close_summary":true,"closed_at":{"default":null,"type":["string","null"]},"external_id":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"notes":{"type":["string","null"]},"order_date":{"type":"string"},"order_number":{"type":"string"},"order_type_id":{"format":"int64","type":"integer"},"owner_id":{"format":"int64","type":"integer"},"priority":{"format":"int16","type":"integer"},"released_at":{"default":null,"type":["string","null"]},"requested_ship_date":{"type":["string","null"]},"ship_to_id":{"format":"int64","type":"integer"},"ship_to_snapshot":{"description":"The ship-to address as frozen at release. Subscribers and documents must read THIS, not a live `owner_address` lookup, or editing a customer rewrites what an already-released order promised."},"source":{"$ref":"#/components/schemas/OrderSource"},"status":{"$ref":"#/components/schemas/OrderStatus"},"version":{"description":"Per-row OCC version, independent of `shipment_order_line.version`. Two operators editing two different lines must not collide on the header (ADR-072 §5).","format":"int32","type":"integer"}},"required":["id","order_date","order_number","order_type_id","owner_id","priority","ship_to_id","source","status","version"],"type":"object"},"ShipmentOrderExpectedLotAttribute":{"properties":{"attribute_code":{"type":"string"},"attribute_value":{"type":"string"},"id":{"format":"int64","type":"integer"},"lot_policy_attribute_id":{"format":"int64","type":["integer","null"]},"order_line_id":{"format":"int64","type":"integer"}},"required":["attribute_code","attribute_value","id","order_line_id"],"type":"object"},"ShipmentOrderLine":{"properties":{"allocation_policy_id":{"description":"Frozen allocation-policy identity. Nullable during expand/backfill; new-runtime writes become mandatory only in the contract migration.","format":"int64","type":["integer","null"]},"allocation_policy_version":{"format":"int32","type":["integer","null"]},"cancel_reason":{"type":["string","null"]},"external_line_no":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"line_no":{"format":"int32","type":"integer"},"order_id":{"format":"int64","type":"integer"},"owner_id":{"format":"int64","type":"integer"},"pack_id":{"format":"int64","type":"integer"},"pack_requested":{"description":"`true`: the customer ordered `pack_id`, and the line is reserved only from stock of that pack. `false`: `pack_id` is the SKU's pack, put there because the order named none, and stock of any pack of the SKU is a candidate.","type":"boolean"},"pick_instruction":{"description":"One-off pick instruction for this line, from the ERP (wms-app 044): shown on its picks and acknowledged before a pick commits (RF `PICKINS`).","type":["string","null"]},"qty_allocated":{"description":"Always 0 in Phase 1 — written by allocation in Phase 2.","format":"double","type":"number"},"qty_cancelled":{"format":"double","type":"number"},"qty_ordered":{"description":"All five counters are in BASE units.","format":"double","type":"number"},"qty_picked":{"description":"Always 0 in Phase 1 — written by picking in Phase 3.","format":"double","type":"number"},"qty_shipped":{"description":"Always 0 in Phase 1 — written by shipping in Phase 3.","format":"double","type":"number"},"sku_code":{"type":"string"},"status":{"$ref":"#/components/schemas/OrderLineStatus"},"uom":{"type":"string"},"uom_factor":{"description":"`pack_item.base_qty` snapshot taken when the line was created. Stored — unlike on `receipt_detail` — so a later `pack_item` edit cannot rewrite what a historical line meant.","format":"double","type":"number"},"version":{"description":"Per-line OCC, independent of the header's version.","format":"int32","type":"integer"}},"required":["id","line_no","order_id","owner_id","pack_id","pack_requested","qty_allocated","qty_cancelled","qty_ordered","qty_picked","qty_shipped","sku_code","status","uom","uom_factor","version"],"type":"object"},"ShipmentOrderLineLotRequirement":{"properties":{"attributes":{"items":{"$ref":"#/components/schemas/ShipmentOrderExpectedLotAttribute"},"type":"array"},"order_line_id":{"format":"int64","type":"integer"},"required_lot":{"type":["string","null"]},"requirement_version":{"format":"int32","type":"integer"}},"required":["attributes","order_line_id","requirement_version"],"type":"object"},"ShipShipmentOrderResult":{"properties":{"already_committed":{"type":"boolean"},"close_summary":true,"goods_issue_id":{"format":"int64","type":"integer"},"journal_ids":{"items":{"format":"int64","type":"integer"},"type":"array"},"new_version":{"format":"int32","type":"integer"},"order_closed":{"default":true,"type":"boolean"},"order_id":{"format":"int64","type":"integer"},"remaining_quantities":{"default":[],"items":{"items":[{"format":"int64","type":"integer"},{"format":"double","type":"number"}],"maxItems":2,"minItems":2,"type":"array"},"type":"array"},"serial_ids":{"items":{"format":"int64","type":"integer"},"type":"array"},"shipped_quantities":{"items":{"items":[{"format":"int64","type":"integer"},{"format":"double","type":"number"}],"maxItems":2,"minItems":2,"type":"array"},"type":"array"}},"required":["already_committed","close_summary","goods_issue_id","journal_ids","new_version","order_id","serial_ids","shipped_quantities"],"type":"object"},"Sku":{"description":"Represents a Stock Keeping Unit (SKU), the core entity for inventory items.\n\nEach SKU contains information about the item, its ownership, packaging, classification, fulfillment parameters, and policy references. Timestamps track creation and modification.\n\n# Fields - `id`: Unique SKU identifier. - `external_id`: Optional external reference. - `owner_id`: Owner's identifier. - `code`: SKU code, unique per owner. - `descr`: Description of the SKU. - `pack_id`: Reference to packaging. - `gross_wgt`, `net_wgt`, `cube`: Physical characteristics. - `abc`: ABC rotation speed classification. - `class`, `active`, `sku_group`: Classification and grouping. - `*_policy_id`: Various policy references (allocation, replenishment, etc.). - `on_rec_copy_receipt_number`: Copy receipt number on receipt. - `putaway_loc`, `putawayzone`, `receipt_qc_loc`: Putaway Location details. - `putaway_class`: Putaway class. - `rotation`: SKU rotation policy. - `shelf_life`, `min_shelf_life_on_pick`, `min_shelf_life_on_rec`: Shelf life parameters. - `receipt_hold_code`, `expire_days`, `deliver_by_days`, `best_by_days`: Expiry and delivery codes. - `allow_multi_lot_on_lpn`: Allow multiple lots on license plate number. - `force_separate_lpn_per_lot`: This SKU demands its own container per lot. - `add_who`, `add_when`, `mod_who`, `mod_when`: Audit fields for creation and modification.","properties":{"abc":{"anyOf":[{"$ref":"#/components/schemas/AbcRotationSpeed"},{"type":"null"}]},"active":{"type":["boolean","null"]},"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"allocation_policy_id":{"format":"int64","type":["integer","null"]},"allow_multi_lot_on_lpn":{"type":["boolean","null"]},"barcode_format_id":{"format":"int64","type":["integer","null"]},"best_by_days":{"format":"int32","type":["integer","null"]},"cartonization_policy_id":{"format":"int64","type":["integer","null"]},"class":{"type":["string","null"]},"code":{"type":"string"},"cube":{"format":"double","type":["number","null"]},"default_uom":{"type":["string","null"]},"deliver_by_days":{"format":"int32","type":["integer","null"]},"descr":{"type":"string"},"expire_days":{"format":"int32","type":["integer","null"]},"external_id":{"type":["string","null"]},"force_separate_lpn_per_lot":{"description":"The same prohibition as `allow_multi_lot_on_lpn = false`, asked of the ARRIVING SKU instead of the ones already on the pallet. See [`DEFAULT_FORCE_SEPARATE_LPN_PER_LOT`] for why both exist.","type":["boolean","null"]},"gross_wgt":{"format":"double","type":["number","null"]},"id":{"format":"int64","type":"integer"},"lot_policy_id":{"format":"int64","type":["integer","null"]},"max_age_on_rec":{"format":"int32","type":["integer","null"]},"max_temperature":{"format":"double","type":["number","null"]},"min_shelf_life_on_pick":{"format":"int32","type":["integer","null"]},"min_shelf_life_on_rec":{"format":"int32","type":["integer","null"]},"min_temperature":{"format":"double","type":["number","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"net_wgt":{"format":"double","type":["number","null"]},"on_rec_copy_receipt_number":{"type":["boolean","null"]},"owner_id":{"format":"int64","type":"integer"},"pack_id":{"format":"int64","type":"integer"},"pack_location":{"type":["string","null"]},"pick_instruction":{"description":"Standing pick instruction for this item (wms-app 044): shown on every pick of it and acknowledged before the pick commits (RF `PICKINS`).","type":["string","null"]},"positions_required":{"description":"How many adjacent positions of one section this item occupies. `1` is an ordinary item; more means the whole section must be free and its dimensions are measured together.","format":"int16","type":["integer","null"]},"putaway_class":{"anyOf":[{"$ref":"#/components/schemas/PutawayClass"},{"type":"null"}]},"putaway_loc":{"type":["string","null"]},"putaway_policy_id":{"format":"int64","type":["integer","null"]},"putawayzone":{"type":["string","null"]},"receipt_hold_code":{"type":["string","null"]},"receipt_policy_id":{"format":"int64","type":["integer","null"]},"receipt_qc_loc":{"type":["string","null"]},"replenishment_policy_id":{"format":"int64","type":["integer","null"]},"requires_temperature_capture":{"type":"boolean"},"return_location":{"type":["string","null"]},"rotate_by":{"type":["string","null"]},"rotation":{"anyOf":[{"$ref":"#/components/schemas/SkuRotation"},{"type":"null"}]},"shelf_life":{"format":"int32","type":["integer","null"]},"sku_group":{"type":["string","null"]},"stack_limit":{"description":"How high this item may be stacked, whatever the rack allows. `0` is no opinion; the engine takes the minimum of this and `location.stack_limit`, so an item may lower the rack's limit and never raise it.","format":"int16","type":["integer","null"]},"tare_weight":{"format":"double","type":["number","null"]},"warning_temperature_max":{"format":"double","type":["number","null"]},"warning_temperature_min":{"format":"double","type":["number","null"]}},"required":["add_when","add_who","code","descr","id","mod_when","mod_who","owner_id","pack_id","requires_temperature_capture"],"type":"object"},"SkuAudit":{"properties":{"changed_at":{"type":"string"},"changed_by":{"format":"int64","type":"integer"},"field_name":{"type":"string"},"id":{"format":"int64","type":"integer"},"new_value":{"type":["string","null"]},"old_value":{"type":["string","null"]},"sku_id":{"format":"int64","type":"integer"}},"required":["changed_at","changed_by","field_name","id","sku_id"],"type":"object"},"SkuBarcode":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"barcode":{"type":"string"},"barcode_type":{"anyOf":[{"$ref":"#/components/schemas/SkuBarcodeType"},{"type":"null"}]},"default_uom":{"type":"string"},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"owner_id":{"format":"int64","type":"integer"},"pack_id":{"format":"int64","type":"integer"},"sku_code":{"type":"string"},"sku_id":{"format":"int64","type":"integer"},"user_notes1":{"type":["string","null"]},"user_notes2":{"type":["string","null"]},"vendor_id":{"format":"int64","type":["integer","null"]}},"required":["add_when","add_who","barcode","default_uom","id","mod_when","mod_who","owner_id","pack_id","sku_code","sku_id"],"type":"object"},"SkuBarcodeType":{"description":"EAN, UPC, GTIN, etc..","enum":["None","Upc","Mni","Rtlin","Epcid","Crn","Gtin"],"title":"SKU Barcode types","type":"string"},"SkuForCreate":{"additionalProperties":false,"description":"Used when creating a new SKU.\n\nContains all required and optional fields needed for SKU creation, excluding database-generated fields like `id`.\n\n# Examples\n\n``` use crate::model::sku::SkuForCreate; let sku_create = SkuForCreate::new(1, \"SKU001\", \"Example SKU\", 1); assert_eq!(sku_create.code, \"SKU001\"); ```","properties":{"abc":{"anyOf":[{"$ref":"#/components/schemas/AbcRotationSpeed"},{"type":"null"}]},"active":{"type":["boolean","null"]},"allocation_policy_id":{"format":"int64","type":["integer","null"]},"allow_multi_lot_on_lpn":{"type":["boolean","null"]},"barcode_format_id":{"format":"int64","type":["integer","null"]},"best_by_days":{"format":"int32","type":["integer","null"]},"cartonization_policy_id":{"format":"int64","type":["integer","null"]},"class":{"type":["string","null"]},"code":{"type":"string"},"cube":{"format":"double","type":["number","null"]},"default_uom":{"type":["string","null"]},"deliver_by_days":{"format":"int32","type":["integer","null"]},"descr":{"type":"string"},"expire_days":{"format":"int32","type":["integer","null"]},"external_id":{"type":["string","null"]},"gross_wgt":{"format":"double","type":["number","null"]},"lot_policy_id":{"format":"int64","type":["integer","null"]},"max_age_on_rec":{"format":"int32","type":["integer","null"]},"max_temperature":{"format":"double","type":["number","null"]},"min_shelf_life_on_pick":{"format":"int32","type":["integer","null"]},"min_shelf_life_on_rec":{"format":"int32","type":["integer","null"]},"min_temperature":{"format":"double","type":["number","null"]},"net_wgt":{"format":"double","type":["number","null"]},"on_rec_copy_receipt_number":{"type":["boolean","null"]},"owner_id":{"format":"int64","type":"integer"},"pack_id":{"format":"int64","type":"integer"},"pack_location":{"type":["string","null"]},"pick_instruction":{"description":"Standing pick instruction for this item (wms-app 044): shown on every pick of it and acknowledged before the pick commits (RF `PICKINS`).","type":["string","null"]},"positions_required":{"format":"int16","type":["integer","null"]},"putaway_class":{"anyOf":[{"$ref":"#/components/schemas/PutawayClass"},{"type":"null"}]},"putaway_loc":{"type":["string","null"]},"putaway_policy_id":{"format":"int64","type":["integer","null"]},"putawayzone":{"type":["string","null"]},"receipt_hold_code":{"type":["string","null"]},"receipt_policy_id":{"format":"int64","type":["integer","null"]},"receipt_qc_loc":{"type":["string","null"]},"replenishment_policy_id":{"format":"int64","type":["integer","null"]},"requires_temperature_capture":{"type":["boolean","null"]},"return_location":{"type":["string","null"]},"rotate_by":{"type":["string","null"]},"rotation":{"anyOf":[{"$ref":"#/components/schemas/SkuRotation"},{"type":"null"}]},"shelf_life":{"format":"int32","type":["integer","null"]},"sku_group":{"type":["string","null"]},"stack_limit":{"format":"int16","type":["integer","null"]},"tare_weight":{"format":"double","type":["number","null"]},"warning_temperature_max":{"format":"double","type":["number","null"]},"warning_temperature_min":{"format":"double","type":["number","null"]}},"required":["code","descr","owner_id","pack_id"],"type":"object"},"SkuPickLocationView":{"description":"A row of `sku_pick_location_view`: what the SKU card lists and shows.","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"id":{"format":"int64","type":"integer"},"location":{"type":"string"},"max_qty":{"format":"double","type":"number"},"min_qty":{"format":"double","type":"number"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"owner_code":{"type":"string"},"owner_id":{"format":"int64","type":"integer"},"pick_type":{"$ref":"#/components/schemas/PickLocationType"},"putawayzone":{"type":["string","null"]},"route_sequence":{"type":["string","null"]},"sku_code":{"type":"string"},"sku_id":{"format":"int64","type":"integer"},"uom":{"type":"string"},"version":{"format":"int32","type":"integer"}},"required":["add_when","add_who","id","location","max_qty","min_qty","mod_when","mod_who","owner_code","owner_id","pick_type","sku_code","sku_id","uom","version"],"type":"object"},"SkuRotation":{"description":"Represents SKU rotation policy, determining the order in which stock is picked.\n\n- `Fifo`: First-In-First-Out rotation. - `Lifo`: Last-In-First-Out rotation.\n\nUsed to specify how items are rotated in inventory management.\n\n# Examples\n\n``` use crate::model::sku::SkuRotation; let rotation = SkuRotation::Fifo; assert_eq!(rotation.to_string(), \"Fifo\"); ``` `PartialEq`/`Eq` are unconditional (not `cfg(test)`): a putaway step now compares `SkuRotation` values outside tests too, via `PropRule::matches` (phase 2b product criteria).","enum":["Fifo","Lifo","Fefo"],"type":"string"},"SkuSerialConfig":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"allow_asn_pre_advised":{"type":"boolean"},"allow_deferred_capture":{"description":"Explicit permission to receive inventory before serial capture is complete. Deliberately separate from `allow_receive_capture`, which merely enables capture at the receive checkpoint.","type":"boolean"},"allow_receive_capture":{"type":"boolean"},"anomaly_block_severity":{"type":["boolean","null"]},"anomaly_max_per_lpn":{"format":"int32","type":["integer","null"]},"anomaly_velocity_threshold_min":{"format":"int32","type":["integer","null"]},"anomaly_vendor_surge_factor":{"format":"double","type":["number","null"]},"check_digit_algorithm":{"type":["string","null"]},"continuous_serial_tracking":{"description":"Master flag. If false — other fields ignored.","type":"boolean"},"id":{"format":"int64","type":"integer"},"industry_profile":{"type":["string","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"multi_serial_delimiter":{"type":["string","null"]},"multi_serial_fixed_length":{"format":"int32","type":["integer","null"]},"pick_episode_reassignment_mode":{"description":"Behaviour when a different operator resumes a Pick with an unfinished serial episode.","type":"string"},"profile_mode":{"description":"Movement/capture coupling policy (ADR-090).","type":"string"},"require_unique_global":{"type":"boolean"},"serial_auto_increment":{"type":"boolean"},"serial_format":{"type":["string","null"]},"serial_increment_length":{"format":"int32","type":["integer","null"]},"serial_increment_source_position":{"format":"int32","type":["integer","null"]},"serial_length":{"format":"int32","type":["integer","null"]},"serial_mask_format":{"type":["string","null"]},"serial_parse_frequency":{"format":"int32","type":["integer","null"]},"serial_parse_mode":{"$ref":"#/components/schemas/SerialParseMode"},"serial_parse_start_after":{"format":"int32","type":["integer","null"]},"serial_parse_start_position":{"format":"int32","type":["integer","null"]},"serial_scope":{"description":"Migration 153 — serial granularity. Tells receive_against_asn / capture_serial how to compute `serials_to_collect_qty` from the operator's submitted qty: - `PerUnit`      → 1 serial per atomic EA (qty_base from pack hierarchy) - `PerCase`      → 1 serial per submitted UOM (typical SSCC) - `PerPallet`    → 1 serial per pack_item.uom='PL' tier - `PerInnerPack` → 1 serial per pack_item.uom='IP' tier Default `PerUnit`. Stored as VARCHAR with CHECK constraint.","type":"string"},"serials_per_barcode":{"format":"int32","type":"integer"},"sku_id":{"format":"int64","type":"integer"},"warranty_period_days":{"format":"int32","type":["integer","null"]}},"required":["add_when","add_who","allow_asn_pre_advised","allow_deferred_capture","allow_receive_capture","continuous_serial_tracking","id","mod_when","mod_who","pick_episode_reassignment_mode","profile_mode","require_unique_global","serial_auto_increment","serial_parse_mode","serial_scope","serials_per_barcode","sku_id"],"type":"object"},"SkuSerialConfigForCreateInner":{"additionalProperties":false,"description":"Serial configuration without the parent identity. The aggregate command owns `sku_id`; accepting it from the caller would make identity propagation configurable in two places.","properties":{"allow_asn_pre_advised":{"type":["boolean","null"]},"allow_deferred_capture":{"type":["boolean","null"]},"allow_receive_capture":{"type":["boolean","null"]},"anomaly_block_severity":{"type":["boolean","null"]},"anomaly_max_per_lpn":{"format":"int32","type":["integer","null"]},"anomaly_velocity_threshold_min":{"format":"int32","type":["integer","null"]},"anomaly_vendor_surge_factor":{"format":"double","type":["number","null"]},"check_digit_algorithm":{"type":["string","null"]},"continuous_serial_tracking":{"type":["boolean","null"]},"industry_profile":{"type":["string","null"]},"multi_serial_delimiter":{"type":["string","null"]},"multi_serial_fixed_length":{"format":"int32","type":["integer","null"]},"pick_episode_reassignment_mode":{"type":["string","null"]},"profile_mode":{"type":["string","null"]},"require_unique_global":{"type":["boolean","null"]},"serial_auto_increment":{"type":["boolean","null"]},"serial_format":{"type":["string","null"]},"serial_increment_length":{"format":"int32","type":["integer","null"]},"serial_increment_source_position":{"format":"int32","type":["integer","null"]},"serial_length":{"format":"int32","type":["integer","null"]},"serial_mask_format":{"type":["string","null"]},"serial_parse_frequency":{"format":"int32","type":["integer","null"]},"serial_parse_mode":{"anyOf":[{"$ref":"#/components/schemas/SerialParseMode"},{"type":"null"}]},"serial_parse_start_after":{"format":"int32","type":["integer","null"]},"serial_parse_start_position":{"format":"int32","type":["integer","null"]},"serial_scope":{"type":["string","null"]},"serials_per_barcode":{"format":"int32","type":["integer","null"]},"warranty_period_days":{"format":"int32","type":["integer","null"]}},"type":"object"},"SkuSerialConfigMutation":{"anyOf":[{"$ref":"#/components/schemas/SkuSerialConfigForCreateInner"},{"properties":{"data":{"$ref":"#/components/schemas/SkuSerialConfigUpdateApi"},"id":{"format":"int64","type":"integer"}},"required":["data","id"],"type":"object"}]},"SkuSerialConfigUpdateApi":{"additionalProperties":false,"properties":{"allow_asn_pre_advised":{"type":"boolean"},"allow_deferred_capture":{"type":"boolean"},"allow_receive_capture":{"type":"boolean"},"anomaly_block_severity":{"type":["boolean","null"]},"anomaly_max_per_lpn":{"format":"int32","type":["integer","null"]},"anomaly_velocity_threshold_min":{"format":"int32","type":["integer","null"]},"anomaly_vendor_surge_factor":{"format":"double","type":["number","null"]},"check_digit_algorithm":{"type":["string","null"]},"continuous_serial_tracking":{"type":"boolean"},"industry_profile":{"type":["string","null"]},"multi_serial_delimiter":{"type":["string","null"]},"multi_serial_fixed_length":{"format":"int32","type":["integer","null"]},"pick_episode_reassignment_mode":{"oneOf":[{"enum":["Block","CancelAndRestart"],"type":"string"},{"description":"The open episode is handed over to the operator the work moved to.","enum":["Handover"],"type":"string"}]},"profile_mode":{"description":"Operational policy for stock whose serial capture is not complete yet.\n\nStored as VARCHAR so the profile remains an application-level policy and can evolve without a PostgreSQL enum migration.","oneOf":[{"description":"Every inventory movement requires a fully committed serial register.","enum":["Strict"],"type":"string"},{"description":"Capture may be deferred; only an unchanged full LPN may move while an episode follows that LPN atomically.","enum":["Flexible"],"type":"string"},{"description":"Serial tracking is disabled for movement-policy purposes.","enum":["NotTracked"],"type":"string"}]},"require_unique_global":{"type":"boolean"},"serial_auto_increment":{"type":"boolean"},"serial_format":{"type":["string","null"]},"serial_increment_length":{"format":"int32","type":["integer","null"]},"serial_increment_source_position":{"format":"int32","type":["integer","null"]},"serial_length":{"format":"int32","type":["integer","null"]},"serial_mask_format":{"type":["string","null"]},"serial_parse_frequency":{"format":"int32","type":["integer","null"]},"serial_parse_mode":{"description":"Per Decisions Log D-32. How serial is extracted from a scanned barcode.","enum":["None","Fixed","Bounded"],"type":"string"},"serial_parse_start_after":{"format":"int32","type":["integer","null"]},"serial_parse_start_position":{"format":"int32","type":["integer","null"]},"serial_scope":{"description":"Supported serial granularity at the public API boundary.","enum":["PerUnit","PerCase","PerPallet","PerInnerPack"],"type":"string"},"serials_per_barcode":{"format":"int32","type":"integer"},"warranty_period_days":{"format":"int32","type":["integer","null"]}},"type":"object"},"SkuUpdateApi":{"additionalProperties":false,"properties":{"abc":{"anyOf":[{"$ref":"#/components/schemas/AbcRotationSpeed"},{"type":"null"}]},"active":{"type":"boolean"},"allocation_policy_id":{"format":"int64","type":["integer","null"]},"allow_multi_lot_on_lpn":{"type":["boolean","null"]},"barcode_format_id":{"format":"int64","type":["integer","null"]},"best_by_days":{"format":"int32","type":["integer","null"]},"cartonization_policy_id":{"format":"int64","type":"integer"},"class":{"type":["string","null"]},"cube":{"format":"double","type":"number"},"default_uom":{"type":["string","null"]},"deliver_by_days":{"format":"int32","type":["integer","null"]},"descr":{"type":"string"},"expire_days":{"format":"int32","type":["integer","null"]},"external_id":{"type":["string","null"]},"gross_wgt":{"format":"double","type":"number"},"lot_policy_id":{"format":"int64","type":"integer"},"max_age_on_rec":{"format":"int32","type":["integer","null"]},"max_temperature":{"format":"double","type":["number","null"]},"min_shelf_life_on_pick":{"format":"int32","type":["integer","null"]},"min_shelf_life_on_rec":{"format":"int32","type":["integer","null"]},"min_temperature":{"format":"double","type":["number","null"]},"net_wgt":{"format":"double","type":"number"},"on_rec_copy_receipt_number":{"type":"boolean"},"pack_id":{"format":"int64","type":"integer"},"pack_location":{"type":["string","null"]},"pick_instruction":{"type":["string","null"]},"positions_required":{"format":"int16","type":"integer"},"putaway_class":{"anyOf":[{"$ref":"#/components/schemas/PutawayClass"},{"type":"null"}]},"putaway_loc":{"type":["string","null"]},"putaway_policy_id":{"format":"int64","type":["integer","null"]},"putawayzone":{"type":["string","null"]},"receipt_hold_code":{"type":["string","null"]},"receipt_policy_id":{"format":"int64","type":"integer"},"receipt_qc_loc":{"type":["string","null"]},"replenishment_policy_id":{"format":"int64","type":"integer"},"requires_temperature_capture":{"type":"boolean"},"return_location":{"type":["string","null"]},"rotate_by":{"type":"string"},"rotation":{"description":"Represents SKU rotation policy, determining the order in which stock is picked.\n\n- `Fifo`: First-In-First-Out rotation. - `Lifo`: Last-In-First-Out rotation.\n\nUsed to specify how items are rotated in inventory management.\n\n# Examples\n\n``` use crate::model::sku::SkuRotation; let rotation = SkuRotation::Fifo; assert_eq!(rotation.to_string(), \"Fifo\"); ``` `PartialEq`/`Eq` are unconditional (not `cfg(test)`): a putaway step now compares `SkuRotation` values outside tests too, via `PropRule::matches` (phase 2b product criteria).","enum":["Fifo","Lifo","Fefo"],"type":"string"},"shelf_life":{"format":"int32","type":["integer","null"]},"sku_group":{"type":["string","null"]},"stack_limit":{"format":"int16","type":"integer"},"tare_weight":{"format":"double","type":"number"},"warning_temperature_max":{"format":"double","type":["number","null"]},"warning_temperature_min":{"format":"double","type":["number","null"]}},"type":"object"},"SourceFingerprint":{"description":"Spec §9 (cross-review 2026-10-06): the expected SOURCE. `source_container_id` is `pick_detail.container_id` — where the goods are taken FROM; the pallet (`drop_id`, `pick_drop_id`) and the planned box (`carton_id`) are where they go and are never part of it (X-06).","properties":{"internal_lot":{"type":"string"},"owner_id":{"format":"int64","type":"integer"},"sku_code":{"type":"string"},"source_container_id":{"format":"int64","type":["integer","null"]},"source_location":{"type":"string"}},"required":["internal_lot","owner_id","sku_code","source_location"],"type":"object"},"StageAssignment":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"dispatch_id":{"format":"int64","type":"integer"},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"outbound_flow_unit_id":{"format":"int64","type":"integer"},"stage_location_code":{"type":"string"},"stop_id":{"format":"int64","type":"integer"},"unit_assignment_id":{"format":"int64","type":"integer"},"unit_assignment_version":{"format":"int32","type":"integer"},"version":{"format":"int32","type":"integer"}},"required":["add_when","add_who","dispatch_id","id","mod_when","mod_who","outbound_flow_unit_id","stage_location_code","stop_id","unit_assignment_id","unit_assignment_version","version"],"type":"object"},"StagedRemainderReview":{"properties":{"execution_id":{"format":"int64","type":"integer"},"previous_dispatch_status":{"anyOf":[{"$ref":"#/components/schemas/DispatchStatus"},{"type":"null"}]},"stage_location":{"type":"string"},"stage_version":{"format":"int32","type":"integer"}},"required":["execution_id","stage_location","stage_version"],"type":"object"},"StageExecution":{"properties":{"container_ids":{"items":{"format":"int64","type":"integer"},"type":"array"},"dispatch_id":{"format":"int64","type":"integer"},"from_location_code":{"type":"string"},"id":{"format":"int64","type":"integer"},"moved":{"type":"boolean"},"operation_id":{"format":"uuid","type":"string"},"outbound_flow_unit_id":{"format":"int64","type":"integer"},"stage_assignment_id":{"format":"int64","type":"integer"},"stage_assignment_version":{"format":"int32","type":"integer"},"stage_location_code":{"type":"string"},"staged_at":{"type":"string"},"staged_by":{"format":"int64","type":"integer"},"stop_id":{"format":"int64","type":"integer"},"subject_container_id":{"format":"int64","type":"integer"},"transfer_reason":{"default":null,"type":["string","null"]},"transferred_from_execution_id":{"default":null,"format":"int64","type":["integer","null"]},"unit_assignment_id":{"format":"int64","type":"integer"},"unit_assignment_version":{"format":"int32","type":"integer"}},"required":["container_ids","dispatch_id","from_location_code","id","moved","operation_id","outbound_flow_unit_id","stage_assignment_id","stage_assignment_version","stage_location_code","staged_at","staged_by","stop_id","subject_container_id","unit_assignment_id","unit_assignment_version"],"type":"object"},"StageUnitState":{"properties":{"assignment":{"anyOf":[{"$ref":"#/components/schemas/StageAssignment"},{"type":"null"}]},"assignment_matches_transport":{"default":false,"description":"The card pins the actual transport intent, not merely its Dispatch id. S1b ledger replies predate this projection; absence must not break replay.","type":"boolean"},"assignment_version":{"description":"Zero denotes absence; echo this Stage entity, not Dispatch-wide OCC.","format":"int32","type":"integer"},"container_code":{"type":["string","null"]},"container_status":{"anyOf":[{"$ref":"#/components/schemas/ContainerStatus"},{"type":"null"}]},"current_location":{"type":["string","null"]},"dispatch_code":{"type":["string","null"]},"dispatch_status":{"anyOf":[{"$ref":"#/components/schemas/DispatchStatus"},{"type":"null"}]},"execution":{"anyOf":[{"$ref":"#/components/schemas/StageExecution"},{"type":"null"}]},"is_current_root":{"type":"boolean"},"nested_units":{"type":"boolean"},"packing_open":{"type":"boolean"},"stage_committed":{"default":false,"description":"Historical commitment remains authoritative even when an old/faulty writer made the current transport generation disagree with its proof.","type":"boolean"},"stop_sequence":{"format":"int32","type":["integer","null"]},"transport_assignment":{"anyOf":[{"$ref":"#/components/schemas/OutboundUnitAssignment"},{"type":"null"}]},"unit":{"$ref":"#/components/schemas/OutboundFlowUnit"}},"required":["assignment_version","is_current_root","nested_units","packing_open","unit"],"type":"object"},"StationExcess":{"properties":{"count_id":{"description":"The request receipt, not a claim that inventory has been adjusted.","format":"int64","type":["integer","null"]},"id":{"format":"int64","type":"integer"},"operation_id":{"format":"uuid","type":"string"},"owner_id":{"format":"int64","type":"integer"},"qty":{"format":"double","type":"number"},"reported_by":{"format":"int64","type":"integer"},"sku_code":{"type":"string"},"station_location":{"type":"string"},"tote_code":{"type":"string"},"tote_container_id":{"format":"int64","type":"integer"},"uom":{"type":"string"},"wave_id":{"format":"int64","type":"integer"}},"required":["id","operation_id","owner_id","qty","reported_by","sku_code","station_location","tote_code","tote_container_id","uom","wave_id"],"type":"object"},"StationExcessContext":{"properties":{"owner_code":{"type":"string"},"owner_id":{"format":"int64","type":"integer"},"sku_code":{"type":"string"},"station_location":{"type":"string"},"tote_code":{"type":"string"},"uom":{"type":"string"},"wave_code":{"type":"string"},"wave_id":{"format":"int64","type":"integer"}},"required":["owner_code","owner_id","sku_code","station_location","tote_code","uom","wave_code","wave_id"],"type":"object"},"StationPositionView":{"description":"One position as the station screen shows it: with its order and wave codes and its box's code (plain read).","properties":{"box_code":{"type":["string","null"]},"box_container_id":{"format":"int64","type":["integer","null"]},"complete":{"description":"The position is complete — \"take the box off\" (R-17): its order's wave member is `Released` and nothing more is coming.","type":"boolean"},"id":{"format":"int64","type":"integer"},"order_id":{"format":"int64","type":["integer","null"]},"order_number":{"type":["string","null"]},"picks_in_box":{"description":"The picks placed in the position's box.","format":"int64","type":"integer"},"picks_still_coming":{"description":"The order's picks bound for this station still to come (R-17).","format":"int64","type":"integer"},"position_no":{"format":"int32","type":"integer"},"station_location":{"type":"string"},"wave_code":{"type":["string","null"]},"wave_id":{"format":"int64","type":["integer","null"]}},"required":["complete","id","picks_in_box","picks_still_coming","position_no","station_location"],"type":"object"},"StationQueueRow":{"description":"One unit of a station's queue ([`OutboundFlowUnitBmc::station_queue`]).","properties":{"container_code":{"description":"The label the operator scans; `None` when the container is gone.","type":["string","null"]},"created_at":{"type":"string"},"handoff_location":{"type":["string","null"]},"order_id":{"format":"int64","type":"integer"},"order_number":{"description":"`None` only when the order row is gone (no foreign key, D-46).","type":["string","null"]},"picks":{"description":"How many picks the unit carries.","format":"int64","type":"integer"},"subject_container_id":{"format":"int64","type":"integer"},"subject_kind":{"allOf":[{"$ref":"#/components/schemas/FlowSubjectKind"}],"description":"A box to verify, a pallet to repack, or a reopened package."},"unit_id":{"format":"int64","type":"integer"},"version":{"format":"int32","type":"integer"}},"required":["created_at","order_id","picks","subject_container_id","subject_kind","unit_id","version"],"type":"object"},"StationRemainderOrder":{"properties":{"awaiting_qty":{"format":"double","type":"number"},"order_id":{"format":"int64","type":"integer"},"order_number":{"type":"string"},"station_location":{"type":"string"},"status":{"type":"string"},"tote_code":{"type":"string"},"version":{"format":"int32","type":"integer"}},"required":["awaiting_qty","order_id","order_number","station_location","status","tote_code","version"],"type":"object"},"StationShortedPick":{"properties":{"pick_id":{"format":"int64","type":"integer"},"qty":{"format":"double","type":"number"},"remediation_id":{"format":"int64","type":"integer"},"shorted_pick_id":{"format":"int64","type":"integer"}},"required":["pick_id","qty","remediation_id","shorted_pick_id"],"type":"object"},"StationSummary":{"description":"A location that may be a distribution station — every `Sort` location — with its positions counted, as the stations screen lists them (plain read). A `Sort` location with no positions is a station not set up yet.","properties":{"boxes":{"format":"int64","type":"integer"},"free":{"format":"int64","type":"integer"},"station_location":{"type":"string"},"total":{"format":"int64","type":"integer"}},"required":["boxes","free","station_location","total"],"type":"object"},"StepDecision":{"description":"One step's decision in the shared planner result. It contains quantities and stable codes only; no SQL fragments or candidate inventory rows.","properties":{"candidate_count":{"format":"uint64","minimum":0,"type":"integer"},"input_need":{"format":"double","type":"number"},"rejections":{"anyOf":[{"$ref":"#/components/schemas/StepRejectionCounts"},{"type":"null"}]},"remainder":{"format":"double","type":"number"},"rule_num":{"type":"string"},"selected_qty":{"format":"double","type":"number"},"sequence":{"format":"int32","type":"integer"},"step_id":{"format":"int64","type":"integer"},"step_version":{"format":"int32","type":"integer"},"uom":{"type":"string"},"verdict":{"$ref":"#/components/schemas/StepVerdict"}},"required":["candidate_count","input_need","remainder","rule_num","selected_qty","sequence","step_id","step_version","uom","verdict"],"type":"object"},"StepDraft":{"description":"One step's unsaved draft, as the editor holds it.\n\nThe same shape the batch save sends (`PutawayStepEdit`'s `step_id` + `fields` + `criteria`), on purpose — the screen holds ONE draft per step and hands the same thing to the read that narrates it and to the write that stores it. Two shapes would be two chances for the preview and the save to disagree about what the operator typed.","properties":{"criteria":{"default":null,"description":"The conditions the operator is holding for this step, or `None` when they have not touched them. `Some(vec![])` means \"no conditions\" — the same distinction the save makes, and it is load-bearing in both.","items":{"$ref":"#/components/schemas/CriterionRow"},"type":["array","null"]},"fields":{"description":"Raw JSON, for the same reason the save's `fields` is: serde folds `{\"allow_mixed_sku\": null}` and `{}` into the same `None`, and \"this step has no opinion\" must not read as \"leave it alone\" in a preview any more than it may in a write."},"step_id":{"format":"int64","type":"integer"}},"required":["fields","step_id"],"type":"object"},"StepDraft_677145":{"description":"One step's unsaved draft, as the editor holds it: the columns the operator has changed, and nothing else.\n\nThe same shape the batch save sends (`SaveAllocationSteps::StepEdit`'s `step_id` + `fields`), on purpose — the screen holds ONE draft per step and hands the same thing to the read that narrates it and to the write that stores it. Two shapes would be two chances for the preview and the save to disagree about what the operator typed.","properties":{"fields":{"description":"Raw JSON, for the same reason the save's `fields` is: serde folds `{\"putawayzone\": null}` and `{}` into the same `None`, and \"clear this narrowing\" must not read as \"leave it alone\" in a preview any more than it may in a write."},"step_id":{"format":"int64","type":"integer"}},"required":["fields","step_id"],"type":"object"},"StepEdit":{"description":"One step's draft.\n\n`fields` is raw JSON on purpose, and this is the one place in the command that is not typed: serde folds `{\"putawayzone\": null}` and `{}` into the same `None`, so a typed struct alone cannot tell \"clear this narrowing\" from \"do not touch it\" — and the step page's visible symptom was exactly that (pick \"— any —\", watch the old value come straight back). [`explicit_clears`] reads the raw value BEFORE deserialization; the typed [`AllocationPolicyDetailForUpdate`] carries the rest.","properties":{"expected_version":{"format":"int32","type":"integer"},"fields":true,"step_id":{"format":"int64","type":"integer"}},"required":["expected_version","fields","step_id"],"type":"object"},"StepFields":{"description":"The thirteen card fields, under their own column names.\n\nSpelled out rather than embedding [`AllocationPolicyDetail`] whole: the card edits exactly these, and a wire shape that also carried `add_who` / `mod_when` / `allocation_policy_id` would invite a draft to send them back.","properties":{"allocation_type":{"$ref":"#/components/schemas/AllocationType"},"location_abc":{"anyOf":[{"$ref":"#/components/schemas/AbcRotationSpeed"},{"type":"null"}]},"location_category":{"anyOf":[{"$ref":"#/components/schemas/LocCategory"},{"type":"null"}]},"location_type":{"anyOf":[{"$ref":"#/components/schemas/LocType"},{"type":"null"}]},"lpn_quantity_rule":{"$ref":"#/components/schemas/LpnQtyRule"},"one_pick_per_uom_location":{"type":"boolean"},"putawayzone":{"type":["string","null"]},"qty_fit_rule":{"anyOf":[{"$ref":"#/components/schemas/QtyFit"},{"type":"null"}]},"sort_1":{"$ref":"#/components/schemas/AllocSort"},"sort_2":{"anyOf":[{"$ref":"#/components/schemas/AllocSort"},{"type":"null"}]},"sort_3":{"anyOf":[{"$ref":"#/components/schemas/AllocSort"},{"type":"null"}]},"sort_4":{"anyOf":[{"$ref":"#/components/schemas/AllocSort"},{"type":"null"}]},"uom_code":{"type":"string"}},"required":["allocation_type","lpn_quantity_rule","one_pick_per_uom_location","sort_1","uom_code"],"type":"object"},"StepRejectionCounts":{"description":"Typed Full-preview rejection counters. The database counters form a waterfall; the selector counters are the real pure predicates applied after candidate loading.","properties":{"customer_requirement_failed":{"format":"uint64","minimum":0,"type":"integer"},"fit_failed":{"format":"uint64","minimum":0,"type":"integer"},"held":{"format":"uint64","minimum":0,"type":"integer"},"location_not_allocatable":{"format":"uint64","minimum":0,"type":"integer"},"lpn_rule_failed":{"format":"uint64","minimum":0,"type":"integer"},"pack_mismatch":{"format":"uint64","minimum":0,"type":"integer"},"shelf_life_failed":{"description":"Lots rejected on their dates: expired, below the reserve boundary (today + max(`min_shelf_life_on_pick`, `shelf_life`)), or missing an expiration the SKU requires.","format":"uint64","minimum":0,"type":"integer"},"step_location_filter_failed":{"format":"uint64","minimum":0,"type":"integer"}},"required":["customer_requirement_failed","fit_failed","held","location_not_allocatable","lpn_rule_failed","pack_mismatch","shelf_life_failed","step_location_filter_failed"],"type":"object"},"StepVerdict":{"description":"Stable wire verdict for one policy step. Configuration defects never become a verdict: policy loading still returns an error.","enum":["selected","no_candidates","no_quantity_for_uom","filtered_by_fit"],"type":"string"},"StepVersion":{"description":"Each written step's NEW version, so the editor's drafts stay saveable without a re-read.","properties":{"step_id":{"format":"int64","type":"integer"},"version":{"format":"int32","type":"integer"}},"required":["step_id","version"],"type":"object"},"SupervisedToteOutcome":{"description":"What the supervisor's door did with the tote.","oneOf":[{"description":"It held goods: delivered to the route's frozen station.","properties":{"moved":{"description":"`false` when nothing moved: a repeat, or a tote already standing at the station.","type":"boolean"},"outcome":{"enum":["delivered"],"type":"string"},"route_completed":{"description":"The delivery finished the route: no live stop and no undelivered tote is left, and the operator's next start takes a new portion.","type":"boolean"},"station_location":{"type":"string"},"tote_container_id":{"format":"int64","type":"integer"},"wave_id":{"description":"The wave whose route the tote served: reconciled at once after a delivery that moved the tote (ruling 6).","format":"int64","type":"integer"}},"required":["moved","outcome","route_completed","station_location","tote_container_id","wave_id"],"type":"object"},{"description":"It was empty: given back to the handling-unit registry.","properties":{"outcome":{"enum":["released"],"type":"string"},"route_completed":{"description":"The release finished the route: no live stop and no live tote is left, and the operator's next start takes a new portion.","type":"boolean"},"tote_container_id":{"format":"int64","type":"integer"}},"required":["outcome","route_completed","tote_container_id"],"type":"object"}]},"SystemSettings":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"config_key":{"type":"string"},"config_value":{"type":"string"},"default_value":{"type":"string"},"description":{"type":["string","null"]},"editable":{"type":"boolean"},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"}},"required":["add_when","add_who","config_key","config_value","default_value","editable","id","mod_when","mod_who"],"type":"object"},"SystemStockLine":{"description":"One identity the system holds at a location, as the counter reads it.","properties":{"lot":{"type":"string"},"lpn":{"description":"The container's code; `None` = loose stock.","type":["string","null"]},"qty":{"format":"double","type":"number"},"sku_code":{"type":"string"}},"required":["lot","qty","sku_code"],"type":"object"},"TargetContainerSpec":{"oneOf":[{"description":"No container — loose units.","enum":["None"],"type":"string"},{"additionalProperties":false,"description":"Resolve an existing container by code.","properties":{"Existing":{"properties":{"code":{"type":"string"}},"required":["code"],"type":"object"}},"required":["Existing"],"type":"object"},{"additionalProperties":false,"description":"Create a fresh top-level pallet. `code=None` triggers auto-generation per `OwnerConfig.auto_generate_lpn_format`.","properties":{"NewPallet":{"properties":{"code":{"type":["string","null"]},"sscc":{"type":["string","null"]}},"type":"object"}},"required":["NewPallet"],"type":"object"},{"additionalProperties":false,"description":"Create a new case, optionally nested under an existing pallet.","properties":{"NewCase":{"properties":{"code":{"type":["string","null"]},"parent_pallet_code":{"type":["string","null"]}},"type":"object"}},"required":["NewCase"],"type":"object"},{"additionalProperties":false,"description":"Add a new case as child of an existing pallet.","properties":{"AddCaseToPallet":{"properties":{"new_case_code":{"type":["string","null"]},"pallet_code":{"type":"string"}},"required":["pallet_code"],"type":"object"}},"required":["AddCaseToPallet"],"type":"object"},{"additionalProperties":false,"description":"Cross-dock staging container (Phase 2 cross-dock; outbound order ref).","properties":{"CrossDock":{"properties":{"outbound_order_id":{"format":"int64","type":["integer","null"]}},"type":"object"}},"required":["CrossDock"],"type":"object"}]},"TargetExceptionRow":{"description":"One exception as the supervisor's list shows it (`pick_target_exception_board` view, wms-app 059 part 5): what was reported, where, by whom, and how it stands — the row the web screen's Retry acts on.","properties":{"assignment_code":{"type":"string"},"assignment_id":{"format":"int64","type":"integer"},"box_code":{"description":"The box reported full.","type":["string","null"]},"comment":{"type":["string","null"]},"continuation_id":{"format":"int64","type":["integer","null"]},"error_code":{"type":["string","null"]},"error_detail":{"type":["string","null"]},"handed_over_at":{"default":null,"type":["string","null"]},"id":{"format":"int64","type":"integer"},"kind":{"description":"`pick_target_exception_kind` as text: `CartonFull` | `TargetLeftCart`.","type":"string"},"order_id":{"format":"int64","type":"integer"},"order_number":{"type":"string"},"picks":{"description":"How many picks the exception replans.","format":"int32","type":"integer"},"position_no":{"format":"int16","type":"integer"},"reason_code":{"description":"`carton_full_reason` as text — `CartonFull` only.","type":["string","null"]},"reported_at":{"type":"string"},"reported_by":{"format":"int64","type":"integer"},"reported_by_name":{"type":["string","null"]},"resolved_at":{"default":null,"type":["string","null"]},"resulting_plan_id":{"format":"int64","type":["integer","null"]},"source_carton_code":{"description":"The full box's planned carton (`PlannedCarton` only).","type":["string","null"]},"status":{"description":"`pick_target_exception_status` as text.","type":"string"},"target_kind":{"description":"`pick_target_kind` as text: `PlannedCarton` | `Bypassed`.","type":"string"}},"required":["assignment_code","assignment_id","id","kind","order_id","order_number","picks","position_no","reported_at","reported_by","status","target_kind"],"type":"object"},"TargetExceptionStatus":{"oneOf":[{"description":"Reported, not yet resolving — kept for a two-phase variant; nothing writes it today (ruling T7). Not written in slice 6 (spec rev 2 state machine).","enum":["Reported"],"type":"string"},{"description":"The close's transaction is resolving it right now.","enum":["Resolving"],"type":"string"},{"description":"Resolved: a new plan (`PlannedCarton`) or a continuation (`Bypassed`).","enum":["Resolved"],"type":"string"},{"description":"The repair failed; `error_code` says why. A supervisor retries.","enum":["RecoveryRequired"],"type":"string"},{"description":"Terminal: nothing is left to repair — none of its picks is a live reservation any more (deleted, shorted, picked), found by a retry. `error_code` says why, `resolved_at` when (`chk_ptee_cancelled`).","enum":["Cancelled"],"type":"string"}]},"Task":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"assignee":{"format":"int64","type":["integer","null"]},"batch_id":{"format":"int64","type":["integer","null"]},"claimed_at":{"default":null,"type":["string","null"]},"code":{"type":"string"},"container_id":{"format":"int64","type":["integer","null"]},"created_at":{"type":"string"},"ended_at":{"default":null,"type":["string","null"]},"escalated_at":{"default":null,"description":"Когда задача ушла супервайзеру: отказов набралось до порога `TASK_SKIP_ESCALATE_AFTER`. Пока стоит — выдача её не отдаёт никому.","type":["string","null"]},"from_location":{"type":["string","null"]},"heartbeat_at":{"default":null,"type":["string","null"]},"id":{"format":"int64","type":"integer"},"lease_expires_at":{"default":null,"type":["string","null"]},"lot":{"type":["string","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"owner_id":{"format":"int64","type":["integer","null"]},"priority":{"format":"int16","type":"integer"},"qty":{"format":"double","type":["number","null"]},"qty_done":{"format":"double","type":"number"},"refused_count":{"description":"Сколько раз от задачи ОТКАЗАЛИСЬ (сдача в счёт не идёт). Растёт в [`TaskBmc::release_to_pool`], обнуляется только переназначением супервайзером ([`TaskBmc::reassign_cas`]) — миграция 307.","format":"int32","type":"integer"},"return_kind":{"description":"КАК задача в последний раз вернулась в пул: `Refused` (отказ оператора), `HandedBack` (сдача), `Seized` (изъял супервайзер), `Expired` (истекла аренда). `skip_reason` пишут все трое, у кого есть причина, и без этого поля доска выдавала бы причину изъятия за причину отказа (миграция 308). Снимается вместе с `skip_reason`, когда задачу снова берут.","type":["string","null"]},"short_reason_code":{"type":["string","null"]},"short_reason_note":{"type":["string","null"]},"skip_reason":{"type":["string","null"]},"skipped_at":{"default":null,"type":["string","null"]},"sku_code":{"type":["string","null"]},"source_id":{"format":"int64","type":"integer"},"source_type":{"type":"string"},"started_at":{"default":null,"type":["string","null"]},"status":{"$ref":"#/components/schemas/TaskStatus"},"task_type":{"$ref":"#/components/schemas/TaskType"},"to_location":{"type":["string","null"]},"uom":{"type":["string","null"]},"version":{"format":"int32","type":"integer"},"wave_id":{"format":"int64","type":["integer","null"]},"weight":{"description":"Вес запаса задачи на момент её создания — единственная формула веса (`pack::StockWeights`), скопированная, как и `qty` (wms-app 340).\n\n`None` — взвесить было нечем (`PhysicalMetric::Unknown`): ни у базовой строки упаковки, ни у карточки товара веса нет. Такая задача проходит любой предел грузоподъёмности — проверка, которой нечего сравнивать, не имеет права отказывать (wms-app 341, спека физических измерений §9.2). Ноль больше не значит «неизвестно»: он сравнивается как число.","format":"double","type":["number","null"]},"workstation_completed_by":{"default":null,"description":"Real web executor of source-owned workstation Pick completion. A pooled task can finish without pretending it had an RF assignment.","format":"int64","type":["integer","null"]}},"required":["add_when","add_who","code","created_at","id","mod_when","mod_who","priority","qty_done","refused_count","source_id","source_type","status","task_type","version"],"type":"object"},"TaskNotDeleted":{"properties":{"reason":{"type":"string"},"task_id":{"format":"int64","type":"integer"}},"required":["reason","task_id"],"type":"object"},"TaskStatus":{"oneOf":[{"enum":["InProgress","Completed","Shorted"],"type":"string"},{"description":"Sitting in the dispatch pool. Dispatch claims it; source-owned manual Pick completion may also finish it together with physical inventory.","enum":["Created"],"type":"string"},{"description":"Handed to an operator by `claim_next`. Only the methods in [`TaskBmc`]'s \"dispatch write surface\" move a task out of it — there is no generic `update` on this BMC, by the rule stated there.","enum":["Assigned"],"type":"string"},{"description":"**Declared, and written by nothing.** Its one writer was `TaskBmc::cancel_in_work`, deleted on 2026-09-04 when the owner ruled that a task whose pick is removed is removed too, whatever state it is in (see `TaskBmc::delete_for_removed_source`). The variant stays because spec §9 declares a status set up front — do not go hunting for the code that writes it.","enum":["Cancelled"],"type":"string"}]},"TaskType":{"oneOf":[{"enum":["Pick","Putaway","Replenish","Move"],"type":"string"},{"description":"One location of an inventory count, one attempt (source `inventory_count_task`, wms-app 062). No quantity: the count is blind.","enum":["Count"],"type":"string"}]},"TraceDetail":{"description":"How much of the scan to keep.\n\n`Full` is not the default because [`StepTrace::candidate_details`] grows with `CANDIDATE_BATCH × MAX_BATCHES × predicates` per step, and the trace is returned to a handheld over the wire on every suggestion.\n\n`Deserialize`/`JsonSchema` because it is a REQUEST field ([`crate::putaway::command::SuggestLocation`]): the choice belongs to whoever is asking about one surprising pallet, not to a build-time constant.","oneOf":[{"description":"Matched step, candidate counts, rejection code tallies.","enum":["Summary"],"type":"string"},{"description":"Every candidate and every predicate verdict, in evaluation order.","enum":["Full"],"type":"string"}]},"TransactionLog":{"description":"Core transaction log entity tracking inventory movements","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"best_by_date":{"type":["string","null"]},"code":{"type":"string"},"delivery_by_date":{"type":["string","null"]},"effective_date":{"type":"string"},"expiration_date":{"type":["string","null"]},"from_loc":{"type":"string"},"from_lpn":{"type":"string"},"hold_code":{"anyOf":[{"$ref":"#/components/schemas/InventoryStatusHold"},{"type":"null"}]},"id":{"format":"int64","type":"integer"},"idempotency_key":{"description":"Correlates rows from the same MoveCommand (one UUID, multiple fragments). NULL on receive-time deposits.","format":"uuid","type":["string","null"]},"lot":{"type":["string","null"]},"manufactured_date":{"type":["string","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"owner_id":{"format":"int64","type":"integer"},"pack_id":{"format":"int64","type":["integer","null"]},"qty":{"format":"double","type":"number"},"qty_after":{"format":"double","type":["number","null"]},"qty_before":{"description":"Balance quantity before / after this row (wms-app 052) — written by inventory adjustments; NULL for other operations.","format":"double","type":["number","null"]},"reason_code":{"description":"Free-form audit hint (≤80 chars).","type":["string","null"]},"sku_code":{"type":"string"},"source_code":{"type":["string","null"]},"source_type":{"description":"Snake-case discriminator (`MoveSourceType::as_code()`) — populated by Move-primitive writes since migration 144. Receive-time deposits leave this NULL.","type":["string","null"]},"status":{"type":"string"},"to_loc":{"type":"string"},"to_lpn":{"type":"string"},"transaction_type":{"$ref":"#/components/schemas/TransactionType"},"uom":{"type":["string","null"]}},"required":["add_when","add_who","code","effective_date","from_loc","from_lpn","id","mod_when","mod_who","owner_id","qty","sku_code","status","to_loc","to_lpn","transaction_type"],"type":"object"},"TransactionType":{"enum":["Deposit","Pick","Ship","Withdraw","Move","Transfer","Adjust","None"],"type":"string"},"TransportUnit":{"properties":{"active":{"type":"boolean"},"carrier_id":{"format":"int64","type":["integer","null"]},"external_ref":{"type":"string"},"id":{"format":"int64","type":"integer"},"kind":{"$ref":"#/components/schemas/TransportUnitKind"},"plate":{"type":["string","null"]},"version":{"format":"int32","type":"integer"}},"required":["active","external_ref","id","kind","version"],"type":"object"},"TransportUnitKind":{"enum":["Truck","Trailer","Container","SwapBody","CourierCage"],"type":"string"},"UnitAssignmentPresentation":{"properties":{"container_code":{"type":["string","null"]},"current_dispatch_code":{"type":["string","null"]},"current_location":{"type":["string","null"]},"current_stop_sequence":{"format":"int32","type":["integer","null"]},"order_number":{"type":["string","null"]},"target_dispatch_code":{"type":["string","null"]},"target_dispatch_status":{"anyOf":[{"$ref":"#/components/schemas/DispatchStatus"},{"type":"null"}]},"target_stop_sequence":{"format":"int32","type":["integer","null"]}},"type":"object"},"UnitAssignmentState":{"properties":{"assignment":{"anyOf":[{"$ref":"#/components/schemas/OutboundUnitAssignment"},{"type":"null"}]},"assignment_version":{"description":"Zero denotes absence, and is the only valid Assign version.","format":"int32","type":"integer"},"is_current_root":{"type":"boolean"},"nested_units":{"description":"Composite replan belongs to the future Consolidation door.","type":"boolean"},"order_intent":{"anyOf":[{"$ref":"#/components/schemas/DispatchOrder"},{"type":"null"}],"description":"Immutable membership id: echo it to refuse a stale transport plan."},"packing_open":{"type":"boolean"},"stage_committed":{"description":"Authoritative physical Stage commitment, independent of Router markers.","type":"boolean"},"unit":{"$ref":"#/components/schemas/OutboundFlowUnit"}},"required":["assignment_version","is_current_root","nested_units","packing_open","stage_committed","unit"],"type":"object"},"UnitAssignmentStatus":{"enum":["Assigned"],"type":"string"},"UserApiKey":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"expires_at":{"default":null,"type":["string","null"]},"id":{"format":"int64","type":"integer"},"key_hash":{"description":"argon2id PHC hash of the full plaintext key. **Never leaves the process.** `#[serde(skip_serializing)]` keeps it out of every RPC response (`list_user_api_key` / `get_user_api_key`). The field is still populated by `FromRow` because `ApiKeyStore::validate` reads it directly from the table — just not via this DTO. See ADR-022 (mutation audit events).","type":"string","writeOnly":true},"key_prefix":{"type":"string"},"last_used_at":{"default":null,"type":["string","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"name":{"type":"string"},"revoked_at":{"default":null,"type":["string","null"]},"user_id":{"format":"int64","type":"integer"}},"required":["add_when","add_who","id","key_hash","key_prefix","mod_when","mod_who","name","user_id"],"type":"object"},"UserInfo":{"properties":{"add_when":{"default":null,"description":"When the account was created — the AUDIT block's \"Created\" field.\n\n`add_when` is NOT NULL on both `enterprise.user` and tenant-manager's `user`, so this is `Option` to tolerate a projection that did not select it, not because a created account can lack a creation time.\n\nAdded late, and the reason is worth keeping: migration 317 put \"Created\" on the detail form reading `add_when`, but this struct — the only thing the `is_rpc` BIO's `get_user` path can return — never carried the column, so the field rendered permanently blank. The form was right; the projection was short.","type":["string","null"]},"api_access":{"type":"boolean"},"date_format":{"type":"string"},"email":{"type":"string"},"employee_id":{"type":["string","null"]},"failed_login_attempts":{"format":"int32","type":"integer"},"full_name":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"last_failed_login_at":{"default":null,"type":["string","null"]},"last_login_at":{"default":null,"type":["string","null"]},"locale":{"type":"string"},"mode":{"type":"string"},"password_age_days":{"description":"\"Password age\" for the AUDIT block — derived from `pwd_changed_at`, in whole days. **Not a database column**: `#[field(skip)]` keeps it out of the SELECT projection (`sea_column_refs`), and `#[sqlx(default)]` keeps `derive(FromRow)` from trying to read a `password_age_days` column that doesn't exist. Populated by `UserBy::finish_computed_fields`, which every `UserBmc` fetch path calls — see there. `None` whenever `pwd_changed_at` is `None`; never a misleading `0`.","format":"int64","type":["integer","null"]},"pwd_changed_at":{"default":null,"type":["string","null"]},"rf_login":{"type":"boolean"},"status":{"$ref":"#/components/schemas/UserStatus"},"timezone":{"type":"string"},"typ":{"$ref":"#/components/schemas/UserTyp"},"username":{"type":"string"}},"required":["api_access","date_format","email","failed_login_attempts","id","locale","mode","rf_login","status","timezone","typ","username"],"type":"object"},"UserStatus":{"description":"Mirror of the `user_status` PostgreSQL enum (`enterprise` migration 044, tenant-manager migration 005).","oneOf":[{"enum":["Active","Locked","Disabled"],"type":"string"},{"description":"The account exists but its owner has not set a password yet. Allowed through: without a password there is nothing to sign in with, and once one is set the account is in use.","enum":["Invited"],"type":"string"}]},"UserThroughput":{"properties":{"hours_span":{"format":"double","type":"number"},"line_count":{"format":"int64","type":"integer"},"lines_per_hour":{"format":"double","type":"number"},"user_id":{"format":"int64","type":"integer"}},"required":["hours_span","line_count","lines_per_hour","user_id"],"type":"object"},"UserTyp":{"description":"Mirror of the `enterprise.user_typ` PostgreSQL enum (migration 021).\n\nLifting `user.typ` from a stringly-typed column to a real enum gets us: - DB-level whitelist (insert/update of an unknown variant fails). - Compile-time exhaustive matching at every read site (was previously ad-hoc `matches!(s.as_str(), \"Admin\" | \"Sys\")` in `role_resolver`/`tx_helper`/`admin_rbac`).","enum":["User","Admin","Sys","Agent"],"type":"string"},"UserWarehouse":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"id":{"format":"int64","type":"integer"},"is_default":{"type":"boolean"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"role_id":{"format":"int64","type":"integer"},"user_id":{"format":"int64","type":"integer"},"warehouse_id":{"format":"int64","type":"integer"}},"required":["add_when","add_who","id","is_default","mod_when","mod_who","role_id","user_id","warehouse_id"],"type":"object"},"UserWarehouseWithDetails":{"description":"Joined result for user warehouse list (warehouse + role details)","properties":{"is_default":{"type":"boolean"},"role_code":{"type":"string"},"role_id":{"format":"int64","type":"integer"},"schema_name":{"type":"string"},"user_warehouse_id":{"format":"int64","type":"integer"},"warehouse_code":{"type":"string"},"warehouse_id":{"format":"int64","type":"integer"},"warehouse_name":{"type":"string"}},"required":["is_default","role_code","role_id","schema_name","user_warehouse_id","warehouse_code","warehouse_id","warehouse_name"],"type":"object"},"ValidationIssue":{"properties":{"field":{"description":"The field an operator can act on — `ship_to_id`, `sku_code`, `lines`.","type":"string"},"line_no":{"description":"Set when the issue is about one line.","format":"int32","type":["integer","null"]},"message":{"type":"string"}},"required":["field","message"],"type":"object"},"ValidationReport":{"properties":{"errors":{"items":{"$ref":"#/components/schemas/ValidationIssue"},"type":"array"},"ok":{"type":"boolean"},"warnings":{"description":"Not blocking. A ship date in the past is worth saying out loud and not worth refusing — back-dated orders are a real thing.","items":{"$ref":"#/components/schemas/ValidationIssue"},"type":"array"}},"required":["errors","ok","warnings"],"type":"object"},"VerificationPlan":{"properties":{"lot_proof":{"$ref":"#/components/schemas/LotProof"},"policy_id":{"format":"int64","type":"integer"},"policy_revision":{"format":"int32","type":"integer"},"required_evidence":{"items":{"$ref":"#/components/schemas/RequiredEvidence"},"type":"array"},"source":{"$ref":"#/components/schemas/SourceFingerprint"}},"required":["lot_proof","policy_id","policy_revision","required_evidence","source"],"type":"object"},"VerificationView":{"description":"What the card must prove about the source of a pick, and how far the operator has got.","properties":{"blocked":{"description":"The wire code of the refusal that makes the pick uncommittable: `SOURCE_EXPIRED` — the reserved lot fell below the SKU's minimum shelf life on pick after it was reserved (ruling D5; the pick is shorted to zero with the reason `EXPIRED`, or rejected); or `SOURCE_NOT_PHYSICALLY_IDENTIFIABLE` — the source cannot be told apart by what is physically there (shorted to zero, rejected or skipped). Not the route step's `blocked_reason` (cartonization facts).","type":["string","null"]},"blocked_message":{"description":"What the card says about `blocked`, in the reader's language: why the pick cannot be committed and the way out a short has. Set exactly when `blocked` is; the terminal prints it as is.","type":["string","null"]},"episode_id":{"description":"The caller's usable open episode, if one exists. A confirmation opens it; this view never does.","format":"int64","type":["integer","null"]},"next":{"anyOf":[{"$ref":"#/components/schemas/RequiredEvidence"},{"type":"null"}],"description":"What the operator proves next; `None` when the plan is satisfied (or blocked)."},"plan":{"anyOf":[{"$ref":"#/components/schemas/VerificationPlan"},{"type":"null"}],"description":"`None` exactly when `blocked` is set."},"satisfied":{"description":"The plan's evidence already proven, in plan order.","items":{"$ref":"#/components/schemas/EvidenceKey"},"type":"array"},"stale":{"description":"The caller's open episode proves another source, or belongs to another ownership (R8, R12): the plan restarts, and the first confirmation cancels that episode and opens a new one.","type":"boolean"}},"required":["satisfied","stale"],"type":"object"},"VocabularyItem":{"description":"One thing the picker may offer.","properties":{"code":{"description":"What lands in the row and what the engine compares — exactly, and case-sensitively.","type":"string"},"display":{"description":"What a human reads. Never the same field as [`Self::code`]: every comparison the engine makes is on the code, so a picker that sent the display back would store a criterion that matches nothing.","type":"string"},"reason":{"description":"Why this item is grouped where it is — the family, at the property stage, which is what the picker draws its headings from (the same shape the allocation screen's unit picker groups by class). `None` where there is no grouping to make.","type":["string","null"]}},"required":["code","display"],"type":"object"},"WarehouseAdminRow":{"properties":{"code":{"type":"string"},"id":{"format":"int64","type":"integer"},"is_active":{"type":"boolean"},"length_uom":{"type":"string"},"name":{"type":"string"},"readiness":{"$ref":"#/components/schemas/WarehouseReadiness"},"readiness_label":{"type":"string"},"readiness_reason":{"type":"string"},"schema_name":{"type":"string"},"volume_uom":{"type":"string"},"weight_uom":{"type":"string"}},"required":["code","id","is_active","length_uom","name","readiness","readiness_label","readiness_reason","schema_name","volume_uom","weight_uom"],"type":"object"},"WarehouseDefaults":{"description":"Defaults configured for the warehouse currently selected by the caller.\n\nThese values live in the enterprise schema because they describe a warehouse, while several of the referenced records (owner, locations, printer) live inside that warehouse's schema.  Keeping this read model in core prevents UI processes from learning that storage layout.","properties":{"default_owner_id":{"format":"int64","type":["integer","null"]},"default_pack_loc":{"type":["string","null"]},"default_pick_loc":{"type":["string","null"]},"default_printer_id":{"format":"int64","type":["integer","null"]},"default_receive_loc":{"type":["string","null"]}},"type":"object"},"WarehouseReadiness":{"enum":["ready","needs_provisioning","outdated","invalid"],"type":"string"},"WarehouseSettingsRow":{"description":"The caller's warehouse as the warehouse settings screen shows it: who it is and the rules the screen sets. One row — the screen never lists or writes another warehouse (plan R2). `Deserialize` because a command's output is stored for its replay.","properties":{"code":{"type":"string"},"id":{"format":"int64","type":"integer"},"name":{"type":"string"},"shared_tote_allows_mixed_owners":{"description":"May goods of several owners lie in one station route's shared tote at once? Switching it off changes nothing already deposited: the next deposit of another owner is refused.","type":"boolean"},"station_route_abandoned_after_minutes":{"description":"Minutes with no activity on a station route — no stop under a live lease, no route or stop change — before the supervisor's board calls it abandoned and the supervisor's door finishes its totes.","format":"int32","type":"integer"}},"required":["code","id","name","shared_tote_allows_mixed_owners","station_route_abandoned_after_minutes"],"type":"object"},"Wave":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"cancelled_at":{"default":null,"type":["string","null"]},"code":{"type":"string"},"completed_at":{"default":null,"type":["string","null"]},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"planned_at":{"default":null,"type":["string","null"]},"policy_id":{"format":"int64","type":["integer","null"]},"policy_run_id":{"format":"int64","type":["integer","null"]},"release_generation":{"format":"int32","type":"integer"},"release_requested_by":{"format":"int64","type":["integer","null"]},"released_at":{"default":null,"type":["string","null"]},"station_location":{"description":"The distribution station (a `Sort` location) the wave is released onto; `None` = no station (wms-app 095, R-4).","type":["string","null"]},"status":{"$ref":"#/components/schemas/WaveStatus"},"version":{"format":"int32","type":"integer"}},"required":["add_when","add_who","code","id","mod_when","mod_who","release_generation","status","version"],"type":"object"},"WaveOrder":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"attempt_count":{"format":"int32","type":"integer"},"id":{"format":"int64","type":"integer"},"last_error_code":{"type":["string","null"]},"last_error_detail":{"type":["string","null"]},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"order_id":{"format":"int64","type":"integer"},"outcome_order_status":{"anyOf":[{"$ref":"#/components/schemas/OrderStatus"},{"type":"null"}]},"outcome_order_version":{"format":"int32","type":["integer","null"]},"priority":{"format":"int16","type":["integer","null"]},"processing_started_at":{"default":null,"type":["string","null"]},"release_expected_order_version":{"format":"int32","type":["integer","null"]},"release_generation":{"format":"int32","type":"integer"},"release_idempotency_key":{"format":"uuid","type":["string","null"]},"released_at":{"default":null,"type":["string","null"]},"sequence":{"format":"int32","type":["integer","null"]},"status":{"$ref":"#/components/schemas/WaveOrderStatus"},"wave_id":{"format":"int64","type":"integer"}},"required":["add_when","add_who","attempt_count","id","mod_when","mod_who","order_id","release_generation","status","wave_id"],"type":"object"},"WaveOrderPreview":{"properties":{"member":{"$ref":"#/components/schemas/WaveOrder"},"validation":{"$ref":"#/components/schemas/ValidationReport"}},"required":["member","validation"],"type":"object"},"WaveOrderStatus":{"enum":["Draft","Pending","Processing","Released","Blocked","Failed","Skipped"],"type":"string"},"WavePolicy":{"properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"auto_release":{"type":"boolean"},"carrier_id":{"format":"int64","type":["integer","null"]},"code":{"type":"string"},"description":{"type":["string","null"]},"eligible_statuses":{"items":{"type":"string"},"type":"array"},"group_by_carrier":{"type":"boolean"},"group_by_owner":{"type":"boolean"},"group_by_requested_ship_date":{"type":"boolean"},"id":{"format":"int64","type":"integer"},"include_undated":{"type":"boolean"},"is_active":{"type":"boolean"},"last_scheduled_at":{"default":null,"type":["string","null"]},"max_lines":{"format":"int32","type":["integer","null"]},"max_orders":{"format":"int32","type":"integer"},"max_waves_per_run":{"format":"int32","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"next_run_at":{"default":null,"type":["string","null"]},"owner_id":{"format":"int64","type":["integer","null"]},"priority_from":{"format":"int16","type":["integer","null"]},"priority_to":{"format":"int16","type":["integer","null"]},"requested_ship_days_ahead":{"format":"int32","type":["integer","null"]},"schedule_interval_minutes":{"format":"int32","type":["integer","null"]},"schedule_starts_at":{"default":null,"type":["string","null"]},"station_location":{"description":"The distribution station every wave this policy builds names (R-4); `None` = no station.","type":["string","null"]},"version":{"format":"int32","type":"integer"}},"required":["add_when","add_who","auto_release","code","eligible_statuses","group_by_carrier","group_by_owner","group_by_requested_ship_date","id","include_undated","is_active","max_orders","max_waves_per_run","mod_when","mod_who","version"],"type":"object"},"WavePolicyBatch":{"properties":{"group":{"$ref":"#/components/schemas/WavePolicyGroup"},"line_count":{"format":"int64","type":"integer"},"order_count":{"format":"int32","type":"integer"},"orders":{"items":{"$ref":"#/components/schemas/WavePolicyCandidate"},"type":"array"}},"required":["group","line_count","order_count","orders"],"type":"object"},"WavePolicyCandidate":{"description":"One currently eligible Order and the capacity fact W2a can prove before allocation: its active document-line count.","properties":{"carrier_id":{"format":"int64","type":["integer","null"]},"line_count":{"format":"int64","type":"integer"},"order_id":{"format":"int64","type":"integer"},"order_number":{"type":"string"},"order_version":{"format":"int32","type":"integer"},"owner_id":{"format":"int64","type":"integer"},"priority":{"format":"int16","type":"integer"},"requested_ship_date":{"type":["string","null"]},"status":{"$ref":"#/components/schemas/OrderStatus"}},"required":["line_count","order_id","order_number","order_version","owner_id","priority","status"],"type":"object"},"WavePolicyExclusion":{"properties":{"order":{"$ref":"#/components/schemas/WavePolicyCandidate"},"reason":{"type":"string"}},"required":["order","reason"],"type":"object"},"WavePolicyForWrite":{"description":"The complete user-owned part of a policy. Create and save share one shape; scheduler/run facts are server-owned and therefore absent.","properties":{"auto_release":{"default":false,"type":"boolean"},"carrier_id":{"format":"int64","type":["integer","null"]},"code":{"type":"string"},"description":{"type":["string","null"]},"eligible_statuses":{"items":{"type":"string"},"type":"array"},"group_by_carrier":{"type":"boolean"},"group_by_owner":{"type":"boolean"},"group_by_requested_ship_date":{"type":"boolean"},"include_undated":{"type":"boolean"},"is_active":{"type":"boolean"},"max_lines":{"format":"int32","type":["integer","null"]},"max_orders":{"format":"int32","type":"integer"},"max_waves_per_run":{"format":"int32","type":"integer"},"owner_id":{"format":"int64","type":["integer","null"]},"priority_from":{"format":"int16","type":["integer","null"]},"priority_to":{"format":"int16","type":["integer","null"]},"requested_ship_days_ahead":{"format":"int32","type":["integer","null"]},"schedule_interval_minutes":{"format":"int32","type":["integer","null"]},"schedule_starts_at":{"default":null,"type":["string","null"]},"station_location":{"default":null,"description":"The distribution station the policy's waves are released onto (R-4). Absent or blank = none.","type":["string","null"]}},"required":["code","eligible_statuses","group_by_carrier","group_by_owner","group_by_requested_ship_date","include_undated","is_active","max_orders","max_waves_per_run"],"type":"object"},"WavePolicyGroup":{"properties":{"carrier_id":{"format":"int64","type":["integer","null"]},"owner_id":{"format":"int64","type":["integer","null"]},"requested_ship_date":{"type":["string","null"]}},"type":"object"},"WavePolicyRun":{"properties":{"add_who":{"format":"int64","type":"integer"},"candidate_count":{"format":"int32","type":"integer"},"completed_at":{"default":null,"type":["string","null"]},"error":{"description":"Why a `Failed` run failed; `None` exactly when it succeeded.","type":["string","null"]},"excluded_order_count":{"format":"int32","type":"integer"},"id":{"format":"int64","type":"integer"},"outcome":{"allOf":[{"$ref":"#/components/schemas/WavePolicyRunOutcome"}],"description":"`Failed` when a scheduled build was rolled back (wms-app 094, P-12): the slot is recorded and skipped rather than retried forever."},"policy_id":{"format":"int64","type":"integer"},"scheduled_for":{"default":null,"type":["string","null"]},"selected_order_count":{"format":"int32","type":"integer"},"started_at":{"type":"string"},"wave_count":{"format":"int32","type":"integer"}},"required":["add_who","candidate_count","excluded_order_count","id","outcome","policy_id","selected_order_count","started_at","wave_count"],"type":"object"},"WavePolicyRunOutcome":{"enum":["Succeeded","Failed"],"type":"string"},"WaveProgress":{"properties":{"blocked":{"format":"int64","type":"integer"},"draft":{"format":"int64","type":"integer"},"failed":{"format":"int64","type":"integer"},"pending":{"format":"int64","type":"integer"},"processing":{"format":"int64","type":"integer"},"released":{"format":"int64","type":"integer"},"skipped":{"format":"int64","type":"integer"}},"required":["blocked","draft","failed","pending","processing","released","skipped"],"type":"object"},"WaveStatus":{"enum":["Draft","Planned","Released","InProgress","Completed","Cancelled"],"type":"string"},"WorkArea":{"description":"<Strong>Work area</Strong> — a named set of putaway zones where an operator is allowed to work (task-manager pass 2, `docs/superpowers/specs/2026-08-27-work-areas-operator-profile-design.md`).\n\nIt is the unit task distribution will filter by: an operator's rights are a grid of `task type × work area`, and a task reaches its area through `task.from_location → location.putawayzone → work_area_zone`. Renamed from `facility` (owner decision 2026-08-27); the columns that make it an area — the concurrent-task limit, \"may hand a task back\" — arrived in step 2 (wms-app 315), and the rules that read them come in step 6.","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"allow_task_release":{"description":"May an operator hand a task back here (Infor \"Sign Off Allowed\"). Read by `TaskService::skip_task_in_area` since step 6 — it gates BOTH doors, the hand-back and the refusal; without a named area the warehouse default (`TASK_ALLOW_RELEASE_DEFAULT`) rules instead.","type":"boolean"},"code":{"type":"string"},"consolidation_station_location":{"description":"The area's consolidation station (consolidation H1; wms-app 20261021191021): the `Consolidation` location where its packed units are put onto outbound pallets. `None` — packed units are `Completed` as before.","type":["string","null"]},"description":{"type":"string"},"id":{"format":"int64","type":"integer"},"max_concurrent_tasks":{"description":"Tasks one operator may hold at once inside this area — only when the terminal names the area (spec §4.1). Read by `TaskService::claim_one_in_area` since step 6; without a named area the warehouse default (`TASK_MAX_CONCURRENT_DEFAULT`) rules instead.","format":"int16","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"pack_station_location":{"description":"The area's pack station (wms-app 065; post-pick spec О-1, D-55): the `Pack` location its carriers are delivered to when their units go to packing. `None` — no station: picking delivers as before. Only a `Pack` location (wms-app 079).","type":["string","null"]},"picking_policy_code":{"description":"Code of the picking policy this area works by (its published revision); `None` = `DISCRETE`. Read side only — assignment goes through `PickingPolicyBmc::assign_to_work_area` (wms-app 042).","type":["string","null"]}},"required":["add_when","add_who","allow_task_release","code","description","id","max_concurrent_tasks","mod_when","mod_who"],"type":"object"},"WorkAreaPickingPolicyRow":{"description":"The row as the work-area card lists it: with the profile's own code.","properties":{"equipment_profile_code":{"type":"string"},"equipment_profile_description":{"type":["string","null"]},"equipment_profile_id":{"format":"int64","type":"integer"},"id":{"format":"int64","type":"integer"},"picking_policy_code":{"type":"string"},"work_area_id":{"format":"int64","type":"integer"}},"required":["equipment_profile_code","equipment_profile_id","id","picking_policy_code","work_area_id"],"type":"object"},"WorkAreaZone":{"description":"One putaway zone of a work area. Many-to-many: a zone may belong to several areas (`UNIQUE (work_area_id, putawayzone)`, not unique by zone).","properties":{"add_when":{"type":"string"},"add_who":{"format":"int64","type":"integer"},"id":{"format":"int64","type":"integer"},"mod_when":{"type":"string"},"mod_who":{"format":"int64","type":"integer"},"putawayzone":{"type":"string"},"work_area_id":{"format":"int64","type":"integer"}},"required":["add_when","add_who","id","mod_when","mod_who","putawayzone","work_area_id"],"type":"object"},"WorkLine":{"description":"One item line of the view.","properties":{"lot":{"type":["string","null"]},"order_id":{"description":"Actual lines: the order the stock was picked for; `None` — stock no pick put there. Expected lines carry the unit's order.","format":"int64","type":["integer","null"]},"owner_id":{"format":"int64","type":"integer"},"qty":{"format":"double","type":"number"},"sku_code":{"type":"string"}},"required":["owner_id","qty","sku_code"],"type":"object"},"WrittenPlan":{"description":"Что записалось.","properties":{"cartons":{"format":"uint","minimum":0,"type":"integer"},"master_data_divergences":{"default":[],"description":"What stands was taken as written; where today's master data says otherwise, it is named here for master-data review (an executed unit whose size, weight or rotation rule changed). Empty for a plan that builds on nothing. `default`: a result stored before this field still reads (idempotent replays).","items":{"type":"string"},"type":"array"},"placements":{"format":"uint","minimum":0,"type":"integer"},"plan_id":{"format":"int64","type":"integer"},"unplaced":{"format":"uint","minimum":0,"type":"integer"}},"required":["cartons","placements","plan_id","unplaced"],"type":"object"}},"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"API key: `Authorization: Bearer wms_live_sk_...`"},"session":{"type":"apiKey","in":"cookie","name":"auth-token","description":"Session cookie from POST /api/login."}}},"security":[{"apiKey":[]},{"session":[]}]}