Calcuate Refund not Responding with JSON on POST

Highlighted
New Member
1 0 0

as I post to the Calculate Refund with json in the format outlined in the link below.

 

https://help.shopify.com/en/api/reference/orders/refund#calculate-2019-10 

 

I am getting an HTML response Rather than the JSON outlined in the Previous link. 

 

 

Here is the format of my request:

https://secret:stuff@{shoplink}.myshopify.com/admin/api/2019-10/orders/{ordernumber}/refunds/calculate.json

 

then my json is the following:

{
"refund": {
"shipping": {
"full_refund": true
},
"refund_line_items": [
{
"line_item_id": {ID FROM LINE ITEMS },
"quantity": 1,
"restock_type": "no_restock"
}
]
}
}

then I get the response 

 

<html>

<body>
  <noscript>
    <a
  </noscript>

  <script type="text/javascript">
    window.location = "https:\/\/app.shopify.com\/services\/login\/identity?destination_uuid={SOMEID}\u0026merge_ignore_postponed=false\u0026prompt=merge\u0026return_to=https%3A%2F%2Fapp.shopify.com%2Fservices%2Flogin%2Fidentity_callback%3Ffrom_signup%3Dfalse%26locale%3Den%26shop_name%3DVictor%2BAllen%26state%3DCUIRUx8-{SOMEID}-{SOMEID}-{SOMEID}%253D\u0026ui_locales=en\u0026ux=shop";
  </script>
</body>

</html>

 

0 Likes
Shopify Staff
Shopify Staff
121 14 14

Hey @astadtla,

 

If you're using an http client like Postman or Insomnia, this issue usually occurs when the client has saved cookies from a previously unsuccessful request. If you're using something like Postman or Insomnia, please clear all stored cookies and try again, and the request should complete as expected.

 

If that doesn't resolve the issue, please provide the `X-Shopify-Request-ID` from the response headers of your API call, and we can investigate this further for you.

JB | Developer Support @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 

0 Likes