# Retrieving user created fields from a ticket

**URL:** <https://community.hubspot.com/t/retrieving-user-created-fields-from-a-ticket/79573>\
**Category:** APIs & Integrations\
**Tags:** developer-tools\
**Created:** [April 18, 2023, 7:23pm UTC](https://community.hubspot.com/t/retrieving-user-created-fields-from-a-ticket/79573 "2023-04-18T19:23:46Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![SMCNULTY](https://avatars.discourse-cdn.com/v4/letter/s/85f322/32.png) [@SMCNULTY](https://community.hubspot.com/u/SMCNULTY)\
**Post date:** [April 18, 2023, 7:23pm UTC](https://community.hubspot.com/t/retrieving-user-created-fields-from-a-ticket/79573/1 "2023-04-18T19:23:46Z")

</div>

All,

Can someone please shed some light on how to retrieve all fields of a ticket? I’m using POSTMAN and I’ve made a GET call to the address below:

[https://api.hubspot.com/crm/v3/objects/tickets/1569140281](https://api.hubspot.com/crm/v3/objects/tickets/1569140281)

(where 1569140281 is a existing ticket)

This returns the snippet below. The return is just a handful of fields, I assume all HS default fields. (create date / pipeline etc.) I would like to return the value of user created fields (by us). Example we have a field “Quote Number” (quote\_number)

Two things:

1. How can I retrieve that field value if I know the ticket number?

2. How can I retrieve the ticket number if I know only the quote number?

 ![SMCNULTY_0-1681845637363.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/5/c/5ca07e852f5453b802bc8555249157ff5d87d932.png)

---

<div class="post-metadata">

**Author:** ![Kevin-C](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/kevin-c/32/34570_2.png) [@Kevin-C](https://community.hubspot.com/u/Kevin-C)\
**Post date:** [April 18, 2023, 7:28pm UTC](https://community.hubspot.com/t/retrieving-user-created-fields-from-a-ticket/79573/2 "2023-04-18T19:28:38Z")

</div>

Hey @SMCNULTY

You’ll want to pass the desired ticket properties to the GET endpoint as a query parameter:

```lia-code-sample
GET
/crm/v3/objects/tickets/{ticketId}?properties=custom_property1,custom_property2,etc

```

Hope this gets you moving!

---

<div class="post-metadata">

**Author:** ![SMCNULTY](https://avatars.discourse-cdn.com/v4/letter/s/85f322/32.png) [@SMCNULTY](https://community.hubspot.com/u/SMCNULTY)\
**Post date:** [April 18, 2023, 7:41pm UTC](https://community.hubspot.com/t/retrieving-user-created-fields-from-a-ticket/79573/3 "2023-04-18T19:41:43Z")

</div>

Excellent thank you! I was able to pull the quote\_number field from a associated ticket. Now, possibly the more challenging request, how to I retrieve an associated ticket # if I just know the quote number?

I ask because we are working with new call center software. Their development team says they can _ **help** _ retrieve HS tickets based on user-input from the phone keypad.

Example customer enters their ticket number (easy) or they enter their “quote number” or “PO number” (both user created fields in HS) and the associated ticket should pop up in their phone system GUI.

I should note they are requiring that I test all the API calls in POSTMAN to make sure they work before passing to their development team. No they’re not paying me to do their work…

---

<div class="post-metadata">

**Author:** ![Kevin-C](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/kevin-c/32/34570_2.png) [@Kevin-C](https://community.hubspot.com/u/Kevin-C)\
**Post date:** [April 18, 2023, 7:57pm UTC](https://community.hubspot.com/t/retrieving-user-created-fields-from-a-ticket/79573/4 "2023-04-18T19:57:42Z")

</div>

Yikes! Best we can do is enable them to do their work best! As far as my suggestions you can test either easily in Postman!

And pardon I missed your second question! To get a ticket via a custom property on a ticket you could use the [search API to search](https://developers.hubspot.com/docs/api/crm/search) tickets with a matching property.

```lia-code-sample
POST
/crm/v3/objects/tickets/search

```

[And more documentation here.](https://developers.hubspot.com/docs/api/crm/tickets)

Hope this gets you moving!

---

<div class="post-metadata">

**Author:** ![SMCNULTY](https://avatars.discourse-cdn.com/v4/letter/s/85f322/32.png) [@SMCNULTY](https://community.hubspot.com/u/SMCNULTY)\
**Post date:** [April 19, 2023, 12:11pm UTC](https://community.hubspot.com/t/retrieving-user-created-fields-from-a-ticket/79573/5 "2023-04-19T12:11:51Z")

</div>

Well I replied to this last night but it doesn’t seem to have stuck. Anyway, I’m 98% of the way there. I was able to get the search function to work by putting the search criteria in the body of the post call in Postman. Is there anyway to put all these details in the API URL?

In this example, I found a real value for our “PO NUMBER” (P\_O\_) which was 3702382 and Postman returned the correct ticket details. Can the property name and value be in the actual URL? (I copied this off the web, I don’t even know what the “operator” field is)

 ![SMCNULTY_0-1681906261145.png](https://d2qpr2jzcazej7.cloudfront.net/original/1X/249d447750898a4df43bcdf2c7c56833b75e3567.png)

---

<div class="post-metadata">

**Author:** ![Kevin-C](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/kevin-c/32/34570_2.png) [@Kevin-C](https://community.hubspot.com/u/Kevin-C)\
**Post date:** [April 19, 2023, 12:52pm UTC](https://community.hubspot.com/t/retrieving-user-created-fields-from-a-ticket/79573/6 "2023-04-19T12:52:22Z")

</div>

Hey @SMCNULTY

1. I don’t believe that you can reduce the POST request to a single URL, but I could be wrong!
2. The operator property is a special symbol or token used to perform operations on operands (values and variables stored as properties on the ticket). With the search api it tells the API how to compare the object being search with the properties being provided in the body.
  1. “value” is whats we are attemptng to match.

In your example:

 ![KevinC_0-1681908611233.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/0/0/00212423d2913c14642870a64a2ba8b67f691749.png)

- we are comparing if the ticket object’s property “p\_o\_” id is “EQUAL” to “370232”.

See the HS operators [here](https://developers.hubspot.com/docs/cms/hubl/operators-and-expression-tests).

---

<div class="post-metadata">

**Author:** ![SMCNULTY](https://avatars.discourse-cdn.com/v4/letter/s/85f322/32.png) [@SMCNULTY](https://community.hubspot.com/u/SMCNULTY)\
**Post date:** [April 19, 2023, 5:37pm UTC](https://community.hubspot.com/t/retrieving-user-created-fields-from-a-ticket/79573/7 "2023-04-19T17:37:23Z")

</div>

excellent thank you. For now I will send what I did with the body over to this company. If anyone else knows if this can be appended to the API URL please let me know.

I appreciate your help with this!

---

<div class="post-metadata">

**Author:** ![SMCNULTY](https://avatars.discourse-cdn.com/v4/letter/s/85f322/32.png) [@SMCNULTY](https://community.hubspot.com/u/SMCNULTY)\
**Post date:** [April 18, 2023, 9:15pm UTC](https://community.hubspot.com/t/retrieving-user-created-fields-from-a-ticket/79573/8 "2023-04-18T21:15:34Z")

</div>

OK great, I’m 99% of the way there. Below is what I did in postman. I passed the quote number in the body of the POSTMAN request and in the return results was a select group of info, the ticket ID being the most important.

Two things:

1. Is it possible to append what I put in the body to the end of the API URL instead?

2. I copied this bit of code from the web, what is “Operator”: “EQ” in the BODY?

 ![SMCNULTY_0-1681852431198.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/e/6/e69e9f5af64aa86843a19005c9365a0bf8bd40ee.png)
