HubSpot API endpoints accept UNIX formatted timestamps in milliseconds. Using any of the HubSpot endpoints to extract information relating to dates will return milliseconds. There is more information on this here.
To clarify further, if I have a deal with a "Closed Date" = 09/01/2020 I would make a GET request using the "Get a deal" endpoint. The response body would contain the following, the bold text is the millisecond timestamp representing the date 09/01/2020.
I could then use the "value" and convert into the appropriate date format. There are many different ways to convert UNIX millisecond timestamps to readable dates. One example would be using Javascript:
var milliseconds = 1578584645680;
var readableDate = new Date(milliseconds);
console.log(readableDate)
The output of the above would be "Thu Jan 09 2020 15:44:05 GMT+0000 (Greenwich Mean Time)".
This is expected behaviour. What is being returned to you is the internal ID of the deal pipeline. You can use the ID returned to pull the pipeline name using the "Get Deal Pipeline" endpoint.
I would also want to bring to your notice that while I extract "Closed date" the output returned for this is an alphanumeric string however the expected value here is "dd-mm-yyyy".
Can you please look into this and revert back at earliest.
HubSpot API endpoints accept UNIX formatted timestamps in milliseconds. Using any of the HubSpot endpoints to extract information relating to dates will return milliseconds. There is more information on this here.
To clarify further, if I have a deal with a "Closed Date" = 09/01/2020 I would make a GET request using the "Get a deal" endpoint. The response body would contain the following, the bold text is the millisecond timestamp representing the date 09/01/2020.
I could then use the "value" and convert into the appropriate date format. There are many different ways to convert UNIX millisecond timestamps to readable dates. One example would be using Javascript:
var milliseconds = 1578584645680;
var readableDate = new Date(milliseconds);
console.log(readableDate)
The output of the above would be "Thu Jan 09 2020 15:44:05 GMT+0000 (Greenwich Mean Time)".