we are seeing a big dependency between the order ID that we are getting from Magenta via REST and the order ID that we see in the order confirmation email. for example REST returns 45, the email has 200045646.
We implemented the increment features directly into the SQL database based on some posts here but it seems that REST APIs pull the original non incremented order ID. anyone was able to address this issue ?
We are using Magento as a backend an d talking to it via REST API
There is order_id (most commonly known as entity_id in sales tables) and increment_id which is human-readable number mostly used for accounting. The first one that you've mentioned is a classic primary key which increments, and the other one (bigger) is the number used for accounting purposes, and that is the actual number which will be mentioned on all pages/documents.
Both of them you can fetch via REST API, in the response of the same API.