{"openapi":"3.1.0","info":{"title":"POST /api/v1/tax/codes","version":"1.0.0","description":"Create tax code"},"servers":[{"url":"https://api.ondayzero.com","description":"Production"}],"paths":{"/api/v1/tax/codes":{"post":{"tags":["tax"],"summary":"Create tax code","description":"Create a new tax code.","operationId":"create_tax_code_api_v1_tax_codes_post","parameters":[{"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/TaxCodeCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxCodeResponse"}}}},"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"}}}},"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":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"TaxCodeCreateRequest":{"properties":{"code":{"type":"string","title":"Code","description":"Tax code (e.g., 'TAXABLE', 'EXEMPT')"},"name":{"type":"string","title":"Name","description":"Display name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Description"},"is_taxable":{"type":"boolean","title":"Is Taxable","description":"Whether items are taxable","default":true}},"type":"object","required":["code","name"],"title":"TaxCodeCreateRequest","description":"Request schema for creating a tax code.","example":{"code":"TAXABLE","description":"Standard taxable goods and services","is_taxable":true,"name":"Taxable"}},"TaxCodeResponse":{"properties":{"id":{"type":"string","title":"Id","description":"Tax code UUID"},"business_id":{"type":"string","title":"Business Id","description":"Business UUID"},"code":{"type":"string","title":"Code","description":"Tax code"},"name":{"type":"string","title":"Name","description":"Display name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Description"},"is_taxable":{"type":"boolean","title":"Is Taxable","description":"Is taxable"},"is_active":{"type":"boolean","title":"Is Active","description":"Is active"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp"},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"Last update timestamp"}},"type":"object","required":["id","business_id","code","name","is_taxable","is_active","created_at","updated_at"],"title":"TaxCodeResponse","description":"Response schema for a tax code."},"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":[]}]}