The Sales Team object

Attributes

id string

Unique identifier for the object.

idx integer
parent_id string required
parent_type string required
sales_person string required
contact_no string
allocated_percentage number
allocated_amount number
commission_rate string
incentives number
The Sales Team 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
}
GET /api/crm/sales-team?parent_id={id}

List sales teams by parent

Returns all sales teams belonging to the specified parent.

Query parameters

parent_id string required

The ID of the parent to list children for.

Returns

A list of sales team objects belonging to the parent.

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

Create a sales team

Creates a new sales team object.

Body parameters

idx integer
parent_id string required
parent_type string required
sales_person string required
contact_no string
allocated_percentage number
allocated_amount number
commission_rate string
incentives number

Returns

Returns the newly created sales team object if the call succeeded.

POST /api/crm/sales-team
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"}'
Response
{
  "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
}
PATCH /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

id string required

The identifier of the sales team to update.

Body parameters

idx integer
parent_id string
parent_type string
sales_person string
contact_no string
allocated_percentage number
allocated_amount number
commission_rate string
incentives number

Returns

Returns the updated sales team object.

PATCH /api/crm/sales-team/{id}
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}'
Response
{
  "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
}
DELETE /api/crm/sales-team/{id}

Delete a sales team

Permanently deletes a sales team. This cannot be undone.

Path parameters

id string required

The identifier of the sales team to delete.

Returns

Returns a confirmation that the sales team has been deleted.

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

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