On Magento 1.7 SOAP APIv2, i'm looking for a way to get a date range to retrieve information from the SOAP API.
$complexFilter = new filters();
$complexFilter->complex_filter = array(
array(
'key' => 'created_at',
'value' => array('key' => 'from', 'value' => '2012-12-17 00:00:00')
),
array(
'key' => 'created_at',
'value' => array('key' => 'to', 'value' => '2013-01-21 12:02:02')
),
);
This seemed like the most natural approach, but only the last criterion gets used. I also tried other combinations like a complex filter of complex filters, different ways to combine them, using gt
and alike instead of from
and co. Most of these approaches resulted in the same result: only the last criterion inside will be used.
What is the proper way to get a date range via the API? Can this also be done via a regular filter? If so, how to combine the start and end date?
increment_id
as the column of a sales order list. I'd lump this approach into the "sad" part of Magento's SOAP API implementation. – Solfatara