Start a new topic

API get the most updated record

Hi All,


Hi Can I get the most recent record on API for SO?


I have more than 40 K records I need to get only the recent ones. 


Please advise. 


I think you can use this:


http://localhost:10880/api/v2/companies/companyname/sales/orders/?sort=-created


That is, the sort is by created, but the negative sign sorts it in descending order.


I hope that helps,

Cliffe

I think you can do this:


http://localhost:10880/api/v2/companies/companyname/sales/orders/?sort=-created


That is, sort by the created field, with a negative sign prefix that means sort in descending order.


I hope that helps,
Cliffe

I'm still getting an error


https://10.0.0.5:10880/api/v2/companies/mmi/purchasing/history_items/?sort=-2021-12-01

Invalid field (2021-12-01) in request

It doesn't look like the Purchasing Item History has a created field. But there is one on the order field. So this worked for me:


https://10.0.0.5:10880/api/v2/companies/mmi/purchasing/history_items/?sort=-order.created


I hope that helps,
Cliffe

Login or Signup to post a comment