question

stevenblakemore avatar image
stevenblakemore asked Bryanne Vega answered

Returning the order with the lowest modifiedTime (so the oldest modified order)

Hi, is there a way to write a query using the API to return the oldest of something without having to return all and go through pagination? I thought orderBy may have done it but I think it only orders the data that was returned.

I could live with returning the MIN(modifiedTime) if that was possible.

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Bryanne Vega avatar image
Bryanne Vega answered

Have you tried using the Get Orders from the REST API with the filter "createdTime"?

Or adding the "?orderBy=&limit=1" to get the last order created?

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community