Not sure if I missed this somewhere in the docs, but just need some clarification.
Here's what it says in the docs for /admin/orders.json:
{ "id" : "450789469" }The unique numeric identifier for the order. This one is used for API purposes. This is different from the order_number property (see below), which is also a unique numeric identifier for the order, but used by the shop owner and customer.
Can we rely on the "id" to always be ascending as the "created_at" date goes into the future? Posed another way, will the "id" value of of subsequent orders always be greater than any "id" of past orders?
ie. will the "id" from an order placed Dec 16, always be > than the "id" on orders placed before, and always be < than orders placed after?
It makes sense that this would be so, but I just wanna make sure. Don't want to rely on this assumption if it's wrong.
Some background on why I need this:
- Writing program to grab order info from the API and insert them into an accounting system
- I need a way to keep track of where I last left off in retrieving orders
- The API endpoint allows for a "since_id" parameter to be passed and I'm saving the "id" of an order for each order I enter into the accounting system
- Need to make sure I can just simply get the largest of these "id" values I saved, and pass this as the "since_id" for my next request to /admin/orders.json
Hope that makes sense :)
Thanks!