The Sales Team object
Attributes
Unique identifier for the object.
{
"id": "sales-team_abc123",
"idx": 1,
"parent_id": null,
"parent_type": "parent_type_example",
"sales_person": "sales_person_example",
"contact_no": "contact_no_example",
"allocated_percentage": 0,
"allocated_amount": 0,
"commission_rate": "commission_rate_example",
"incentives": 0
} /api/crm/sales-team?parent_id={id} List sales teams by parent
Returns all sales teams belonging to the specified parent.
Query parameters
The ID of the parent to list children for.
Returns
A list of sales team objects belonging to the parent.
curl https://api.overplane.dev/api/crm/sales-team?parent_id=parent_abc123 \
-H "Authorization: Bearer sk_test_..." {
"data": [
{
"id": "sales-team_abc123",
"idx": 1,
"parent_id": null,
"parent_type": "parent_type_example",
"sales_person": "sales_person_example",
"contact_no": "contact_no_example",
"allocated_percentage": 0,
"allocated_amount": 0,
"commission_rate": "commission_rate_example",
"incentives": 0
}
],
"has_more": false,
"total": 1
} /api/crm/sales-team Create a sales team
Creates a new sales team object.
Body parameters
Returns
Returns the newly created sales team object if the call succeeded.
curl https://api.overplane.dev/api/crm/sales-team \
-H "Authorization: Bearer sk_test_..." \
-X POST \
-H "Content-Type: application/json" \
-d '{"parent_id":null,"parent_type":"parent_type_example","sales_person":"sales_person_example"}' {
"id": "sales-team_abc123",
"idx": 1,
"parent_id": null,
"parent_type": "parent_type_example",
"sales_person": "sales_person_example",
"contact_no": "contact_no_example",
"allocated_percentage": 0,
"allocated_amount": 0,
"commission_rate": "commission_rate_example",
"incentives": 0
} /api/crm/sales-team/{id} Update a sales team
Updates the specified sales team by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
Path parameters
The identifier of the sales team to update.
Body parameters
Returns
Returns the updated sales team object.
curl https://api.overplane.dev/api/crm/sales-team/sales-team_abc123 \
-H "Authorization: Bearer sk_test_..." \
-X PATCH \
-H "Content-Type: application/json" \
-d '{"idx":1,"parent_id":null}' {
"id": "sales-team_abc123",
"idx": 1,
"parent_id": null,
"parent_type": "parent_type_example",
"sales_person": "sales_person_example",
"contact_no": "contact_no_example",
"allocated_percentage": 0,
"allocated_amount": 0,
"commission_rate": "commission_rate_example",
"incentives": 0
} /api/crm/sales-team/{id} Delete a sales team
Permanently deletes a sales team. This cannot be undone.
Path parameters
The identifier of the sales team to delete.
Returns
Returns a confirmation that the sales team has been deleted.
curl https://api.overplane.dev/api/crm/sales-team/sales-team_abc123 \
-H "Authorization: Bearer sk_test_..." \
-X DELETE {
"id": "sales-team_abc123",
"deleted": true
} /api/crm/sales-team/reorder Reorder sales teams
Updates the sort order of sales teams within their parent by setting new index values.
Returns
Returns the reordered list.
curl https://api.overplane.dev/api/crm/sales-team/reorder \
-H "Authorization: Bearer sk_test_..." \
-X POST {
"id": "sales-team_abc123",
"idx": 1,
"parent_id": null,
"parent_type": "parent_type_example",
"sales_person": "sales_person_example",
"contact_no": "contact_no_example",
"allocated_percentage": 0,
"allocated_amount": 0,
"commission_rate": "commission_rate_example",
"incentives": 0
}