简体   繁体   English

使用日期过滤器(不是订单)在 Shopify 中获取退款列表

[英]Get Refunds List in Shopify with Date Filter (Not Orders)

`GET /admin/api/2022-10/orders.json?financial_status=refunded,partially_refunded&fields=refunds&created_at_min=2022-10-05T00:00:00-05:00&created_at_max=2022-11-17T24:00:00-05:00&limit=250&since_id=0&status=any`

We are using this API to fetch the refunds list.我们正在使用这个 API 来获取退款列表。 Actually we want to fetch refunds on Date base like refunds with in specific date but Shopify does not provide any refund Listing API to get the refunds on date basis.实际上我们想在日期基础上获取退款,例如特定日期的退款,但 Shopify 不提供任何退款清单 API 以在日期基础上获得退款。

So if a refund is issued after two months (Order in Dec-> Refund in Feb) then we have it in the order list of that month (Dec)but not in the order list of after two months (Feb).因此,如果在两个月后发出退款(12 月的订单 -> 2 月的退款),那么我们会在该月(12 月)的订单列表中找到它,但不会在两个月后(2 月)的订单列表中。

Refunds in Shopify are just a property within orders. Shopify 中的退款只是订单中的属性。 The order resource schema looks like this: order resource模式如下所示:

{
    "created_at": "date the order was placed",
    "processed_at": "date the order was imported",
    "refunds": [
        {
            "created_at": "date the refund was created",
            "processed_at": "date the refund was processed"
        }
    ]
}

To filter refunds by date, you'll need to fetch the orders list then use the refund's created_at or processed_at properties to filter them in the order you want: either when the refund request was issued or when it was processed.要按日期过滤退款,您需要获取订单列表,然后使用退款的created_atprocessed_at属性按您想要的顺序过滤它们:退款请求发出时或处理时。

There is not current API which provides direct refund access like orders.目前没有API可以像订单一样直接退款。 You can fetch it through the order list or order ids.您可以通过订单列表或订单 ID 获取它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM