Square api:按日期过滤 ListOrders 不起作用

Square api: filter ListOrders by date not working

我正在进行以下调用(减去我的 locationId):

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

但在回复中我收到了 2016-03-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"
}

按订单日期筛选是否有效?

很遗憾,列表订单端点不支持日期过滤器。关于 working with dates implies that all list endpoints take date filters, but it is intended to be general advice for working with those types of parameters (and should be updated to not imply that). However, not all list endpoints do. If you look at the specific documentation for the list orders endpoint 的 API 约定的文档不显示对 begin_time 和 end_time 参数的支持。对于一个端点的例子,列表支付端点特别提到了对 begin_time 和 end_time 参数的支持。