{"openapi":"3.1.0","info":{"title":"PUT /api/v1/catalog-items/{item_id}","version":"1.0.0","description":"Update catalog item"},"servers":[{"url":"https://api.ondayzero.com","description":"Production"}],"paths":{"/api/v1/catalog-items/{item_id}":{"put":{"tags":["catalog-items"],"summary":"Update catalog item","description":"Update an existing catalog item.","operationId":"update_catalog_item_api_v1_catalog_items__item_id__put","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-business-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Business-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogItemUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogItemResponse"}}}},"400":{"description":"Bad Request - Invalid input","content":{"application/json":{"example":{"detail":"Invalid request parameters"}}}},"401":{"description":"Unauthorized - Authentication required","content":{"application/json":{"example":{"detail":"Not authenticated"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"detail":"Not enough permissions"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"detail":"Resource not found"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"example":{"detail":"Resource already exists"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"CatalogItemResponse":{"properties":{"id":{"type":"string","title":"Id","description":"Catalog item UUID."},"business_id":{"type":"string","title":"Business Id","description":"Business UUID."},"name":{"type":"string","title":"Name"},"item_type":{"type":"string","title":"Item Type"},"sku":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sku"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"unit_price":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Unit Price"},"purchase_cost":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Purchase Cost"},"is_sold":{"type":"boolean","title":"Is Sold"},"is_purchased":{"type":"boolean","title":"Is Purchased"},"taxable":{"type":"boolean","title":"Taxable"},"income_ledger_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Income Ledger Id"},"expense_ledger_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expense Ledger Id"},"income_ledger_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Income Ledger Name"},"expense_ledger_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expense Ledger Name"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","business_id","name","item_type","is_sold","is_purchased","taxable","is_active","created_at","updated_at"],"title":"CatalogItemResponse","description":"Response schema for a catalog item."},"CatalogItemUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"item_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Item Type"},"sku":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Sku"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"unit_price":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Unit Price"},"purchase_cost":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Purchase Cost"},"is_sold":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Sold"},"is_purchased":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Purchased"},"taxable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Taxable"},"income_ledger_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Income Ledger Id"},"expense_ledger_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expense Ledger Id"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"CatalogItemUpdateRequest","description":"Request schema for updating a catalog item (all fields optional)."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Token","description":"API token authentication. Format: `Bearer dz_...`"}}},"security":[{"BearerAuth":[]}]}