Dear Hubspot, when I use the api to get the information in the contacts, the first time I query the data, the number of data is correct, but when new data enters after a period of time, I will use vidOffset to query the data again , The number of data items will be wrong. Excuse me, is there a way to sort by fields when I search?
I read the relevant chapters, that is not what I want, I can find the normal data, but when I use vidOffset to check the newly added data for the second time, there will be less data, and the data will be found. The number of items is inconsistent with the number of items in Hubspot contacts. https://api.hubapi.com/contacts/v1/lists/all/contacts/all?hapikey=demo&count=250
Hello @LWang. If I am understanding you correctly, you are making a call for your contacts, which is giving you X number of contacts, then you are making an additional call which is giving you Y (which is less than the first call).
Hubspot will only allow 100 contacts per call. You have to use pagination to get additional contacts past the first 100, which I think is what you're doing. Let's say you have 125 contacts. Your first call will give you the first 100 contacts, and then you use the has_more function to get the additional 25.
In using a function like vidOffset, you're going to get different numbers of contacts depending on what number you set vidOffset to.
I know this, The current situation is like this, for example: I had 125 pieces of data in my contacts yesterday. I exported 125 pieces of data according to the API. This is normal. Then I stopped the api export. Today I continue to use the last vid-offset returned to me yesterday and use vidOffset to query. It will appear that the number of data items is incorrect. Have you ever encountered such a situation? Because I have a large amount of data, there is no way to eliminate it.
Is there a reason why you're using vidOffset instead of hasMore to get additional contacts? How many contacts overall are you expecting to retrieve? I have upwards of 1000 and was able to retrieve them all in one call in just a few minutes.
I have millions of data. I check it together based on hasMore and vidOffset. When hasMore is true, I bring in the vidOffset returned each time and check it together. If the query is concentrated in a time period, it is correct, but when the interval If you check again in one or two days, it will lack data. I don’t know why.