# Api Deal - I cannot request data from the next offset (Undefined offset: 9527615)

**URL:** <https://community.hubspot.com/t/api-deal-i-cannot-request-data-from-the-next-offset-undefined-offset-9527615/30579>\
**Category:** APIs & Integrations\
**Tags:** object\
**Created:** [January 21, 2021, 5:09pm UTC](https://community.hubspot.com/t/api-deal-i-cannot-request-data-from-the-next-offset-undefined-offset-9527615/30579 "2021-01-21T17:09:24Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ecaldonazzo](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/ecaldonazzo/32/22074_2.png) [@ecaldonazzo](https://community.hubspot.com/u/ecaldonazzo)\
**Post date:** [January 21, 2021, 5:09pm UTC](https://community.hubspot.com/t/api-deal-i-cannot-request-data-from-the-next-offset-undefined-offset-9527615/30579/1 "2021-01-21T17:09:24Z")

</div>

I’m using the deal API to get all the deals that are in the hubspot, I did it according to the hubspot’s documentation, it works perfect, however, this week an error appeared, “Undefined offset: 9527615”, because of that I can’t order the rest, because “offset” he doesn’t find. my algorithm can take the data until it reaches that offset. why is this happening?

---

<div class="post-metadata">

**Author:** ![dennisedson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dennisedson/32/28044_2.png) [@dennisedson](https://community.hubspot.com/u/dennisedson)\
**Post date:** [January 21, 2021, 10:18pm UTC](https://community.hubspot.com/t/api-deal-i-cannot-request-data-from-the-next-offset-undefined-offset-9527615/30579/2 "2021-01-21T22:18:30Z")

</div>

Hello @ecaldonazzo

This is strange. Is it persistent?

---

<div class="post-metadata">

**Author:** ![ecaldonazzo](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/ecaldonazzo/32/22074_2.png) [@ecaldonazzo](https://community.hubspot.com/u/ecaldonazzo)\
**Post date:** [January 22, 2021, 1:00pm UTC](https://community.hubspot.com/t/api-deal-i-cannot-request-data-from-the-next-offset-undefined-offset-9527615/30579/3 "2021-01-22T13:00:13Z")

</div>

Hello @dennisedson,  
Yes, is it persistent .

---

<div class="post-metadata">

**Author:** ![dennisedson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dennisedson/32/28044_2.png) [@dennisedson](https://community.hubspot.com/u/dennisedson)\
**Post date:** [January 22, 2021, 4:16pm UTC](https://community.hubspot.com/t/api-deal-i-cannot-request-data-from-the-next-offset-undefined-offset-9527615/30579/4 "2021-01-22T16:16:05Z")

</div>

Thanks @ecaldonazzo ,

When you get this error, you should see an correlationID. What is that?

Also, do you know how far along you get until you reach that issue?

---

<div class="post-metadata">

**Author:** ![ecaldonazzo](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/ecaldonazzo/32/22074_2.png) [@ecaldonazzo](https://community.hubspot.com/u/ecaldonazzo)\
**Post date:** [January 26, 2021, 7:35pm UTC](https://community.hubspot.com/t/api-deal-i-cannot-request-data-from-the-next-offset-undefined-offset-9527615/30579/5 "2021-01-26T19:35:34Z")

</div>

I monitored the offset requisition process and if it finds it:

 ![37016iC12F43B569BBDFA4.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/1/a/1a0173b61729629e031c5f12089d865e6d0d2470.png)

when he requests offset 1058997208 he returns this error “Undefined offset: 9527615”

---

<div class="post-metadata">

**Author:** ![ecaldonazzo](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/ecaldonazzo/32/22074_2.png) [@ecaldonazzo](https://community.hubspot.com/u/ecaldonazzo)\
**Post date:** [January 27, 2021, 5:42pm UTC](https://community.hubspot.com/t/api-deal-i-cannot-request-data-from-the-next-offset-undefined-offset-9527615/30579/6 "2021-01-27T17:42:39Z")

</div>

Hello @dennisedson

I found a problem, they created a new stage in the hubspot, and the array that associates the stage id with the stage name in my code was not prepared for these new stages. in this case I made it to be dynamic and not use another array for verification.  
thanks for the help.
