<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Get all companies - odd offset behaviour in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Get-all-companies-odd-offset-behaviour/m-p/295430#M27692</link>
    <description>&lt;P&gt;I'm getting all my companies using API, but I'm testing how pagination works so I limited my results to 4 and I have 6 companies in total.&amp;nbsp;&lt;/P&gt;&lt;P&gt;so I do a GET&amp;nbsp;&lt;STRONG&gt;/companies/v2/companies?limit=4&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;and then I receive 4 companies with the root info {&amp;nbsp;"has-more": true,&amp;nbsp;"offset": 2403636826 ...&amp;nbsp;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Given that I need to create a new request to get the rest of the companies:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;/companies/v2/companies?limit=4&amp;amp;offset=2403636826&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;But&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;I get the error&lt;/STRONG&gt;: &lt;EM&gt;Unable to parse value for query parameter: offset&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think the problem is under the offset type. In order to test I requested with offset=2147483647 (which is the maximum integer32 number) I get results correctly.&lt;/P&gt;&lt;P&gt;But when I request with a integer64 (offset=2147483648 for example) I get the same error of &lt;EM&gt;unable to parse offset&lt;/EM&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I make it work?&lt;/P&gt;</description>
    <pubDate>Tue, 08 Oct 2019 12:58:37 GMT</pubDate>
    <dc:creator>devmosaic</dc:creator>
    <dc:date>2019-10-08T12:58:37Z</dc:date>
    <item>
      <title>Get all companies - odd offset behaviour</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Get-all-companies-odd-offset-behaviour/m-p/295430#M27692</link>
      <description>&lt;P&gt;I'm getting all my companies using API, but I'm testing how pagination works so I limited my results to 4 and I have 6 companies in total.&amp;nbsp;&lt;/P&gt;&lt;P&gt;so I do a GET&amp;nbsp;&lt;STRONG&gt;/companies/v2/companies?limit=4&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;and then I receive 4 companies with the root info {&amp;nbsp;"has-more": true,&amp;nbsp;"offset": 2403636826 ...&amp;nbsp;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Given that I need to create a new request to get the rest of the companies:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;/companies/v2/companies?limit=4&amp;amp;offset=2403636826&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;But&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;I get the error&lt;/STRONG&gt;: &lt;EM&gt;Unable to parse value for query parameter: offset&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think the problem is under the offset type. In order to test I requested with offset=2147483647 (which is the maximum integer32 number) I get results correctly.&lt;/P&gt;&lt;P&gt;But when I request with a integer64 (offset=2147483648 for example) I get the same error of &lt;EM&gt;unable to parse offset&lt;/EM&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I make it work?&lt;/P&gt;</description>
      <pubDate>Tue, 08 Oct 2019 12:58:37 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Get-all-companies-odd-offset-behaviour/m-p/295430#M27692</guid>
      <dc:creator>devmosaic</dc:creator>
      <dc:date>2019-10-08T12:58:37Z</dc:date>
    </item>
    <item>
      <title>Re: Get all companies - odd offset behaviour</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Get-all-companies-odd-offset-behaviour/m-p/295596#M27703</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/107207"&gt;@devmosaic&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you're using the `offset` parameter that's documented in &lt;A href="https://developers.hubspot.com/docs/methods/companies/get-all-companies" target="_self"&gt;this&lt;/A&gt; documentation, the number should be working. Can you give me your Hub ID so that I can dig into this? If it's an issue with the endpoint, I'll want to get this in front of the team asap.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Oct 2019 20:51:47 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Get-all-companies-odd-offset-behaviour/m-p/295596#M27703</guid>
      <dc:creator>Derek_Gervais</dc:creator>
      <dc:date>2019-10-08T20:51:47Z</dc:date>
    </item>
    <item>
      <title>Re: Get all companies - odd offset behaviour</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Get-all-companies-odd-offset-behaviour/m-p/295602#M27704</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/142"&gt;@Derek_Gervais&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I did use the documentation you mentioned. I strongly think the problem might be in Hubspot API's backend.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My is HID &lt;STRONG&gt;6403674&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Oct 2019 21:04:10 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Get-all-companies-odd-offset-behaviour/m-p/295602#M27704</guid>
      <dc:creator>devmosaic</dc:creator>
      <dc:date>2019-10-08T21:04:10Z</dc:date>
    </item>
    <item>
      <title>Re: Get all companies - odd offset behaviour</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Get-all-companies-odd-offset-behaviour/m-p/296102#M27778</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/107207"&gt;@devmosaic&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for the info, that was helpful in identifying the issue. I was able to reproduce the issue you're seeing, but there's a catch: The public "Get all companies" endpoint is `companies/v2/companies/paged`, not `companies/v2/companies`. The `companies/v2/companies` endpoint appears to be an old legacy endpoint that's still live, though undocumented. This issue appears limited only to this legacy `companies/v2/companies` endpoint, not the currently supported `companies/v2/companies/paged` endpoint.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'll be sure to bring this to my team in order to get to the bottom of this issue, but regardless I'd recommend using the publicly documented endpoint (i.e. `companies/v2/companies/paged`) as described in the following developer documentation:&amp;nbsp;&lt;A href="https://developers.hubspot.com/docs/methods/companies/get-all-companies" target="_blank"&gt;https://developers.hubspot.com/docs/methods/companies/get-all-companies&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Oct 2019 21:08:15 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Get-all-companies-odd-offset-behaviour/m-p/296102#M27778</guid>
      <dc:creator>Derek_Gervais</dc:creator>
      <dc:date>2019-10-10T21:08:15Z</dc:date>
    </item>
    <item>
      <title>Re: Get all companies - odd offset behaviour</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Get-all-companies-odd-offset-behaviour/m-p/296120#M27782</link>
      <description>&lt;P&gt;I'm not sure where I pulled from the legacy URL (without paged/ at the end)&lt;/P&gt;&lt;P&gt;But thanks for helping me,&lt;BR /&gt;Have a great one.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Oct 2019 22:22:35 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Get-all-companies-odd-offset-behaviour/m-p/296120#M27782</guid>
      <dc:creator>devmosaic</dc:creator>
      <dc:date>2019-10-10T22:22:35Z</dc:date>
    </item>
    <item>
      <title>Re: Get all companies - odd offset behaviour</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Get-all-companies-odd-offset-behaviour/m-p/376174#M36966</link>
      <description>&lt;P&gt;&lt;A href="https://legacydocs.hubspot.com/docs/methods/companies/get-all-companies" target="_blank"&gt;https://legacydocs.hubspot.com/docs/methods/companies/get-all-companies&lt;/A&gt;&amp;nbsp;there is max limit only 250, in my companies table i have 3357 records so how to send all these companies records into External application. how to adjust end point please help me&lt;/P&gt;</description>
      <pubDate>Sat, 03 Oct 2020 20:17:31 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Get-all-companies-odd-offset-behaviour/m-p/376174#M36966</guid>
      <dc:creator>Kishore</dc:creator>
      <dc:date>2020-10-03T20:17:31Z</dc:date>
    </item>
  </channel>
</rss>

