Fulfilment API - 200 OK, but prompting login

Highlighted
New Member
4 0 0

Hi,

 

I'm trying to access the fulfilment API and am receiving a 200 OK response, however, the body being returned is asking me to login.

 

This is the request being made:

 

POST /admin/api/2020-04/orders/#{order_id}/fulfillments.json
{
  "fulfillment": {
    "location_id": 905684977,
    "tracking_number": "123456789",
    "tracking_urls": [
      "https://shipping.xyz/track.php?num=123456789",
      "https://anothershipper.corp/track.php?code=abc"
    ],
    "notify_customer": true
  }
}

 This is the response I'm getting:

 

<html>
 
<body>
<noscript>
<a
</noscript>
 
<script type="text/javascript">
window.location = "https:\/\/app.shopify.com\/services\/login\/identity?destination_uuid=65de0743-2ad9-4618-a528-78672be63d92\u0026enforce_merge=true\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%3Dxyz%2BDelivery%26state%3Ddq-369368CyKl3gLsvlUrrj-CFC7fOce5UWFCRg_Cgq3P6zR2D1xp_Z_QpAhdm5frgq8wwsczdfAEejQKqE5wmxga2PsnKic-cXwo9VBr8IfrQJ-A3Px6JutK0okaa4XMV0G4diS9bU4c8kbQkEGkZvZ390aof-DdW2SPvCar8k7H8x7vuqURMRdS2bbhRWg3rAsYFzbt7kbYoiU2S-yFhRjn3PKNnrHGqhb0gag4DB2AVptqvNmwa9ovppXESfj\u0026ui_locales=en\u0026ux=shop";
</script>
</body>
 
</html>

Any ideas what is going wrong here?  I'm able to access the orders API using the same credentials and the private app I'm using has full permissions.
 
Thanks
0 Likes
Highlighted
Shopify Staff
Shopify Staff
370 68 53

Hi @strike_media_dv 

 

What are you using to do the API call? Postman? Insomnia? With a POST request you will need to delete all the cookies being sent prior to the request. That should fix it up for you. 

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


0 Likes
Highlighted
New Member
4 0 0

Thank you very much, this did it :)

0 Likes