The Depreciation Schedule object
Attributes
Unique identifier for the 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"
} /api/assets/depreciation-schedule?parent_id={id} List depreciation schedules by parent
Returns all depreciation schedules belonging to the specified parent.
Query parameters
The ID of the parent to list children for.
Returns
A list of depreciation schedule objects belonging to the parent.
curl https://api.overplane.dev/api/assets/depreciation-schedule?parent_id=parent_abc123 \
-H "Authorization: Bearer sk_test_..." {
"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
} /api/assets/depreciation-schedule Create a depreciation schedule
Creates a new depreciation schedule object.
Body parameters
Returns
Returns the newly created depreciation schedule object if the call succeeded.
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}' {
"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"
} /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
The identifier of the depreciation schedule to update.
Body parameters
Returns
Returns the updated depreciation schedule object.
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}' {
"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"
} /api/assets/depreciation-schedule/{id} Delete a depreciation schedule
Permanently deletes a depreciation schedule. This cannot be undone.
Path parameters
The identifier of the depreciation schedule to delete.
Returns
Returns a confirmation that the depreciation schedule has been deleted.
curl https://api.overplane.dev/api/assets/depreciation-schedule/depreciation-schedule_abc123 \
-H "Authorization: Bearer sk_test_..." \
-X DELETE {
"id": "depreciation-schedule_abc123",
"deleted": true
} /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.
curl https://api.overplane.dev/api/assets/depreciation-schedule/reorder \
-H "Authorization: Bearer sk_test_..." \
-X POST {
"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"
}