# Update deal
You can update a deal.
PATCH
/deals/:id/
Attributes | Type | Required | Description |
---|---|---|---|
id | integer | yes | A unique identifier for the deal which is given by User.com automatically. |
custom_id | string | no | The unique identifier for the deal which is provided by the client. |
activities_status | string | no | A status of an activity assigned to the user. |
assigned_to | integer | no | A unique identifier for the agent which is given by User.com automatically. |
company | integer | no | A unique identifier for the company which is given by User.com automatically. |
currency | string | no | A currency of a deal. |
expected_close_date | string | no | A date when the deal is expected to be closed. |
loss_reason | integer | no | A reason for a lost deal. |
lost_at | string | no | A date when the deal has been marked as lost. |
name | string | no | A deal name. |
participants | integer | no | A list of persons assigned to a deal. |
pipeline | integer | no | An id of a pipeline where the deal is assigned to. |
products | integer(list) | no | A list of products' ids. |
stage | integer | no | An id of a stage of the pipeline the deal is currently at. |
status | integer | no | A status of your deal (0 - abandoned, 1 - in progress, 2 - won, 3 - lost, 4 - archived) |
person | integer | no | A unique identifier for the user which is given by User.com automatically. |
value | string | no | A value of a deal. |
won_at | string | no | A date when the deal has been marked as won. |
# Request
- CURL
- JavaScript
- PHP
- Python
curl -X POST -H "Authorization: Token <your_64_char_api_key> " -H "Content-Type: application/json" -d '{
"name": "Updated name",
"description": "updated description",
}' "https://<your_app_subdomain>.user.com/api/public/deals/:id/"
# Response
{
"id": 3300,
"name": "Updated deal name",
"value": "525.00",
"currency": "USD",
"custom_id": null,
"stage": 25898,
"pipeline": 4338,
"assigned_to": null,
"restricted_to": null,
"agent": 5567,
"company": null,
"person": 22266722,
"status": "1",
"scope": "2",
"created_by": 5567,
"created_at": "2017-06-27T14:51:04.331287Z",
"updated_at": "2017-07-10T12:01:58.617681Z",
"activities_status": "3",
"activities_status_updated_at": "2017-07-10T12:01:58.617406Z",
"expected_close_date": null
}