I am using the endpoint /admin/api/2023-04/orders.json to pull an order and order properties.
The order is currently unpaid, but fulfilled.
Items from the order have been marked as “returned” by the store owner.
When we pull this order in via the api - there is no indication that the returned items are actually returned from the order.
The refunds array is also empty.
There is a separate endpoint for returns - however, there doesn’t seem to be a way to pull the returned items, or their statuses in the orders call.
Is there a way to do this?
1 Like
Hi @gvbrown ,
Thanks for your post. In the REST Admin API with the orders.json endpoint we’ve tested and confirmed that there’s not a way to tell by looking at the data provided by the endpoint that a return occurred with this particular mix of circumstances with no refund being provided..
We’ll submit some internal feedback about this, and in the meantime you may want to consider trying the GraphQL Admin API where the Order object has a returnStatus property that makes it easy to quickly check if a return occurred on the order. That works like this:
{
order(id:“gid://shopify/Order/123456789”) {
returnStatus
}
}
Hope you have a great day