{"openapi":"3.1.0","info":{"title":"GET /api/v1/fixed-assets/depreciation-matrix","version":"1.0.0","description":"Depreciation schedule matrix"},"servers":[{"url":"https://api.ondayzero.com","description":"Production"}],"paths":{"/api/v1/fixed-assets/depreciation-matrix":{"get":{"tags":["fixed-assets"],"summary":"Depreciation schedule matrix","description":"Depreciation pivoted to months across the top and assets down the side.\n\nEach cell is that asset's depreciation for that month, split into what has\nalready posted and what is still queued. `column_totals` is the subtotal\nrow along the bottom.","operationId":"get_depreciation_matrix_api_v1_fixed_assets_depreciation_matrix_get","parameters":[{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Earliest period to include (YYYY-MM-DD)","title":"Start Date"},"description":"Earliest period to include (YYYY-MM-DD)"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Latest period to include (YYYY-MM-DD)","title":"End Date"},"description":"Latest period to include (YYYY-MM-DD)"},{"name":"include_posted","in":"query","required":false,"schema":{"type":"boolean","description":"Include already-posted periods","default":true,"title":"Include Posted"},"description":"Include already-posted periods"},{"name":"include_scheduled","in":"query","required":false,"schema":{"type":"boolean","description":"Include queued (not yet posted) periods","default":true,"title":"Include Scheduled"},"description":"Include queued (not yet posted) periods"},{"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_DepreciationMatrixResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"DepreciationMatrixCell":{"properties":{"period":{"type":"string","title":"Period","description":"Period bucket, YYYY-MM"},"amount_cents":{"type":"integer","title":"Amount Cents","description":"Total depreciation in this cell"},"posted_cents":{"type":"integer","title":"Posted Cents","description":"Portion already posted to the ledger, in cents"},"scheduled_cents":{"type":"integer","title":"Scheduled Cents","description":"Portion still queued as a draft entry, in cents"}},"type":"object","required":["period","amount_cents","posted_cents","scheduled_cents"],"title":"DepreciationMatrixCell","description":"One month's depreciation for one asset (or one column subtotal)."},"DepreciationMatrixResponse":{"properties":{"periods":{"items":{"type":"string"},"type":"array","title":"Periods","description":"Month buckets (YYYY-MM), ascending"},"rows":{"items":{"$ref":"#/components/schemas/DepreciationMatrixRow"},"type":"array","title":"Rows","description":"One row per asset"},"column_totals":{"items":{"$ref":"#/components/schemas/DepreciationMatrixCell"},"type":"array","title":"Column Totals","description":"Subtotal row: one total per period"},"total_posted_cents":{"type":"integer","title":"Total Posted Cents","description":"Grand total posted, in cents"},"total_scheduled_cents":{"type":"integer","title":"Total Scheduled Cents","description":"Grand total still queued, in cents"},"grand_total_cents":{"type":"integer","title":"Grand Total Cents","description":"Grand total, in cents"}},"type":"object","required":["total_posted_cents","total_scheduled_cents","grand_total_cents"],"title":"DepreciationMatrixResponse","description":"Depreciation schedule pivoted to months (X) by asset (Y)."},"DepreciationMatrixRow":{"properties":{"asset_id":{"type":"string","title":"Asset Id","description":"Asset ID"},"asset_name":{"type":"string","title":"Asset Name","description":"Asset name"},"category_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category Name","description":"Asset category name"},"cells":{"items":{"$ref":"#/components/schemas/DepreciationMatrixCell"},"type":"array","title":"Cells","description":"One cell per period, in period order"},"total_cents":{"type":"integer","title":"Total Cents","description":"Row total in cents"},"posted_cents":{"type":"integer","title":"Posted Cents","description":"Row total already posted, in cents"},"scheduled_cents":{"type":"integer","title":"Scheduled Cents","description":"Row total still queued, in cents"}},"type":"object","required":["asset_id","asset_name","total_cents","posted_cents","scheduled_cents"],"title":"DepreciationMatrixRow","description":"One asset's row across the matrix's months."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"SuccessEnvelope_DepreciationMatrixResponse_":{"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/DepreciationMatrixResponse"},{"type":"null"}]}},"additionalProperties":true,"type":"object","title":"SuccessEnvelope[DepreciationMatrixResponse]"},"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":[]}]}