{"openapi":"3.1.0","info":{"title":"Fabriqo Workspace API","summary":"Programmatic access to one Fabriqo workspace.","description":"Each Workspace API credential is bound to exactly one workspace and determines the workspace context for every request; clients do not pass workspace identity with each operation. Token scopes and current workspace or solution entitlements are both enforced.","version":"1.0.0"},"servers":[{"url":"https://api.fabriqo.app"}],"paths":{"/v1/workspace":{"get":{"tags":["workspace"],"summary":"Get Workspace","operationId":"workspace.get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1.0}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"security":[{"WorkspaceApiToken":[]}],"x-fabriqo-required-scopes":[]}},"/v1/items":{"get":{"tags":["catalog"],"summary":"List Items","description":"Required Workspace API scope: `catalog:read`.","operationId":"items.list","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Cursor"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/CatalogLifecycleStatus"},{"type":"null"}],"title":"Status"}},{"name":"purchasable","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Purchasable"}},{"name":"sellable","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Sellable"}},{"name":"manufacturable","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Manufacturable"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Q"}},{"name":"sku","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":100},{"type":"null"}],"title":"Sku"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CursorPage_ItemRead_"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["catalog:read"]},"post":{"tags":["catalog"],"summary":"Create Workspace Item","description":"Required Workspace API scope: `catalog:write`.","operationId":"items.create","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200,"description":"A caller-generated key that makes retrying this command safe.","title":"Idempotency-Key"},"description":"A caller-generated key that makes retrying this command safe."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["catalog:write"]}},"/v1/items/{item_id}":{"get":{"tags":["catalog"],"summary":"Get Item","description":"Required Workspace API scope: `catalog:read`.","operationId":"items.get","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","maxLength":31,"pattern":"^item_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Item Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["catalog:read"]},"patch":{"tags":["catalog"],"summary":"Patch Item","description":"Required Workspace API scope: `catalog:write`.","operationId":"items.update","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","maxLength":31,"pattern":"^item_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Item Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["catalog:write"]}},"/v1/items/{item_id}/stock":{"get":{"tags":["inventory"],"summary":"Item Stock","description":"Required Workspace API scope: `inventory:read`.","operationId":"items.stock","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","maxLength":31,"pattern":"^item_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Item Id"}},{"name":"location_id","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/LocationId"},{"type":"null"}],"title":"Location Id"}},{"name":"lot_id","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/LotId"},{"type":"null"}],"title":"Lot Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemStockRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["inventory:read"]}},"/v1/items/{item_id}/valuation":{"get":{"tags":["inventory"],"summary":"Item Valuation","description":"Required Workspace API scope: `inventory:read`.","operationId":"items.valuation","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","maxLength":31,"pattern":"^item_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Item Id"}},{"name":"location_id","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/LocationId"},{"type":"null"}],"title":"Location Id"}},{"name":"lot_id","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/LotId"},{"type":"null"}],"title":"Lot Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemValuationRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["inventory:read"]}},"/v1/items/{item_id}/suppliers":{"get":{"tags":["catalog"],"summary":"List Item Suppliers","description":"Required Workspace API scope: `catalog:read`.","operationId":"itemSuppliers.list","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","maxLength":31,"pattern":"^item_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Item Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CursorPage_ItemSupplierRead_"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["catalog:read"]},"post":{"tags":["catalog"],"summary":"Create Item Supplier","description":"Required Workspace API scope: `catalog:write`.","operationId":"itemSuppliers.create","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","maxLength":31,"pattern":"^item_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Item Id"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200,"description":"A caller-generated key that makes retrying this command safe.","title":"Idempotency-Key"},"description":"A caller-generated key that makes retrying this command safe."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemSupplierCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemSupplierRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["catalog:write"]}},"/v1/items/{item_id}/suppliers/{item_supplier_id}":{"get":{"tags":["catalog"],"summary":"Get Item Supplier","description":"Required Workspace API scope: `catalog:read`.","operationId":"itemSuppliers.get","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","maxLength":31,"pattern":"^item_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Item Id"}},{"name":"item_supplier_id","in":"path","required":true,"schema":{"type":"string","maxLength":31,"pattern":"^isup_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Item Supplier Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemSupplierRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["catalog:read"]},"patch":{"tags":["catalog"],"summary":"Patch Item Supplier","description":"Required Workspace API scope: `catalog:write`.","operationId":"itemSuppliers.update","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","maxLength":31,"pattern":"^item_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Item Id"}},{"name":"item_supplier_id","in":"path","required":true,"schema":{"type":"string","maxLength":31,"pattern":"^isup_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Item Supplier Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemSupplierUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemSupplierRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["catalog:write"]},"delete":{"tags":["catalog"],"summary":"Delete Item Supplier","description":"Required Workspace API scope: `catalog:write`.","operationId":"itemSuppliers.delete","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","maxLength":31,"pattern":"^item_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Item Id"}},{"name":"item_supplier_id","in":"path","required":true,"schema":{"type":"string","maxLength":31,"pattern":"^isup_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Item Supplier Id"}}],"responses":{"204":{"description":"Successful Response"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["catalog:write"]}},"/v1/barcodes":{"get":{"tags":["catalog"],"summary":"List Barcodes","description":"Required Workspace API scope: `catalog:read`.","operationId":"barcodes.list","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Cursor"}},{"name":"item_id","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ItemId"},{"type":"null"}],"title":"Item Id"}},{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":120},{"type":"null"}],"title":"Code"}},{"name":"symbology","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/BarcodeSymbology"},{"type":"null"}],"title":"Symbology"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CursorPage_BarcodeRead_"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["catalog:read"]},"post":{"tags":["catalog"],"summary":"Create Barcode","description":"Required Workspace API scope: `catalog:write`.","operationId":"barcodes.create","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200,"description":"A caller-generated key that makes retrying this command safe.","title":"Idempotency-Key"},"description":"A caller-generated key that makes retrying this command safe."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BarcodeCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BarcodeRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["catalog:write"]}},"/v1/barcodes/{barcode_id}":{"get":{"tags":["catalog"],"summary":"Get Barcode","description":"Required Workspace API scope: `catalog:read`.","operationId":"barcodes.get","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"barcode_id","in":"path","required":true,"schema":{"type":"string","maxLength":29,"pattern":"^bc_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Barcode Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BarcodeRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["catalog:read"]},"patch":{"tags":["catalog"],"summary":"Patch Barcode","description":"Required Workspace API scope: `catalog:write`.","operationId":"barcodes.update","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"barcode_id","in":"path","required":true,"schema":{"type":"string","maxLength":29,"pattern":"^bc_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Barcode Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BarcodeUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BarcodeRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["catalog:write"]},"delete":{"tags":["catalog"],"summary":"Delete Barcode","description":"Required Workspace API scope: `catalog:write`.","operationId":"barcodes.delete","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"barcode_id","in":"path","required":true,"schema":{"type":"string","maxLength":29,"pattern":"^bc_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Barcode Id"}}],"responses":{"204":{"description":"Successful Response"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["catalog:write"]}},"/v1/customers":{"get":{"tags":["customers"],"summary":"List Customers","description":"Required Workspace API scope: `customers:read`.","operationId":"customers.list","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Cursor"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Q"}},{"name":"include_archived","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Archived"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CursorPage_CustomerRead_"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["customers:read"]},"post":{"tags":["customers"],"summary":"Create Customer","description":"Required Workspace API scope: `customers:write`.","operationId":"customers.create","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200,"description":"A caller-generated key that makes retrying this command safe.","title":"Idempotency-Key"},"description":"A caller-generated key that makes retrying this command safe."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["customers:write"]}},"/v1/customers/{customer_id}":{"get":{"tags":["customers"],"summary":"Get Customer","description":"Required Workspace API scope: `customers:read`.","operationId":"customers.get","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","maxLength":31,"pattern":"^cust_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Customer Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["customers:read"]},"patch":{"tags":["customers"],"summary":"Update Customer","description":"Required Workspace API scope: `customers:write`.","operationId":"customers.update","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","maxLength":31,"pattern":"^cust_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Customer Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["customers:write"]}},"/v1/customers/{customer_id}/archive":{"post":{"tags":["customers"],"summary":"Archive Customer","description":"Required Workspace API scope: `customers:write`.","operationId":"customers.archive","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","maxLength":31,"pattern":"^cust_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Customer Id"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200,"description":"A caller-generated key that makes retrying this command safe.","title":"Idempotency-Key"},"description":"A caller-generated key that makes retrying this command safe."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["customers:write"]}},"/v1/customers/{customer_id}/restore":{"post":{"tags":["customers"],"summary":"Restore Customer","description":"Required Workspace API scope: `customers:write`.","operationId":"customers.restore","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","maxLength":31,"pattern":"^cust_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Customer Id"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200,"description":"A caller-generated key that makes retrying this command safe.","title":"Idempotency-Key"},"description":"A caller-generated key that makes retrying this command safe."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["customers:write"]}},"/v1/suppliers":{"get":{"tags":["suppliers"],"summary":"List Suppliers","description":"Required Workspace API scope: `suppliers:read`.","operationId":"suppliers.list","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Cursor"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Q"}},{"name":"include_archived","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Archived"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CursorPage_SupplierRead_"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["suppliers:read"]},"post":{"tags":["suppliers"],"summary":"Create Supplier","description":"Required Workspace API scope: `suppliers:write`.","operationId":"suppliers.create","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200,"description":"A caller-generated key that makes retrying this command safe.","title":"Idempotency-Key"},"description":"A caller-generated key that makes retrying this command safe."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupplierCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupplierRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["suppliers:write"]}},"/v1/suppliers/{supplier_id}":{"get":{"tags":["suppliers"],"summary":"Get Supplier","description":"Required Workspace API scope: `suppliers:read`.","operationId":"suppliers.get","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"supplier_id","in":"path","required":true,"schema":{"type":"string","maxLength":30,"pattern":"^sup_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Supplier Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupplierRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["suppliers:read"]},"patch":{"tags":["suppliers"],"summary":"Update Supplier","description":"Required Workspace API scope: `suppliers:write`.","operationId":"suppliers.update","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"supplier_id","in":"path","required":true,"schema":{"type":"string","maxLength":30,"pattern":"^sup_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Supplier Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupplierUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupplierRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["suppliers:write"]}},"/v1/suppliers/{supplier_id}/archive":{"post":{"tags":["suppliers"],"summary":"Archive Supplier","description":"Required Workspace API scope: `suppliers:write`.","operationId":"suppliers.archive","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"supplier_id","in":"path","required":true,"schema":{"type":"string","maxLength":30,"pattern":"^sup_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Supplier Id"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200,"description":"A caller-generated key that makes retrying this command safe.","title":"Idempotency-Key"},"description":"A caller-generated key that makes retrying this command safe."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupplierRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["suppliers:write"]}},"/v1/suppliers/{supplier_id}/restore":{"post":{"tags":["suppliers"],"summary":"Restore Supplier","description":"Required Workspace API scope: `suppliers:write`.","operationId":"suppliers.restore","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"supplier_id","in":"path","required":true,"schema":{"type":"string","maxLength":30,"pattern":"^sup_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Supplier Id"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200,"description":"A caller-generated key that makes retrying this command safe.","title":"Idempotency-Key"},"description":"A caller-generated key that makes retrying this command safe."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupplierRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["suppliers:write"]}},"/v1/locations":{"get":{"tags":["inventory"],"summary":"List Locations","description":"Required Workspace API scope: `locations:read`.","operationId":"locations.list","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Cursor"}},{"name":"include_archived","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Archived"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CursorPage_LocationRead_"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["locations:read"]},"post":{"tags":["inventory"],"summary":"Create Workspace Location","description":"Required Workspace API scope: `locations:write`.","operationId":"locations.create","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200,"description":"A caller-generated key that makes retrying this command safe.","title":"Idempotency-Key"},"description":"A caller-generated key that makes retrying this command safe."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocationCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocationRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["locations:write"]}},"/v1/locations/{location_id}":{"get":{"tags":["inventory"],"summary":"Get Location","description":"Required Workspace API scope: `locations:read`.","operationId":"locations.get","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"location_id","in":"path","required":true,"schema":{"type":"string","maxLength":30,"pattern":"^loc_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Location Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocationRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["locations:read"]},"patch":{"tags":["inventory"],"summary":"Update Location","description":"Required Workspace API scope: `locations:write`.","operationId":"locations.update","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"location_id","in":"path","required":true,"schema":{"type":"string","maxLength":30,"pattern":"^loc_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Location Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocationUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocationRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["locations:write"]}},"/v1/locations/{location_id}/set-default":{"post":{"tags":["inventory"],"summary":"Make Default","description":"Required Workspace API scope: `locations:write`.","operationId":"locations.setDefault","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"location_id","in":"path","required":true,"schema":{"type":"string","maxLength":30,"pattern":"^loc_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Location Id"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200,"description":"A caller-generated key that makes retrying this command safe.","title":"Idempotency-Key"},"description":"A caller-generated key that makes retrying this command safe."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocationRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["locations:write"]}},"/v1/locations/{location_id}/archive":{"post":{"tags":["inventory"],"summary":"Archive","description":"Required Workspace API scope: `locations:write`.","operationId":"locations.archive","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"location_id","in":"path","required":true,"schema":{"type":"string","maxLength":30,"pattern":"^loc_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Location Id"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200,"description":"A caller-generated key that makes retrying this command safe.","title":"Idempotency-Key"},"description":"A caller-generated key that makes retrying this command safe."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocationRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["locations:write"]}},"/v1/locations/{location_id}/restore":{"post":{"tags":["inventory"],"summary":"Restore","description":"Required Workspace API scope: `locations:write`.","operationId":"locations.restore","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"location_id","in":"path","required":true,"schema":{"type":"string","maxLength":30,"pattern":"^loc_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Location Id"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200,"description":"A caller-generated key that makes retrying this command safe.","title":"Idempotency-Key"},"description":"A caller-generated key that makes retrying this command safe."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocationRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["locations:write"]}},"/v1/replenishment-policies":{"get":{"tags":["planning"],"summary":"List Policies","description":"Required Workspace API scope: `planning:read`.","operationId":"replenishmentPolicies.list","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"item_id","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ItemId"},{"type":"null"}],"title":"Item Id"}},{"name":"location_id","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/LocationId"},{"type":"null"}],"title":"Location Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"enum":["active","paused"],"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CursorPage_ReplenishmentPolicyRead_"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["planning:read"]},"post":{"tags":["planning"],"summary":"Create Policy","description":"Required Workspace API scope: `planning:write`.","operationId":"replenishmentPolicies.create","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200,"description":"A caller-generated key that makes retrying this command safe.","title":"Idempotency-Key"},"description":"A caller-generated key that makes retrying this command safe."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplenishmentPolicyCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplenishmentPolicyRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["planning:write"]}},"/v1/replenishment-policies/{policy_id}":{"get":{"tags":["planning"],"summary":"Get Policy","description":"Required Workspace API scope: `planning:read`.","operationId":"replenishmentPolicies.get","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"policy_id","in":"path","required":true,"schema":{"type":"string","maxLength":31,"pattern":"^rpol_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Policy Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplenishmentPolicyRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["planning:read"]},"patch":{"tags":["planning"],"summary":"Update Policy","description":"The policy's item and location are immutable. Create a new policy for a different item and location pair.\n\nRequired Workspace API scope: `planning:write`.","operationId":"replenishmentPolicies.update","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"policy_id","in":"path","required":true,"schema":{"type":"string","maxLength":31,"pattern":"^rpol_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Policy Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplenishmentPolicyUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplenishmentPolicyRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["planning:write"]},"delete":{"tags":["planning"],"summary":"Delete Policy","description":"Required Workspace API scope: `planning:write`.","operationId":"replenishmentPolicies.delete","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"policy_id","in":"path","required":true,"schema":{"type":"string","maxLength":31,"pattern":"^rpol_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Policy Id"}}],"responses":{"204":{"description":"Successful Response"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["planning:write"]}},"/v1/replenishment-recommendations":{"get":{"tags":["planning"],"summary":"List Recommendations","description":"Required Workspace API scope: `planning:read`.","operationId":"replenishmentRecommendations.list","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"enum":["open","accepted","dismissed","superseded","resolved"],"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"item_id","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ItemId"},{"type":"null"}],"title":"Item Id"}},{"name":"location_id","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/LocationId"},{"type":"null"}],"title":"Location Id"}},{"name":"supply_method","in":"query","required":false,"schema":{"anyOf":[{"enum":["purchase","manufacture","manual"],"type":"string"},{"type":"null"}],"title":"Supply Method"}},{"name":"supplier_id","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/SupplierId"},{"type":"null"}],"title":"Supplier Id"}},{"name":"late","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Late"}},{"name":"required_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Required After"}},{"name":"required_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Required Before"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CursorPage_ReplenishmentRecommendationRead_"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["planning:read"]}},"/v1/replenishment-recommendations/{recommendation_id}":{"get":{"tags":["planning"],"summary":"Get Recommendation","description":"Required Workspace API scope: `planning:read`.","operationId":"replenishmentRecommendations.get","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"recommendation_id","in":"path","required":true,"schema":{"type":"string","maxLength":31,"pattern":"^rrec_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Recommendation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplenishmentRecommendationRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["planning:read"]}},"/v1/replenishment-recommendations/{recommendation_id}/accept":{"post":{"tags":["planning"],"summary":"Accept Replenishment Recommendation","description":"Requires planning:write. Accepting a purchase recommendation also requires purchasing:write; accepting a manufacture recommendation also requires manufacturing:write. The additional scope is checked against the recommendation's supply method at request time.\n\nRequired Workspace API scope: `planning:write`.","operationId":"replenishmentRecommendations.accept","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"recommendation_id","in":"path","required":true,"schema":{"type":"string","maxLength":31,"pattern":"^rrec_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Recommendation Id"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200,"description":"A caller-generated key that makes retrying this command safe.","title":"Idempotency-Key"},"description":"A caller-generated key that makes retrying this command safe."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplenishmentRecommendationRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["planning:write"]}},"/v1/replenishment-recommendations/{recommendation_id}/dismiss":{"post":{"tags":["planning"],"summary":"Dismiss Replenishment Recommendation","description":"Required Workspace API scope: `planning:write`.","operationId":"replenishmentRecommendations.dismiss","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"recommendation_id","in":"path","required":true,"schema":{"type":"string","maxLength":31,"pattern":"^rrec_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Recommendation Id"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200,"description":"A caller-generated key that makes retrying this command safe.","title":"Idempotency-Key"},"description":"A caller-generated key that makes retrying this command safe."}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ReplenishmentRecommendationDismissRequest"},{"type":"null"}],"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplenishmentRecommendationRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["planning:write"]}},"/v1/items/{item_id}/availability":{"get":{"tags":["planning"],"summary":"Availability","description":"Return item availability for one location when location_id is supplied. Omit location_id to aggregate availability across all workspace locations; omission does not select the workspace default location.\n\nRequired Workspace API scope: `planning:read`.","operationId":"items.availability.get","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","maxLength":31,"pattern":"^item_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Item Id"}},{"name":"location_id","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/LocationId"},{"type":"null"}],"description":"Location to inspect. If omitted, aggregate availability across all workspace locations rather than using the default location.","title":"Location Id"},"description":"Location to inspect. If omitted, aggregate availability across all workspace locations rather than using the default location."},{"name":"horizon_days","in":"query","required":false,"schema":{"type":"integer","maximum":3650,"minimum":1,"default":90,"title":"Horizon Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemAvailabilityRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["planning:read"]}},"/v1/items/{item_id}/availability/forecast":{"get":{"tags":["planning"],"summary":"Forecast","description":"Required Workspace API scope: `planning:read`.","operationId":"items.availability.forecast","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","maxLength":31,"pattern":"^item_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Item Id"}},{"name":"location_id","in":"query","required":true,"schema":{"type":"string","maxLength":30,"pattern":"^loc_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Location Id"}},{"name":"horizon_days","in":"query","required":false,"schema":{"type":"integer","maximum":3650,"minimum":1,"default":90,"title":"Horizon Days"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CursorPage_ItemAvailabilityForecastEntry_"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["planning:read"]}},"/v1/reservations":{"get":{"tags":["inventory"],"summary":"List Reservations","description":"List claims with a currently addressable Sales or Manufacturing demand.\n\nRequired Workspace API scope: `inventory:read`.","operationId":"reservations.list","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Cursor"}},{"name":"item_id","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ItemId"},{"type":"null"}],"title":"Item Id"}},{"name":"location_id","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/LocationId"},{"type":"null"}],"title":"Location Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"enum":["active","consumed","released"],"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"demand_type","in":"query","required":false,"schema":{"anyOf":[{"enum":["sales_order_line","production_material_requirement"],"type":"string"},{"type":"null"}],"title":"Demand Type"}},{"name":"demand_id","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/SalesOrderLineId"},{"$ref":"#/components/schemas/ProductionMaterialRequirementId"},{"type":"null"}],"title":"Demand Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CursorPage_ReservationRead_"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["inventory:read"]}},"/v1/reservations/{reservation_id}":{"get":{"tags":["inventory"],"summary":"Get Reservation","description":"Get a claim whose public demand and parent resource still exist.\n\nRequired Workspace API scope: `inventory:read`.","operationId":"reservations.get","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"reservation_id","in":"path","required":true,"schema":{"type":"string","maxLength":30,"pattern":"^res_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Reservation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReservationRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["inventory:read"]}},"/v1/lots":{"get":{"tags":["inventory"],"summary":"List Lots","description":"Required Workspace API scope: `inventory:read`.","operationId":"lots.list","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Cursor"}},{"name":"item_id","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ItemId"},{"type":"null"}],"title":"Item Id"}},{"name":"supplier_id","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/SupplierId"},{"type":"null"}],"title":"Supplier Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CursorPage_LotRead_"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["inventory:read"]}},"/v1/lots/{lot_id}":{"get":{"tags":["inventory"],"summary":"Get Lot","description":"Required Workspace API scope: `inventory:read`.","operationId":"lots.get","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"lot_id","in":"path","required":true,"schema":{"type":"string","maxLength":30,"pattern":"^lot_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Lot Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LotRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["inventory:read"]}},"/v1/inventory-movements":{"get":{"tags":["inventory"],"summary":"List Movements","description":"Required Workspace API scope: `inventory:read`.","operationId":"inventoryMovements.list","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Cursor"}},{"name":"item_id","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ItemId"},{"type":"null"}],"title":"Item Id"}},{"name":"location_id","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/LocationId"},{"type":"null"}],"title":"Location Id"}},{"name":"lot_id","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/LotId"},{"type":"null"}],"title":"Lot Id"}},{"name":"reason","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Reason"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CursorPage_InventoryMovementRead_"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["inventory:read"]}},"/v1/inventory-movements/{movement_id}":{"get":{"tags":["inventory"],"summary":"Get Movement","description":"Required Workspace API scope: `inventory:read`.","operationId":"inventoryMovements.get","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"movement_id","in":"path","required":true,"schema":{"type":"string","maxLength":31,"pattern":"^imov_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Movement Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryMovementRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["inventory:read"]}},"/v1/inventory-adjustments":{"post":{"tags":["inventory"],"summary":"Create Adjustment","description":"Required Workspace API scope: `inventory:write`.","operationId":"inventoryAdjustments.create","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200,"description":"A caller-generated key that makes retrying this command safe.","title":"Idempotency-Key"},"description":"A caller-generated key that makes retrying this command safe."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryAdjustmentCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryAdjustmentResult"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["inventory:write"]}},"/v1/inventory-adjustments/{adjustment_id}":{"get":{"tags":["inventory"],"summary":"Get Adjustment","description":"Required Workspace API scope: `inventory:read`.","operationId":"inventoryAdjustments.get","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"adjustment_id","in":"path","required":true,"schema":{"type":"string","maxLength":31,"pattern":"^iadj_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Adjustment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryAdjustmentResult"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["inventory:read"]}},"/v1/inventory-transfers":{"post":{"tags":["inventory"],"summary":"Create Transfer","description":"Required Workspace API scope: `inventory:write`.","operationId":"inventoryTransfers.create","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200,"description":"A caller-generated key that makes retrying this command safe.","title":"Idempotency-Key"},"description":"A caller-generated key that makes retrying this command safe."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryTransferCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryTransferResult"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["inventory:write"]}},"/v1/inventory-transfers/{transfer_id}":{"get":{"tags":["inventory"],"summary":"Get Transfer","description":"Required Workspace API scope: `inventory:read`.","operationId":"inventoryTransfers.get","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"transfer_id","in":"path","required":true,"schema":{"type":"string","maxLength":30,"pattern":"^itr_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Transfer Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryTransferResult"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["inventory:read"]}},"/v1/purchase-orders":{"get":{"tags":["purchasing"],"summary":"List Purchase Orders","description":"Required Workspace API scope: `purchasing:read`.","operationId":"purchaseOrders.list","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Cursor"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Q"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/POStatus"},{"type":"null"}],"title":"Status"}},{"name":"supplier_id","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/SupplierId"},{"type":"null"}],"title":"Supplier Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CursorPage_PurchaseOrderSummaryRead_"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["purchasing:read"]},"post":{"tags":["purchasing"],"summary":"Create Purchase Order","description":"Required Workspace API scope: `purchasing:write`.","operationId":"purchaseOrders.create","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200,"description":"A caller-generated key that makes retrying this command safe.","title":"Idempotency-Key"},"description":"A caller-generated key that makes retrying this command safe."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrderCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrderRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["purchasing:write"]}},"/v1/purchase-orders/{purchase_order_id}":{"get":{"tags":["purchasing"],"summary":"Get Purchase Order","description":"Required Workspace API scope: `purchasing:read`.","operationId":"purchaseOrders.get","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"purchase_order_id","in":"path","required":true,"schema":{"type":"string","maxLength":29,"pattern":"^po_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Purchase Order Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrderRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["purchasing:read"]},"patch":{"tags":["purchasing"],"summary":"Update Purchase Order","description":"Allowed only while the purchase order has status `draft`. Orders with status `ordered`, `partial_received`, `received`, or `cancelled` return `409` with code `po_invalid_status`.\n\nRequired Workspace API scope: `purchasing:write`.","operationId":"purchaseOrders.update","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"purchase_order_id","in":"path","required":true,"schema":{"type":"string","maxLength":29,"pattern":"^po_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Purchase Order Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrderUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrderRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Purchase order is not draft (`po_invalid_status`) or another conflict occurred.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["purchasing:write"]}},"/v1/purchase-orders/{purchase_order_id}/mark-ordered":{"post":{"tags":["purchasing"],"summary":"Mark Purchase Order As Ordered","description":"Required Workspace API scope: `purchasing:write`.","operationId":"purchaseOrders.markOrdered","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"purchase_order_id","in":"path","required":true,"schema":{"type":"string","maxLength":29,"pattern":"^po_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Purchase Order Id"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200,"description":"A caller-generated key that makes retrying this command safe.","title":"Idempotency-Key"},"description":"A caller-generated key that makes retrying this command safe."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrderRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["purchasing:write"]}},"/v1/purchase-orders/{purchase_order_id}/receipts/{receipt_id}":{"get":{"tags":["purchasing"],"summary":"Get Purchase Receipt","description":"Required Workspace API scope: `purchasing:read`.","operationId":"purchaseOrders.receipts.get","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"purchase_order_id","in":"path","required":true,"schema":{"type":"string","maxLength":29,"pattern":"^po_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Purchase Order Id"}},{"name":"receipt_id","in":"path","required":true,"schema":{"type":"string","maxLength":31,"pattern":"^prec_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Receipt Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseReceiptRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["purchasing:read"]}},"/v1/purchase-orders/{purchase_order_id}/receipts/{receipt_id}/lines":{"get":{"tags":["purchasing"],"summary":"List Purchase Receipt Lines","description":"Required Workspace API scope: `purchasing:read`.","operationId":"purchaseOrders.receipts.lines.list","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"purchase_order_id","in":"path","required":true,"schema":{"type":"string","maxLength":29,"pattern":"^po_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Purchase Order Id"}},{"name":"receipt_id","in":"path","required":true,"schema":{"type":"string","maxLength":31,"pattern":"^prec_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Receipt Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CursorPage_PurchaseReceiptLineRead_"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["purchasing:read"]}},"/v1/purchase-orders/{purchase_order_id}/receipts":{"post":{"tags":["purchasing"],"summary":"Create Purchase Receipt","description":"Required Workspace API scope: `purchasing:write`.","operationId":"purchaseOrders.receipts.create","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"purchase_order_id","in":"path","required":true,"schema":{"type":"string","maxLength":29,"pattern":"^po_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Purchase Order Id"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200,"description":"A caller-generated key that makes retrying this command safe.","title":"Idempotency-Key"},"description":"A caller-generated key that makes retrying this command safe."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseReceiveRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseReceiptResult"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["purchasing:write"]},"get":{"tags":["purchasing"],"summary":"List Purchase Order Receipts","description":"Required Workspace API scope: `purchasing:read`.","operationId":"purchaseOrders.receipts.list","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"purchase_order_id","in":"path","required":true,"schema":{"type":"string","maxLength":29,"pattern":"^po_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Purchase Order Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CursorPage_PurchaseReceiptSummaryRead_"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["purchasing:read"]}},"/v1/purchase-orders/{purchase_order_id}/cancel":{"post":{"tags":["purchasing"],"summary":"Cancel Purchase Order","description":"Required Workspace API scope: `purchasing:write`.","operationId":"purchaseOrders.cancel","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"purchase_order_id","in":"path","required":true,"schema":{"type":"string","maxLength":29,"pattern":"^po_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Purchase Order Id"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200,"description":"A caller-generated key that makes retrying this command safe.","title":"Idempotency-Key"},"description":"A caller-generated key that makes retrying this command safe."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrderRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["purchasing:write"]}},"/v1/purchase-orders/{purchase_order_id}/lines":{"get":{"tags":["purchasing"],"summary":"List Purchase Order Lines","description":"Required Workspace API scope: `purchasing:read`.","operationId":"purchaseOrders.lines.list","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"purchase_order_id","in":"path","required":true,"schema":{"type":"string","maxLength":29,"pattern":"^po_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Purchase Order Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CursorPage_PurchaseOrderLineRead_"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["purchasing:read"]},"post":{"tags":["purchasing"],"summary":"Create Purchase Order Line","description":"Allowed only while the purchase order has status `draft`. Orders with status `ordered`, `partial_received`, `received`, or `cancelled` return `409` with code `po_invalid_status`.\n\nRequired Workspace API scope: `purchasing:write`.","operationId":"purchaseOrders.lines.create","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"purchase_order_id","in":"path","required":true,"schema":{"type":"string","maxLength":29,"pattern":"^po_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Purchase Order Id"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200,"description":"A caller-generated key that makes retrying this command safe.","title":"Idempotency-Key"},"description":"A caller-generated key that makes retrying this command safe."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrderLineCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrderLineRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Purchase order is not draft (`po_invalid_status`) or another conflict occurred.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["purchasing:write"]}},"/v1/purchase-orders/{purchase_order_id}/overheads":{"get":{"tags":["purchasing"],"summary":"List Purchase Order Overheads","description":"Required Workspace API scope: `purchasing:read`.","operationId":"purchaseOrders.overheads.list","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"purchase_order_id","in":"path","required":true,"schema":{"type":"string","maxLength":29,"pattern":"^po_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Purchase Order Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CursorPage_PurchaseOrderOverheadRead_"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["purchasing:read"]},"post":{"tags":["purchasing"],"summary":"Create Purchase Order Overhead Endpoint","description":"Allowed only while the purchase order has status `draft`. Orders with status `ordered`, `partial_received`, `received`, or `cancelled` return `409` with code `po_invalid_status`.\n\nRequired Workspace API scope: `purchasing:write`.","operationId":"purchaseOrders.overheads.create","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"purchase_order_id","in":"path","required":true,"schema":{"type":"string","maxLength":29,"pattern":"^po_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Purchase Order Id"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200,"description":"A caller-generated key that makes retrying this command safe.","title":"Idempotency-Key"},"description":"A caller-generated key that makes retrying this command safe."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrderOverheadInput"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrderOverheadRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Purchase order is not draft (`po_invalid_status`) or another conflict occurred.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["purchasing:write"]}},"/v1/purchase-orders/{purchase_order_id}/lines/{line_id}":{"get":{"tags":["purchasing"],"summary":"Get Purchase Order Line","description":"Required Workspace API scope: `purchasing:read`.","operationId":"purchaseOrders.lines.get","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"purchase_order_id","in":"path","required":true,"schema":{"type":"string","maxLength":29,"pattern":"^po_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Purchase Order Id"}},{"name":"line_id","in":"path","required":true,"schema":{"type":"string","maxLength":30,"pattern":"^pol_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Line Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrderLineRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["purchasing:read"]},"patch":{"tags":["purchasing"],"summary":"Update Purchase Order Line","description":"Allowed only while the purchase order has status `draft`. Orders with status `ordered`, `partial_received`, `received`, or `cancelled` return `409` with code `po_invalid_status`.\n\nRequired Workspace API scope: `purchasing:write`.","operationId":"purchaseOrders.lines.update","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"purchase_order_id","in":"path","required":true,"schema":{"type":"string","maxLength":29,"pattern":"^po_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Purchase Order Id"}},{"name":"line_id","in":"path","required":true,"schema":{"type":"string","maxLength":30,"pattern":"^pol_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Line Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrderLineUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrderLineRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Purchase order is not draft (`po_invalid_status`) or another conflict occurred.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["purchasing:write"]},"delete":{"tags":["purchasing"],"summary":"Delete Purchase Order Line Endpoint","description":"Allowed only while the purchase order has status `draft`. Orders with status `ordered`, `partial_received`, `received`, or `cancelled` return `409` with code `po_invalid_status`.\n\nRequired Workspace API scope: `purchasing:write`.","operationId":"purchaseOrders.lines.delete","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"purchase_order_id","in":"path","required":true,"schema":{"type":"string","maxLength":29,"pattern":"^po_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Purchase Order Id"}},{"name":"line_id","in":"path","required":true,"schema":{"type":"string","maxLength":30,"pattern":"^pol_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Line Id"}}],"responses":{"204":{"description":"Successful Response"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Purchase order is not draft (`po_invalid_status`) or another conflict occurred.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["purchasing:write"]}},"/v1/purchase-orders/{purchase_order_id}/overheads/{overhead_id}":{"get":{"tags":["purchasing"],"summary":"Get Purchase Order Overhead","description":"Required Workspace API scope: `purchasing:read`.","operationId":"purchaseOrders.overheads.get","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"purchase_order_id","in":"path","required":true,"schema":{"type":"string","maxLength":29,"pattern":"^po_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Purchase Order Id"}},{"name":"overhead_id","in":"path","required":true,"schema":{"type":"string","maxLength":30,"pattern":"^poh_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Overhead Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrderOverheadRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["purchasing:read"]},"patch":{"tags":["purchasing"],"summary":"Update Purchase Order Overhead Endpoint","description":"Allowed only while the purchase order has status `draft`. Orders with status `ordered`, `partial_received`, `received`, or `cancelled` return `409` with code `po_invalid_status`.\n\nRequired Workspace API scope: `purchasing:write`.","operationId":"purchaseOrders.overheads.update","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"purchase_order_id","in":"path","required":true,"schema":{"type":"string","maxLength":29,"pattern":"^po_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Purchase Order Id"}},{"name":"overhead_id","in":"path","required":true,"schema":{"type":"string","maxLength":30,"pattern":"^poh_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Overhead Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrderOverheadUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrderOverheadRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Purchase order is not draft (`po_invalid_status`) or another conflict occurred.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["purchasing:write"]},"delete":{"tags":["purchasing"],"summary":"Delete Purchase Order Overhead Endpoint","description":"Allowed only while the purchase order has status `draft`. Orders with status `ordered`, `partial_received`, `received`, or `cancelled` return `409` with code `po_invalid_status`.\n\nRequired Workspace API scope: `purchasing:write`.","operationId":"purchaseOrders.overheads.delete","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"purchase_order_id","in":"path","required":true,"schema":{"type":"string","maxLength":29,"pattern":"^po_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Purchase Order Id"}},{"name":"overhead_id","in":"path","required":true,"schema":{"type":"string","maxLength":30,"pattern":"^poh_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Overhead Id"}}],"responses":{"204":{"description":"Successful Response"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Purchase order is not draft (`po_invalid_status`) or another conflict occurred.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["purchasing:write"]}},"/v1/sales-orders/reconcile":{"post":{"tags":["sales"],"summary":"Reconcile Sales Order","description":"Reconcile one normalized external order using a stable source_key/external_id and source timestamp. App identities are installation-bound; service tokens share a separate workspace namespace. Replays need no Idempotency-Key. Older or conflicting equal-timestamp snapshots are stale; contact redaction is durable. An ignored initial terminal snapshot returns a null order_id. Uses the standard Workspace API request and rate limits (429 with Retry-After).\n\nRequired Workspace API scope: `sales:write`.","operationId":"salesOrders.reconcile","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesOrderReconcileRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesOrderReconcileResult"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1.0}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"security":[{"WorkspaceApiToken":[]}],"x-fabriqo-required-scopes":["sales:write"]}},"/v1/sales-orders":{"get":{"tags":["sales"],"summary":"List Sales Orders","description":"Required Workspace API scope: `sales:read`.","operationId":"salesOrders.list","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Cursor"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/OrderStatus"},{"type":"null"}],"title":"Status"}},{"name":"customer_id","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/CustomerId"},{"type":"null"}],"title":"Customer Id"}},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":32},{"type":"null"}],"title":"Source"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CursorPage_SalesOrderSummaryRead_"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["sales:read"]},"post":{"tags":["sales"],"summary":"Create Sales Order","description":"Required Workspace API scope: `sales:write`.","operationId":"salesOrders.create","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200,"description":"A caller-generated key that makes retrying this command safe.","title":"Idempotency-Key"},"description":"A caller-generated key that makes retrying this command safe."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesOrderCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesOrderRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["sales:write"]}},"/v1/sales-orders/{order_id}":{"get":{"tags":["sales"],"summary":"Get Sales Order","description":"Required Workspace API scope: `sales:read`.","operationId":"salesOrders.get","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","maxLength":29,"pattern":"^so_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Order Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesOrderRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["sales:read"]},"patch":{"tags":["sales"],"summary":"Update Sales Order","description":"Required Workspace API scope: `sales:write`.","operationId":"salesOrders.update","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","maxLength":29,"pattern":"^so_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Order Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesOrderUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesOrderRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["sales:write"]}},"/v1/sales-orders/{order_id}/fulfillments/{fulfillment_id}":{"get":{"tags":["sales"],"summary":"Get Sales Order Fulfillment","description":"Required Workspace API scope: `sales:read`.","operationId":"salesOrders.fulfillments.get","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","maxLength":29,"pattern":"^so_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Order Id"}},{"name":"fulfillment_id","in":"path","required":true,"schema":{"type":"string","maxLength":30,"pattern":"^ful_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Fulfillment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesOrderFulfillmentRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["sales:read"]}},"/v1/sales-orders/{order_id}/fulfillments/{fulfillment_id}/lines":{"get":{"tags":["sales"],"summary":"List Sales Order Fulfillment Lines","description":"Required Workspace API scope: `sales:read`.","operationId":"salesOrders.fulfillments.lines.list","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","maxLength":29,"pattern":"^so_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Order Id"}},{"name":"fulfillment_id","in":"path","required":true,"schema":{"type":"string","maxLength":30,"pattern":"^ful_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Fulfillment Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CursorPage_SalesOrderFulfillmentLineRead_"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["sales:read"]}},"/v1/sales-orders/{order_id}/fulfillments":{"post":{"tags":["sales"],"summary":"Create Sales Order Fulfillment","description":"Fulfill at the sales order's current fulfill_location_id. To fulfill at another location, PATCH the order's fulfill_location_id first; this reallocates its remaining reservations before fulfillment.\n\nRequired Workspace API scope: `sales:write`.","operationId":"salesOrders.fulfillments.create","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","maxLength":29,"pattern":"^so_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Order Id"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200,"description":"A caller-generated key that makes retrying this command safe.","title":"Idempotency-Key"},"description":"A caller-generated key that makes retrying this command safe."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesOrderFulfillRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesOrderFulfillmentResult"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["sales:write"]},"get":{"tags":["sales"],"summary":"List Sales Order Fulfillments","description":"Required Workspace API scope: `sales:read`.","operationId":"salesOrders.fulfillments.list","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","maxLength":29,"pattern":"^so_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Order Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CursorPage_SalesOrderFulfillmentSummaryRead_"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["sales:read"]}},"/v1/sales-orders/{order_id}/cancel":{"post":{"tags":["sales"],"summary":"Cancel Sales Order","description":"Required Workspace API scope: `sales:write`.","operationId":"salesOrders.cancel","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","maxLength":29,"pattern":"^so_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Order Id"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200,"description":"A caller-generated key that makes retrying this command safe.","title":"Idempotency-Key"},"description":"A caller-generated key that makes retrying this command safe."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesOrderRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["sales:write"]}},"/v1/sales-orders/{order_id}/lines":{"get":{"tags":["sales"],"summary":"List Sales Order Lines","description":"Required Workspace API scope: `sales:read`.","operationId":"salesOrders.lines.list","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","maxLength":29,"pattern":"^so_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Order Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CursorPage_SalesOrderLineRead_"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["sales:read"]}},"/v1/sales-orders/{order_id}/lines/{line_id}":{"get":{"tags":["sales"],"summary":"Get Sales Order Line","description":"Required Workspace API scope: `sales:read`.","operationId":"salesOrders.lines.get","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","maxLength":29,"pattern":"^so_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Order Id"}},{"name":"line_id","in":"path","required":true,"schema":{"type":"string","maxLength":30,"pattern":"^sol_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Line Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesOrderLineRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["sales:read"]}},"/v1/boms":{"get":{"tags":["manufacturing"],"summary":"List BOMs","description":"Required Workspace API scope: `manufacturing:read`.","operationId":"boms.list","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"item_id","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ItemId"},{"type":"null"}],"title":"Item Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CursorPage_BomRead_"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["manufacturing:read"]},"post":{"tags":["manufacturing"],"summary":"Create BOM","description":"Required Workspace API scope: `manufacturing:write`.","operationId":"boms.create","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200,"description":"A caller-generated key that makes retrying this command safe.","title":"Idempotency-Key"},"description":"A caller-generated key that makes retrying this command safe."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BomCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BomRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["manufacturing:write"]}},"/v1/boms/{bom_id}":{"get":{"tags":["manufacturing"],"summary":"Get BOM","description":"Required Workspace API scope: `manufacturing:read`.","operationId":"boms.get","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"bom_id","in":"path","required":true,"schema":{"type":"string","maxLength":30,"pattern":"^bom_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Bom Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BomRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["manufacturing:read"]},"patch":{"tags":["manufacturing"],"summary":"Update BOM","description":"Only a BOM with status `draft` can be edited. An edit to a BOM with status `active`, `superseded`, or `archived` returns `409` with code `bom_invalid`.\n\nRequired Workspace API scope: `manufacturing:write`.","operationId":"boms.update","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"bom_id","in":"path","required":true,"schema":{"type":"string","maxLength":30,"pattern":"^bom_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Bom Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BomUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BomRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"BOM is not draft or another BOM validation rule failed (`bom_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["manufacturing:write"]}},"/v1/boms/{bom_id}/activate":{"post":{"tags":["manufacturing"],"summary":"Activate BOM","description":"Required Workspace API scope: `manufacturing:write`.","operationId":"boms.activate","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"bom_id","in":"path","required":true,"schema":{"type":"string","maxLength":30,"pattern":"^bom_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Bom Id"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200,"description":"A caller-generated key that makes retrying this command safe.","title":"Idempotency-Key"},"description":"A caller-generated key that makes retrying this command safe."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BomRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["manufacturing:write"]}},"/v1/boms/{bom_id}/archive":{"post":{"tags":["manufacturing"],"summary":"Archive BOM","description":"Required Workspace API scope: `manufacturing:write`.","operationId":"boms.archive","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"bom_id","in":"path","required":true,"schema":{"type":"string","maxLength":30,"pattern":"^bom_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Bom Id"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200,"description":"A caller-generated key that makes retrying this command safe.","title":"Idempotency-Key"},"description":"A caller-generated key that makes retrying this command safe."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BomRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["manufacturing:write"]}},"/v1/boms/{bom_id}/lines":{"get":{"tags":["manufacturing"],"summary":"List Lines","description":"Required Workspace API scope: `manufacturing:read`.","operationId":"boms.lines.list","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"bom_id","in":"path","required":true,"schema":{"type":"string","maxLength":30,"pattern":"^bom_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Bom Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CursorPage_BomLineRead_"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["manufacturing:read"]},"post":{"tags":["manufacturing"],"summary":"Create Line","description":"Only a BOM with status `draft` can be edited. An edit to a BOM with status `active`, `superseded`, or `archived` returns `409` with code `bom_invalid`.\n\nRequired Workspace API scope: `manufacturing:write`.","operationId":"boms.lines.create","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"bom_id","in":"path","required":true,"schema":{"type":"string","maxLength":30,"pattern":"^bom_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Bom Id"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200,"description":"A caller-generated key that makes retrying this command safe.","title":"Idempotency-Key"},"description":"A caller-generated key that makes retrying this command safe."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BomLineCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BomLineRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"BOM is not draft or another BOM validation rule failed (`bom_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["manufacturing:write"]}},"/v1/boms/{bom_id}/lines/{line_id}":{"get":{"tags":["manufacturing"],"summary":"Get Line","description":"Required Workspace API scope: `manufacturing:read`.","operationId":"boms.lines.get","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"bom_id","in":"path","required":true,"schema":{"type":"string","maxLength":30,"pattern":"^bom_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Bom Id"}},{"name":"line_id","in":"path","required":true,"schema":{"type":"string","maxLength":31,"pattern":"^boml_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Line Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BomLineRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["manufacturing:read"]},"patch":{"tags":["manufacturing"],"summary":"Patch Line","description":"Only a BOM with status `draft` can be edited. An edit to a BOM with status `active`, `superseded`, or `archived` returns `409` with code `bom_invalid`.\n\nRequired Workspace API scope: `manufacturing:write`.","operationId":"boms.lines.update","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"bom_id","in":"path","required":true,"schema":{"type":"string","maxLength":30,"pattern":"^bom_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Bom Id"}},{"name":"line_id","in":"path","required":true,"schema":{"type":"string","maxLength":31,"pattern":"^boml_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Line Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BomLineUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BomLineRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"BOM is not draft or another BOM validation rule failed (`bom_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["manufacturing:write"]},"delete":{"tags":["manufacturing"],"summary":"Delete Line","description":"Only a BOM with status `draft` can be edited. An edit to a BOM with status `active`, `superseded`, or `archived` returns `409` with code `bom_invalid`.\n\nRequired Workspace API scope: `manufacturing:write`.","operationId":"boms.lines.delete","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"bom_id","in":"path","required":true,"schema":{"type":"string","maxLength":30,"pattern":"^bom_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Bom Id"}},{"name":"line_id","in":"path","required":true,"schema":{"type":"string","maxLength":31,"pattern":"^boml_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Line Id"}}],"responses":{"204":{"description":"Successful Response"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"BOM is not draft or another BOM validation rule failed (`bom_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["manufacturing:write"]}},"/v1/boms/{bom_id}/cost-preview":{"get":{"tags":["manufacturing"],"summary":"Cost Preview","description":"Required Workspace API scope: `manufacturing:read`.","operationId":"boms.costPreview","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"bom_id","in":"path","required":true,"schema":{"type":"string","maxLength":30,"pattern":"^bom_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Bom Id"}},{"name":"quantity","in":"query","required":false,"schema":{"type":"string","pattern":"^(?=.*[1-9])(?:0|[1-9][0-9]{0,9})(?:\\.[0-9]{1,4})?$","default":"1","title":"Quantity"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BomCostPreviewRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["manufacturing:read"]}},"/v1/production-runs":{"get":{"tags":["manufacturing"],"summary":"List Production Runs","description":"Required Workspace API scope: `manufacturing:read`.","operationId":"productionRuns.list","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"enum":["planned","in_progress","completed","cancelled"],"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"item_id","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ItemId"},{"type":"null"}],"title":"Item Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CursorPage_ProductionRunRead_"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["manufacturing:read"]},"post":{"tags":["manufacturing"],"summary":"Create Production Run","description":"Required Workspace API scope: `manufacturing:write`.","operationId":"productionRuns.create","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200,"description":"A caller-generated key that makes retrying this command safe.","title":"Idempotency-Key"},"description":"A caller-generated key that makes retrying this command safe."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductionRunCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductionRunRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["manufacturing:write"]}},"/v1/production-runs/{run_id}":{"get":{"tags":["manufacturing"],"summary":"Get Production Run","description":"Required Workspace API scope: `manufacturing:read`.","operationId":"productionRuns.get","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","maxLength":30,"pattern":"^run_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductionRunDetailRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["manufacturing:read"]}},"/v1/production-runs/{run_id}/material-requirements":{"get":{"tags":["manufacturing"],"summary":"List Production Material Requirements","description":"Required Workspace API scope: `manufacturing:read`.","operationId":"productionRuns.materialRequirements.list","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","maxLength":30,"pattern":"^run_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Run Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CursorPage_ProductionMaterialRequirementRead_"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["manufacturing:read"]}},"/v1/production-runs/{run_id}/material-requirements/{requirement_id}":{"get":{"tags":["manufacturing"],"summary":"Get Production Material Requirement","description":"Required Workspace API scope: `manufacturing:read`.","operationId":"productionRuns.materialRequirements.get","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","maxLength":30,"pattern":"^run_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Run Id"}},{"name":"requirement_id","in":"path","required":true,"schema":{"type":"string","maxLength":31,"pattern":"^preq_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Requirement Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductionMaterialRequirementRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["manufacturing:read"]}},"/v1/production-runs/{run_id}/receipts":{"get":{"tags":["manufacturing"],"summary":"List Receipts","description":"Required Workspace API scope: `manufacturing:read`.","operationId":"productionRuns.receipts.list","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","maxLength":30,"pattern":"^run_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Run Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CursorPage_ProductionReceiptRead_"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["manufacturing:read"]},"post":{"tags":["manufacturing"],"summary":"Create Receipt","description":"Required Workspace API scope: `manufacturing:write`.","operationId":"productionRuns.receipts.create","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","maxLength":30,"pattern":"^run_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Run Id"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200,"description":"A caller-generated key that makes retrying this command safe.","title":"Idempotency-Key"},"description":"A caller-generated key that makes retrying this command safe."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductionReceiptCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductionReceiptResult"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["manufacturing:write"]}},"/v1/production-runs/{run_id}/receipts/{receipt_id}":{"get":{"tags":["manufacturing"],"summary":"Get Receipt","description":"Required Workspace API scope: `manufacturing:read`.","operationId":"productionRuns.receipts.get","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","maxLength":30,"pattern":"^run_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Run Id"}},{"name":"receipt_id","in":"path","required":true,"schema":{"type":"string","maxLength":34,"pattern":"^prodrec_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Receipt Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductionReceiptRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["manufacturing:read"]}},"/v1/production-runs/{run_id}/cancel":{"post":{"tags":["manufacturing"],"summary":"Cancel Production Run","description":"Required Workspace API scope: `manufacturing:write`.","operationId":"productionRuns.cancel","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","maxLength":30,"pattern":"^run_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Run Id"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200,"description":"A caller-generated key that makes retrying this command safe.","title":"Idempotency-Key"},"description":"A caller-generated key that makes retrying this command safe."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductionRunRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["manufacturing:write"]}},"/v1/production-runs/{run_id}/costing":{"get":{"tags":["manufacturing"],"summary":"Production Run Costing","description":"Required Workspace API scope: `manufacturing:read`.","operationId":"productionRuns.costing","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","maxLength":30,"pattern":"^run_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductionCostBreakdownRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["manufacturing:read"]}},"/v1/manufacturing-expenses":{"get":{"tags":["manufacturing"],"summary":"List Expenses","description":"Required Workspace API scope: `manufacturing:read`.","operationId":"manufacturingExpenses.list","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CursorPage_ManufacturingExpenseRead_"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["manufacturing:read"]},"post":{"tags":["manufacturing"],"summary":"Create Expense","description":"Required Workspace API scope: `manufacturing:write`.","operationId":"manufacturingExpenses.create","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200,"description":"A caller-generated key that makes retrying this command safe.","title":"Idempotency-Key"},"description":"A caller-generated key that makes retrying this command safe."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManufacturingExpenseCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManufacturingExpenseRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["manufacturing:write"]}},"/v1/manufacturing-expenses/{expense_id}":{"get":{"tags":["manufacturing"],"summary":"Get Expense","description":"Required Workspace API scope: `manufacturing:read`.","operationId":"manufacturingExpenses.get","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"expense_id","in":"path","required":true,"schema":{"type":"string","maxLength":31,"pattern":"^mexp_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Expense Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManufacturingExpenseRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["manufacturing:read"]},"patch":{"tags":["manufacturing"],"summary":"Patch Expense","description":"Required Workspace API scope: `manufacturing:write`.","operationId":"manufacturingExpenses.update","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"expense_id","in":"path","required":true,"schema":{"type":"string","maxLength":31,"pattern":"^mexp_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Expense Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManufacturingExpenseUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManufacturingExpenseRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["manufacturing:write"]},"delete":{"tags":["manufacturing"],"summary":"Delete Expense","description":"Required Workspace API scope: `manufacturing:write`.","operationId":"manufacturingExpenses.delete","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"expense_id","in":"path","required":true,"schema":{"type":"string","maxLength":31,"pattern":"^mexp_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Expense Id"}}],"responses":{"204":{"description":"Successful Response"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["manufacturing:write"]}},"/v1/overhead-rules":{"get":{"tags":["manufacturing"],"summary":"List Rules","description":"Required Workspace API scope: `manufacturing:read`.","operationId":"overheadRules.list","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CursorPage_OverheadRuleRead_"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["manufacturing:read"]},"post":{"tags":["manufacturing"],"summary":"Create Rule","description":"Required Workspace API scope: `manufacturing:write`.","operationId":"overheadRules.create","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200,"description":"A caller-generated key that makes retrying this command safe.","title":"Idempotency-Key"},"description":"A caller-generated key that makes retrying this command safe."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OverheadRuleCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OverheadRuleRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["manufacturing:write"]}},"/v1/overhead-rules/{rule_id}":{"get":{"tags":["manufacturing"],"summary":"Get Rule","description":"Required Workspace API scope: `manufacturing:read`.","operationId":"overheadRules.get","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"string","maxLength":30,"pattern":"^ohr_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Rule Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OverheadRuleRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["manufacturing:read"]},"patch":{"tags":["manufacturing"],"summary":"Patch Rule","description":"Required Workspace API scope: `manufacturing:write`.","operationId":"overheadRules.update","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"string","maxLength":30,"pattern":"^ohr_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Rule Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OverheadRuleUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OverheadRuleRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["manufacturing:write"]},"delete":{"tags":["manufacturing"],"summary":"Delete Rule","description":"Required Workspace API scope: `manufacturing:write`.","operationId":"overheadRules.delete","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"string","maxLength":30,"pattern":"^ohr_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Rule Id"}}],"responses":{"204":{"description":"Successful Response"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["manufacturing:write"]}},"/v1/lots/{lot_id}/trace":{"get":{"tags":["traceability"],"summary":"Get Lot Trace","description":"Required Workspace API scope: `traceability:read`.","operationId":"lots.trace","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"lot_id","in":"path","required":true,"schema":{"type":"string","maxLength":30,"pattern":"^lot_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Lot Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LotTraceRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["traceability:read"]}},"/v1/lots/{lot_id}/trace/movements":{"get":{"tags":["traceability"],"summary":"List Lot Trace Movements","description":"Required Workspace API scope: `traceability:read`.","operationId":"lots.trace.movements.list","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"lot_id","in":"path","required":true,"schema":{"type":"string","maxLength":30,"pattern":"^lot_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Lot Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CursorPage_LotTraceMovementRead_"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["traceability:read"]}},"/v1/lots/{lot_id}/trace/production-links":{"get":{"tags":["traceability"],"summary":"List Lot Trace Production Links","description":"Required Workspace API scope: `traceability:read`.","operationId":"lots.trace.productionLinks.list","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"lot_id","in":"path","required":true,"schema":{"type":"string","maxLength":30,"pattern":"^lot_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Lot Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CursorPage_LotTraceProductionLinkRead_"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["traceability:read"]}},"/v1/lots/{lot_id}/trace/order-links":{"get":{"tags":["traceability"],"summary":"List Lot Trace Order Links","description":"Required Workspace API scope: `traceability:read`.","operationId":"lots.trace.orderLinks.list","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"lot_id","in":"path","required":true,"schema":{"type":"string","maxLength":30,"pattern":"^lot_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Lot Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CursorPage_LotTraceOrderLinkRead_"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["traceability:read"]}},"/v1/recalls":{"post":{"tags":["traceability"],"summary":"Create Recall","description":"Required Workspace API scope: `traceability:write`.","operationId":"recalls.create","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200,"description":"A caller-generated key that makes retrying this command safe.","title":"Idempotency-Key"},"description":"A caller-generated key that makes retrying this command safe."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecallCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecallRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["traceability:write"]},"get":{"tags":["traceability"],"summary":"List Recalls","description":"Required Workspace API scope: `traceability:read`.","operationId":"recalls.list","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CursorPage_RecallRead_"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["traceability:read"]}},"/v1/recalls/{recall_id}":{"get":{"tags":["traceability"],"summary":"Get Recall","description":"Required Workspace API scope: `traceability:read`.","operationId":"recalls.get","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"recall_id","in":"path","required":true,"schema":{"type":"string","maxLength":30,"pattern":"^rec_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Recall Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecallRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["traceability:read"]}},"/v1/recalls/{recall_id}/close":{"post":{"tags":["traceability"],"summary":"Close Recall","description":"Required Workspace API scope: `traceability:write`.","operationId":"recalls.close","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"recall_id","in":"path","required":true,"schema":{"type":"string","maxLength":30,"pattern":"^rec_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Recall Id"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200,"description":"A caller-generated key that makes retrying this command safe.","title":"Idempotency-Key"},"description":"A caller-generated key that makes retrying this command safe."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecallRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["traceability:write"]}},"/v1/recalls/{recall_id}/impact":{"get":{"tags":["traceability"],"summary":"Get Recall Impact","description":"Required Workspace API scope: `traceability:read`.","operationId":"recalls.impact","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"recall_id","in":"path","required":true,"schema":{"type":"string","maxLength":30,"pattern":"^rec_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Recall Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecallImpactRead"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["traceability:read"]}},"/v1/recalls/{recall_id}/affected-orders":{"get":{"tags":["traceability"],"summary":"List Recall Affected Orders","description":"Required Workspace API scope: `traceability:read`.","operationId":"recalls.affectedOrders.list","security":[{"WorkspaceApiToken":[]}],"parameters":[{"name":"recall_id","in":"path","required":true,"schema":{"type":"string","maxLength":30,"pattern":"^rec_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Recall Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CursorPage_RecallAffectedOrderRead_"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Scope or entitlement denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"408":{"description":"Request body receive timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"State or idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After and back off before retrying.","headers":{"Retry-After":{"description":"Seconds until the client may retry the request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"x-fabriqo-required-scopes":["traceability:read"]}}},"components":{"schemas":{"Address":{"properties":{"line1":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Line1"},"line2":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Line2"},"city":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"City"},"postal_code":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Postal Code"},"country":{"anyOf":[{"type":"string","pattern":"^[A-Z]{2}$"},{"type":"null"}],"title":"Country"}},"additionalProperties":false,"type":"object","title":"Address"},"ApiErrorBody":{"properties":{"code":{"type":"string","title":"Code"},"message":{"type":"string","title":"Message"},"details":{"anyOf":[{},{"type":"null"}],"title":"Details"}},"type":"object","required":["code","message"],"title":"ApiErrorBody"},"ApiErrorResponse":{"properties":{"error":{"$ref":"#/components/schemas/ApiErrorBody"}},"type":"object","required":["error"],"title":"ApiErrorResponse"},"BarcodeCreateRequest":{"properties":{"item_id":{"$ref":"#/components/schemas/ItemId"},"code":{"type":"string","maxLength":120,"minLength":1,"title":"Code"},"symbology":{"$ref":"#/components/schemas/BarcodeSymbology","default":"code128"},"is_primary":{"type":"boolean","title":"Is Primary","default":false}},"additionalProperties":false,"type":"object","required":["item_id","code"],"title":"BarcodeCreateRequest"},"BarcodeId":{"type":"string","maxLength":29,"pattern":"^bc_[0-7][0-9A-HJKMNP-TV-Z]{25}$"},"BarcodeRead":{"properties":{"id":{"$ref":"#/components/schemas/BarcodeId"},"item_id":{"$ref":"#/components/schemas/ItemId"},"code":{"type":"string","title":"Code"},"symbology":{"$ref":"#/components/schemas/BarcodeSymbology"},"is_primary":{"type":"boolean","title":"Is Primary"}},"additionalProperties":false,"type":"object","required":["id","item_id","code","symbology","is_primary"],"title":"BarcodeRead"},"BarcodeSymbology":{"type":"string","enum":["code128","ean13","upc","qr"],"title":"BarcodeSymbology"},"BarcodeUpdateRequest":{"properties":{"code":{"type":"string","maxLength":120,"minLength":1,"title":"Code"},"symbology":{"$ref":"#/components/schemas/BarcodeSymbology"},"is_primary":{"type":"boolean","title":"Is Primary"}},"additionalProperties":false,"type":"object","title":"BarcodeUpdateRequest"},"BomCostPreviewRead":{"properties":{"bom_id":{"$ref":"#/components/schemas/BomId"},"item_id":{"$ref":"#/components/schemas/ItemId"},"quantity":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Quantity"},"estimated_material_cost":{"anyOf":[{"type":"string","pattern":"^(?!-0(?:\\.0+)?$)-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$"},{"type":"null"}],"title":"Estimated Material Cost"}},"additionalProperties":false,"type":"object","required":["bom_id","item_id","quantity","estimated_material_cost"],"title":"BomCostPreviewRead"},"BomCreateRequest":{"properties":{"item_id":{"$ref":"#/components/schemas/ItemId"},"output_quantity":{"type":"string","pattern":"^(?=.*[1-9])(?:0|[1-9][0-9]{0,9})(?:\\.[0-9]{1,4})?$","title":"Output Quantity","default":"1"},"revision":{"type":"string","maxLength":64,"minLength":1,"title":"Revision","default":"1"},"lead_time_days":{"type":"integer","maximum":3650.0,"minimum":0.0,"title":"Lead Time Days","default":0},"minimum_order_quantity":{"type":"string","pattern":"^(?:0|[1-9][0-9]{0,9})(?:\\.[0-9]{1,4})?$","title":"Minimum Order Quantity","default":"0"},"order_multiple":{"type":"string","pattern":"^(?=.*[1-9])(?:0|[1-9][0-9]{0,9})(?:\\.[0-9]{1,4})?$","title":"Order Multiple","default":"1"}},"additionalProperties":false,"type":"object","required":["item_id"],"title":"BomCreateRequest"},"BomId":{"type":"string","maxLength":30,"pattern":"^bom_[0-7][0-9A-HJKMNP-TV-Z]{25}$"},"BomLineCreateRequest":{"properties":{"item_id":{"$ref":"#/components/schemas/ItemId"},"quantity_per_unit":{"type":"string","pattern":"^(?=.*[1-9])(?:0|[1-9][0-9]{0,9})(?:\\.[0-9]{1,4})?$","title":"Quantity Per Unit"},"scrappage_factor":{"type":"string","pattern":"^(?:0|[1-9][0-9]{0,3})(?:\\.[0-9]{1,4})?$","title":"Scrappage Factor","default":"0"}},"additionalProperties":false,"type":"object","required":["item_id","quantity_per_unit"],"title":"BomLineCreateRequest"},"BomLineId":{"type":"string","maxLength":31,"pattern":"^boml_[0-7][0-9A-HJKMNP-TV-Z]{25}$"},"BomLineRead":{"properties":{"id":{"$ref":"#/components/schemas/BomLineId"},"bom_id":{"$ref":"#/components/schemas/BomId"},"item_id":{"$ref":"#/components/schemas/ItemId"},"quantity_per_unit":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Quantity Per Unit"},"scrappage_factor":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Scrappage Factor"}},"additionalProperties":false,"type":"object","required":["id","bom_id","item_id","quantity_per_unit","scrappage_factor"],"title":"BomLineRead"},"BomLineUpdateRequest":{"properties":{"quantity_per_unit":{"type":"string","pattern":"^(?=.*[1-9])(?:0|[1-9][0-9]{0,9})(?:\\.[0-9]{1,4})?$","title":"Quantity Per Unit"},"scrappage_factor":{"type":"string","pattern":"^(?:0|[1-9][0-9]{0,3})(?:\\.[0-9]{1,4})?$","title":"Scrappage Factor"}},"additionalProperties":false,"type":"object","title":"BomLineUpdateRequest"},"BomRead":{"properties":{"id":{"$ref":"#/components/schemas/BomId"},"item_id":{"$ref":"#/components/schemas/ItemId"},"output_quantity":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Output Quantity"},"status":{"type":"string","enum":["draft","active","superseded","archived"],"title":"Status"},"revision":{"type":"string","title":"Revision"},"lead_time_days":{"type":"integer","title":"Lead Time Days"},"minimum_order_quantity":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Minimum Order Quantity"},"order_multiple":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Order Multiple"},"line_count":{"type":"integer","title":"Line Count"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"additionalProperties":false,"type":"object","required":["id","item_id","output_quantity","status","revision","lead_time_days","minimum_order_quantity","order_multiple","line_count","created_at","updated_at"],"title":"BomRead"},"BomUpdateRequest":{"properties":{"output_quantity":{"type":"string","pattern":"^(?=.*[1-9])(?:0|[1-9][0-9]{0,9})(?:\\.[0-9]{1,4})?$","title":"Output Quantity"},"revision":{"type":"string","maxLength":64,"minLength":1,"title":"Revision"},"lead_time_days":{"type":"integer","maximum":3650.0,"minimum":0.0,"title":"Lead Time Days"},"minimum_order_quantity":{"type":"string","pattern":"^(?:0|[1-9][0-9]{0,9})(?:\\.[0-9]{1,4})?$","title":"Minimum Order Quantity"},"order_multiple":{"type":"string","pattern":"^(?=.*[1-9])(?:0|[1-9][0-9]{0,9})(?:\\.[0-9]{1,4})?$","title":"Order Multiple"}},"additionalProperties":false,"type":"object","title":"BomUpdateRequest"},"CatalogLifecycleStatus":{"type":"string","enum":["draft","active","paused","discontinued"],"title":"CatalogLifecycleStatus"},"CursorPage_BarcodeRead_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/BarcodeRead"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items"],"title":"CursorPage[BarcodeRead]"},"CursorPage_BomLineRead_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/BomLineRead"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items"],"title":"CursorPage[BomLineRead]"},"CursorPage_BomRead_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/BomRead"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items"],"title":"CursorPage[BomRead]"},"CursorPage_CustomerRead_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CustomerRead"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items"],"title":"CursorPage[CustomerRead]"},"CursorPage_InventoryMovementRead_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/InventoryMovementRead"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items"],"title":"CursorPage[InventoryMovementRead]"},"CursorPage_ItemAvailabilityForecastEntry_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ItemAvailabilityForecastEntry"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items"],"title":"CursorPage[ItemAvailabilityForecastEntry]"},"CursorPage_ItemRead_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ItemRead"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items"],"title":"CursorPage[ItemRead]"},"CursorPage_ItemSupplierRead_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ItemSupplierRead"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items"],"title":"CursorPage[ItemSupplierRead]"},"CursorPage_LocationRead_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/LocationRead"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items"],"title":"CursorPage[LocationRead]"},"CursorPage_LotRead_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/LotRead"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items"],"title":"CursorPage[LotRead]"},"CursorPage_LotTraceMovementRead_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/LotTraceMovementRead"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items"],"title":"CursorPage[LotTraceMovementRead]"},"CursorPage_LotTraceOrderLinkRead_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/LotTraceOrderLinkRead"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items"],"title":"CursorPage[LotTraceOrderLinkRead]"},"CursorPage_LotTraceProductionLinkRead_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/LotTraceProductionLinkRead"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items"],"title":"CursorPage[LotTraceProductionLinkRead]"},"CursorPage_ManufacturingExpenseRead_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ManufacturingExpenseRead"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items"],"title":"CursorPage[ManufacturingExpenseRead]"},"CursorPage_OverheadRuleRead_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/OverheadRuleRead"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items"],"title":"CursorPage[OverheadRuleRead]"},"CursorPage_ProductionMaterialRequirementRead_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ProductionMaterialRequirementRead"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items"],"title":"CursorPage[ProductionMaterialRequirementRead]"},"CursorPage_ProductionReceiptRead_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ProductionReceiptRead"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items"],"title":"CursorPage[ProductionReceiptRead]"},"CursorPage_ProductionRunRead_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ProductionRunRead"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items"],"title":"CursorPage[ProductionRunRead]"},"CursorPage_PurchaseOrderLineRead_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/PurchaseOrderLineRead"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items"],"title":"CursorPage[PurchaseOrderLineRead]"},"CursorPage_PurchaseOrderOverheadRead_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/PurchaseOrderOverheadRead"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items"],"title":"CursorPage[PurchaseOrderOverheadRead]"},"CursorPage_PurchaseOrderSummaryRead_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/PurchaseOrderSummaryRead"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items"],"title":"CursorPage[PurchaseOrderSummaryRead]"},"CursorPage_PurchaseReceiptLineRead_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/PurchaseReceiptLineRead"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items"],"title":"CursorPage[PurchaseReceiptLineRead]"},"CursorPage_PurchaseReceiptSummaryRead_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/PurchaseReceiptSummaryRead"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items"],"title":"CursorPage[PurchaseReceiptSummaryRead]"},"CursorPage_RecallAffectedOrderRead_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/RecallAffectedOrderRead"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items"],"title":"CursorPage[RecallAffectedOrderRead]"},"CursorPage_RecallRead_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/RecallRead"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items"],"title":"CursorPage[RecallRead]"},"CursorPage_ReplenishmentPolicyRead_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ReplenishmentPolicyRead"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items"],"title":"CursorPage[ReplenishmentPolicyRead]"},"CursorPage_ReplenishmentRecommendationRead_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ReplenishmentRecommendationRead"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items"],"title":"CursorPage[ReplenishmentRecommendationRead]"},"CursorPage_ReservationRead_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ReservationRead"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items"],"title":"CursorPage[ReservationRead]"},"CursorPage_SalesOrderFulfillmentLineRead_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/SalesOrderFulfillmentLineRead"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items"],"title":"CursorPage[SalesOrderFulfillmentLineRead]"},"CursorPage_SalesOrderFulfillmentSummaryRead_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/SalesOrderFulfillmentSummaryRead"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items"],"title":"CursorPage[SalesOrderFulfillmentSummaryRead]"},"CursorPage_SalesOrderLineRead_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/SalesOrderLineRead"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items"],"title":"CursorPage[SalesOrderLineRead]"},"CursorPage_SalesOrderSummaryRead_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/SalesOrderSummaryRead"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items"],"title":"CursorPage[SalesOrderSummaryRead]"},"CursorPage_SupplierRead_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/SupplierRead"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items"],"title":"CursorPage[SupplierRead]"},"CustomerCreateRequest":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"email":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"title":"Phone"},"vat_number":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Vat Number"},"address":{"anyOf":[{"$ref":"#/components/schemas/Address"},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Notes"}},"additionalProperties":false,"type":"object","required":["name"],"title":"CustomerCreateRequest"},"CustomerId":{"type":"string","maxLength":31,"pattern":"^cust_[0-7][0-9A-HJKMNP-TV-Z]{25}$"},"CustomerRead":{"properties":{"id":{"$ref":"#/components/schemas/CustomerId"},"name":{"type":"string","title":"Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"vat_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vat Number"},"address":{"$ref":"#/components/schemas/Address"},"is_archived":{"type":"boolean","title":"Is Archived"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"additionalProperties":false,"type":"object","required":["id","name","email","phone","vat_number","address","is_archived","notes"],"title":"CustomerRead"},"CustomerUpdateRequest":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"email":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"title":"Phone"},"vat_number":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Vat Number"},"address":{"anyOf":[{"$ref":"#/components/schemas/Address"},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Notes"}},"additionalProperties":false,"type":"object","title":"CustomerUpdateRequest"},"ForecastReference":{"properties":{"type":{"type":"string","title":"Type"},"id":{"type":"string","maxLength":48,"pattern":"^[a-z][a-z0-9]*_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Id"}},"additionalProperties":false,"type":"object","required":["type","id"],"title":"ForecastReference"},"InventoryAdjustmentCreateRequest":{"properties":{"item_id":{"$ref":"#/components/schemas/ItemId"},"location_id":{"$ref":"#/components/schemas/LocationId"},"lot_id":{"anyOf":[{"$ref":"#/components/schemas/LotId"},{"type":"null"}]},"quantity_delta":{"type":"string","pattern":"^(?!-0(?:\\.0{1,4})?$)-?(?:0|[1-9][0-9]{0,9})(?:\\.[0-9]{1,4})?$","title":"Quantity Delta"},"unit_cost":{"anyOf":[{"type":"string","pattern":"^(?=.*[1-9])(?:0|[1-9][0-9]{0,9})(?:\\.[0-9]{1,4})?$"},{"type":"null"}],"title":"Unit Cost"},"reason_note":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Reason Note"}},"additionalProperties":false,"type":"object","required":["item_id","location_id","quantity_delta"],"title":"InventoryAdjustmentCreateRequest"},"InventoryAdjustmentId":{"type":"string","maxLength":31,"pattern":"^iadj_[0-7][0-9A-HJKMNP-TV-Z]{25}$"},"InventoryAdjustmentResult":{"properties":{"id":{"$ref":"#/components/schemas/InventoryAdjustmentId"},"item_id":{"$ref":"#/components/schemas/ItemId"},"movement_ids":{"items":{"$ref":"#/components/schemas/InventoryMovementId"},"type":"array","title":"Movement Ids"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"location_id":{"$ref":"#/components/schemas/LocationId"},"quantity_delta":{"type":"string","pattern":"^(?!-0(?:\\.0+)?$)-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Quantity Delta"}},"additionalProperties":false,"type":"object","required":["id","item_id","movement_ids","created_at","location_id","quantity_delta"],"title":"InventoryAdjustmentResult"},"InventoryMovementId":{"type":"string","maxLength":31,"pattern":"^imov_[0-7][0-9A-HJKMNP-TV-Z]{25}$"},"InventoryMovementRead":{"properties":{"id":{"$ref":"#/components/schemas/InventoryMovementId"},"item_id":{"$ref":"#/components/schemas/ItemId"},"location_id":{"$ref":"#/components/schemas/LocationId"},"lot_id":{"anyOf":[{"$ref":"#/components/schemas/LotId"},{"type":"null"}]},"counterparty_location_id":{"anyOf":[{"$ref":"#/components/schemas/LocationId"},{"type":"null"}]},"quantity_delta":{"type":"string","pattern":"^(?!-0(?:\\.0+)?$)-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Quantity Delta"},"unit_cost":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Unit Cost"},"reason":{"type":"string","maxLength":40,"minLength":1,"title":"Reason"},"reference":{"anyOf":[{"$ref":"#/components/schemas/InventoryMovementReferenceRead"},{"type":"null"}]},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"effective_at":{"type":"string","format":"date-time","title":"Effective At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"additionalProperties":false,"type":"object","required":["id","item_id","location_id","lot_id","counterparty_location_id","quantity_delta","unit_cost","reason","reference","notes","effective_at","created_at"],"title":"InventoryMovementRead"},"InventoryMovementReferenceRead":{"properties":{"type":{"type":"string","maxLength":50,"minLength":1,"title":"Type"},"id":{"type":"string","maxLength":48,"pattern":"^[a-z][a-z0-9]*_[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"Id"}},"additionalProperties":false,"type":"object","required":["type","id"],"title":"InventoryMovementReferenceRead"},"InventoryTransferCreateRequest":{"properties":{"item_id":{"$ref":"#/components/schemas/ItemId"},"from_location_id":{"$ref":"#/components/schemas/LocationId"},"to_location_id":{"$ref":"#/components/schemas/LocationId"},"quantity":{"type":"string","pattern":"^(?=.*[1-9])(?:0|[1-9][0-9]{0,9})(?:\\.[0-9]{1,4})?$","title":"Quantity"},"lot_id":{"anyOf":[{"$ref":"#/components/schemas/LotId"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["item_id","from_location_id","to_location_id","quantity"],"title":"InventoryTransferCreateRequest"},"InventoryTransferId":{"type":"string","maxLength":30,"pattern":"^itr_[0-7][0-9A-HJKMNP-TV-Z]{25}$"},"InventoryTransferResult":{"properties":{"id":{"$ref":"#/components/schemas/InventoryTransferId"},"item_id":{"$ref":"#/components/schemas/ItemId"},"movement_ids":{"items":{"$ref":"#/components/schemas/InventoryMovementId"},"type":"array","title":"Movement Ids"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"from_location_id":{"$ref":"#/components/schemas/LocationId"},"to_location_id":{"$ref":"#/components/schemas/LocationId"},"quantity":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Quantity"},"lot_id":{"anyOf":[{"$ref":"#/components/schemas/LotId"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["id","item_id","movement_ids","created_at","from_location_id","to_location_id","quantity","lot_id"],"title":"InventoryTransferResult"},"ItemAvailabilityForecastEntry":{"properties":{"time_precision":{"type":"string","enum":["date","timestamp"],"title":"Time Precision"},"expected_at":{"type":"string","format":"date-time","title":"Expected At"},"event_type":{"type":"string","enum":["supply","demand"],"title":"Event Type"},"supply_state":{"anyOf":[{"type":"string","enum":["confirmed","planned"]},{"type":"null"}],"title":"Supply State"},"quantity_delta":{"type":"string","pattern":"^(?!-0(?:\\.0+)?$)-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Quantity Delta"},"projected_confirmed":{"type":"string","pattern":"^(?!-0(?:\\.0+)?$)-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Projected Confirmed"},"projected_including_plan":{"type":"string","pattern":"^(?!-0(?:\\.0+)?$)-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Projected Including Plan"},"reference":{"$ref":"#/components/schemas/ForecastReference"}},"additionalProperties":false,"type":"object","required":["time_precision","expected_at","event_type","supply_state","quantity_delta","projected_confirmed","projected_including_plan","reference"],"title":"ItemAvailabilityForecastEntry"},"ItemAvailabilityRead":{"properties":{"item_id":{"$ref":"#/components/schemas/ItemId"},"location_id":{"anyOf":[{"$ref":"#/components/schemas/LocationId"},{"type":"null"}]},"on_hand":{"type":"string","pattern":"^(?!-0(?:\\.0+)?$)-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"On Hand"},"reserved":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Reserved"},"available":{"type":"string","pattern":"^(?!-0(?:\\.0+)?$)-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Available"},"confirmed_supply":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Confirmed Supply"},"planned_supply":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Planned Supply"},"expected_demand":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Expected Demand"},"projected_confirmed":{"type":"string","pattern":"^(?!-0(?:\\.0+)?$)-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Projected Confirmed"},"projected_including_plan":{"type":"string","pattern":"^(?!-0(?:\\.0+)?$)-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Projected Including Plan"}},"additionalProperties":false,"type":"object","required":["item_id","location_id","on_hand","reserved","available","confirmed_supply","planned_supply","expected_demand","projected_confirmed","projected_including_plan"],"title":"ItemAvailabilityRead"},"ItemCreateRequest":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"sku":{"type":"string","maxLength":100,"minLength":1,"title":"Sku"},"unit":{"type":"string","maxLength":30,"minLength":1,"title":"Unit"},"purchasable":{"type":"boolean","title":"Purchasable","default":false},"sellable":{"type":"boolean","title":"Sellable","default":false},"manufacturable":{"type":"boolean","title":"Manufacturable","default":false},"status":{"$ref":"#/components/schemas/CatalogLifecycleStatus","default":"draft"}},"additionalProperties":false,"type":"object","required":["name","sku","unit"],"title":"ItemCreateRequest"},"ItemId":{"type":"string","maxLength":31,"pattern":"^item_[0-7][0-9A-HJKMNP-TV-Z]{25}$"},"ItemRead":{"properties":{"id":{"$ref":"#/components/schemas/ItemId"},"name":{"type":"string","title":"Name"},"sku":{"type":"string","title":"Sku"},"unit":{"type":"string","title":"Unit"},"purchasable":{"type":"boolean","title":"Purchasable"},"sellable":{"type":"boolean","title":"Sellable"},"manufacturable":{"type":"boolean","title":"Manufacturable"},"status":{"$ref":"#/components/schemas/CatalogLifecycleStatus"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"additionalProperties":false,"type":"object","required":["id","name","sku","unit","purchasable","sellable","manufacturable","status","created_at","updated_at"],"title":"ItemRead"},"ItemStockRead":{"properties":{"item_id":{"$ref":"#/components/schemas/ItemId"},"location_id":{"anyOf":[{"$ref":"#/components/schemas/LocationId"},{"type":"null"}]},"lot_id":{"anyOf":[{"$ref":"#/components/schemas/LotId"},{"type":"null"}]},"on_hand":{"type":"string","pattern":"^(?!-0(?:\\.0+)?$)-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"On Hand"}},"additionalProperties":false,"type":"object","required":["item_id","on_hand"],"title":"ItemStockRead"},"ItemSupplierCreateRequest":{"properties":{"supplier_id":{"$ref":"#/components/schemas/SupplierId"},"supplier_sku":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Supplier Sku"},"lead_time_days":{"anyOf":[{"type":"integer","maximum":3650.0,"minimum":0.0},{"type":"null"}],"title":"Lead Time Days"},"minimum_order_quantity":{"type":"string","pattern":"^(?:0|[1-9][0-9]{0,9})(?:\\.[0-9]{1,4})?$","title":"Minimum Order Quantity","default":"0"},"order_multiple":{"type":"string","pattern":"^(?=.*[1-9])(?:0|[1-9][0-9]{0,9})(?:\\.[0-9]{1,4})?$","title":"Order Multiple","default":"1"},"unit_cost":{"type":"string","pattern":"^(?:0|[1-9][0-9]{0,9})(?:\\.[0-9]{1,4})?$","title":"Unit Cost"},"currency":{"anyOf":[{"type":"string","pattern":"^[A-Z]{3}$"},{"type":"null"}],"title":"Currency","description":"Defaults to the workspace currency when omitted; the resolved currency is persisted."},"preferred":{"type":"boolean","title":"Preferred","default":false}},"additionalProperties":false,"type":"object","required":["supplier_id","unit_cost"],"title":"ItemSupplierCreateRequest"},"ItemSupplierId":{"type":"string","maxLength":31,"pattern":"^isup_[0-7][0-9A-HJKMNP-TV-Z]{25}$"},"ItemSupplierRead":{"properties":{"id":{"$ref":"#/components/schemas/ItemSupplierId"},"item_id":{"$ref":"#/components/schemas/ItemId"},"supplier_id":{"$ref":"#/components/schemas/SupplierId"},"supplier_sku":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supplier Sku"},"lead_time_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Lead Time Days"},"minimum_order_quantity":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Minimum Order Quantity"},"order_multiple":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Order Multiple"},"unit_cost":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Unit Cost"},"currency":{"type":"string","pattern":"^[A-Z]{3}$","title":"Currency"},"preferred":{"type":"boolean","title":"Preferred"}},"additionalProperties":false,"type":"object","required":["id","item_id","supplier_id","supplier_sku","lead_time_days","minimum_order_quantity","order_multiple","unit_cost","currency","preferred"],"title":"ItemSupplierRead"},"ItemSupplierUpdateRequest":{"properties":{"supplier_sku":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Supplier Sku"},"lead_time_days":{"anyOf":[{"type":"integer","maximum":3650.0,"minimum":0.0},{"type":"null"}],"title":"Lead Time Days"},"minimum_order_quantity":{"type":"string","pattern":"^(?:0|[1-9][0-9]{0,9})(?:\\.[0-9]{1,4})?$","title":"Minimum Order Quantity"},"order_multiple":{"type":"string","pattern":"^(?=.*[1-9])(?:0|[1-9][0-9]{0,9})(?:\\.[0-9]{1,4})?$","title":"Order Multiple"},"unit_cost":{"type":"string","pattern":"^(?:0|[1-9][0-9]{0,9})(?:\\.[0-9]{1,4})?$","title":"Unit Cost"},"currency":{"type":"string","pattern":"^[A-Z]{3}$","title":"Currency"},"preferred":{"type":"boolean","title":"Preferred"}},"additionalProperties":false,"type":"object","title":"ItemSupplierUpdateRequest"},"ItemUpdateRequest":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"sku":{"type":"string","maxLength":100,"minLength":1,"title":"Sku"},"unit":{"type":"string","maxLength":30,"minLength":1,"title":"Unit"},"purchasable":{"type":"boolean","title":"Purchasable"},"sellable":{"type":"boolean","title":"Sellable"},"manufacturable":{"type":"boolean","title":"Manufacturable"},"status":{"$ref":"#/components/schemas/CatalogLifecycleStatus"}},"additionalProperties":false,"type":"object","title":"ItemUpdateRequest"},"ItemValuationRead":{"properties":{"item_id":{"$ref":"#/components/schemas/ItemId"},"location_id":{"anyOf":[{"$ref":"#/components/schemas/LocationId"},{"type":"null"}]},"lot_id":{"anyOf":[{"$ref":"#/components/schemas/LotId"},{"type":"null"}]},"inventory_value":{"anyOf":[{"type":"string","pattern":"^(?!-0(?:\\.0+)?$)-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$"},{"type":"null"}],"title":"Inventory Value"},"weighted_average_cost":{"anyOf":[{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$"},{"type":"null"}],"title":"Weighted Average Cost"}},"additionalProperties":false,"type":"object","required":["item_id","inventory_value","weighted_average_cost"],"title":"ItemValuationRead"},"JsonValue":{},"LocationCreateRequest":{"properties":{"name":{"type":"string","maxLength":120,"minLength":1,"title":"Name"},"slug":{"anyOf":[{"type":"string","maxLength":120,"minLength":1},{"type":"null"}],"title":"Slug"}},"additionalProperties":false,"type":"object","required":["name"],"title":"LocationCreateRequest"},"LocationId":{"type":"string","maxLength":30,"pattern":"^loc_[0-7][0-9A-HJKMNP-TV-Z]{25}$"},"LocationRead":{"properties":{"id":{"$ref":"#/components/schemas/LocationId"},"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug"},"is_default":{"type":"boolean","title":"Is Default"},"is_archived":{"type":"boolean","title":"Is Archived"}},"additionalProperties":false,"type":"object","required":["id","name","slug","is_default","is_archived"],"title":"LocationRead"},"LocationUpdateRequest":{"properties":{"name":{"type":"string","maxLength":120,"minLength":1,"title":"Name"}},"additionalProperties":false,"type":"object","title":"LocationUpdateRequest"},"LotId":{"type":"string","maxLength":30,"pattern":"^lot_[0-7][0-9A-HJKMNP-TV-Z]{25}$"},"LotRead":{"properties":{"id":{"$ref":"#/components/schemas/LotId"},"item_id":{"$ref":"#/components/schemas/ItemId"},"supplier_id":{"anyOf":[{"$ref":"#/components/schemas/SupplierId"},{"type":"null"}]},"purchase_order_line_id":{"anyOf":[{"$ref":"#/components/schemas/PurchaseOrderLineId"},{"type":"null"}]},"lot_code":{"type":"string","title":"Lot Code"},"received_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Received At"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"unit_cost":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Unit Cost"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"additionalProperties":false,"type":"object","required":["id","item_id","supplier_id","purchase_order_line_id","lot_code","received_at","expires_at","unit_cost","notes"],"title":"LotRead"},"LotTraceMovementRead":{"properties":{"id":{"$ref":"#/components/schemas/InventoryMovementId"},"item_id":{"$ref":"#/components/schemas/ItemId"},"location_id":{"$ref":"#/components/schemas/LocationId"},"quantity_delta":{"type":"string","pattern":"^(?!-0(?:\\.0+)?$)-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Quantity Delta"},"reason":{"type":"string","title":"Reason"},"reference_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reference Type"},"reference_id":{"anyOf":[{"type":"string","maxLength":48,"pattern":"^[a-z][a-z0-9]*_[0-7][0-9A-HJKMNP-TV-Z]{25}$"},{"type":"null"}],"title":"Reference Id"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"additionalProperties":false,"type":"object","required":["id","item_id","location_id","quantity_delta","reason","reference_type","reference_id","created_at"],"title":"LotTraceMovementRead"},"LotTraceOrderLinkRead":{"properties":{"id":{"$ref":"#/components/schemas/OrderLotLinkId"},"order_id":{"$ref":"#/components/schemas/SalesOrderId"},"order_line_id":{"anyOf":[{"$ref":"#/components/schemas/SalesOrderLineId"},{"type":"null"}]},"quantity":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Quantity"}},"additionalProperties":false,"type":"object","required":["id","order_id","order_line_id","quantity"],"title":"LotTraceOrderLinkRead"},"LotTraceProductionLinkRead":{"properties":{"id":{"$ref":"#/components/schemas/ProductionComponentId"},"production_run_id":{"$ref":"#/components/schemas/ProductionRunId"},"item_id":{"$ref":"#/components/schemas/ItemId"},"produced_lot_id":{"anyOf":[{"$ref":"#/components/schemas/LotId"},{"type":"null"}]},"quantity_consumed":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Quantity Consumed"}},"additionalProperties":false,"type":"object","required":["id","production_run_id","item_id","produced_lot_id","quantity_consumed"],"title":"LotTraceProductionLinkRead"},"LotTraceRead":{"properties":{"lot_id":{"$ref":"#/components/schemas/LotId"},"lot_code":{"type":"string","title":"Lot Code"},"item_id":{"$ref":"#/components/schemas/ItemId"},"item_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Item Name"},"sku":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sku"},"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit"},"origin_label":{"type":"string","title":"Origin Label"},"origin_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin Note"},"provenance_known":{"type":"boolean","title":"Provenance Known"},"current_quantity":{"type":"string","pattern":"^(?!-0(?:\\.0+)?$)-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Current Quantity"}},"additionalProperties":false,"type":"object","required":["lot_id","lot_code","item_id","item_name","sku","unit","origin_label","origin_note","provenance_known","current_quantity"],"title":"LotTraceRead"},"ManufacturingExpenseCreateRequest":{"properties":{"category":{"type":"string","maxLength":120,"minLength":1,"title":"Category"},"vendor":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Vendor"},"amount":{"type":"string","pattern":"^(?=.*[1-9])(?:0|[1-9][0-9]{0,9})(?:\\.[0-9]{1,4})?$","title":"Amount"},"incurred_at":{"type":"string","format":"date-time","title":"Incurred At"},"sales_order_id":{"anyOf":[{"$ref":"#/components/schemas/SalesOrderId"},{"type":"null"}]},"linked_production_run_id":{"anyOf":[{"$ref":"#/components/schemas/ProductionRunId"},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Notes"}},"additionalProperties":false,"type":"object","required":["category","amount","incurred_at"],"title":"ManufacturingExpenseCreateRequest"},"ManufacturingExpenseId":{"type":"string","maxLength":31,"pattern":"^mexp_[0-7][0-9A-HJKMNP-TV-Z]{25}$"},"ManufacturingExpenseRead":{"properties":{"id":{"$ref":"#/components/schemas/ManufacturingExpenseId"},"category":{"type":"string","title":"Category"},"vendor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendor"},"amount":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Amount"},"incurred_at":{"type":"string","format":"date-time","title":"Incurred At"},"sales_order_id":{"anyOf":[{"$ref":"#/components/schemas/SalesOrderId"},{"type":"null"}]},"linked_production_run_id":{"anyOf":[{"$ref":"#/components/schemas/ProductionRunId"},{"type":"null"}]},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"additionalProperties":false,"type":"object","required":["id","category","vendor","amount","incurred_at","sales_order_id","linked_production_run_id","notes"],"title":"ManufacturingExpenseRead"},"ManufacturingExpenseUpdateRequest":{"properties":{"category":{"type":"string","maxLength":120,"minLength":1,"title":"Category"},"vendor":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Vendor"},"amount":{"type":"string","pattern":"^(?=.*[1-9])(?:0|[1-9][0-9]{0,9})(?:\\.[0-9]{1,4})?$","title":"Amount"},"incurred_at":{"type":"string","format":"date-time","title":"Incurred At"},"sales_order_id":{"anyOf":[{"$ref":"#/components/schemas/SalesOrderId"},{"type":"null"}]},"linked_production_run_id":{"anyOf":[{"$ref":"#/components/schemas/ProductionRunId"},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Notes"}},"additionalProperties":false,"type":"object","title":"ManufacturingExpenseUpdateRequest"},"OrderLotLinkId":{"type":"string","maxLength":30,"pattern":"^oll_[0-7][0-9A-HJKMNP-TV-Z]{25}$"},"OrderStatus":{"type":"string","enum":["draft","open","partially_fulfilled","fulfilled","cancelled"],"title":"OrderStatus"},"OverheadRuleCreateRequest":{"properties":{"name":{"type":"string","maxLength":120,"minLength":1,"title":"Name"},"method":{"type":"string","enum":["flat","percent","per_unit"],"title":"Method"},"rate":{"type":"string","pattern":"^(?:0|[1-9][0-9]{0,9})(?:\\.[0-9]{1,4})?$","title":"Rate"},"active":{"type":"boolean","title":"Active","default":true}},"additionalProperties":false,"type":"object","required":["name","method","rate"],"title":"OverheadRuleCreateRequest"},"OverheadRuleId":{"type":"string","maxLength":30,"pattern":"^ohr_[0-7][0-9A-HJKMNP-TV-Z]{25}$"},"OverheadRuleRead":{"properties":{"id":{"$ref":"#/components/schemas/OverheadRuleId"},"name":{"type":"string","title":"Name"},"method":{"type":"string","enum":["flat","percent","per_unit"],"title":"Method"},"rate":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Rate"},"active":{"type":"boolean","title":"Active"}},"additionalProperties":false,"type":"object","required":["id","name","method","rate","active"],"title":"OverheadRuleRead"},"OverheadRuleUpdateRequest":{"properties":{"name":{"type":"string","maxLength":120,"minLength":1,"title":"Name"},"method":{"type":"string","enum":["flat","percent","per_unit"],"title":"Method"},"rate":{"type":"string","pattern":"^(?:0|[1-9][0-9]{0,9})(?:\\.[0-9]{1,4})?$","title":"Rate"},"active":{"type":"boolean","title":"Active"}},"additionalProperties":false,"type":"object","title":"OverheadRuleUpdateRequest"},"POStatus":{"type":"string","enum":["draft","ordered","partial_received","received","cancelled"],"title":"POStatus"},"ProductionComponentId":{"type":"string","maxLength":29,"pattern":"^pc_[0-7][0-9A-HJKMNP-TV-Z]{25}$"},"ProductionCostBreakdownRead":{"properties":{"material_cost":{"anyOf":[{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$"},{"type":"null"}],"title":"Material Cost"},"material_unit_cost":{"anyOf":[{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$"},{"type":"null"}],"title":"Material Unit Cost"},"labor_cost":{"anyOf":[{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$"},{"type":"null"}],"title":"Labor Cost"},"overhead_cost":{"anyOf":[{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$"},{"type":"null"}],"title":"Overhead Cost"},"total_cost":{"anyOf":[{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$"},{"type":"null"}],"title":"Total Cost"},"unit_cost":{"anyOf":[{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$"},{"type":"null"}],"title":"Unit Cost"},"valuation_unavailable_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Valuation Unavailable Reason"}},"additionalProperties":false,"type":"object","required":["material_cost","material_unit_cost","labor_cost","overhead_cost","total_cost","unit_cost"],"title":"ProductionCostBreakdownRead"},"ProductionMaterialRequirementId":{"type":"string","maxLength":31,"pattern":"^preq_[0-7][0-9A-HJKMNP-TV-Z]{25}$"},"ProductionMaterialRequirementRead":{"properties":{"id":{"$ref":"#/components/schemas/ProductionMaterialRequirementId"},"run_id":{"$ref":"#/components/schemas/ProductionRunId"},"bom_line_id":{"$ref":"#/components/schemas/BomLineId"},"item_id":{"$ref":"#/components/schemas/ItemId"},"quantity_required":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Quantity Required"},"quantity_consumed":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Quantity Consumed"},"quantity_remaining":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Quantity Remaining"},"quantity_reserved":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Quantity Reserved"},"quantity_unreserved":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Quantity Unreserved"}},"additionalProperties":false,"type":"object","required":["id","run_id","bom_line_id","item_id","quantity_required","quantity_consumed","quantity_remaining","quantity_reserved","quantity_unreserved"],"title":"ProductionMaterialRequirementRead"},"ProductionMaterialRequirementReservationDemandRead":{"properties":{"type":{"type":"string","const":"production_material_requirement","title":"Type"},"id":{"$ref":"#/components/schemas/ProductionMaterialRequirementId"},"parent_id":{"$ref":"#/components/schemas/ProductionRunId"}},"additionalProperties":false,"type":"object","required":["type","id","parent_id"],"title":"ProductionMaterialRequirementReservationDemandRead"},"ProductionReceiptCreateRequest":{"anyOf":[{"properties":{"produced_quantity":{"pattern":"^(?=.*[1-9])(?:0|[1-9][0-9]{0,9})(?:\\.[0-9]{1,4})?$"}},"required":["produced_quantity"]},{"properties":{"scrap_quantity":{"pattern":"^(?=.*[1-9])(?:0|[1-9][0-9]{0,9})(?:\\.[0-9]{1,4})?$"}},"required":["scrap_quantity"]}],"properties":{"produced_quantity":{"type":"string","pattern":"^(?:0|[1-9][0-9]{0,9})(?:\\.[0-9]{1,4})?$","title":"Produced Quantity","description":"Good output quantity; defaults to zero when omitted.","default":"0"},"scrap_quantity":{"type":"string","pattern":"^(?:0|[1-9][0-9]{0,9})(?:\\.[0-9]{1,4})?$","title":"Scrap Quantity","description":"Scrap output quantity; defaults to zero when omitted.","default":"0"},"notes":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Notes"},"confirm_paused_components":{"type":"boolean","title":"Confirm Paused Components","default":false}},"additionalProperties":false,"type":"object","title":"ProductionReceiptCreateRequest","description":"The sum of produced_quantity and scrap_quantity must be greater than zero. An omitted quantity is zero. Finished output and component consumption use the production run's assigned location_id."},"ProductionReceiptId":{"type":"string","maxLength":34,"pattern":"^prodrec_[0-7][0-9A-HJKMNP-TV-Z]{25}$"},"ProductionReceiptRead":{"properties":{"id":{"$ref":"#/components/schemas/ProductionReceiptId"},"run_id":{"$ref":"#/components/schemas/ProductionRunId"},"produced_quantity":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Produced Quantity"},"scrap_quantity":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Scrap Quantity"},"material_basis_quantity":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Material Basis Quantity"},"location_id":{"$ref":"#/components/schemas/LocationId"},"produced_lot_id":{"anyOf":[{"$ref":"#/components/schemas/LotId"},{"type":"null"}]},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"additionalProperties":false,"type":"object","required":["id","run_id","produced_quantity","scrap_quantity","material_basis_quantity","location_id","produced_lot_id","notes","created_at"],"title":"ProductionReceiptRead"},"ProductionReceiptResult":{"properties":{"run":{"$ref":"#/components/schemas/ProductionRunRead"},"receipt":{"$ref":"#/components/schemas/ProductionReceiptRead"}},"additionalProperties":false,"type":"object","required":["run","receipt"],"title":"ProductionReceiptResult"},"ProductionRunCreateRequest":{"properties":{"item_id":{"$ref":"#/components/schemas/ItemId"},"bom_id":{"anyOf":[{"$ref":"#/components/schemas/BomId"},{"type":"null"}]},"location_id":{"anyOf":[{"$ref":"#/components/schemas/LocationId"},{"type":"null"}],"description":"When omitted, Fabriqo resolves the workspace's current default location and persists that location on the production run."},"due_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Due At"},"quantity_planned":{"type":"string","pattern":"^(?=.*[1-9])(?:0|[1-9][0-9]{0,9})(?:\\.[0-9]{1,4})?$","title":"Quantity Planned"},"notes":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Notes"},"confirm_paused_item":{"type":"boolean","title":"Confirm Paused Item","default":false}},"additionalProperties":false,"type":"object","required":["item_id","quantity_planned"],"title":"ProductionRunCreateRequest"},"ProductionRunDetailRead":{"properties":{"id":{"$ref":"#/components/schemas/ProductionRunId"},"item_id":{"$ref":"#/components/schemas/ItemId"},"bom_id":{"anyOf":[{"$ref":"#/components/schemas/BomId"},{"type":"null"}]},"location_id":{"$ref":"#/components/schemas/LocationId"},"quantity_planned":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Quantity Planned"},"quantity_produced":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Quantity Produced"},"material_basis_quantity":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Material Basis Quantity"},"remaining_quantity":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Remaining Quantity"},"status":{"type":"string","enum":["planned","in_progress","completed","cancelled"],"title":"Status"},"urgency":{"type":"string","enum":["blocker","urgent","normal","backlog"],"title":"Urgency"},"due_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Due At"},"blocked":{"type":"boolean","title":"Blocked"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"receipt_count":{"type":"integer","title":"Receipt Count"}},"additionalProperties":false,"type":"object","required":["id","item_id","bom_id","location_id","quantity_planned","quantity_produced","material_basis_quantity","remaining_quantity","status","urgency","due_at","blocked","started_at","completed_at","notes","created_at","receipt_count"],"title":"ProductionRunDetailRead"},"ProductionRunId":{"type":"string","maxLength":30,"pattern":"^run_[0-7][0-9A-HJKMNP-TV-Z]{25}$"},"ProductionRunRead":{"properties":{"id":{"$ref":"#/components/schemas/ProductionRunId"},"item_id":{"$ref":"#/components/schemas/ItemId"},"bom_id":{"anyOf":[{"$ref":"#/components/schemas/BomId"},{"type":"null"}]},"location_id":{"$ref":"#/components/schemas/LocationId"},"quantity_planned":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Quantity Planned"},"quantity_produced":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Quantity Produced"},"material_basis_quantity":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Material Basis Quantity"},"remaining_quantity":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Remaining Quantity"},"status":{"type":"string","enum":["planned","in_progress","completed","cancelled"],"title":"Status"},"urgency":{"type":"string","enum":["blocker","urgent","normal","backlog"],"title":"Urgency"},"due_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Due At"},"blocked":{"type":"boolean","title":"Blocked"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"additionalProperties":false,"type":"object","required":["id","item_id","bom_id","location_id","quantity_planned","quantity_produced","material_basis_quantity","remaining_quantity","status","urgency","due_at","blocked","started_at","completed_at","notes","created_at"],"title":"ProductionRunRead"},"PurchaseOrderCreateRequest":{"properties":{"supplier_id":{"$ref":"#/components/schemas/SupplierId"},"po_number":{"anyOf":[{"type":"string","maxLength":40,"minLength":1},{"type":"null"}],"title":"Po Number"},"ordered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ordered At"},"expected_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expected At"},"receive_location_id":{"anyOf":[{"$ref":"#/components/schemas/LocationId"},{"type":"null"}],"description":"When omitted, Fabriqo resolves the workspace's current default location and persists that location on the purchase order."},"notes":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Notes"},"currency":{"anyOf":[{"type":"string","pattern":"^[A-Z]{3}$"},{"type":"null"}],"title":"Currency","description":"Defaults to the workspace currency when omitted; the resolved currency is persisted."},"confirm_paused_items":{"type":"boolean","title":"Confirm Paused Items","default":false},"lines":{"items":{"$ref":"#/components/schemas/PurchaseOrderLineInput"},"type":"array","maxItems":500,"minItems":1,"title":"Lines"},"overheads":{"items":{"$ref":"#/components/schemas/PurchaseOrderOverheadInput"},"type":"array","maxItems":100,"title":"Overheads"}},"additionalProperties":false,"type":"object","required":["supplier_id","lines"],"title":"PurchaseOrderCreateRequest"},"PurchaseOrderId":{"type":"string","maxLength":29,"pattern":"^po_[0-7][0-9A-HJKMNP-TV-Z]{25}$"},"PurchaseOrderLineCreateRequest":{"properties":{"item_id":{"$ref":"#/components/schemas/ItemId"},"description":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Description"},"sku":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Sku"},"unit":{"anyOf":[{"type":"string","maxLength":30},{"type":"null"}],"title":"Unit"},"qty_ordered":{"type":"string","pattern":"^(?=.*[1-9])(?:0|[1-9][0-9]{0,9})(?:\\.[0-9]{1,4})?$","title":"Qty Ordered"},"unit_cost":{"type":"string","pattern":"^(?:0|[1-9][0-9]{0,9})(?:\\.[0-9]{1,4})?$","title":"Unit Cost"},"tax_rate":{"type":"string","pattern":"^(?:(?:0|[1-9][0-9]?)(?:\\.[0-9]{1,4})?|100(?:\\.0{1,4})?)$","title":"Tax Rate","default":"0"},"confirm_paused_items":{"type":"boolean","title":"Confirm Paused Items","default":false}},"additionalProperties":false,"type":"object","required":["item_id","qty_ordered","unit_cost"],"title":"PurchaseOrderLineCreateRequest"},"PurchaseOrderLineId":{"type":"string","maxLength":30,"pattern":"^pol_[0-7][0-9A-HJKMNP-TV-Z]{25}$"},"PurchaseOrderLineInput":{"properties":{"item_id":{"$ref":"#/components/schemas/ItemId"},"description":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Description"},"sku":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Sku"},"unit":{"anyOf":[{"type":"string","maxLength":30},{"type":"null"}],"title":"Unit"},"qty_ordered":{"type":"string","pattern":"^(?=.*[1-9])(?:0|[1-9][0-9]{0,9})(?:\\.[0-9]{1,4})?$","title":"Qty Ordered"},"unit_cost":{"type":"string","pattern":"^(?:0|[1-9][0-9]{0,9})(?:\\.[0-9]{1,4})?$","title":"Unit Cost"},"tax_rate":{"type":"string","pattern":"^(?:(?:0|[1-9][0-9]?)(?:\\.[0-9]{1,4})?|100(?:\\.0{1,4})?)$","title":"Tax Rate","default":"0"}},"additionalProperties":false,"type":"object","required":["item_id","qty_ordered","unit_cost"],"title":"PurchaseOrderLineInput"},"PurchaseOrderLineRead":{"properties":{"id":{"$ref":"#/components/schemas/PurchaseOrderLineId"},"purchase_order_id":{"$ref":"#/components/schemas/PurchaseOrderId"},"item_id":{"$ref":"#/components/schemas/ItemId"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"sku":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sku"},"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit"},"qty_ordered":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Qty Ordered"},"qty_received":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Qty Received"},"unit_cost":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Unit Cost"},"tax_rate":{"type":"string","pattern":"^(?:(?:0|[1-9][0-9]?)(?:\\.[0-9]+)?|100(?:\\.0+)?)$","title":"Tax Rate"}},"additionalProperties":false,"type":"object","required":["id","purchase_order_id","item_id","description","sku","unit","qty_ordered","qty_received","unit_cost","tax_rate"],"title":"PurchaseOrderLineRead"},"PurchaseOrderLineUpdateRequest":{"properties":{"item_id":{"$ref":"#/components/schemas/ItemId"},"description":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Description"},"sku":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Sku"},"unit":{"anyOf":[{"type":"string","maxLength":30},{"type":"null"}],"title":"Unit"},"qty_ordered":{"type":"string","pattern":"^(?=.*[1-9])(?:0|[1-9][0-9]{0,9})(?:\\.[0-9]{1,4})?$","title":"Qty Ordered"},"unit_cost":{"type":"string","pattern":"^(?:0|[1-9][0-9]{0,9})(?:\\.[0-9]{1,4})?$","title":"Unit Cost"},"tax_rate":{"type":"string","pattern":"^(?:(?:0|[1-9][0-9]?)(?:\\.[0-9]{1,4})?|100(?:\\.0{1,4})?)$","title":"Tax Rate"},"confirm_paused_items":{"type":"boolean","title":"Confirm Paused Items","default":false}},"additionalProperties":false,"type":"object","title":"PurchaseOrderLineUpdateRequest"},"PurchaseOrderOverheadId":{"type":"string","maxLength":30,"pattern":"^poh_[0-7][0-9A-HJKMNP-TV-Z]{25}$"},"PurchaseOrderOverheadInput":{"properties":{"kind":{"$ref":"#/components/schemas/PurchaseOverheadKind"},"description":{"type":"string","maxLength":160,"minLength":1,"title":"Description"},"amount":{"type":"string","pattern":"^(?:0|[1-9][0-9]{0,9})(?:\\.[0-9]{1,4})?$","title":"Amount"},"allocation_method":{"$ref":"#/components/schemas/PurchaseOverheadAllocationMethod","default":"by_quantity"}},"additionalProperties":false,"type":"object","required":["kind","description","amount"],"title":"PurchaseOrderOverheadInput"},"PurchaseOrderOverheadRead":{"properties":{"id":{"$ref":"#/components/schemas/PurchaseOrderOverheadId"},"purchase_order_id":{"$ref":"#/components/schemas/PurchaseOrderId"},"kind":{"$ref":"#/components/schemas/PurchaseOverheadKind"},"description":{"type":"string","title":"Description"},"amount":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Amount"},"allocation_method":{"$ref":"#/components/schemas/PurchaseOverheadAllocationMethod"}},"additionalProperties":false,"type":"object","required":["id","purchase_order_id","kind","description","amount","allocation_method"],"title":"PurchaseOrderOverheadRead"},"PurchaseOrderOverheadUpdateRequest":{"properties":{"kind":{"$ref":"#/components/schemas/PurchaseOverheadKind"},"description":{"type":"string","maxLength":160,"minLength":1,"title":"Description"},"amount":{"type":"string","pattern":"^(?:0|[1-9][0-9]{0,9})(?:\\.[0-9]{1,4})?$","title":"Amount"},"allocation_method":{"$ref":"#/components/schemas/PurchaseOverheadAllocationMethod"}},"additionalProperties":false,"type":"object","title":"PurchaseOrderOverheadUpdateRequest"},"PurchaseOrderRead":{"properties":{"id":{"$ref":"#/components/schemas/PurchaseOrderId"},"po_number":{"type":"string","title":"Po Number"},"supplier_id":{"$ref":"#/components/schemas/SupplierId"},"status":{"$ref":"#/components/schemas/POStatus"},"ordered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ordered At"},"expected_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expected At"},"received_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Received At"},"receive_location_id":{"$ref":"#/components/schemas/LocationId"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"currency":{"type":"string","pattern":"^[A-Z]{3}$","title":"Currency"},"line_count":{"type":"integer","minimum":0.0,"title":"Line Count"},"receipt_count":{"type":"integer","minimum":0.0,"title":"Receipt Count"},"overhead_count":{"type":"integer","minimum":0.0,"title":"Overhead Count"},"totals":{"$ref":"#/components/schemas/PurchaseOrderTotalsRead"}},"additionalProperties":false,"type":"object","required":["id","po_number","supplier_id","status","ordered_at","expected_at","received_at","receive_location_id","notes","currency","line_count","receipt_count","overhead_count","totals"],"title":"PurchaseOrderRead"},"PurchaseOrderSummaryRead":{"properties":{"id":{"$ref":"#/components/schemas/PurchaseOrderId"},"po_number":{"type":"string","title":"Po Number"},"supplier_id":{"$ref":"#/components/schemas/SupplierId"},"status":{"$ref":"#/components/schemas/POStatus"},"ordered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ordered At"},"expected_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expected At"},"received_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Received At"},"receive_location_id":{"$ref":"#/components/schemas/LocationId"},"currency":{"type":"string","pattern":"^[A-Z]{3}$","title":"Currency"},"line_count":{"type":"integer","minimum":0.0,"title":"Line Count"},"receipt_count":{"type":"integer","minimum":0.0,"title":"Receipt Count"}},"additionalProperties":false,"type":"object","required":["id","po_number","supplier_id","status","ordered_at","expected_at","received_at","receive_location_id","currency","line_count","receipt_count"],"title":"PurchaseOrderSummaryRead"},"PurchaseOrderTotalsRead":{"properties":{"subtotal":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Subtotal"},"overhead":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Overhead"},"tax":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Tax"},"total":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Total"}},"additionalProperties":false,"type":"object","required":["subtotal","overhead","tax","total"],"title":"PurchaseOrderTotalsRead"},"PurchaseOrderUpdateRequest":{"properties":{"supplier_id":{"$ref":"#/components/schemas/SupplierId"},"po_number":{"type":"string","maxLength":40,"minLength":1,"title":"Po Number"},"ordered_at":{"type":"string","format":"date-time","title":"Ordered At"},"expected_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expected At"},"receive_location_id":{"$ref":"#/components/schemas/LocationId"},"notes":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Notes"},"currency":{"type":"string","pattern":"^[A-Z]{3}$","title":"Currency"}},"additionalProperties":false,"type":"object","title":"PurchaseOrderUpdateRequest"},"PurchaseOverheadAllocationMethod":{"type":"string","enum":["by_quantity","by_value"],"title":"PurchaseOverheadAllocationMethod"},"PurchaseOverheadKind":{"type":"string","enum":["shipping","customs","other"],"title":"PurchaseOverheadKind"},"PurchaseReceiptId":{"type":"string","maxLength":31,"pattern":"^prec_[0-7][0-9A-HJKMNP-TV-Z]{25}$"},"PurchaseReceiptLineId":{"type":"string","maxLength":32,"pattern":"^precl_[0-7][0-9A-HJKMNP-TV-Z]{25}$"},"PurchaseReceiptLineRead":{"properties":{"id":{"$ref":"#/components/schemas/PurchaseReceiptLineId"},"purchase_receipt_id":{"$ref":"#/components/schemas/PurchaseReceiptId"},"purchase_order_line_id":{"$ref":"#/components/schemas/PurchaseOrderLineId"},"qty_received":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Qty Received"},"unit_cost_effective":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Unit Cost Effective"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"additionalProperties":false,"type":"object","required":["id","purchase_receipt_id","purchase_order_line_id","qty_received","unit_cost_effective","created_at"],"title":"PurchaseReceiptLineRead"},"PurchaseReceiptRead":{"properties":{"id":{"$ref":"#/components/schemas/PurchaseReceiptId"},"purchase_order_id":{"$ref":"#/components/schemas/PurchaseOrderId"},"received_at":{"type":"string","format":"date-time","title":"Received At"},"location_id":{"$ref":"#/components/schemas/LocationId"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"line_count":{"type":"integer","minimum":0.0,"title":"Line Count"}},"additionalProperties":false,"type":"object","required":["id","purchase_order_id","received_at","location_id","notes","created_at","line_count"],"title":"PurchaseReceiptRead"},"PurchaseReceiptResult":{"properties":{"purchase_order":{"$ref":"#/components/schemas/PurchaseOrderRead"},"receipt":{"$ref":"#/components/schemas/PurchaseReceiptRead"},"replayed":{"type":"boolean","title":"Replayed","default":false}},"additionalProperties":false,"type":"object","required":["purchase_order","receipt"],"title":"PurchaseReceiptResult"},"PurchaseReceiptSummaryRead":{"properties":{"id":{"$ref":"#/components/schemas/PurchaseReceiptId"},"purchase_order_id":{"$ref":"#/components/schemas/PurchaseOrderId"},"received_at":{"type":"string","format":"date-time","title":"Received At"},"location_id":{"$ref":"#/components/schemas/LocationId"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"line_count":{"type":"integer","minimum":0.0,"title":"Line Count"}},"additionalProperties":false,"type":"object","required":["id","purchase_order_id","received_at","location_id","notes","created_at","line_count"],"title":"PurchaseReceiptSummaryRead"},"PurchaseReceiveLineRequest":{"properties":{"line_id":{"$ref":"#/components/schemas/PurchaseOrderLineId"},"qty":{"type":"string","pattern":"^(?=.*[1-9])(?:0|[1-9][0-9]{0,9})(?:\\.[0-9]{1,4})?$","title":"Qty"}},"additionalProperties":false,"type":"object","required":["line_id","qty"],"title":"PurchaseReceiveLineRequest"},"PurchaseReceiveRequest":{"properties":{"received_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Received At"},"location_id":{"anyOf":[{"$ref":"#/components/schemas/LocationId"},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Notes"},"lines":{"items":{"$ref":"#/components/schemas/PurchaseReceiveLineRequest"},"type":"array","maxItems":500,"minItems":1,"title":"Lines"}},"additionalProperties":false,"type":"object","required":["lines"],"title":"PurchaseReceiveRequest"},"RecallAffectedOrderId":{"type":"string","maxLength":30,"pattern":"^rao_[0-7][0-9A-HJKMNP-TV-Z]{25}$"},"RecallAffectedOrderRead":{"properties":{"id":{"$ref":"#/components/schemas/RecallAffectedOrderId"},"order_id":{"$ref":"#/components/schemas/SalesOrderId"},"order_line_id":{"anyOf":[{"$ref":"#/components/schemas/SalesOrderLineId"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["id","order_id","order_line_id"],"title":"RecallAffectedOrderRead"},"RecallCreateRequest":{"properties":{"lot_id":{"$ref":"#/components/schemas/LotId"},"notes":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Notes"}},"additionalProperties":false,"type":"object","required":["lot_id"],"title":"RecallCreateRequest"},"RecallId":{"type":"string","maxLength":30,"pattern":"^rec_[0-7][0-9A-HJKMNP-TV-Z]{25}$"},"RecallImpactRead":{"properties":{"recall_id":{"$ref":"#/components/schemas/RecallId"},"lot_id":{"$ref":"#/components/schemas/LotId"},"status":{"$ref":"#/components/schemas/RecallStatus"},"opened_at":{"type":"string","format":"date-time","title":"Opened At"},"closed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Closed At"},"affected_order_count":{"type":"integer","minimum":0.0,"title":"Affected Order Count"}},"additionalProperties":false,"type":"object","required":["recall_id","lot_id","status","opened_at","closed_at","affected_order_count"],"title":"RecallImpactRead"},"RecallRead":{"properties":{"id":{"$ref":"#/components/schemas/RecallId"},"lot_id":{"$ref":"#/components/schemas/LotId"},"status":{"$ref":"#/components/schemas/RecallStatus"},"opened_at":{"type":"string","format":"date-time","title":"Opened At"},"closed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Closed At"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"additionalProperties":false,"type":"object","required":["id","lot_id","status","opened_at","closed_at","notes"],"title":"RecallRead"},"RecallStatus":{"type":"string","enum":["open","closed"],"title":"RecallStatus"},"ReplenishmentPolicyCreateRequest":{"properties":{"item_id":{"$ref":"#/components/schemas/ItemId"},"location_id":{"$ref":"#/components/schemas/LocationId","description":"The policy's location. Together with item_id, this identifies the policy and cannot be changed after creation."},"strategy":{"type":"string","enum":["manual","shortage","min_target"],"title":"Strategy","default":"min_target"},"supply_method":{"type":"string","enum":["purchase","manufacture","manual"],"title":"Supply Method"},"minimum_quantity":{"type":"string","pattern":"^(?:0|[1-9][0-9]{0,9})(?:\\.[0-9]{1,4})?$","title":"Minimum Quantity","default":"0"},"target_quantity":{"type":"string","pattern":"^(?:0|[1-9][0-9]{0,9})(?:\\.[0-9]{1,4})?$","title":"Target Quantity","default":"0"},"safety_stock":{"type":"string","pattern":"^(?:0|[1-9][0-9]{0,9})(?:\\.[0-9]{1,4})?$","title":"Safety Stock","default":"0"},"minimum_order_quantity_override":{"anyOf":[{"type":"string","pattern":"^(?:0|[1-9][0-9]{0,9})(?:\\.[0-9]{1,4})?$"},{"type":"null"}],"title":"Minimum Order Quantity Override","description":"When set, replaces the selected item supplier or BOM minimum order quantity. Null uses the source value; zero removes the source minimum."},"order_multiple_override":{"anyOf":[{"type":"string","pattern":"^(?=.*[1-9])(?:0|[1-9][0-9]{0,9})(?:\\.[0-9]{1,4})?$"},{"type":"null"}],"title":"Order Multiple Override","description":"When set, replaces the selected item supplier or BOM order multiple. Null uses the source value."},"item_supplier_id":{"anyOf":[{"$ref":"#/components/schemas/ItemSupplierId"},{"type":"null"}]},"bom_id":{"anyOf":[{"$ref":"#/components/schemas/BomId"},{"type":"null"}]},"lead_time_override_days":{"anyOf":[{"type":"integer","maximum":3650.0,"minimum":0.0},{"type":"null"}],"title":"Lead Time Override Days"},"planning_horizon_days":{"type":"integer","maximum":3650.0,"minimum":1.0,"title":"Planning Horizon Days","default":90},"replenishment_window_days":{"type":"integer","maximum":3650.0,"minimum":0.0,"title":"Replenishment Window Days","default":0},"status":{"type":"string","enum":["active","paused"],"title":"Status","default":"active"}},"additionalProperties":false,"type":"object","required":["item_id","location_id","supply_method"],"title":"ReplenishmentPolicyCreateRequest"},"ReplenishmentPolicyId":{"type":"string","maxLength":31,"pattern":"^rpol_[0-7][0-9A-HJKMNP-TV-Z]{25}$"},"ReplenishmentPolicyRead":{"properties":{"id":{"$ref":"#/components/schemas/ReplenishmentPolicyId"},"item_id":{"$ref":"#/components/schemas/ItemId"},"location_id":{"$ref":"#/components/schemas/LocationId"},"strategy":{"type":"string","enum":["manual","shortage","min_target"],"title":"Strategy"},"supply_method":{"type":"string","enum":["purchase","manufacture","manual"],"title":"Supply Method"},"minimum_quantity":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Minimum Quantity"},"target_quantity":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Target Quantity"},"safety_stock":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Safety Stock"},"minimum_order_quantity_override":{"anyOf":[{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$"},{"type":"null"}],"title":"Minimum Order Quantity Override","description":"Null uses the selected item supplier or BOM minimum order quantity; zero removes the source minimum."},"order_multiple_override":{"anyOf":[{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$"},{"type":"null"}],"title":"Order Multiple Override","description":"Null uses the selected item supplier or BOM order multiple."},"item_supplier_id":{"anyOf":[{"$ref":"#/components/schemas/ItemSupplierId"},{"type":"null"}]},"bom_id":{"anyOf":[{"$ref":"#/components/schemas/BomId"},{"type":"null"}]},"lead_time_override_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Lead Time Override Days"},"planning_horizon_days":{"type":"integer","title":"Planning Horizon Days"},"replenishment_window_days":{"type":"integer","title":"Replenishment Window Days"},"status":{"type":"string","enum":["active","paused"],"title":"Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"additionalProperties":false,"type":"object","required":["id","item_id","location_id","strategy","supply_method","minimum_quantity","target_quantity","safety_stock","minimum_order_quantity_override","order_multiple_override","item_supplier_id","bom_id","lead_time_override_days","planning_horizon_days","replenishment_window_days","status","created_at","updated_at"],"title":"ReplenishmentPolicyRead"},"ReplenishmentPolicyUpdateRequest":{"properties":{"strategy":{"type":"string","enum":["manual","shortage","min_target"],"title":"Strategy"},"supply_method":{"type":"string","enum":["purchase","manufacture","manual"],"title":"Supply Method"},"minimum_quantity":{"type":"string","pattern":"^(?:0|[1-9][0-9]{0,9})(?:\\.[0-9]{1,4})?$","title":"Minimum Quantity"},"target_quantity":{"type":"string","pattern":"^(?:0|[1-9][0-9]{0,9})(?:\\.[0-9]{1,4})?$","title":"Target Quantity"},"safety_stock":{"type":"string","pattern":"^(?:0|[1-9][0-9]{0,9})(?:\\.[0-9]{1,4})?$","title":"Safety Stock"},"minimum_order_quantity_override":{"anyOf":[{"type":"string","pattern":"^(?:0|[1-9][0-9]{0,9})(?:\\.[0-9]{1,4})?$"},{"type":"null"}],"title":"Minimum Order Quantity Override","description":"When set, replaces the selected item supplier or BOM minimum order quantity. Null clears the override and uses the source value; zero removes the source minimum."},"order_multiple_override":{"anyOf":[{"type":"string","pattern":"^(?=.*[1-9])(?:0|[1-9][0-9]{0,9})(?:\\.[0-9]{1,4})?$"},{"type":"null"}],"title":"Order Multiple Override","description":"When set, replaces the selected item supplier or BOM order multiple. Null clears the override and uses the source value."},"item_supplier_id":{"anyOf":[{"$ref":"#/components/schemas/ItemSupplierId"},{"type":"null"}]},"bom_id":{"anyOf":[{"$ref":"#/components/schemas/BomId"},{"type":"null"}]},"lead_time_override_days":{"anyOf":[{"type":"integer","maximum":3650.0,"minimum":0.0},{"type":"null"}],"title":"Lead Time Override Days"},"planning_horizon_days":{"type":"integer","maximum":3650.0,"minimum":1.0,"title":"Planning Horizon Days"},"replenishment_window_days":{"type":"integer","maximum":3650.0,"minimum":0.0,"title":"Replenishment Window Days"},"status":{"type":"string","enum":["active","paused"],"title":"Status"}},"additionalProperties":false,"type":"object","title":"ReplenishmentPolicyUpdateRequest"},"ReplenishmentRecommendationDismissRequest":{"properties":{"reason":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Reason"}},"additionalProperties":false,"type":"object","title":"ReplenishmentRecommendationDismissRequest"},"ReplenishmentRecommendationId":{"type":"string","maxLength":31,"pattern":"^rrec_[0-7][0-9A-HJKMNP-TV-Z]{25}$"},"ReplenishmentRecommendationRead":{"properties":{"id":{"$ref":"#/components/schemas/ReplenishmentRecommendationId"},"policy_id":{"anyOf":[{"$ref":"#/components/schemas/ReplenishmentPolicyId"},{"type":"null"}]},"item_id":{"$ref":"#/components/schemas/ItemId"},"location_id":{"$ref":"#/components/schemas/LocationId"},"supply_method":{"type":"string","enum":["purchase","manufacture","manual"],"title":"Supply Method"},"shortage_quantity":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Shortage Quantity"},"recommended_quantity":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Recommended Quantity"},"required_at":{"type":"string","format":"date-time","title":"Required At"},"action_by":{"type":"string","format":"date-time","title":"Action By"},"late":{"type":"boolean","title":"Late"},"item_supplier_id":{"anyOf":[{"$ref":"#/components/schemas/ItemSupplierId"},{"type":"null"}]},"bom_id":{"anyOf":[{"$ref":"#/components/schemas/BomId"},{"type":"null"}]},"status":{"type":"string","enum":["open","accepted","dismissed","superseded","resolved"],"title":"Status"},"supply_source_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supply Source Type"},"supply_source_id":{"anyOf":[{"type":"string","maxLength":48,"pattern":"^[a-z][a-z0-9]*_[0-7][0-9A-HJKMNP-TV-Z]{25}$"},{"type":"null"}],"title":"Supply Source Id"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"calculation_snapshot":{"additionalProperties":{"$ref":"#/components/schemas/JsonValue"},"type":"object","title":"Calculation Snapshot"},"configuration_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Configuration Error"},"dismissal_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dismissal Reason"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"additionalProperties":false,"type":"object","required":["id","policy_id","item_id","location_id","supply_method","shortage_quantity","recommended_quantity","required_at","action_by","late","item_supplier_id","bom_id","status","supply_source_type","supply_source_id","reason","calculation_snapshot","configuration_error","dismissal_reason","created_at","updated_at"],"title":"ReplenishmentRecommendationRead"},"ReservationId":{"type":"string","maxLength":30,"pattern":"^res_[0-7][0-9A-HJKMNP-TV-Z]{25}$"},"ReservationRead":{"properties":{"id":{"$ref":"#/components/schemas/ReservationId"},"item_id":{"$ref":"#/components/schemas/ItemId"},"location_id":{"$ref":"#/components/schemas/LocationId"},"demand":{"oneOf":[{"$ref":"#/components/schemas/SalesOrderLineReservationDemandRead"},{"$ref":"#/components/schemas/ProductionMaterialRequirementReservationDemandRead"}],"title":"Demand","discriminator":{"propertyName":"type","mapping":{"production_material_requirement":"#/components/schemas/ProductionMaterialRequirementReservationDemandRead","sales_order_line":"#/components/schemas/SalesOrderLineReservationDemandRead"}}},"reserved_quantity":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Reserved Quantity"},"consumed_quantity":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Consumed Quantity"},"released_quantity":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Released Quantity"},"remaining_quantity":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Remaining Quantity"},"required_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Required At"},"status":{"type":"string","enum":["active","consumed","released"],"title":"Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"additionalProperties":false,"type":"object","required":["id","item_id","location_id","demand","reserved_quantity","consumed_quantity","released_quantity","remaining_quantity","required_at","status","created_at","updated_at"],"title":"ReservationRead"},"SalesDelivery":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Name"},"company":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Company"},"address":{"anyOf":[{"$ref":"#/components/schemas/Address"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"title":"Phone"}},"additionalProperties":false,"type":"object","title":"SalesDelivery"},"SalesFulfillmentId":{"type":"string","maxLength":30,"pattern":"^ful_[0-7][0-9A-HJKMNP-TV-Z]{25}$"},"SalesFulfillmentLineId":{"type":"string","maxLength":31,"pattern":"^full_[0-7][0-9A-HJKMNP-TV-Z]{25}$"},"SalesOrderCreateRequest":{"properties":{"customer_id":{"anyOf":[{"$ref":"#/components/schemas/CustomerId"},{"type":"null"}]},"fulfill_location_id":{"anyOf":[{"$ref":"#/components/schemas/LocationId"},{"type":"null"}],"description":"When omitted, Fabriqo resolves the workspace's current default location and persists that location on the order."},"currency":{"type":"string","pattern":"^[A-Z]{3}$","title":"Currency"},"customer_name":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Customer Name"},"customer_email":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Customer Email"},"delivery":{"anyOf":[{"$ref":"#/components/schemas/SalesDelivery"},{"type":"null"}]},"discount_amount":{"type":"string","pattern":"^(?:0|[1-9][0-9]{0,9})(?:\\.[0-9]{1,4})?$","title":"Discount Amount","default":"0"},"shipping_amount":{"type":"string","pattern":"^(?:0|[1-9][0-9]{0,9})(?:\\.[0-9]{1,4})?$","title":"Shipping Amount","default":"0"},"tax_rate":{"type":"string","pattern":"^(?:(?:0|[1-9][0-9]?)(?:\\.[0-9]{1,4})?|100(?:\\.0{1,4})?)$","title":"Tax Rate","default":"0"},"due_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Due Date"},"order_date":{"type":"string","format":"date","title":"Order Date"},"notes":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Notes"},"confirm_paused_items":{"type":"boolean","title":"Confirm Paused Items","default":false},"lines":{"items":{"$ref":"#/components/schemas/SalesOrderLineCreateRequest"},"type":"array","maxItems":500,"minItems":1,"title":"Lines"}},"additionalProperties":false,"type":"object","required":["currency","order_date","lines"],"title":"SalesOrderCreateRequest"},"SalesOrderFulfillLineRequest":{"properties":{"order_line_id":{"$ref":"#/components/schemas/SalesOrderLineId"},"qty":{"type":"string","pattern":"^(?=.*[1-9])(?:0|[1-9][0-9]{0,9})(?:\\.[0-9]{1,4})?$","title":"Qty"}},"additionalProperties":false,"type":"object","required":["order_line_id","qty"],"title":"SalesOrderFulfillLineRequest"},"SalesOrderFulfillRequest":{"properties":{"fulfilled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Fulfilled At"},"notes":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Notes"},"lines":{"items":{"$ref":"#/components/schemas/SalesOrderFulfillLineRequest"},"type":"array","maxItems":500,"minItems":1,"title":"Lines"}},"additionalProperties":false,"type":"object","required":["lines"],"title":"SalesOrderFulfillRequest"},"SalesOrderFulfillmentLineRead":{"properties":{"id":{"$ref":"#/components/schemas/SalesFulfillmentLineId"},"fulfillment_id":{"$ref":"#/components/schemas/SalesFulfillmentId"},"order_line_id":{"$ref":"#/components/schemas/SalesOrderLineId"},"qty_fulfilled":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Qty Fulfilled"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"additionalProperties":false,"type":"object","required":["id","fulfillment_id","order_line_id","qty_fulfilled","created_at"],"title":"SalesOrderFulfillmentLineRead"},"SalesOrderFulfillmentRead":{"properties":{"id":{"$ref":"#/components/schemas/SalesFulfillmentId"},"order_id":{"$ref":"#/components/schemas/SalesOrderId"},"location_id":{"$ref":"#/components/schemas/LocationId"},"fulfilled_at":{"type":"string","format":"date-time","title":"Fulfilled At"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"line_count":{"type":"integer","minimum":0.0,"title":"Line Count"}},"additionalProperties":false,"type":"object","required":["id","order_id","location_id","fulfilled_at","notes","created_at","line_count"],"title":"SalesOrderFulfillmentRead"},"SalesOrderFulfillmentResult":{"properties":{"order":{"$ref":"#/components/schemas/SalesOrderRead"},"fulfillment":{"$ref":"#/components/schemas/SalesOrderFulfillmentRead"},"replayed":{"type":"boolean","title":"Replayed","default":false}},"additionalProperties":false,"type":"object","required":["order","fulfillment"],"title":"SalesOrderFulfillmentResult"},"SalesOrderFulfillmentSummaryRead":{"properties":{"id":{"$ref":"#/components/schemas/SalesFulfillmentId"},"order_id":{"$ref":"#/components/schemas/SalesOrderId"},"location_id":{"$ref":"#/components/schemas/LocationId"},"fulfilled_at":{"type":"string","format":"date-time","title":"Fulfilled At"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"line_count":{"type":"integer","minimum":0.0,"title":"Line Count"}},"additionalProperties":false,"type":"object","required":["id","order_id","location_id","fulfilled_at","notes","created_at","line_count"],"title":"SalesOrderFulfillmentSummaryRead"},"SalesOrderId":{"type":"string","maxLength":29,"pattern":"^so_[0-7][0-9A-HJKMNP-TV-Z]{25}$"},"SalesOrderLineCreateRequest":{"properties":{"item_id":{"$ref":"#/components/schemas/ItemId"},"qty":{"type":"string","pattern":"^(?=.*[1-9])(?:0|[1-9][0-9]{0,9})(?:\\.[0-9]{1,4})?$","title":"Qty"},"unit_price":{"type":"string","pattern":"^(?:0|[1-9][0-9]{0,9})(?:\\.[0-9]{1,4})?$","title":"Unit Price"}},"additionalProperties":false,"type":"object","required":["item_id","qty","unit_price"],"title":"SalesOrderLineCreateRequest"},"SalesOrderLineId":{"type":"string","maxLength":30,"pattern":"^sol_[0-7][0-9A-HJKMNP-TV-Z]{25}$"},"SalesOrderLineRead":{"properties":{"id":{"$ref":"#/components/schemas/SalesOrderLineId"},"order_id":{"$ref":"#/components/schemas/SalesOrderId"},"item_id":{"anyOf":[{"$ref":"#/components/schemas/ItemId"},{"type":"null"}]},"source_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Reference"},"source_variant_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Variant Reference"},"sku":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sku"},"name":{"type":"string","title":"Name"},"qty":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Qty"},"unit_price":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Unit Price"},"line_total":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Line Total"},"qty_fulfilled":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Qty Fulfilled"},"qty_remaining":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Qty Remaining"},"qty_reserved":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Qty Reserved"},"qty_unreserved":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Qty Unreserved"}},"additionalProperties":false,"type":"object","required":["id","order_id","item_id","source_reference","source_variant_reference","sku","name","qty","unit_price","line_total","qty_fulfilled","qty_remaining","qty_reserved","qty_unreserved"],"title":"SalesOrderLineRead"},"SalesOrderLineReservationDemandRead":{"properties":{"type":{"type":"string","const":"sales_order_line","title":"Type"},"id":{"$ref":"#/components/schemas/SalesOrderLineId"},"parent_id":{"$ref":"#/components/schemas/SalesOrderId"}},"additionalProperties":false,"type":"object","required":["type","id","parent_id"],"title":"SalesOrderLineReservationDemandRead"},"SalesOrderRead":{"properties":{"id":{"$ref":"#/components/schemas/SalesOrderId"},"order_code":{"type":"string","title":"Order Code"},"status":{"$ref":"#/components/schemas/OrderStatus"},"source":{"type":"string","title":"Source"},"source_channel":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Channel"},"source_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Reference"},"imported_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Imported At"},"customer_id":{"anyOf":[{"$ref":"#/components/schemas/CustomerId"},{"type":"null"}]},"fulfill_location_id":{"$ref":"#/components/schemas/LocationId"},"currency":{"type":"string","pattern":"^[A-Z]{3}$","title":"Currency"},"customer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Name"},"delivery":{"anyOf":[{"$ref":"#/components/schemas/SalesDelivery"},{"type":"null"}]},"discount_amount":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Discount Amount"},"shipping_amount":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Shipping Amount"},"tax_rate":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Tax Rate"},"subtotal_amount":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Subtotal Amount"},"tax_amount":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Tax Amount"},"total_amount":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Total Amount"},"due_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Due Date"},"order_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Order Date"},"ordered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ordered At"},"fulfilled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Fulfilled At"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"line_count":{"type":"integer","minimum":0.0,"title":"Line Count"},"fulfillment_count":{"type":"integer","minimum":0.0,"title":"Fulfillment Count"}},"additionalProperties":false,"type":"object","required":["id","order_code","status","source","source_channel","source_reference","imported_at","customer_id","fulfill_location_id","currency","customer_name","delivery","discount_amount","shipping_amount","tax_rate","subtotal_amount","tax_amount","total_amount","due_date","order_date","ordered_at","fulfilled_at","notes","line_count","fulfillment_count"],"title":"SalesOrderRead"},"SalesOrderReconcileLineRequest":{"properties":{"external_id":{"type":"string","maxLength":255,"minLength":1,"title":"External Id"},"external_variant_id":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"External Variant Id"},"item_id":{"anyOf":[{"$ref":"#/components/schemas/ItemId"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Sku"},"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"qty":{"type":"string","pattern":"^(?=.*[1-9])(?:0|[1-9][0-9]{0,9})(?:\\.[0-9]{1,4})?$","title":"Qty","description":"Total ordered quantity, including units fulfilled locally; not remaining quantity."},"unit_price":{"type":"string","pattern":"^(?:0|[1-9][0-9]{0,9})(?:\\.[0-9]{1,4})?$","title":"Unit Price"},"allow_fulfilled_quantity_floor":{"type":"boolean","title":"Allow Fulfilled Quantity Floor","description":"Allow the total quantity to be floored at the locally fulfilled quantity when the source reports less. Otherwise such a reduction conflicts.","default":false}},"additionalProperties":false,"type":"object","required":["external_id","name","qty","unit_price"],"title":"SalesOrderReconcileLineRequest"},"SalesOrderReconcileRequest":{"properties":{"source_key":{"type":"string","maxLength":64,"minLength":1,"pattern":"^[a-z][a-z0-9_-]{0,63}$","title":"Source Key"},"external_id":{"type":"string","maxLength":255,"minLength":1,"title":"External Id"},"source_updated_at":{"type":"string","format":"date-time","title":"Source Updated At"},"source_cancelled":{"type":"boolean","title":"Source Cancelled","default":false},"source_fulfilled":{"type":"boolean","title":"Source Fulfilled","default":false},"contact_data_redacted":{"type":"boolean","title":"Contact Data Redacted","default":false},"order_code":{"anyOf":[{"type":"string","maxLength":40,"minLength":1},{"type":"null"}],"title":"Order Code"},"ordered_at":{"type":"string","format":"date-time","title":"Ordered At"},"customer_id":{"anyOf":[{"$ref":"#/components/schemas/CustomerId"},{"type":"null"}]},"fulfill_location_id":{"anyOf":[{"$ref":"#/components/schemas/LocationId"},{"type":"null"}],"description":"When omitted, Fabriqo resolves the workspace's current default location and persists that location on the order."},"customer_name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Customer Name"},"subtotal":{"anyOf":[{"type":"string","pattern":"^(?:0|[1-9][0-9]{0,9})(?:\\.[0-9]{1,4})?$"},{"type":"null"}],"title":"Subtotal"},"tax_amount":{"anyOf":[{"type":"string","pattern":"^(?:0|[1-9][0-9]{0,9})(?:\\.[0-9]{1,4})?$"},{"type":"null"}],"title":"Tax Amount"},"total_amount":{"anyOf":[{"type":"string","pattern":"^(?:0|[1-9][0-9]{0,9})(?:\\.[0-9]{1,4})?$"},{"type":"null"}],"title":"Total Amount"},"discount_amount":{"type":"string","pattern":"^(?:0|[1-9][0-9]{0,9})(?:\\.[0-9]{1,4})?$","title":"Discount Amount","default":"0"},"shipping_amount":{"type":"string","pattern":"^(?:0|[1-9][0-9]{0,9})(?:\\.[0-9]{1,4})?$","title":"Shipping Amount","default":"0"},"currency":{"type":"string","pattern":"^[A-Z]{3}$","title":"Currency"},"delivery":{"anyOf":[{"$ref":"#/components/schemas/SalesDelivery"},{"type":"null"}]},"lines":{"items":{"$ref":"#/components/schemas/SalesOrderReconcileLineRequest"},"type":"array","maxItems":500,"title":"Lines"}},"additionalProperties":false,"type":"object","required":["source_key","external_id","source_updated_at","ordered_at","currency","lines"],"title":"SalesOrderReconcileRequest"},"SalesOrderReconcileResult":{"properties":{"order_id":{"anyOf":[{"$ref":"#/components/schemas/SalesOrderId"},{"type":"null"}]},"outcome":{"type":"string","enum":["created","updated","unchanged","stale","ignored"],"title":"Outcome"},"source_updated_at":{"type":"string","format":"date-time","title":"Source Updated At"},"contact_data_redacted":{"type":"boolean","title":"Contact Data Redacted"}},"additionalProperties":false,"type":"object","required":["order_id","outcome","source_updated_at","contact_data_redacted"],"title":"SalesOrderReconcileResult"},"SalesOrderSummaryRead":{"properties":{"id":{"$ref":"#/components/schemas/SalesOrderId"},"order_code":{"type":"string","title":"Order Code"},"status":{"$ref":"#/components/schemas/OrderStatus"},"source":{"type":"string","title":"Source"},"source_channel":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Channel"},"source_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Reference"},"imported_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Imported At"},"customer_id":{"anyOf":[{"$ref":"#/components/schemas/CustomerId"},{"type":"null"}]},"fulfill_location_id":{"$ref":"#/components/schemas/LocationId"},"currency":{"type":"string","pattern":"^[A-Z]{3}$","title":"Currency"},"customer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Name"},"discount_amount":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Discount Amount"},"shipping_amount":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Shipping Amount"},"tax_rate":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Tax Rate"},"subtotal_amount":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Subtotal Amount"},"tax_amount":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Tax Amount"},"total_amount":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$","title":"Total Amount"},"due_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Due Date"},"order_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Order Date"},"ordered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ordered At"},"fulfilled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Fulfilled At"},"line_count":{"type":"integer","minimum":0.0,"title":"Line Count"},"fulfillment_count":{"type":"integer","minimum":0.0,"title":"Fulfillment Count"}},"additionalProperties":false,"type":"object","required":["id","order_code","status","source","source_channel","source_reference","imported_at","customer_id","fulfill_location_id","currency","customer_name","discount_amount","shipping_amount","tax_rate","subtotal_amount","tax_amount","total_amount","due_date","order_date","ordered_at","fulfilled_at","line_count","fulfillment_count"],"title":"SalesOrderSummaryRead"},"SalesOrderUpdateRequest":{"properties":{"notes":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Notes"},"fulfill_location_id":{"$ref":"#/components/schemas/LocationId","description":"Location for all future fulfillments. Updating it releases and reallocates remaining order-line reservations at the new location before fulfillment."},"due_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Due Date"}},"additionalProperties":false,"type":"object","title":"SalesOrderUpdateRequest"},"SupplierCreateRequest":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"email":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"title":"Phone"},"website":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Website"},"vat_number":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Vat Number"},"address":{"anyOf":[{"$ref":"#/components/schemas/Address"},{"type":"null"}]},"contact_info":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Contact Info"},"default_lead_time_days":{"anyOf":[{"type":"integer","maximum":3650.0,"minimum":0.0},{"type":"null"}],"title":"Default Lead Time Days"},"notes":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Notes"}},"additionalProperties":false,"type":"object","required":["name"],"title":"SupplierCreateRequest"},"SupplierId":{"type":"string","maxLength":30,"pattern":"^sup_[0-7][0-9A-HJKMNP-TV-Z]{25}$"},"SupplierRead":{"properties":{"id":{"$ref":"#/components/schemas/SupplierId"},"name":{"type":"string","title":"Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website"},"vat_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vat Number"},"address":{"$ref":"#/components/schemas/Address"},"contact_info":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Info"},"default_lead_time_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Default Lead Time Days"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"is_archived":{"type":"boolean","title":"Is Archived"}},"additionalProperties":false,"type":"object","required":["id","name","email","phone","website","vat_number","address","contact_info","default_lead_time_days","notes","is_archived"],"title":"SupplierRead"},"SupplierUpdateRequest":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"email":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"title":"Phone"},"website":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Website"},"vat_number":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Vat Number"},"address":{"anyOf":[{"$ref":"#/components/schemas/Address"},{"type":"null"}]},"contact_info":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Contact Info"},"default_lead_time_days":{"anyOf":[{"type":"integer","maximum":3650.0,"minimum":0.0},{"type":"null"}],"title":"Default Lead Time Days"},"notes":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Notes"}},"additionalProperties":false,"type":"object","title":"SupplierUpdateRequest"},"WorkspaceId":{"type":"string","maxLength":29,"pattern":"^ws_[0-7][0-9A-HJKMNP-TV-Z]{25}$"},"WorkspaceRead":{"properties":{"id":{"$ref":"#/components/schemas/WorkspaceId"},"slug":{"type":"string","title":"Slug"},"name":{"type":"string","title":"Name"},"currency":{"type":"string","pattern":"^[A-Z]{3}$","title":"Currency"},"timezone":{"type":"string","title":"Timezone"},"default_location_id":{"anyOf":[{"$ref":"#/components/schemas/LocationId"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["id","slug","name","currency","timezone","default_location_id"],"title":"WorkspaceRead"}},"securitySchemes":{"WorkspaceApiToken":{"type":"http","description":"A workspace-scoped Fabriqo service token, delegated OAuth access token, or installation-bound App OAuth access token. The authenticated token determines the workspace context. Each operation also requires the documented scope and applicable workspace or solution entitlement.","scheme":"bearer"}}}}