The Target Detail object
Attributes
Unique identifier for the object.
{
"id": "target-detail_abc123",
"idx": 1,
"parent_id": null,
"parent_type": "parent_type_example",
"item_group": "item_group_example",
"fiscal_year": "fiscal_year_example",
"target_qty": 0,
"target_amount": 0,
"distribution_id": "distribution_id_example"
} /api/setup/target-detail?parent_id={id} List target details by parent
Returns all target details belonging to the specified parent.
Query parameters
The ID of the parent to list children for.
Returns
A list of target detail objects belonging to the parent.
curl https://api.overplane.dev/api/setup/target-detail?parent_id=parent_abc123 \
-H "Authorization: Bearer sk_test_..." {
"data": [
{
"id": "target-detail_abc123",
"idx": 1,
"parent_id": null,
"parent_type": "parent_type_example",
"item_group": "item_group_example",
"fiscal_year": "fiscal_year_example",
"target_qty": 0,
"target_amount": 0,
"distribution_id": "distribution_id_example"
}
],
"has_more": false,
"total": 1
} /api/setup/target-detail Create a target detail
Creates a new target detail object.
Body parameters
Returns
Returns the newly created target detail object if the call succeeded.
curl https://api.overplane.dev/api/setup/target-detail \
-H "Authorization: Bearer sk_test_..." \
-X POST \
-H "Content-Type: application/json" \
-d '{"parent_id":null,"parent_type":"parent_type_example","fiscal_year":"fiscal_year_example","distribution_id":"distribution_id_example"}' {
"id": "target-detail_abc123",
"idx": 1,
"parent_id": null,
"parent_type": "parent_type_example",
"item_group": "item_group_example",
"fiscal_year": "fiscal_year_example",
"target_qty": 0,
"target_amount": 0,
"distribution_id": "distribution_id_example"
} /api/setup/target-detail/{id} Update a target detail
Updates the specified target detail by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
Path parameters
The identifier of the target detail to update.
Body parameters
Returns
Returns the updated target detail object.
curl https://api.overplane.dev/api/setup/target-detail/target-detail_abc123 \
-H "Authorization: Bearer sk_test_..." \
-X PATCH \
-H "Content-Type: application/json" \
-d '{"idx":1,"parent_id":null}' {
"id": "target-detail_abc123",
"idx": 1,
"parent_id": null,
"parent_type": "parent_type_example",
"item_group": "item_group_example",
"fiscal_year": "fiscal_year_example",
"target_qty": 0,
"target_amount": 0,
"distribution_id": "distribution_id_example"
} /api/setup/target-detail/{id} Delete a target detail
Permanently deletes a target detail. This cannot be undone.
Path parameters
The identifier of the target detail to delete.
Returns
Returns a confirmation that the target detail has been deleted.
curl https://api.overplane.dev/api/setup/target-detail/target-detail_abc123 \
-H "Authorization: Bearer sk_test_..." \
-X DELETE {
"id": "target-detail_abc123",
"deleted": true
} /api/setup/target-detail/reorder Reorder target details
Updates the sort order of target details within their parent by setting new index values.
Returns
Returns the reordered list.
curl https://api.overplane.dev/api/setup/target-detail/reorder \
-H "Authorization: Bearer sk_test_..." \
-X POST {
"id": "target-detail_abc123",
"idx": 1,
"parent_id": null,
"parent_type": "parent_type_example",
"item_group": "item_group_example",
"fiscal_year": "fiscal_year_example",
"target_qty": 0,
"target_amount": 0,
"distribution_id": "distribution_id_example"
}