# Get deals by user
You can return deals assigned to a specific user.
GET
/deals/?:lookup=:value
Lookup | Example | Description |
---|---|---|
user_id | ?user_id=123 | A unique identifier for the user which is given by User.com automatically. |
user_custom_id | ?user_custom_id=my-custom-id | A unique identifier for the user which is provided by a client. |
userkey | ?userkey=Ypp9DQiEZIl | A cookie of your user (value of userkey attribute). |
# Request
- CURL
- JavaScript
- PHP
- Python
curl -X GET -H
"Authorization: Token <your_64_char_api_key>" -H "Accept: */*; version=2" "https://<your_app_subdomain>.user.com/api/public/deals/?user_id=:user_id"
# Response
{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"id": 12218,
"name": "example deal",
"value": "1250.00",
"currency": "USD",
"custom_id": null,
"stage": 36585,
"pipeline": 6179,
"assigned_to": 398,
"restricted_to": null,
"agent": null,
"company_id": 768,
"user_id": 20900530,
"status": 1,
"products": [],
"scope": 2,
"created_by": 382,
"created_at": "2017-09-06T09:53:50.748535Z",
"updated_at": "2017-09-06T09:53:50.748555Z",
"tags": [{"id": 9, "name": "To call"}],
"activities_status": "planned",
"expected_close_date": null,
"loss_reason": null,
"loss_reason_description": "",
"lost_at": null,
"won_at": null,
"participants": [4],
"user_custom_id": "52bdc3be5145e87076c8",
"products_custom_id": [],
"company_custom_id": "c44adda2ecc0",
"custom_attribute_xyz": null
}
]
}