POST create fulfillments

KHCoolrunner
New Member
5 0 0

Hi Shopify, 

 

I ran into a problem that got me stuck. I want to create fulfillment for, a location called Testlokation as shown on picture below:

 

Skærmbillede 2020-05-28 kl. 08.46.54.png

 

But when i try to make a POST request to /admin/api/2020-04/orders/2279048347780/fulfillments.json

 

With following data (example from guide):

{
  "fulfillment": {
    "location_id": 45549650052,
    "tracking_number": "123456789",
    "tracking_urls": [
      "https://shipping.xyz/track.php?num=123456789",
      "https://anothershipper.corp/track.php?code=abc"
    ],
    "notify_customer": true
  }
}

I get alot of HTML as response, and nothing is created. The reply from this request is seen below:

<html>

<body>
	<noscript>
		<a
			href="https://app.shopify.com/services/login/identity?destination_uuid=283aeb0b-b751-4d97-87e4-3679f97bcd87&amp;prompt=merge&amp;return_to=https%3A%2F%2Fapp.shopify.com%2Fservices%2Flogin%2Fidentity_callback%3Ffrom_signup%3Dfalse%26locale%3Den%26shop_name%3Ddevcool%26state%3DWgO58DIcFD8cn92t08rdGfPzMx-8zVibkLcPFuOamksZGBuWJMp7SMS0SirsdpQsPU0VWY0FgqboOOvQgWmQUN4mEOaoXabsJezM2PNTq55dtNomf3-NMOecmjwfVpIFo025K_dYFMppwpsN88Dpx9Wx1wk57683UxhVZUXE54nSd9QZITlQD_qnbKiGUjPcTfp-Q06j6agSbL8XYzY0R_Bm40iHNJRLoAgGgvLg5no%253D&amp;ui_locales=en&amp;ux=shop">Continue</a>
	</noscript>

	<script type="text/javascript">
		window.location = "https:\/\/app.shopify.com\/services\/login\/identity?destination_uuid=283aeb0b-b751-4d97-87e4-3679f97bcd87\u0026prompt=merge\u0026return_to=https%3A%2F%2Fapp.shopify.com%2Fservices%2Flogin%2Fidentity_callback%3Ffrom_signup%3Dfalse%26locale%3Den%26shop_name%3Ddevcool%26state%3DWgO58DIcFD8cn92t08rdGfPzMx-8zVibkLcPFuOamksZGBuWJMp7SMS0SirsdpQsPU0VWY0FgqboOOvQgWmQUN4mEOaoXabsJezM2PNTq55dtNomf3-NMOecmjwfVpIFo025K_dYFMppwpsN88Dpx9Wx1wk57683UxhVZUXE54nSd9QZITlQD_qnbKiGUjPcTfp-Q06j6agSbL8XYzY0R_Bm40iHNJRLoAgGgvLg5no%253D\u0026ui_locales=en\u0026ux=shop";
	</script>
</body>

</html>

Have any of you experienced this? And if so, what did you do to solve this?

 

0 Likes
vix
Shopify Staff
Shopify Staff
534 105 103

@KHCoolrunner 

 

Is this happening for all POST requests? It usually is one of two things: 
1. You are sending cookies with your request (try and delete them all) 

2. Your authentication is wrong 

Vix | Developer Support @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

0 Likes