Depreciation Run Line

The depreciation run line resource.

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

List depreciation run lines

Retrieve a paginated list of depreciation run lines. 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/depreciationRunLine
curl --request GET \
  --url 'https://rest.carbon.ms/depreciationRunLine?select=*&limit=10' \
  --header 'Authorization: Bearer <api-key>'
Response
[
  {
    "id": "abc123def456",
    "depreciationRunId": "xyz789",
    "fixedAssetId": "xyz789",
    "amount": 0,
    "companyId": "xyz789",
    "taxAmount": 0,
    "journalId": "xyz789"
  }
]
GET/depreciationRunLine

Retrieve a depreciation run line

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

Query parameters

idstring

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

GEThttps://rest.carbon.ms/depreciationRunLine
curl --request GET \
  --url 'https://rest.carbon.ms/depreciationRunLine?id=eq.%7Bid%7D' \
  --header 'Authorization: Bearer <api-key>'
Response
{
  "id": "abc123def456",
  "depreciationRunId": "xyz789",
  "fixedAssetId": "xyz789",
  "amount": 0,
  "companyId": "xyz789",
  "taxAmount": 0,
  "journalId": "xyz789"
}
POST/depreciationRunLine

Create a depreciation run line

Create a new depreciation run line.

Body parameters

depreciationRunIdstringrequired

References depreciationRun.id

fixedAssetIdstringrequired

References fixedAsset.id

amountnumberrequired
taxAmountnumber
journalIdstring

References journal.id

companyIdstringrequired

References company.id

POSThttps://rest.carbon.ms/depreciationRunLine
curl --request POST \
  --url https://rest.carbon.ms/depreciationRunLine \
  --header 'Authorization: Bearer <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'Prefer: return=representation' \
  --data '{"depreciationRunId":"xyz789","fixedAssetId":"xyz789","amount":0,"companyId":"xyz789"}'
Response
{
  "id": "abc123def456",
  "depreciationRunId": "xyz789",
  "fixedAssetId": "xyz789",
  "amount": 0,
  "companyId": "xyz789",
  "taxAmount": 0,
  "journalId": "xyz789"
}
PATCH/depreciationRunLine

Update a depreciation run line

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

Body parameters

depreciationRunIdstringrequired

References depreciationRun.id

fixedAssetIdstringrequired

References fixedAsset.id

amountnumberrequired
taxAmountnumber
journalIdstring

References journal.id

companyIdstringrequired

References company.id

PATCHhttps://rest.carbon.ms/depreciationRunLine
curl --request PATCH \
  --url 'https://rest.carbon.ms/depreciationRunLine?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",
  "fixedAssetId": "xyz789",
  "amount": 0,
  "companyId": "xyz789",
  "taxAmount": 0,
  "journalId": "xyz789"
}
DELETE/depreciationRunLine

Delete a depreciation run line

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

Query parameters

idstring

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

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