Open App

Deals

Manage CRM pipeline deals.


List deals

GET /v1/deals

Query parameters

Parameter Type Description
pageSize integer Results per page (default 10, max 100)
pageIndex integer Zero-based page index (default 0)
search string Search by deal name or description
pipeline_id integer Filter by pipeline
deal_current_stage integer Filter by pipeline stage ID
cstid integer Filter by contact (company)
deal_owner_id integer Filter by owner user ID
sortBy string Field to sort by
sortOrder string asc | desc

Example response

{
  "success": true,
  "data": {
    "data": [
      {
        "deal_id": 7,
        "deal_name": "Acme Corp — Enterprise License",
        "deal_amount": 15000.00,
        "deal_source": "Referral",
        "deal_expected_close_date": "2026-09-30",
        "pipeline_id": 1,
        "cstid": 10,
        "owner": "John Smith"
      }
    ],
    "current_page": 1,
    "total_records": 32,
    "total_pages": 4
  }
}

Get a deal

GET /v1/deals/{id}
Parameter Description
id The deal_id

Create a deal

POST /v1/deals
Content-Type: application/json

Request body

Field Type Required Description
deal_name string yes Deal name (max 255 chars)
pipeline_id integer yes CRM pipeline ID
cstid integer yes Company contact cstid
deal_amount number no Deal value
deal_amount_currency integer no org_currency_id
deal_owner_id integer no Assigned owner user ID
deal_contact_id integer no Individual contact within the company
deal_expected_close_date date no Expected close date (YYYY-MM-DD)
deal_source string no e.g. "Referral", "Cold call"
deal_description string no Deal description
deal_assignedto integer no Assigned user ID
tag_ids integer[] no Array of tag IDs

Example request

{
  "deal_name": "Acme Corp — Enterprise License",
  "pipeline_id": 1,
  "cstid": 10,
  "deal_amount": 15000.00,
  "deal_source": "Referral",
  "deal_expected_close_date": "2026-09-30"
}

Example response

{
  "success": true,
  "message": "Deal created successfully!",
  "data": {
    "deal_id": 7,
    "deal_name": "Acme Corp — Enterprise License"
  }
}

Update a deal

PUT /v1/deals/{id}
Content-Type: application/json

Required fields

deal_name, pipeline_id, and cstid are required even on updates. All other fields are optional.

Example response

{
  "success": true,
  "message": "Deal updated successfully!"
}

Delete a deal

DELETE /v1/deals/{id}
Parameter Description
id The deal_id

Example response

{
  "success": true,
  "message": "Deal deleted successfully"
}