Update the details of an existing deal by their unique slug.
Request
PUT
PUT /v1/deal/:slug
Path Parameter
- slug
stringReplace
:slugwith the deal's unique slug in the request URL.
Body
- name
string>= 1 characters (required)
- close_date
stringFormat: YYYY-MM-DD (e.g., 1990-01-01)(required)
- deal_stage_id
integer(required)
- deal_type
stringAllowed Values:
1 => "New Business",
2 => "Existing Business" - deal_amount
numberit must be a positive value
- organization_slug
string>= 1 characters
- job_slugs
string(allowed comma separated slug as string)
- candidate_slugs
string(allowed comma separated slug as string)
- contact_slugs
string(allowed comma separated slug as string)
- created_by
integer(required)
- owner_id
integer(required)
- tags
stringComma-separated values:- [Java,Leadership]
- custom fields:
Array[object]For Example:
"id": 1,
"value": "textfeild"
Response
201
Body
- id
numberExample: 28
- slug
stringExample: contact_68ba678fcd2a83f4640c
- name
stringExample: Anjali kotwani
- stage
objectExample:
"id": 1,
"label": "win",
"percentage": "100" - deal_amount
numberExample: 22
- amount_by_stage
numberExample: 2.2
- close_date
stringExample: 1990-02-02
- deal_type
stringExample: "1"
- organization
objectExample:
"id": 1 - jobs
objectExample:
"id": 1 - candidates
objectExample:
"id": 1 - contacts
objectExample:
"id": 1 - tags
stringExample: [leader,java]
- created_at
string (ISO 8601 date)Example: 2015-05-15T00:00:00Z
- updated_at
string (ISO 8601 date)Example: 2015-05-15T00:00:00Z
- created_by
objectExample:
"id": 1,
"email": "Rohan@abc.com",
"first_name": "Rohan",
"last_name": "Sharma",
"full_name": "Rohan Sharma",
"role": "Admin",
"phone": null - updated_by
objectExample:
"id": 1,
"email": "Rohan@abc.com",
"first_name": "Rohan",
"last_name": "Sharma",
"full_name": "Rohan Sharma",
"role": "Admin",
"phone": null - owner
objectExample:
"id": 1,
"email": "Rohan@abc.com",
"first_name": "Rohan",
"last_name": "Sharma",
"full_name": "Rohan Sharma",
"role": "Admin",
"phone": null - custom fields:
objectExample:
"id": 1,
"field_name": "textfeild",
"field_type": "string",
"value": "anjali"
422
Body
- Unprocessable Entity
Response Example
{
"id": 11,
"slug": "deal_b93fc43d76fff40d6647",
"name": "software engineer",
"stage": {
"id": 4
},
"deal_amount": 11,
"amount_by_stage": 2.2,
"close_date": "2024-08-07",
"deal_type": 1,
"organization": {
"id": 8
},
"jobs": [],
"candidates": [],
"contacts": [],
"tags": null,
"created_at": "2024-08-06T13:33:00.000Z",
"updated_at": "2024-08-06T13:33:33.000Z",
"created_by": {
"id": 1,
"email": "Rohan@abc.com",
"first_name": "Rohan",
"last_name": "Sharma",
"full_name": "Rohan Sharma",
"role": "Admin",
"phone": null
},
"updated_by": {
"id": 1,
"email": "Rohan@abc.com",
"first_name": "Rohan",
"last_name": "Sharma",
"full_name": "Rohan Sharma",
"role": "Admin",
"phone": null
},
"owner": {
"id": 1,
"email": "Rohan@abc.com",
"first_name": "Rohan",
"last_name": "Sharma",
"full_name": "Rohan Sharma",
"role": "Admin",
"phone": null
},
"custom_fields": [
{
"id": 2,
"field_name": "test deal",
"field_type": "phone",
"value": ""
},
{
"id": 3,
"field_name": "File",
"field_type": "file",
"value": ""
},
{
"id": 1,
"field_name": "TEst after delete",
"field_type": "text",
"value": ""
}
]
}