# Query in CRM ticket api

**URL:** <https://community.hubspot.com/t/query-in-crm-ticket-api/87736>\
**Category:** APIs & Integrations\
**Tags:** crm\
**Created:** [August 17, 2023, 3:20pm UTC](https://community.hubspot.com/t/query-in-crm-ticket-api/87736 "2023-08-17T15:20:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ayush\_47](https://avatars.discourse-cdn.com/v4/letter/a/f475e1/32.png) [@Ayush\_47](https://community.hubspot.com/u/Ayush_47)\
**Post date:** [August 17, 2023, 3:20pm UTC](https://community.hubspot.com/t/query-in-crm-ticket-api/87736/1 "2023-08-17T15:20:24Z")

</div>

I’ve recently used the following API endpoint: [https://api.hubapi.com/crm/v3/objects/tickets/:ticketId?limit=10&archived=false](https://api.hubapi.com/crm/v3/objects/tickets/:ticketId?limit=10&archived=false)

From the response, I am able to retrieve fields like ticket\_pipeline, priority, and category. However, I’m keen on extracting other details related to the same ticket ID. Specifically, I’m looking for:

- Campaign duration
- Deliverable target
- Invoice amount
- Media buy type
- RO amount
- Ticket owner
- Ticket status
- Unit price

Could anyone guide me on how to adjust the API call or provide guidance on fetching these additional fields? I appreciate any help or insights you can offer.

Thank you in advance!

---

<div class="post-metadata">

**Author:** ![coldrickjack](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/coldrickjack/32/6684_2.png) [@coldrickjack](https://community.hubspot.com/u/coldrickjack)\
**Post date:** [August 17, 2023, 8:51pm UTC](https://community.hubspot.com/t/query-in-crm-ticket-api/87736/2 "2023-08-17T20:51:50Z")

</div>

Hello [@Ayush\_47](https://community.hubspot.com/t5/user/viewprofilepage/user-id/617009),

This can be done by included the “properties” parameter in your request. It contains a comma separated list of properties to return in the response. For instance if I had a ticket with “prop1”, “prop2” and “prop3” I would make a request similar to the below:

```lia-code-sample
GET https://api.hubapi.com/crm/v3/objects/ticket/1606885847?properties=prop1%2Cprop2%2Cprop3
RESPONSE
{
 "id": "1606885847",
 "properties": {
 "createdate": "2023-08-04T09:07:14.627Z",
 "hs_lastmodifieddate": "2023-08-17T20:50:30.997Z",
 "hs_object_id": "1606885847",
 "prop1": "prop1 value",
 "prop2": "prop2 value",
 "prop3": "prop3 value"
 },
 "createdAt": "2023-08-04T09:07:14.627Z",
 "updatedAt": "2023-08-17T20:50:30.997Z",
 "archived": false
}

```

I hope this helps!

---

<div class="post-metadata">

**Author:** ![Ayush\_47](https://avatars.discourse-cdn.com/v4/letter/a/f475e1/32.png) [@Ayush\_47](https://community.hubspot.com/u/Ayush_47)\
**Post date:** [August 18, 2023, 6:47am UTC](https://community.hubspot.com/t/query-in-crm-ticket-api/87736/3 "2023-08-18T06:47:26Z")

</div>

Thannks for help!

Also is there anyway by which i can get the all tickets associated with owners or I can filter the tickets by the owners list i have

---

<div class="post-metadata">

**Author:** ![coldrickjack](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/coldrickjack/32/6684_2.png) [@coldrickjack](https://community.hubspot.com/u/coldrickjack)\
**Post date:** [August 18, 2023, 11:03am UTC](https://community.hubspot.com/t/query-in-crm-ticket-api/87736/4 "2023-08-18T11:03:46Z")

</div>

Hi [@Ayush\_47](https://community.hubspot.com/t5/user/viewprofilepage/user-id/617009),

You can either retrieve all of the tickets and filter by owner or alternatively use the [CRM Search API](https://developers.hubspot.com/docs/api/crm/search) to search for tickets where owner is equal to X, Y or Z.
