Depreciation Run

The depreciation run resource.

Basehttps://rest.carbon.ms/depreciationRun
GET/depreciationRun

List depreciation runs

Retrieve a paginated list of depreciation runs. Filter, order, and select columns with PostgREST query parameters.

Query parameters

selectstring

Comma-separated columns to return. Defaults to all.

orderstring

Column to sort by, e.g. `createdAt.desc`.

limitinteger

Maximum rows to return.

offsetinteger

Rows to skip, for pagination.

GEThttps://rest.carbon.ms/depreciationRun
curl --request GET \
  --url 'https://rest.carbon.ms/depreciationRun?select=*&limit=10' \
  --header 'Authorization: Bearer <api-key>'
Response
[
  {
    "id": "abc123def456",
    "depreciationRunId": "xyz789",
    "periodEnd": "2026-01-01",
    "status": "string",
    "companyId": "xyz789",
    "createdAt": "2026-01-01T00:00:00Z",
    "createdBy": "string",
    "postedAt": "2026-01-01T00:00:00Z"
  }
]
GET/depreciationRun

Retrieve a depreciation run

Fetch a single depreciation run by filtering on `id`.

Query parameters

idstring

Match on the depreciation run's `id`, e.g. `eq.{id}`.

GEThttps://rest.carbon.ms/depreciationRun
curl --request GET \
  --url 'https://rest.carbon.ms/depreciationRun?id=eq.%7Bid%7D' \
  --header 'Authorization: Bearer <api-key>'
Response
{
  "id": "abc123def456",
  "depreciationRunId": "xyz789",
  "periodEnd": "2026-01-01",
  "status": "string",
  "companyId": "xyz789",
  "createdAt": "2026-01-01T00:00:00Z",
  "createdBy": "string",
  "postedAt": "2026-01-01T00:00:00Z"
}
POST/depreciationRun

Create a depreciation run

Create a new depreciation run.

Body parameters

depreciationRunIdstringrequired
periodEnddaterequired
statusstringrequired
postedAttimestamp
postedBystring

References user.id

companyIdstringrequired

References company.id

POSThttps://rest.carbon.ms/depreciationRun
curl --request POST \
  --url https://rest.carbon.ms/depreciationRun \
  --header 'Authorization: Bearer <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'Prefer: return=representation' \
  --data '{"depreciationRunId":"xyz789","periodEnd":"2026-01-01","status":"string","companyId":"xyz789"}'
Response
{
  "id": "abc123def456",
  "depreciationRunId": "xyz789",
  "periodEnd": "2026-01-01",
  "status": "string",
  "companyId": "xyz789",
  "createdAt": "2026-01-01T00:00:00Z",
  "createdBy": "string",
  "postedAt": "2026-01-01T00:00:00Z"
}
PATCH/depreciationRun

Update a depreciation run

Update an existing depreciation run, matched on `id`.

Body parameters

depreciationRunIdstringrequired
periodEnddaterequired
statusstringrequired
postedAttimestamp
postedBystring

References user.id

companyIdstringrequired

References company.id

PATCHhttps://rest.carbon.ms/depreciationRun
curl --request PATCH \
  --url 'https://rest.carbon.ms/depreciationRun?id=eq.%7Bid%7D' \
  --header 'Authorization: Bearer <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'Prefer: return=representation' \
  --data '{"depreciationRunId":"xyz789"}'
Response
{
  "id": "abc123def456",
  "depreciationRunId": "xyz789",
  "periodEnd": "2026-01-01",
  "status": "string",
  "companyId": "xyz789",
  "createdAt": "2026-01-01T00:00:00Z",
  "createdBy": "string",
  "postedAt": "2026-01-01T00:00:00Z"
}
DELETE/depreciationRun

Delete a depreciation run

Delete a depreciation run, matched on `id`. Returns 204 No Content.

Query parameters

idstring

The `id` of the depreciation run to delete, e.g. `eq.{id}`.

DELETEhttps://rest.carbon.ms/depreciationRun
curl --request DELETE \
  --url 'https://rest.carbon.ms/depreciationRun?id=eq.%7Bid%7D' \
  --header 'Authorization: Bearer <api-key>'
204 No Content