{"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","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/ErrorResponse"},"example":{"error":"validation_error","message":"Validation failed: amount: Input should be a valid integer","errors":{"amount":"Input should be a valid integer"},"code":"GEN_002","request_id":"3f0e7c2a-9b4d-4e1a-8c6f-2d5b7a1e9c30"}}}},"401":{"description":"Unauthorized - Missing or expired token, an MCP OAuth token used against the REST API, or no access to this business","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":"unauthorized","message":"Authentication required","code":"AUTH_001","request_id":"3f0e7c2a-9b4d-4e1a-8c6f-2d5b7a1e9c30"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":"forbidden","message":"You don't have permission to access this resource","code":"AUTH_002","request_id":"3f0e7c2a-9b4d-4e1a-8c6f-2d5b7a1e9c30"}}}}},"x-fastapi-operation-id":"list_scheduled_journal_entries_api_v1_fixed_assets_scheduled_journal_entries_get"}}},"components":{"schemas":{"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"},"schedule_kind":{"type":"string","enum":["depreciation","amortization"],"title":"Schedule Kind","description":"Depreciation or prepaid amortization","default":"depreciation"},"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]"},"ErrorResponse":{"title":"ErrorResponse","type":"object","description":"Envelope returned by every non-2xx response. Branch on `code` (stable) rather than `message` (human-readable, may change).","required":["error","message","code"],"properties":{"error":{"type":"string","description":"Error category: `validation_error`, `unauthorized`, `forbidden`, `not_found`, `conflict`, `rate_limited`, `server_error`, or `service_unavailable`."},"message":{"type":"string","description":"Human-readable explanation, safe to show to end users."},"code":{"type":"string","description":"Stable machine-readable code in `CATEGORY_NNN` form (e.g. `NOT_FOUND_006`, `AUTH_010`, `GEN_002`)."},"request_id":{"type":"string","description":"Correlation id for support requests. Echoes the `x-request-id` request header when one was supplied."},"errors":{"type":"object","additionalProperties":{"type":"string"},"description":"Field-level validation messages keyed by field name. Present on 400/422 validation failures only."}}}},"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Token","description":"API token authentication. Format: `Bearer dz_...`"}}},"security":[{"BearerAuth":[]}]}