Deal API
API Endpoints
| Operation | Method | Endpoint |
|---|---|---|
| Create Deal | POST | https://crm.twozo.io/rest/api/v1/deal |
| Get Deal | GET | https://crm.twozo.io/rest/api/v1/deal/{id} |
| Update Deal | PUT / PATCH | https://crm.twozo.io/rest/api/v1/deal/{id} |
| Delete Deal | DELETE | https://crm.twozo.io/rest/api/v1/deal/{id} |
| List Deals | GET | https://crm.twozo.io/rest/api/v1/deal/view/list?filter=title:like(w)&sort=title:asc |
| Dropdown Values | GET | https://crm.twozo.io/rest/api/v1/field/dropdown?name={INTERNAL_NAME} |
| Field List | GET | https://crm.twozo.io/rest/api/v1/field/list?source=deal |
List API
GET
GET https://crm.twozo.io/rest/api/v1/deal/view/list?filter={internalname}:like(w)&sort={internalname}:asc
Example
GET https://crm.twozo.io/rest/api/v1/deal/view/list?filter=title:like(w)&sort=title:asc
Pagination Parameters
| Parameter | Description | Example |
|---|---|---|
page | Page number | page=1 |
pageSize | Number of records per page | pageSize=25 |
Filter Parameters
Format
filter=<field>:<operator>(<value>)
Supported Filter Operators
| Operator | Meaning | Example Request | Equivalent Condition |
|---|---|---|---|
eq | Equals | filter=status:eq(active) | status = 'active' |
neq | Not Equals | filter=status:neq(archived) | status != 'archived' |
in | In List | filter=status:in(active,pending) | status IN ('active','pending') |
nin | Not In List | filter=status:nin(deleted,archived) | status NOT IN ('deleted','archived') |
lt | Less Than | filter=amount:lt(500) | amount < 500 |
lte | Less Than or Equal | filter=amount:lte(1000) | amount <= 1000 |
gt | Greater Than | filter=amount:gt(100) | amount > 100 |
gte | Greater Than or Equal | filter=amount:gte(250) | amount >= 250 |
between | Range | filter=createdAt:between(1771936945416,1771936947532) | createdAt BETWEEN value1 AND value2 |
like | Contains Text | filter=name:like(john) | name LIKE '%john%' |
Filter Examples
&filter=status:eq(active)
&filter=status:neq(archived)
&filter=status:in(active,pending)
&filter=status:nin(deleted,archived)
&filter=amount:lt(500)
&filter=amount:lte(1000)
&filter=amount:gt(100)
&filter=amount:gte(250)
&filter=createdAt:between(1771936945416,1771936947532)
&filter=name:like(john)
&filter=deletedAt:isnull(true)
&filter=deletedAt:notnull(true)
&filter=metadata.notes:exists(true)
Sort Parameters
Format
sort=<field>:<direction>
Multiple sort fields can be separated by commas.
Supported Sort Directions
| Direction | Meaning |
|---|---|
asc | Ascending Order |
desc | Descending Order |
Sort Examples
| Request | Description |
|---|---|
sort=createdAt:desc | Sort by created date in descending order |
sort=name:asc | Sort by name in ascending order |
sort=createdAt:desc,name:asc | Sort by created date descending, then by name ascending |
Example
&sort=createdAt:desc,name:asc
FieldList
GET: https://crm.twozo.io/rest/api/v1/field/list?source=deal
FieldList Response
{
"code": 0,
"data": {
"source": {
"is_enabled": true,
"name": "Deal",
"id": 103
},
"fields": [
[
{
"internal_name": "title",
"is_active": true,
"source_id": 103,
"id": 181,
"type": "SINGLE_STRING",
"config": {
"min_length": 1,
"max_length": 255
},
"field_name": "Title"
}
],
[
{
"internal_name": "pipeline",
"is_active": true,
"source_id": 103,
"id": 182,
"type": "DROPDOWN",
"config": {},
"field_name": "Pipeline"
},
{
"internal_name": "pipeline_stage",
"is_active": true,
"source_id": 103,
"id": 183,
"type": "DROPDOWN",
"config": {},
"field_name": "Stage"
},
{
"internal_name": "won_reason",
"is_active": true,
"options": [
{
"name": "Product feature",
"id": 9218960
},
{
"name": "Price",
"id": 9218961
},
{
"name": "Timing",
"id": 9218962
},
{
"name": "Others",
"id": 9218963
}
],
"source_id": 103,
"id": 184,
"type": "DROPDOWN",
"config": {},
"field_name": "Won Reason"
},
{
"internal_name": "lost_reason",
"is_active": true,
"options": [
{
"name": "Opted our rival",
"id": 9218948
},
{
"name": "Price is too high",
"id": 9218949
},
{
"name": "Junk Lead",
"id": 9218950
},
{
"name": "Not interested",
"id": 9218951
},
{
"name": "No Requirement",
"id": 9218952
},
{
"name": "Need only in future",
"id": 9218953
},
{
"name": "Product not satisfying",
"id": 9218954
},
{
"name": "No proper follow-up",
"id": 9218955
},
{
"name": "Appointment Missed",
"id": 9218956
}
],
"source_id": 103,
"id": 185,
"type": "DROPDOWN",
"config": {},
"field_name": "Lost Reason"
},
{
"internal_name": "deal_closed_on",
"is_active": true,
"source_id": 103,
"id": 186,
"type": "DATE",
"config": {},
"field_name": "Deal Closed On"
}
],
[
{
"internal_name": "primary_contact",
"is_active": true,
"related_field": {
"id": 101,
"source": "Contact"
},
"source_id": 103,
"id": 187,
"type": "CONTACT_ONBOARD",
"config": {},
"field_name": "Primary Contact"
}
],
[
{
"internal_name": "related_contacts",
"is_active": true,
"related_field": {
"id": 101,
"source": "Contact"
},
"source_id": 103,
"id": 188,
"type": "CONTACTS_ONBOARD",
"config": {},
"field_name": "Related Contacts"
}
],
[
{
"internal_name": "company",
"is_active": true,
"related_field": {
"id": 144,
"source": "Company"
},
"source_id": 103,
"id": 189,
"type": "COMPANY_ONBOARD",
"config": {},
"field_name": "Company"
}
],
[
{
"internal_name": "deal_value",
"is_active": true,
"sub_fields": [
{
"name": "CURRENCY",
"input_type": "DROPDOWN",
"id": 26,
"type": "DEAL_VALUE",
"display_name": "Currency",
"config": {
"dropdown": "currencyList"
}
},
{
"name": "VALUE",
"input_type": "SINGLE_NUMBER",
"id": 27,
"type": "DEAL_VALUE",
"display_name": "Price",
"config": {
"isWholeNumber": false
}
},
{
"name": "PRODUCT",
"input_type": "PRODUCT",
"id": 28,
"type": "DEAL_VALUE",
"display_name": "Products"
}
],
"related_field": {
"id": 228,
"source": "Product"
},
"source_id": 103,
"id": 190,
"type": "DEAL_VALUE",
"config": {
"min": 0,
"max": 9999999999999
},
"field_name": "Deal Value"
}
],
[
{
"internal_name": "sales_owner",
"is_active": true,
"source_id": 103,
"id": 191,
"type": "OWNER",
"config": {},
"field_name": "Sales Owner"
}
],
[
{
"internal_name": "product_quantity",
"is_active": true,
"source_id": 103,
"id": 192,
"type": "PRODUCT",
"config": {},
"field_name": "Product Quantity"
}
],
[
{
"internal_name": "expected_close_date",
"is_active": true,
"source_id": 103,
"id": 193,
"type": "DATE",
"config": {},
"field_name": "Expected Close Date"
}
],
[
{
"internal_name": "source",
"is_active": true,
"options": [
{
"name": "Web",
"id": 9218964
},
{
"name": "Organic Search",
"id": 9218965
},
{
"name": "Email",
"id": 9218966
},
{
"name": "Phone",
"id": 9218967
},
{
"name": "Chat",
"id": 9218968
},
{
"name": "Web Form",
"id": 9218969
},
{
"name": "Referral",
"id": 9218970
},
{
"name": "Direct",
"id": 9218971
},
{
"name": "Paid Search",
"id": 9218972
},
{
"name": "Blogs",
"id": 9218973
},
{
"name": "Social Media",
"id": 9218974
},
{
"name": "Display Ads",
"id": 9218975
},
{
"name": "Events",
"id": 9218976
},
{
"name": "Webinar",
"id": 9218977
}
],
"source_id": 103,
"id": 194,
"type": "DROPDOWN",
"config": {},
"field_name": "Source"
}
],
[
{
"internal_name": "tags",
"is_active": true,
"source_id": 103,
"id": 195,
"type": "TAGS",
"config": {
"max_limit": 10,
"max_length": 255
},
"field_name": "Tags"
}
],
[
{
"internal_name": "territory",
"is_active": true,
"source_id": 103,
"id": 196,
"type": "TERRITORY",
"config": {},
"field_name": "Territory"
}
],
[
{
"internal_name": "id",
"is_active": true,
"source_id": 103,
"id": 197,
"type": "SINGLE_NUMBER",
"config": {},
"field_name": "ID"
}
],
[
{
"internal_name": "rotting_days",
"is_active": true,
"source_id": 103,
"id": 198,
"type": "SINGLE_NUMBER",
"config": {},
"field_name": "Rotting Days"
}
],
[
{
"internal_name": "age",
"is_active": true,
"source_id": 103,
"id": 199,
"type": "SINGLE_NUMBER",
"config": {},
"field_name": "Age"
}
],
[
{
"internal_name": "won_time",
"is_active": true,
"source_id": 103,
"id": 200,
"type": "DATE_TIME",
"config": {},
"field_name": "Won Time"
}
],
[
{
"internal_name": "lost_time",
"is_active": true,
"source_id": 103,
"id": 201,
"type": "DATE_TIME",
"config": {},
"field_name": "Lost Time"
}
],
[
{
"internal_name": "stage_probability",
"is_active": true,
"source_id": 103,
"id": 202,
"type": "SINGLE_NUMBER",
"config": {},
"field_name": "Stage Probability"
}
],
[
{
"internal_name": "weighted_value",
"is_active": true,
"sub_fields": [
{
"name": "CURRENCY",
"input_type": "DROPDOWN",
"id": 6,
"type": "MONETARY",
"display_name": "Currency",
"config": {
"dropdown": "currencyList"
}
},
{
"name": "VALUE",
"input_type": "SINGLE_NUMBER",
"id": 7,
"type": "MONETARY",
"display_name": "Price",
"config": {
"isWholeNumber": false,
"default": 0.0
}
}
],
"source_id": 103,
"id": 203,
"type": "MONETARY",
"config": {},
"field_name": "Weighted value"
}
],
[
{
"internal_name": "expected_deal_value",
"is_active": true,
"sub_fields": [
{
"name": "CURRENCY",
"input_type": "DROPDOWN",
"id": 6,
"type": "MONETARY",
"display_name": "Currency",
"config": {
"dropdown": "currencyList"
}
},
{
"name": "VALUE",
"input_type": "SINGLE_NUMBER",
"id": 7,
"type": "MONETARY",
"display_name": "Price",
"config": {
"isWholeNumber": false,
"default": 0.0
}
}
],
"source_id": 103,
"id": 204,
"type": "MONETARY",
"config": {},
"field_name": "Expected Deal Value"
}
],
[
{
"internal_name": "product_amount",
"is_active": true,
"sub_fields": [
{
"name": "CURRENCY",
"input_type": "DROPDOWN",
"id": 6,
"type": "MONETARY",
"display_name": "Currency",
"config": {
"dropdown": "currencyList"
}
},
{
"name": "VALUE",
"input_type": "SINGLE_NUMBER",
"id": 7,
"type": "MONETARY",
"display_name": "Price",
"config": {
"isWholeNumber": false,
"default": 0.0
}
}
],
"source_id": 103,
"id": 227,
"type": "MONETARY",
"config": {},
"field_name": "Product Amount"
}
],
[
{
"internal_name": "description",
"is_active": true,
"source_id": 103,
"id": 205,
"type": "SINGLE_STRING",
"config": {
"min_length": 1,
"max_length": 255
},
"field_name": "Description"
}
],
[
{
"internal_name": "type",
"is_active": true,
"options": [
{
"name": "New Business",
"id": 9218957
},
{
"name": "Existing Business - Renewal",
"id": 9218958
},
{
"name": "Existing Business - Upgrade",
"id": 9218959
}
],
"source_id": 103,
"id": 206,
"type": "DROPDOWN",
"config": {},
"field_name": "Type"
}
],
[
{
"internal_name": "payment_status",
"is_active": true,
"options": [
{
"name": "Online",
"id": 9218978
},
{
"name": "Offline",
"id": 9218979
}
],
"source_id": 103,
"id": 207,
"type": "DROPDOWN",
"config": {},
"field_name": "Payment Status"
}
],
[
{
"internal_name": "status",
"is_active": true,
"source_id": 103,
"id": 208,
"type": "DROPDOWN",
"config": {
"max_length": 255
},
"field_name": "Status"
}
],
[
{
"internal_name": "deal_stage_updated_at",
"is_active": true,
"source_id": 103,
"id": 209,
"type": "DATE_TIME",
"config": {},
"field_name": "Deal Stage Updated At"
}
],
[
{
"internal_name": "web_forms",
"is_active": true,
"source_id": 103,
"id": 210,
"type": "SINGLE_STRING",
"config": {
"max_length": 255
},
"field_name": "Web Form"
}
],
[
{
"internal_name": "created_by",
"is_active": true,
"source_id": 103,
"id": 211,
"type": "OWNER",
"config": {},
"field_name": "Created By"
}
],
[
{
"internal_name": "created_at",
"is_active": true,
"source_id": 103,
"id": 212,
"type": "DATE_TIME",
"config": {},
"field_name": "Created At"
}
],
[
{
"internal_name": "updated_by",
"is_active": true,
"source_id": 103,
"id": 213,
"type": "OWNER",
"config": {},
"field_name": "Updated By"
}
],
[
{
"internal_name": "updated_at",
"is_active": true,
"source_id": 103,
"id": 214,
"type": "DATE_TIME",
"config": {},
"field_name": "Updated At"
}
],
[
{
"internal_name": "recent_note",
"is_active": true,
"source_id": 103,
"id": 225,
"type": "TEXT",
"config": {},
"field_name": "Recent Note"
}
],
[
{
"internal_name": "last_assigned_at",
"is_active": true,
"source_id": 103,
"id": 226,
"type": "DATE_TIME",
"config": {},
"field_name": "Last Assigned At"
}
],
[
{
"internal_name": "last_activity_date",
"is_active": true,
"source_id": 103,
"id": 215,
"type": "DATE",
"config": {},
"field_name": "Last Activity Date"
}
],
[
{
"internal_name": "next_activity_date",
"is_active": true,
"source_id": 103,
"id": 216,
"type": "DATE",
"config": {},
"field_name": "Next Activity Date"
}
],
[
{
"internal_name": "last_activity_type",
"is_active": true,
"source_id": 103,
"id": 217,
"type": "SINGLE_STRING",
"config": {},
"field_name": "Last Activity Type"
}
],
[
{
"internal_name": "done_activities",
"is_active": true,
"source_id": 103,
"id": 218,
"type": "SINGLE_NUMBER",
"config": {},
"field_name": "Done Activities"
}
],
[
{
"internal_name": "upcoming_activities",
"is_active": true,
"source_id": 103,
"id": 219,
"type": "SINGLE_NUMBER",
"config": {},
"field_name": "Upcoming Activities"
}
],
[
{
"internal_name": "total_activities",
"is_active": true,
"source_id": 103,
"id": 220,
"type": "SINGLE_NUMBER",
"config": {},
"field_name": "Total Activities"
}
],
[
{
"internal_name": "deal_value_in_base_currency",
"is_active": true,
"sub_fields": [
{
"name": "CURRENCY",
"input_type": "DROPDOWN",
"id": 6,
"type": "MONETARY",
"display_name": "Currency",
"config": {
"dropdown": "currencyList"
}
},
{
"name": "VALUE",
"input_type": "SINGLE_NUMBER",
"id": 7,
"type": "MONETARY",
"display_name": "Price",
"config": {
"isWholeNumber": false,
"default": 0.0
}
}
],
"source_id": 103,
"id": 224,
"type": "MONETARY",
"config": {},
"field_name": "Deal Value In Base Currency"
}
],
[
{
"internal_name": "last_email_received",
"is_active": true,
"source_id": 103,
"id": 221,
"type": "DATE_TIME",
"config": {},
"field_name": "Last Email Received"
}
],
[
{
"internal_name": "email_message_count",
"is_active": true,
"source_id": 103,
"id": 222,
"type": "SINGLE_NUMBER",
"config": {},
"field_name": "Email Messages Count"
}
],
[
{
"internal_name": "last_email_sent",
"is_active": true,
"source_id": 103,
"id": 223,
"type": "DATE_TIME",
"config": {},
"field_name": "Last Email Sent"
}
],
[
{
"internal_name": "forecast_category",
"is_active": true,
"source_id": 103,
"id": 93001,
"type": "DROPDOWN",
"config": {},
"field_name": "Forecast Category"
}
],
[
{
"internal_name": "cf_custom_date_field",
"is_active": true,
"source_id": 103,
"id": 119769,
"type": "DATE",
"config": {},
"field_name": "custom date field"
}
]
]
}
}
Deal Fields
| Field | Type | Required | Description |
|---|---|---|---|
title | string | Required | Name/title of the deal. Example: "demo purpose10" |
pipeline | number | Required | ID of the pipeline the deal belongs to. Example: 70401 → General |
pipeline_stage | number | Required | ID of the current stage within the pipeline. Example: 109753 → New |
primary_contact | number / object | Required | Existing Contact: Provide the Contact ID to associate an existing contact with the deal. Example: 1174909New Contact: If the contact does not already exist, provide the Create Contact API request payload. The system will create the contact and automatically associate it with the deal. |
related_contacts | number / object | Optional | Existing Contact: Provide the Contact ID. Example: 1174909New Contact: Provide the Create Contact API request payload. The system will create the contact and associate it with the deal. |
sales_owner | number | Required | ID of the user assigned as the deal owner. Example: 71201 |
company | number / object | Optional | Existing Company: Provide the Company ID. Example: 120783New Company: Provide the Create Company API request payload. The system will create the company and associate it with the deal. |
deal_value | object | Optional | Monetary value of the deal. |
weighted_value | object | Read-only | Deal value weighted by the pipeline stage probability. |
expected_deal_value | object | Optional | Forecasted value of the deal. |
product_amount | object | Read-only | Total value contributed by attached products. |
source | number or string | Optional | ID or name representing the deal source. Example: 10321825, Web |
territory | number | Optional | ID of the sales territory. Example: 63064 |
tags | array<number> | Optional | List of tag IDs assigned to the deal. Example: [65316] |
description | string | Optional | Free-text notes about the deal. Example: "demo purpose" |
type | number or string | Optional | ID or name representing the deal type. Example: 10322557, New Business |
payment_status | number or string | Optional | ID or name representing the payment status. Example: 10322558, Online |
Nested Object — deal_value / weighted_value / expected_deal_value / product_amount
All four monetary fields share the same shape on write.
| Field | Type | Required | Description |
|---|---|---|---|
currency | number / code / name | Required | ID, code, or name of the currency. Example: 3, US, United States.See Dropdown Option List - Overview. |
Mandatory Fields
The following fields are required when creating a deal:
- Deal Title
- Primary Contact
- Pipeline
- Stage
- Sales Owner
Dependent Fields
Pipeline Stage → Won/Lost Reason and Closed On
-
When the Deal Stage is set to Won, the corresponding Won Reason and Closed On fields must be provided.
-
When the Deal Stage is set to Lost, the corresponding Lost Reason and Closed On fields must be provided.
-
The deal cannot be saved or updated until the required reason and Closed On value are provided.
Forecast Category → Expected Close Date
- When a Forecast Category is selected, the Expected Close Date must be provided. Any system or custom field marked as Required in Modules & Fields must be included in the request. Any field configured with a Default Value under Modules & Fields will be automatically populated if it is not included in the request.
Additional Notes
Dropdown field types - All the deal dropdown field options should be fetched from the API call as it is dynamic dropdown.
Custom Field Data Structure
{
"cf_custom_text_field": "custom text",
"cf_custom_large_txt_field": "sdkfj",
"cf_custom_number_field": 10,
"cf_custom_dropdown_field": 10413746,
"cf_custom_multiselect_field": [
10413746,
10413747
],
"cf_custom_owner_field": 71591,
"cf_custom_company_field": 121728,
"cf_custom_contact_field": 1186422,
"cf_custom_monetory_field": {
"currency": 1,
"value": 1.2345678901234568E12
},
"cf_custom_phone_field": [
{
"phone_type": 1,
"phone_number": "10101010101010101"
}
],
"cf_custom_email_field": [
{
"email_type": 2,
"email_value": "sss@hvu.in"
}
],
"cf_custom_time_field": "2025-05-15T10:15:30",
"cf_custom_date_field": "2026-07-01T12:55:00",
"cf_custom_date_range_field": {
"range": {
"from": "2026-07-01T12:55:00+05:30",
"to": "2026-07-02T12:50:00+05:30"
}
},
"cf_custom_date_time_range_field": {
"range": {
"from": "2026-07-01T12:55:00Z",
"to": "2026-07-02T12:50:00Z"
}
}
}