{"openapi":"3.1.0","info":{"title":"GET /api/v1/reports/subledger-gl-reconciliation","version":"1.0.0","description":"Sub-ledger to GL reconciliation"},"servers":[{"url":"https://api.ondayzero.com","description":"Production"}],"paths":{"/api/v1/reports/subledger-gl-reconciliation":{"get":{"tags":["reports"],"summary":"Sub-ledger to GL reconciliation","description":"Compare AR/AP sub-ledger open balances against their GL control-account balances.","operationId":"get_subledger_gl_reconciliation_api_v1_reports_subledger_gl_reconciliation_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_SubledgerGlReconciliationResponse_"}}}},"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"}}}},"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"},"SubledgerGlReconciliationResponse":{"properties":{"generated_at":{"type":"string","format":"date-time","title":"Generated At","description":"Timestamp when reconciliation was computed."},"ar":{"$ref":"#/components/schemas/SubledgerGlSectionResponse","description":"Accounts receivable sub-ledger vs AR control account."},"ap":{"$ref":"#/components/schemas/SubledgerGlSectionResponse","description":"Accounts payable sub-ledger vs AP control account."}},"type":"object","required":["generated_at","ar","ap"],"title":"SubledgerGlReconciliationResponse","description":"AR/AP sub-ledger to GL control-account reconciliation snapshot."},"SubledgerGlSectionResponse":{"properties":{"subledger_open_balance_cents":{"type":"integer","title":"Subledger Open Balance Cents","description":"Open-balance total from the sub-ledger in cents."},"gl_control_balance_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Gl Control Balance Cents","description":"Control-account balance from the GL in cents (normalized to natural sign)."},"difference_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Difference Cents","description":"Sub-ledger minus GL control balance in cents."},"is_reconciled":{"type":"boolean","title":"Is Reconciled","description":"True when sub-ledger and GL balances match exactly."},"control_ledger_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Control Ledger Id","description":"Control ledger UUID when one is configured."},"control_ledger_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Control Ledger Name","description":"Control ledger display name when one is configured."},"control_ledger_system_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Control Ledger System Key","description":"Control ledger system key (for example, accounts_receivable)."},"control_ledger_normal_balance":{"anyOf":[{"type":"string","enum":["debit","credit"]},{"type":"null"}],"title":"Control Ledger Normal Balance","description":"Normal-balance side for the control ledger."}},"type":"object","required":["subledger_open_balance_cents","is_reconciled"],"title":"SubledgerGlSectionResponse","description":"One side of sub-ledger versus GL control-account reconciliation."},"SuccessEnvelope_SubledgerGlReconciliationResponse_":{"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/SubledgerGlReconciliationResponse"},{"type":"null"}]}},"additionalProperties":true,"type":"object","title":"SuccessEnvelope[SubledgerGlReconciliationResponse]"},"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":[]}]}