# Search depreciation schedules

Operation ID: `searchDepreciationSchedules`

Group: Accounting › Fixed Assets › Depreciation Schedules

[Open in the interactive reference](https://docs.api.lensing.ai/lensing/v1/endpoints/searchDepreciationSchedules)

`POST /fixed-assets/depreciation-schedules/search`

Read-only: A read that takes its filters in the body. Changes nothing, and ignores Idempotency-Key.

Searches depreciation schedules. Each schedule returned has the same fields as `GET fixed-assets/depreciation-schedules/:id`.

To filter by depreciation rule, acquisition date, currency, or `lastModifiedDate`, use `GET fixed-assets/depreciation-schedules`.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `Api-Version` | header | string · v1 | yes | The API version this request targets, named by its public identifier. Required on every request; omitting it, or naming a version this company does not have, is answered with 400. This document describes version `v1`. |

## Request body

Required, `application/json`: searchDepreciationSchedulesInput.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `filters` | object | no | The filters to apply. A schedule must match every filter you send. Omit to return all depreciation schedules. If you send an empty list for a filter, that filter is ignored. Example: `{"status":"Ongoing","entityIds":[1],"startDateFrom":"2024-01-01","startDateTo":"2024-12-31"}`. |
| `filters.id` | string | no | Limits results to the depreciation schedule with this id. The match is exact. A value that is not in the format of an id matches no schedule. |
| `filters.scheduleNumber` | string | no | Limits results to the depreciation schedule with this schedule number. The match is exact and case-sensitive. Example: 'DS-0042'. |
| `filters.fixedAssetIds` | array<number> | no | Limits results to the schedules of any of these fixed assets. The match is exact. Send the internal numbers that schedules return in `fixedAssetId`, not the `id` that the fixed asset endpoints use. |
| `filters.entityIds` | array<number> | no | Limits results to schedules for fixed assets owned by any of these legal entities. The match is exact. Send the internal numbers that schedules return in `entityId`, not the `id` that the legal entity endpoints use. |
| `filters.bookIds` | array<number> | no | Limits results to schedules for fixed assets tracked in any of these accounting books. The match is exact. Send the internal numbers that schedules return in `bookId`, not the `id` that the accounting book endpoints use. |
| `filters.status` | string | no | Limits results to schedules with this status. Accepted values: 'NotStarted', 'Ongoing', 'Completed', 'Disposed', 'Voided'. |
| `filters.startDateFrom` | date | no | Limits results to schedules whose startDate is on or after this date. Format: YYYY-MM-DD. |
| `filters.startDateTo` | date | no | Limits results to schedules whose startDate is on or before this date. Format: YYYY-MM-DD. |
| `filters.endDateFrom` | date | no | Limits results to schedules whose endDate is on or after this date. Format: YYYY-MM-DD. |
| `filters.endDateTo` | date | no | Limits results to schedules whose endDate is on or before this date. Format: YYYY-MM-DD. |
| `page` | object | no | The page of results to return. Omit for the first page. Example: `{"size":50}`. |
| `page.cursor` | string | no | The cursor from the previous response's `pagination.nextCursor`. Omit on the first request. |
| `page.size` | number | no | The number of depreciation schedules per page, between 1 and 200. Defaults to 50. A value above 200 is treated as 200, and a value below 1 as 1, not rejected. |

```json
{
  "filters": {
    "status": "Ongoing",
    "entityIds": [
      1
    ],
    "startDateFrom": "2024-01-01",
    "startDateTo": "2024-12-31"
  },
  "page": {
    "size": 50
  }
}
```

## Response

`200` Success

Under `data` (searchDepreciationSchedulesOutput):

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `items` | array<object> | yes | The depreciation schedules on this page, most recently created first. An empty array when nothing matches. Example: `[{"id":"7c2e5a91-3f84-4b60-9d17-a5e8f2c04b39","scheduleNumber":"DS-0042","fixedAssetId":3187,"entityId":1,"bookId":1,"depreciationRuleId":12,"status":"Ongoing","acquisitionDate":"2024-01-15","startDate":"2024-02-01","endDate":"2029-01-31","currency":"EUR","acquisitionValue":"24000.00","depreciableAmount":"21600.00","depreciatedAmount":"7560.00","remainingValue":"16440.00","lastModifiedDate":"2026-08-14T09:12:33.000Z"}]`. |
| `items[].id` | string | yes | The unique identifier for the depreciation schedule. |
| `items[].scheduleNumber` | string | no | The depreciation schedule number. Unique within the tenant. Example: 'DS-0042'. |
| `items[].fixedAssetId` | number | yes | The internal number of the fixed asset the schedule depreciates. It is not the `id` that the fixed asset endpoints use. |
| `items[].entityId` | number | yes | The internal number of the legal entity that owns the fixed asset. It is not the `id` that the legal entity endpoints use. |
| `items[].bookId` | number | yes | The internal number of the accounting book the fixed asset is tracked in. It is not the `id` that the accounting book endpoints use, or the `bookId` on a depreciation policy. |
| `items[].depreciationRuleId` | number | yes | The internal number of the depreciation rule applied to the fixed asset. A rule links a depreciation policy to a fixed asset type and sets the useful life. |
| `items[].status` | string | yes | The status of the schedule. Possible values: 'NotStarted' (no line has been recorded), 'Ongoing' (some lines have been recorded), 'Completed' (every line has been recorded), 'Disposed' (the fixed asset was disposed of), 'Voided' (the fixed asset was voided). |
| `items[].acquisitionDate` | date | yes | The date the fixed asset was acquired. Format: YYYY-MM-DD. It can be earlier than startDate. |
| `items[].startDate` | date | yes | The date depreciation starts. Format: YYYY-MM-DD. |
| `items[].endDate` | date | yes | The last day of depreciation. Format: YYYY-MM-DD. |
| `items[].currency` | string | yes | The currency of the fixed asset. Format: ISO 4217, for example 'EUR'. |
| `items[].acquisitionValue` | decimal | yes | The acquisition cost of the fixed asset, in the `currency`. |
| `items[].depreciableAmount` | decimal | yes | The total amount to depreciate over the schedule, in the `currency`. Formula: the fixed asset's depreciationStartValueAmount - salvageValueAmount, or when depreciationStartValueAmount is absent, acquisitionValue - salvageValueAmount. See depreciationStartValueAmount and salvageValueAmount on GET fixed-assets/:id. |
| `items[].depreciatedAmount` | decimal | yes | The depreciation recorded on this schedule, in the `currency`. Formula: the sum of the recorded schedule lines. Lines that have not been recorded do not count, whatever their dates. |
| `items[].remainingValue` | decimal | yes | The net book value of the fixed asset, in the `currency`. Formula: acquisitionValue - depreciatedAmount, or when the fixed asset has a depreciationStartValueAmount, depreciationStartValueAmount - depreciatedAmount. It is 0 once the fixed asset is voided, retired, or disposed of. |
| `items[].lastModifiedDate` | date-time | yes | The date and time the depreciation schedule last changed, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ. Recording depreciation changes depreciatedAmount and remainingValue. It updates lastModifiedDate only when the schedule's status changes. |
| `pagination` | object | yes | Whether more depreciation schedules match, and the cursor for the next page. Example: `{"hasMore":false}`. |
| `pagination.nextCursor` | string | no | The cursor for the next page. Pass it as `page.cursor`. Absent on the last page. |
| `pagination.hasMore` | boolean | yes | Whether more depreciation schedules match after this page. |

```json
{
  "data": {
    "items": [
      {
        "id": "7c2e5a91-3f84-4b60-9d17-a5e8f2c04b39",
        "scheduleNumber": "DS-0042",
        "fixedAssetId": 3187,
        "entityId": 1,
        "bookId": 1,
        "depreciationRuleId": 12,
        "status": "Ongoing",
        "acquisitionDate": "2024-01-15",
        "startDate": "2024-02-01",
        "endDate": "2029-01-31",
        "currency": "EUR",
        "acquisitionValue": "24000.00",
        "depreciableAmount": "21600.00",
        "depreciatedAmount": "7560.00",
        "remainingValue": "16440.00",
        "lastModifiedDate": "2026-08-14T09:12:33.000Z"
      }
    ],
    "pagination": {
      "hasMore": false
    }
  },
  "diagnostics": [
    {
      "code": "<code>",
      "message": "<message>",
      "severity": "error",
      "path": [
        "<path>"
      ],
      "details": "<details>"
    }
  ]
}
```

## Errors

| Code | Status |
| --- | --- |
| `INVALID_CURSOR` | 400 |

## Statuses

- `400` — Invalid request or business failure. Codes: INVALID_CURSOR
- `401` — The request carries no valid access token.
- `403` — Not authorized
- `404` — Not found
- `429` — Too many requests from this client address. The response has no body and no `Retry-After` header.
- `500` — Internal server error
