I am facing a very puzzling aspect of the REST API of Magento. Seemingly, the GET /Orders response does not return any date. This can't be right, sales orders are dated.
What am I missing here?
I am facing a very puzzling aspect of the REST API of Magento. Seemingly, the GET /Orders response does not return any date. This can't be right, sales orders are dated.
What am I missing here?
You are right. You should get the order date back. The field is called created_at
.
In case you are not getting it, check if it is allowed in the Attributes section. System->Web Services->REST Attributes
and click on the user type Admin
.
If you didn't test, and just looked at the link you mentioned in the question then you should try it. I think that link just offers an example. It's not the real thing.
I just did a test and here is what came back:
Array
(
[41] => Array
(
[entity_id] => 41
[status] => pending
[coupon_code] =>
[shipping_description] => United Parcel Service - Ground
[customer_id] =>
[base_discount_amount] => 0.0000
[base_grand_total] => 823.4500
[base_shipping_amount] => 11.5700
[base_shipping_tax_amount] => 0.0000
[base_subtotal] => 750.0000
[base_tax_amount] => 61.8800
[base_total_paid] =>
[base_total_refunded] =>
[discount_amount] => 0.0000
[grand_total] => 823.4500
[shipping_amount] => 11.5700
[shipping_tax_amount] => 0.0000
[store_to_order_rate] => 1.0000
[subtotal] => 750.0000
[tax_amount] => 61.8800
[total_paid] =>
[total_refunded] =>
[base_shipping_discount_amount] => 0.0000
[base_subtotal_incl_tax] => 811.8800
[base_total_due] =>
[shipping_discount_amount] => 0.0000
[subtotal_incl_tax] => 811.8800
[total_due] =>
[increment_id] => 100000049
[base_currency_code] => USD
[discount_description] =>
[remote_ip] => 216.113.168.131
[store_currency_code] => USD
[store_name] => Main Website
Main Website Store
English
[created_at] => 2013-03-15 02:01:34
[shipping_incl_tax] => 11.5700
[base_customer_balance_amount] => 0.0000
[customer_balance_amount] => 0.0000
[payment_method] => checkmo
[gift_message_from] =>
[gift_message_to] =>
[gift_message_body] =>
[tax_name] => US-CA-*-Rate 1
[tax_rate] => 8.2500
[addresses] => Array
(
.....
Notice the created_at
field.
I tested with JSON format, but I don't think that makes a difference.