{"openapi":"3.1.0","info":{"title":"GET /api/v1/fixed-assets/scheduled-journal-entries","version":"1.0.0","description":"List scheduled journal entries"},"servers":[{"url":"https://api.ondayzero.com","description":"Production"}],"paths":{"/api/v1/fixed-assets/scheduled-journal-entries":{"get":{"tags":["fixed-assets"],"summary":"List scheduled journal entries","description":"Depreciation journal entries queued to post on their future dates.\n\nThese are drafts: none of them is on the books yet. Each item shows the\ndebit/credit legs that will be written when its date arrives.","operationId":"list_scheduled_journal_entries_api_v1_fixed_assets_scheduled_journal_entries_get","parameters":[{"name":"through_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Only entries queued on or before this date","title":"Through Date"},"description":"Only entries queued on or before this date"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"description":"Maximum entries to return","default":200,"title":"Limit"},"description":"Maximum entries to return"},{"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_ScheduledJournalEntryListResponse_"}}}},"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"},"ScheduledJournalEntryItem":{"properties":{"entry_id":{"type":"string","title":"Entry Id","description":"Queued depreciation entry ID"},"asset_id":{"type":"string","title":"Asset Id","description":"Asset this entry depreciates"},"asset_name":{"type":"string","title":"Asset Name","description":"Asset name"},"period_date":{"type":"string","format":"date","title":"Period Date","description":"Date this entry is queued to post"},"amount_cents":{"type":"integer","title":"Amount Cents","description":"Depreciation amount in cents"},"status":{"type":"string","title":"Status","description":"'scheduled' (future) or 'due' (date reached, not yet posted)"},"description":{"type":"string","title":"Description","description":"Journal entry description"},"lines":{"items":{"$ref":"#/components/schemas/ScheduledJournalEntryLine"},"type":"array","title":"Lines","description":"The debit/credit legs that will post"}},"type":"object","required":["entry_id","asset_id","asset_name","period_date","amount_cents","status","description"],"title":"ScheduledJournalEntryItem","description":"A journal entry queued to post on a future date.\n\nNothing is on the books yet — the entry has no journal entry ID until its\nperiod date arrives and the posting job (or a Run Depreciation click)\nmaterialises it."},"ScheduledJournalEntryLine":{"properties":{"ledger_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ledger Id","description":"Target ledger account"},"ledger_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ledger Name","description":"Target ledger account name"},"debit_credit":{"type":"string","title":"Debit Credit","description":"'debit' or 'credit'"},"amount_cents":{"type":"integer","title":"Amount Cents","description":"Leg amount in cents"},"description":{"type":"string","title":"Description","description":"Line description"}},"type":"object","required":["debit_credit","amount_cents","description"],"title":"ScheduledJournalEntryLine","description":"One leg of the journal entry a queued depreciation entry will post."},"ScheduledJournalEntryListResponse":{"properties":{"entries":{"items":{"$ref":"#/components/schemas/ScheduledJournalEntryItem"},"type":"array","title":"Entries","description":"Queued entries, earliest first"},"count":{"type":"integer","title":"Count","description":"Entries returned in this page"},"total_count":{"type":"integer","title":"Total Count","description":"Total queued entries matching the filter"},"due_count":{"type":"integer","title":"Due Count","description":"Returned entries whose date has already arrived"},"total_amount_cents":{"type":"integer","title":"Total Amount Cents","description":"Sum of every queued entry's amount, in cents"},"truncated":{"type":"boolean","title":"Truncated","description":"True when more queued entries exist than were returned"}},"type":"object","required":["count","total_count","due_count","total_amount_cents","truncated"],"title":"ScheduledJournalEntryListResponse","description":"Upcoming depreciation journal entries for a business."},"SuccessEnvelope_ScheduledJournalEntryListResponse_":{"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/ScheduledJournalEntryListResponse"},{"type":"null"}]}},"additionalProperties":true,"type":"object","title":"SuccessEnvelope[ScheduledJournalEntryListResponse]"},"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":[]}]}