Does the startDateTime parameter function correctly in Trustpilot's private reviews API for business units?

I’m attempting to retrieve all reviews rated with 5 stars that are recorded from a certain date using Trustpilot’s private reviews API for business units. The documentation specifies the following for the parameter ‘startDateTime’:

startDateTime, Optional String
Filter reviews by datetime range. If the time is not defined, it defaults to 00:00:00.
Example: ?startDateTime=2013-09-07T13:37:00

While I can successfully obtain the 5-star reviews, there are still results being returned that precede the defined startDateTime. Is this an issue or a bug?

Any assistance would be greatly appreciated. Thank you!

Hey Alex,

It sounds like a potential issue with the date filtering in the API. Double-check if the date format matches exactly what's specified in the documentation. Also, make sure your request includes the full timestamp, including seconds. If everything's aligned and it still fails, it might be on their end. Consider reaching out to Trustpilot support for clarification or look for any API updates or patches.

Hope that helps!

Hello Alex_Brave,

It seems you might be facing an issue with Trustpilot’s API date filtering. Here are a few steps you can take to ensure everything is set up correctly:

  1. Verify the startDateTime format matches YYYY-MM-DDTHH:MM:SS. Ensure it matches the example format in the documentation precisely, including the 'T' separator.
  2. Make sure your server or application environment is set to the correct time zone that matches the API’s expectations.
  3. Double-check your parameter key names to avoid any typos.
  4. If possible, log the response for debugging to verify what dates are being interpreted by the API.
  5. Test with a small dataset to see if the issue persists.

If all else fails, as Bob_Clever suggested, it's a good idea to reach out to Trustpilot support to confirm if there's any known issue with this parameter or if there's an update on the API.

Best of luck resolving this!