Get ticket information through api not working

tickets

#1

Hi team, I need to retrieve the information that is in the tickets, I saw this

You can use two calls to curl

https://api.hubapi.com/crm-objects/v1/objects/tickets/paged?hapikey=demo

and

https://api.hubapi.com/crm-objects/v1/objects/tickets/paged?hapikey=demo&properties=subject&properties=content&properties=hs_pipeline&properties=hs_pipeline_stage

but...they are retrieving the exact same response...when you want to get certain properties you add it to the url &properties=subject&properties=content....etc but it is not working for me...
best regards.


#3

Hi @codeling what is the HubID of the account you're looking to query for tickets? Happy to take a look for you. FWIW, I just made two requests to my own Account for tickets - one with no ticket properties appended to the URL, and one with the subject property appended and received two unique responses.

  1. No properties filled out
    http://prntscr.com/lonv9k

  2. subject property filled out (https://api.hubapi.com/crm-objects/v1/objects/tickets/paged?hapikey=my_hapikey_here&properties=subject)


#4

Thanks for response, if it is working for you then that means it is something from the account? Where can I find the hubid? I might not be able to give it to you because it's from my company, in any case did you try to use the demo one to see if there is any differences?

https://api.hubapi.com/crm-objects/v1/objects/tickets/paged?hapikey=demo&properties=subject

best regards


#5

Hi @codeling , you'd find the HubID in the URL: http://prntscr.com/looamn

It's not sensitive info, so you're safe to post it here


#6

I just realized...if I paste the demo link in the browser I do get the properties!

https://api.hubapi.com/crm-objects/v1/objects/tickets/paged?hapikey=demo&properties=subject

but if I do it through curl i do not get !

this is really strange!
best regards


#7

Hi @codeling, making the requests you sent above in NodeJS and in Postman both yielded separate responses for me. It may be something to do with your setup with curl, but looks like the endpoint is working. I'd try making a get request to your own portal with your api key to test. If you don't have access to tickets in your portal, you can create a test portal here: https://developers.hubspot.com/docs/faq/how-do-i-create-a-test-account