GET/ tags/ :id/ deals/
Get deals by tag
You can return all deals including a specific tag.
Attributes
Optional unless marked required
- id
- A unique identifier for the tag which is given by User automatically.
Request
- cURL
- JavaScript
- PHP
- Python
curl -X GET "https://<your_app_subdomain>.user.com/api/public/tags/:id/deals/" \
-H "Authorization: Token <your_64_char_api_key>" \
-H "Accept: */*; version=2"
const response = await fetch(
"https://<your_app_subdomain>.user.com/api/public/tags/:id/deals/",
{
method: "GET",
headers: {
Authorization: "Token <your_64_char_api_key>",
Accept: "*/*; version=2",
},
},
);
const data = await response.json();
console.log(data);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://<your_app_subdomain>.user.com/api/public/tags/:id/deals/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Token <your_64_char_api_key>",
"Accept: */*; version=2",
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import requests
response = requests.get(
"https://<your_app_subdomain>.user.com/api/public/tags/:id/deals/",
headers={
"Authorization": "Token <your_64_char_api_key>",
"Accept": "*/*; version=2",
},
)
print(response.json())
Response examples
- 200 OK
- 404 Not Found
{"count": 1,"next": null,"previous": null,"results": [{"id": 580,"name": "Website redesign","value": "0.00","currency": "EUR","custom_id": "website-redesign","stage": 27,"pipeline": 11,"assigned_to": null,"agent": null,"company": null,"person": null,"products": [],"status": 1,"scope": 2,"created_by": 1,"created_at": "2026-11-10T13:19:54.879921Z","updated_at": "2026-11-10T13:19:54.879943Z","tags": ,1 item"activities_status": "no planned","expected_close_date": null,"loss_reason": null,"loss_reason_description": "","lost_at": null,"won_at": null,"participants": [],"attributes": [],"order_products": [],"description": null}]}{
"detail": "No Tag matches the given query."
}
Response fields
Fields returned in the 200 OK response body.
- count
- Number of results across all pages. It can lag behind recent changes; see Response pagination.
- next
- URL of the next page of results. null on the last page.
- previous
- URL of the previous page of results. null on the first page.
- results
- Results on this page.
- results[].
id - A unique identifier for the tag which is given by User automatically.
- results[].
name - A tag name.
- results[].
value - A value of a deal.
- results[].
currency - A currency of a deal.
- results[].
custom_id - A unique identifier for the deal which is provided by the client.
- results[].
stage - An id of a stage of the pipeline the deal is currently at.
- results[].
pipeline - An id of a pipeline where the deal is assigned to.
- results[].
assigned_to - A unique identifier for the agent which is given by User automatically.
- results[].
agent - The agent the deal is assigned to, or null.
- results[].
company - ID of the company the deal belongs to, or
null. - results[].
person - ID of the contact the deal belongs to, or
null. - results[].
products - A list of products' ids.
- results[].
status - A status of your deal (0 - abandoned, 1 - in progress, 2 - won, 3 - lost, 4 - archived)
- results[].
scope - Deal scope: 1 (open) or 2 (participants, the default). It currently has no effect.
- results[].
created_by - ID of the agent who created the deal.
- results[].
created_at - A creation date of a deal.
- results[].
updated_at - A date of last deal update.
- results[].
tags - A list of tags.
- results[].
tags[]. id - A unique identifier for the tag which is given by User automatically.
- results[].
tags[]. name - A tag name.
- results[].
- results[].
activities_status - A status of an activity assigned to the user.
- results[].
expected_close_date - A date when the deal is expected to be closed.
- results[].
loss_reason - A reason for a lost deal.
- results[].
loss_reason_description - Free-text note on why the deal was lost.
- results[].
lost_at - A date when the deal has been marked as lost.
- results[].
won_at - A date when the deal has been marked as won.
- results[].
participants - A list of user_ids assigned to a deal.
- results[].
attributes - Custom deal attributes that have a value, each with
name,name_std,value,descriptionandvalue_type. - results[].
order_products - A list of basic information per each ordered product which is provided by the client. Those information have to contain: product_id (integer) OR product_custom_id (string) quantity (integer) value (integer) currency (string)
- results[].
description - Deal description.
- results[].
note
Errors that can come from any endpoint (401, 429, 500, 502, 504) are described in HTTP response codes.