{"openapi":"3.1.0","info":{"title":"GET /api/v1/businesses/{business_id}/trial-balance","version":"1.0.0","description":"Get trial balance"},"servers":[{"url":"https://api.ondayzero.com","description":"Production"}],"paths":{"/api/v1/businesses/{business_id}/trial-balance":{"get":{"tags":["businesses"],"summary":"Get trial balance","description":"Trial balance listing every ledger account with debit and credit balances as of a point-in-time date. All amounts in cents.","operationId":"get_trial_balance_api_v1_businesses__business_id__trial_balance_get","parameters":[{"name":"business_id","in":"path","required":true,"schema":{"type":"string","title":"Business Id"}},{"name":"as_of_date","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"As-of date (YYYY-MM-DD)","title":"As Of Date"},"description":"As-of date (YYYY-MM-DD)"},{"name":"hide_zero_rows","in":"query","required":false,"schema":{"type":"boolean","description":"Exclude accounts with zero debit and credit balances","default":false,"title":"Hide Zero Rows"},"description":"Exclude accounts with zero debit and credit balances"},{"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_GetTrialBalanceResponse_"}}}},"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":{"GetTrialBalanceResponse":{"properties":{"as_of_date":{"type":"string","title":"As Of Date"},"accounts":{"items":{"$ref":"#/components/schemas/TrialBalanceAccountRow"},"type":"array","title":"Accounts"},"total_debits_cents":{"type":"integer","title":"Total Debits Cents"},"total_credits_cents":{"type":"integer","title":"Total Credits Cents"},"is_balanced":{"type":"boolean","title":"Is Balanced"}},"additionalProperties":true,"type":"object","required":["as_of_date","accounts","total_debits_cents","total_credits_cents","is_balanced"],"title":"GetTrialBalanceResponse","description":"Response for ``get_trial_balance``."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"SuccessEnvelope_GetTrialBalanceResponse_":{"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/GetTrialBalanceResponse"},{"type":"null"}]}},"additionalProperties":true,"type":"object","title":"SuccessEnvelope[GetTrialBalanceResponse]"},"TrialBalanceAccountRow":{"properties":{"name":{"type":"string","title":"Name"},"type":{"type":"string","title":"Type"},"debit_cents":{"type":"integer","title":"Debit Cents"},"credit_cents":{"type":"integer","title":"Credit Cents"}},"additionalProperties":true,"type":"object","required":["name","type","debit_cents","credit_cents"],"title":"TrialBalanceAccountRow","description":"Single account row on the trial balance."},"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":[]}]}