我希望使用 Bigcommerce PHP 库以及以下条件获取所有订单。
- 订单状态= 2(已发货)
- 2天前创建的订单
我正在尝试用PHP中的CURL调用获取订单
当我过世时
$api_url = 'https://www.myapiurl.com/api/v2/orders.json?status_id=2';
它返回所有已发货的订单,但是当我尝试通过日期过滤器时,它没有获得所需的结果
$api_url = 'https://www.myapiurl.com/api/v2/orders.json?status_id=2&min_date_created=2015-08-30';
$ api_url ='https://www.myapiurl.com/api/v2/orders.json?status_id=2&min_date_created=2015-08-30';
我该怎么做?
答案 0 :(得分:0)
我在商店测试过这种格式并为我工作(我正在使用bigommerce的php api版本3)。
https://store-xxxxxxx.mybigcommerce.com/api/v2/orders?status_id=1&min_date_created=2015-03-04
响应:
Array
(
[0] => stdClass Object
(
[id] => 25
[customer_id] => 0
[date_created] => Wed, 04 Mar 2015 17:36:34 +0000
[date_modified] => Wed, 04 Mar 2015 17:36:34 +0000
[date_shipped] =>
[status_id] => 1
[status] => Pending
[subtotal_ex_tax] => 90.0000
[subtotal_inc_tax] => 90.0000
[subtotal_tax] => 0.0000
[base_shipping_cost] => 0.0000
[shipping_cost_ex_tax] => 0.0000
[shipping_cost_inc_tax] => 0.0000
[shipping_cost_tax] => 0.0000
[shipping_cost_tax_class_id] => 0
[base_handling_cost] => 0.0000
[handling_cost_ex_tax] => 0.0000
[handling_cost_inc_tax] => 0.0000
[handling_cost_tax] => 0.0000
[handling_cost_tax_class_id] => 0
[base_wrapping_cost] => 0.0000
[wrapping_cost_ex_tax] => 0.0000
[wrapping_cost_inc_tax] => 0.0000
[wrapping_cost_tax] => 0.0000
[wrapping_cost_tax_class_id] => 0
[total_ex_tax] => 80.0000
[total_inc_tax] => 80.0000
[total_tax] => 0.0000
[items_total] => 1
[items_shipped] => 0
[payment_method] => Manual
[payment_provider_id] =>
[payment_status] =>
[refunded_amount] => 0.0000
[order_is_digital] =>
[store_credit_amount] => 0.0000
[gift_certificate_amount] => 0.0000
[ip_address] =>
[geoip_country] =>
[geoip_country_iso2] =>
[currency_id] => 1
[currency_code] => USD
[currency_exchange_rate] => 1.0000000000
[default_currency_id] => 1
[default_currency_code] => USD
......
....
..
.