Companies Modified Endpoint

If I open the Companies view in Hubspot, and filter for companies modified after todays date (4/11/2019) I get 375 companies.

If I use the Companies Modified endpoint and set the “since” value to same date (after converting) I’m seeing a total count of some 13557 companies returned.

Is there some additional filteringt happening inside Hubspot? Is there an option to apply further filtering to the Companies endpoint so that I can filter and only get the companies I’m interested downloaded?

Hey @SteveWark ,

Can you give me your Hub ID so that I can take a look? The “Recently modified companies” endpoint should only return a maximum of 10,000 companies anyway, so it definitely seems like something is up.

Derek,

I’m making simple API call as shown below, to get all companies modifed sine 7/11/2019. The returned JSON includes the first 200 and at the end the JSON file it list offet=200 plus total=13536 which I’m assuming is the total count of companies to be returned.

However, this morning if I apply same filter to Companies view in Hubspot ie all modified companies after 7/11/2019 I see none.

I’m assuming you are after our portalID, is it safe to display that in a public forum?

Int32 unixTimestamp = (Int32)(DateTime.UtcNow.Subtract(new DateTime(2019, 11, 7))).TotalSeconds;
var Hubspotclient = new RestClient();
Hubspotclient.BaseUrl = new Uri(“https://api.hubapi.com”);
var Hubspotrequest = new RestRequest(“/companies/v2/companies/recent/modified?hapikey=<ourkey>&count=200&since=”+ unixTimestamp.ToString(), Method.GET);

Derek,

Most obvious is that the UNIX Timestamp is incorrect, re-checking that now…

Steve

Derek,

Got current UNIX timestamp from https://www.epochconverter.com/ and put into my code, the returned total is now 13,357

Steve

Think I’ve sorted this, the “since” field is in milliseconds so I needed to multiply x 1000 so now I’m seeing correct sort of numbers.

Hey @SteveWark ,

Was just about to reach out saying this, looks like you beat me to the punch. All HubSpot timestamps are miliseconds, so anything in seconds will look like January 1st 1970.

Thanks for posting your solution here!