{"id":533,"date":"2025-04-09T12:24:53","date_gmt":"2025-04-09T12:24:53","guid":{"rendered":"http:\/\/gogetmuscle.com\/?p=533"},"modified":"2025-04-09T17:39:40","modified_gmt":"2025-04-09T17:39:40","slug":"check-ticket-status-associated-with-contact-id-returning-429","status":"publish","type":"post","link":"http:\/\/gogetmuscle.com\/index.php\/2025\/04\/09\/check-ticket-status-associated-with-contact-id-returning-429\/","title":{"rendered":"Check ticket status associated with contact id returning 429"},"content":{"rendered":"
Hello, I’m facing a status 429 issue when checking the status of tickets associated with a contact via the API. I need to return only the open ticket associated with a phone number, if any.<\/P>
I couldn’t find a way in the HubSpot API to return only the ID of the ticket associated with a contact id that is open on the platform. The only way I could find to do this is to query all tickets (open or closed) associated with a contact’s ID. The problem is that if the contact has many closed tickets, I need to send several requests to the hubpost api individually passing the ticket id associated with a contact to check the hs_pipeline_stage of each of these tickets to verify if the ticket is open, but if I send more than 10 requests within 1 second, I am temporarily banned by the hate limit with the following response in the request:
<\/P>
data: {
status: ‘error’,
message: ‘You have reached your ten_secondly_rolling limit.’,
errorType: ‘RATE_LIMIT’,
correlationId: ‘2507e73d-4339-4705-83ee-dc446341d6a9’,
policyName: ‘TEN_SECONDLY_ROLLING’,
groupName: ‘publicapi:private_app-api-calls-ten-secondly:3595377:44357029’ }<\/P>
Here is the flow of my nodejs api to search for an open ticket in hubspot:<\/P>
First I return all tickets associated with a contact’s id:
<\/P>
Request:
curl –location ‘https:\/\/api.hubapi.com\/crm\/v3\/objects\/contacts\/109384404784\/associations\/tickets<\/a>‘
<\/P>