The Target Detail object

Attributes

id string

Unique identifier for the object.

idx integer
parent_id string required
parent_type string required
item_group string
fiscal_year string required
target_qty number
target_amount number
distribution_id string required
The Target Detail 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"
}
GET /api/setup/target-detail?parent_id={id}

List target details by parent

Returns all target details belonging to the specified parent.

Query parameters

parent_id string required

The ID of the parent to list children for.

Returns

A list of target detail objects belonging to the parent.

GET /api/setup/target-detail?parent_id={id}
curl https://api.overplane.dev/api/setup/target-detail?parent_id=parent_abc123 \
  -H "Authorization: Bearer sk_test_..."
Response
{
  "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
}
POST /api/setup/target-detail

Create a target detail

Creates a new target detail object.

Body parameters

idx integer
parent_id string required
parent_type string required
item_group string
fiscal_year string required
target_qty number
target_amount number
distribution_id string required

Returns

Returns the newly created target detail object if the call succeeded.

POST /api/setup/target-detail
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"}'
Response
{
  "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"
}
PATCH /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

id string required

The identifier of the target detail to update.

Body parameters

idx integer
parent_id string
parent_type string
item_group string
fiscal_year string
target_qty number
target_amount number
distribution_id string

Returns

Returns the updated target detail object.

PATCH /api/setup/target-detail/{id}
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}'
Response
{
  "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"
}
DELETE /api/setup/target-detail/{id}

Delete a target detail

Permanently deletes a target detail. This cannot be undone.

Path parameters

id string required

The identifier of the target detail to delete.

Returns

Returns a confirmation that the target detail has been deleted.

DELETE /api/setup/target-detail/{id}
curl https://api.overplane.dev/api/setup/target-detail/target-detail_abc123 \
  -H "Authorization: Bearer sk_test_..." \
  -X DELETE
Response
{
  "id": "target-detail_abc123",
  "deleted": true
}
POST /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.

POST /api/setup/target-detail/reorder
curl https://api.overplane.dev/api/setup/target-detail/reorder \
  -H "Authorization: Bearer sk_test_..." \
  -X POST
Response
{
  "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"
}