tags:

views:

167

answers:

3

I've found that there are two different properties of the order in Magento API available.

order_id and order_increment_id. For sample order they can be something like order_increment_id=100000080 and order_id=81.

The Question Is: What is the difference between them? How they are considered to be used? In the web store UI I see that my order has "Order #" = 100000080. What is order_id property for?

A: 

I guess order_increment_id is used for displaying to the customer, and the order_id is for internal use. People find low order ids strange, they are used to seeing 10 digits or so when looking at order ids.

greg0ire
+1  A: 

I've been working with magento API for almost a year now and can assure you that the only ID you need to use is the order_increment_id. It is used as the main ID in the order.info call. The same is true for the invoice and shipment APIs - they also use the appropriate increment id as the main one.

The order_id, which I believe is the same as entity_id, is the primary key in the sales_order table used to join all the eav tables together. It is used internally in magento, but working with the API you needn't worry about it.

silvo
A: 

What silvo has said is true and thats why there is method called getLastRealOrderId();

Kapil