{"openapi":"3.1.0","info":{"title":"GET /api/v1/reports/import-templates","version":"1.0.0","description":"List import templates"},"servers":[{"url":"https://api.ondayzero.com","description":"Production"}],"paths":{"/api/v1/reports/import-templates":{"get":{"tags":["reports"],"summary":"List import templates","description":"Every CSV template the app can import — chart of accounts, customers, vendors, transactions, invoices, bills, journal entries — with column definitions derived from the importers themselves, per-file download URLs and a ZIP URL bundling all of them with a README each.","operationId":"list_import_templates_api_v1_reports_import_templates_get","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"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope_ImportTemplateListResponse_"}}}},"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"}}}},"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"},"ImportTemplateColumn":{"properties":{"name":{"type":"string","title":"Name"},"required":{"type":"boolean","title":"Required"},"description":{"type":"string","title":"Description","default":""},"format":{"type":"string","title":"Format","default":"text"},"example":{"type":"string","title":"Example","default":""}},"type":"object","required":["name","required"],"title":"ImportTemplateColumn"},"ImportTemplateItem":{"properties":{"key":{"type":"string","title":"Key","description":"Stable identifier, e.g. `chart_of_accounts`."},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"filename":{"type":"string","title":"Filename","description":"Suggested filename for the CSV."},"upload_page":{"type":"string","title":"Upload Page","description":"Where in the app to upload the file."},"columns":{"items":{"$ref":"#/components/schemas/ImportTemplateColumn"},"type":"array","title":"Columns"},"download_url":{"type":"string","title":"Download Url","description":"Authenticated URL of the CSV."},"readme_url":{"type":"string","title":"Readme Url","description":"Authenticated URL of the README (markdown)."}},"type":"object","required":["key","name","description","filename","upload_page","columns","download_url","readme_url"],"title":"ImportTemplateItem","description":"One CSV import template the app accepts."},"ImportTemplateListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ImportTemplateItem"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"zip_url":{"type":"string","title":"Zip Url","description":"Authenticated URL of a ZIP with every CSV, a README per template and an INDEX.md."}},"type":"object","required":["items","total","zip_url"],"title":"ImportTemplateListResponse"},"SuccessEnvelope_ImportTemplateListResponse_":{"properties":{"success":{"type":"boolean","title":"Success","default":true},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"data":{"anyOf":[{"$ref":"#/components/schemas/ImportTemplateListResponse"},{"type":"null"}]}},"additionalProperties":true,"type":"object","title":"SuccessEnvelope[ImportTemplateListResponse]"},"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":[]}]}