Jump to content

Is order_row.id always the same as order_details.id ?


DavidArcadie

Recommended Posts

TL;DR : Using API requests, 'order.associations.order_rows.order_row.id' seems to be always equal to 'order_details.id'. Is this by design, or just a coincidence ?

Hi there !

I'm not sure I'm posting in the right section so feel free to let me know :)

I'm using Prestashop 1,7 API to grab all orders made on the store and put them in our company's ERP. In a full schema of the "order" endpoint, there's an "order_row" array within "associations.order_rows" containing a few informations about order rows, and each of them has an ID.

Since I need a bit more informations than the one in order_row, I'm also grabbing every "order_detail" associated to the order I want. Every order_detail also has an ID, and as far as I can tell, this is the same as order_row.id. Which is perfect since it allows me to link order_row and order_detail.

But I'm a bit worried that this link I'm seeing there is just a coincidence because my shop is completely empty and IDs are clean.

Would you kindly telle me if those IDs are really linked by design, or should I avoid relying on it ?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...