2016-04-12 62 views
0

我做以下調用(減去我locationId)日期:廣場API:過濾ListOrders由不工作

GET https://connect.squareup.com/v1/xxxxxxxxx/orders?begin_time=2016-04-12T00:00:00Z

但在迴應我從2016年3月29日

訂單
{ 
    "buyer_note": "Ship fast, please!", 
    "total_discount_money": { 
     "currency_code": "USD", 
     "amount": 0 
    }, 
    "created_at": "2016-03-14T23:44:46Z", 
    "id": "LLVH1OON", 
    "total_shipping_money": { 
     "currency_code": "USD", 
     "amount": 1 
    }, 
    "total_price_money": { 
     "currency_code": "USD", 
     "amount": 11 
    }, 
    "merchant_token": "xxxxxxxxxxx", 
    "expires_at": "2016-03-21T23:45:08Z", 
    "recipient_name": "Buyer McPhee", 
    "subtotal_money": { 
     "currency_code": "USD", 
     "amount": 10 
    }, 
    "updated_at": "2016-03-21T23:45:33Z", 
    "state": "COMPLETED" 
} 

訂單日期的過濾器有效嗎?

回答

1

不幸的是,列表訂單端點不支持日期過濾器。有關working with dates的API約定的文檔意味着所有列表端點都採用日期過濾器,但它旨在成爲處理這些類型參數的常規建議(並且應該更新爲不暗示)。但是,並非所有列表端點都可以。如果您查看list orders endpoint的特定文檔,則不會顯示對begin_time和end_time參數的支持。對於一個端點的例子,列表支付端點特別提到了對begin_time和end_time參數的支持。

+0

這將是一個有用的過濾器,特別是因爲Webhooks不可用於訂單端點或者... – dbJones