The Depreciation Schedule object

Attributes

id string

Unique identifier for the object.

idx integer
parent_id string required
parent_type string required
schedule_date string required
depreciation_amount number required
accumulated_depreciation_amount number
journal_entry string
shift string
The Depreciation Schedule object
{
  "id": "depreciation-schedule_abc123",
  "idx": 1,
  "parent_id": null,
  "parent_type": "parent_type_example",
  "schedule_date": "2024-01-15",
  "depreciation_amount": 0,
  "accumulated_depreciation_amount": 0,
  "journal_entry": "journal_entry_example",
  "shift": "shift_example"
}
GET /api/assets/depreciation-schedule?parent_id={id}

List depreciation schedules by parent

Returns all depreciation schedules belonging to the specified parent.

Query parameters

parent_id string required

The ID of the parent to list children for.

Returns

A list of depreciation schedule objects belonging to the parent.

GET /api/assets/depreciation-schedule?parent_id={id}
curl https://api.overplane.dev/api/assets/depreciation-schedule?parent_id=parent_abc123 \
  -H "Authorization: Bearer sk_test_..."
Response
{
  "data": [
    {
      "id": "depreciation-schedule_abc123",
      "idx": 1,
      "parent_id": null,
      "parent_type": "parent_type_example",
      "schedule_date": "2024-01-15",
      "depreciation_amount": 0,
      "accumulated_depreciation_amount": 0,
      "journal_entry": "journal_entry_example",
      "shift": "shift_example"
    }
  ],
  "has_more": false,
  "total": 1
}
POST /api/assets/depreciation-schedule

Create a depreciation schedule

Creates a new depreciation schedule object.

Body parameters

idx integer
parent_id string required
parent_type string required
schedule_date string required
depreciation_amount number required
accumulated_depreciation_amount number
journal_entry string
shift string

Returns

Returns the newly created depreciation schedule object if the call succeeded.

POST /api/assets/depreciation-schedule
curl https://api.overplane.dev/api/assets/depreciation-schedule \
  -H "Authorization: Bearer sk_test_..." \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"parent_id":null,"parent_type":"parent_type_example","schedule_date":"2024-01-15","depreciation_amount":0}'
Response
{
  "id": "depreciation-schedule_abc123",
  "idx": 1,
  "parent_id": null,
  "parent_type": "parent_type_example",
  "schedule_date": "2024-01-15",
  "depreciation_amount": 0,
  "accumulated_depreciation_amount": 0,
  "journal_entry": "journal_entry_example",
  "shift": "shift_example"
}
PATCH /api/assets/depreciation-schedule/{id}

Update a depreciation schedule

Updates the specified depreciation schedule by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

Path parameters

id string required

The identifier of the depreciation schedule to update.

Body parameters

idx integer
parent_id string
parent_type string
schedule_date string
depreciation_amount number
accumulated_depreciation_amount number
journal_entry string
shift string

Returns

Returns the updated depreciation schedule object.

PATCH /api/assets/depreciation-schedule/{id}
curl https://api.overplane.dev/api/assets/depreciation-schedule/depreciation-schedule_abc123 \
  -H "Authorization: Bearer sk_test_..." \
  -X PATCH \
  -H "Content-Type: application/json" \
  -d '{"idx":1,"parent_id":null}'
Response
{
  "id": "depreciation-schedule_abc123",
  "idx": 1,
  "parent_id": null,
  "parent_type": "parent_type_example",
  "schedule_date": "2024-01-15",
  "depreciation_amount": 0,
  "accumulated_depreciation_amount": 0,
  "journal_entry": "journal_entry_example",
  "shift": "shift_example"
}
DELETE /api/assets/depreciation-schedule/{id}

Delete a depreciation schedule

Permanently deletes a depreciation schedule. This cannot be undone.

Path parameters

id string required

The identifier of the depreciation schedule to delete.

Returns

Returns a confirmation that the depreciation schedule has been deleted.

DELETE /api/assets/depreciation-schedule/{id}
curl https://api.overplane.dev/api/assets/depreciation-schedule/depreciation-schedule_abc123 \
  -H "Authorization: Bearer sk_test_..." \
  -X DELETE
Response
{
  "id": "depreciation-schedule_abc123",
  "deleted": true
}
POST /api/assets/depreciation-schedule/reorder

Reorder depreciation schedules

Updates the sort order of depreciation schedules within their parent by setting new index values.

Returns

Returns the reordered list.

POST /api/assets/depreciation-schedule/reorder
curl https://api.overplane.dev/api/assets/depreciation-schedule/reorder \
  -H "Authorization: Bearer sk_test_..." \
  -X POST
Response
{
  "id": "depreciation-schedule_abc123",
  "idx": 1,
  "parent_id": null,
  "parent_type": "parent_type_example",
  "schedule_date": "2024-01-15",
  "depreciation_amount": 0,
  "accumulated_depreciation_amount": 0,
  "journal_entry": "journal_entry_example",
  "shift": "shift_example"
}