APIs & Integrations

Not applicable

Hubspot api,Only 100 tickets per request!

SOLVE

Hi team, I came across this situation were I was trying to find a newly created ticket but I could not see it in the response I was requesting, found it bit odd that I always got a array of 100 elements, so I check documentation and it only allows 100 tickets per request -> https://developers.hubspot.com/docs/methods/tickets/get-all-tickets

Blockquote Get all tickets from a portal, up to 100 per request.

I can get ticket by id ( https://developers.hubspot.com/docs/methods/tickets/get_ticket_by_id ) but...I need to get all tickets....how can I solve this?

best regards

1 Accepted solution
IsaacTakushi
Solution
HubSpot Employee
HubSpot Employee

Hubspot api,Only 100 tickets per request!

SOLVE

Hi @codeling,

Happy to clarify.

When you make that first request, it will return a hasMore boolean and an offset value. You can then append the offset value to the request URL to get the next 100 tickets in your second call, and so on until "hasMore": false.

There are a number of ways to approach this, but Connor's repo here may be a good place to start if you're not sure how to set up the looping requests.

Isaac Takushi

Associate Certification Manager

View solution in original post

0 Upvotes
1 Reply 1
IsaacTakushi
Solution
HubSpot Employee
HubSpot Employee

Hubspot api,Only 100 tickets per request!

SOLVE

Hi @codeling,

Happy to clarify.

When you make that first request, it will return a hasMore boolean and an offset value. You can then append the offset value to the request URL to get the next 100 tickets in your second call, and so on until "hasMore": false.

There are a number of ways to approach this, but Connor's repo here may be a good place to start if you're not sure how to set up the looping requests.

Isaac Takushi

Associate Certification Manager
0 Upvotes