Create a Deal
POST
/deals/save-dealsCreates a new deal.
Request
Body Params multipart/form-data
title
string
required
Example:
Deal 102
deal_value
string
required
Example:
10
source_id
string
required
Example:
1
days_to_close
string
required
Aug 13, 2024, 13-08-2024, you can use any format from this.
Example:
Aug 13, 2024
pipeline_id
string
required
Example:
1
stage_id
string
required
Example:
1
default_deal_owner
string
required
Example:
1
rel_type
string
required
deal related type->lead
Example:
deal
rel_id
string
required
lead id on which deal will be created
Example:
1
tags
string
required
user_id[]
string
required
staff id on which lead will be assign
Example:
1
staff_id
string
required
staff who processed this deal
Example:
1
Responses
Success(200)
Validation(422)
Duplicate data(409)
Unauthorized(401)
HTTP Code: 200
Content Type : JSONapplication/json
Data Schema
message
string
required
data
object
required
id
string
required
title
string
required
deal_value
string
required
source_id
string
required
status
string
required
notes
null
required
pipeline_id
string
required
currency
string
required
created_at
string
required
days_to_close
string
required
user_id
string
required
project_id
null
required
invoice_id
null
required
client_id
string
required
rel_type
string
required
rel_id
string
required
stage_id
string
required
default_deal_owner
string
required
convert_to_project
null
required
lost_reason
null
required
tax
null
required
total_tax
null
required
dealorder
string
required
full_name
string
required
source_name
string
required
pipeline_name
string
required
stage_name
string
required
comments
array
required
assignees
array [object {4}]
required
customers
object
required
attachments
array
required
Example
{
"message": "Deal information saved",
"data": {
"id": "40",
"title": "Deal 101",
"deal_value": "10.00",
"source_id": "1",
"status": "open",
"notes": null,
"pipeline_id": "1",
"currency": "USD",
"created_at": "2024-08-21 18:23:15",
"days_to_close": "2024-08-13",
"user_id": "[\"1\"]",
"project_id": null,
"invoice_id": null,
"client_id": "null",
"rel_type": "deal",
"rel_id": "1",
"stage_id": "1",
"default_deal_owner": "1",
"convert_to_project": null,
"lost_reason": null,
"tax": null,
"total_tax": null,
"dealorder": "1",
"full_name": "doe john",
"source_name": "Facebook",
"pipeline_name": "Sales",
"stage_name": "Qualified To Buy",
"comments": [],
"assignees": [
{
"staffid": "1",
"firstname": "doe",
"lastname": "john",
"full_name": "doe john"
}
],
"customers": {
"id": "",
"name": "",
"link": "",
"addedfrom": 0,
"subtext": "",
"type": "deal"
},
"attachments": []
}
}
Last modified: 2 months ago