{"openapi":"3.1.0","info":{"title":"POST /api/v1/xero/sync","version":"1.0.0","description":"Sync Xero data"},"servers":[{"url":"https://api.ondayzero.com","description":"Production"}],"paths":{"/api/v1/xero/sync":{"post":{"tags":["xero"],"summary":"Sync Xero data","description":"Pull accounting data from Xero using optional entity/date filters.","operationId":"sync_api_v1_xero_sync_post","parameters":[{"name":"async_mode","in":"query","required":false,"schema":{"type":"boolean","description":"When true, queue Temporal workflow; when false, run inline.","default":true,"title":"Async Mode"},"description":"When true, queue Temporal workflow; when false, run inline."},{"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":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/XeroSyncConfigUpdate"},{"type":"null"}],"title":"Body"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"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"}}}},"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"},"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"},"XeroSyncConfigUpdate":{"properties":{"include_accounts":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Accounts"},"include_contacts":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Contacts"},"include_invoices":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Invoices"},"include_journals":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Journals"},"include_manual_journals":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Manual Journals"},"include_bank_transactions":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Bank Transactions"},"include_payments":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Payments"},"include_items":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Items"},"include_purchase_orders":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Purchase Orders"},"include_tax_rates":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Tax Rates"},"include_tracking_categories":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Tracking Categories"},"sync_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sync Mode","description":"full_history, incremental, or custom_range"},"start_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Start Date"},"end_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"End Date"}},"type":"object","title":"XeroSyncConfigUpdate","description":"Update payload for Xero sync configuration."}},"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Token","description":"API token authentication. Format: `Bearer dz_...`"}}},"security":[{"BearerAuth":[]}]}