Skip to main content
Solved

Filtering Data Retrieved Through API Call For Records Greater Than a Specified Date

  • February 12, 2025
  • 4 replies
  • 160 views

I am trying to filter my API response to only make a get request of records from an endpoint of records that have to be greater than a specific date. I have tried to look at the documentation but unfortunately it does not contain any page on the documentation to give knowledge or show how this is done. 

When I add the filter parameters I get an error message as shown below :
 


The error message is caused when I try to invoke the following endpoint also containing the filters required : {{endpoint_url}}ProjectBudget?$filter=LastModifiedDateTime_value gt datetimeoffset'11/10/2024 12:00:00 AM'

​​​​​​​The endpoint URL is the specific company URL required to access the endpoints of the specific company

I require some assistance in being able to get past the error message so I can comfortably ingest data that is greater than a specified date.

Will appreciate the assistance.
 

Best answer by jinin

Hi ​@Williamqh ,

Try applying the filter as shown below.

$filter= LastModifiedDateTime ge datetimeoffset'2021-01-01T00:58:57.837-08:00'

4 replies

kpopova
Acumatica Employee
Forum|alt.badge.img+2
  • Acumatica Employee
  • February 12, 2025

jinin
Pro I
Forum|alt.badge.img+11
  • Pro I
  • Answer
  • February 12, 2025

Hi ​@Williamqh ,

Try applying the filter as shown below.

$filter= LastModifiedDateTime ge datetimeoffset'2021-01-01T00:58:57.837-08:00'


  • Author
  • Freshman I
  • February 12, 2025

Thank you this was very helpful

I had to change my datetime to the required string format to make the API call work.


  • Author
  • Freshman I
  • February 12, 2025

Hi ​@Williamqh ,

Try applying the filter as shown below.

$filter= LastModifiedDateTime ge datetimeoffset'2021-01-01T00:58:57.837-08:00'

Thanks  lot, this was what I needed