Weird error when creating a fulfillment

Solved
Highlighted
New Member
2 0 0

Hello,

 

am trying to create a fulfillment using Shopify API. Am passinng this request

URL: https://mydomain.myshopify.com/admin/api/2020-01/orders/#1948236316727/fulfillments.json

Body:

{
"fulfillment": {
"location_id": 34344304695,
"notify_customer": false
}
}

Content-Type is set to application/json, method POST. 

 

It returns 200 OK, but with following body:

 

<html>
<body>
  <noscript>
    <a
  </noscript>
  <script type="text/javascript">
    window.location = "https:\/\/app.shopify.com\/services\/login\/identity?destination_uuid=77767744-a39e-4e77-b556-8e18e8b2662d\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%3DMtnBird%26state%3D2362iFoJvCmKDlMFKdwO0VVxLBpGO_P0BvoXj9ffvsG35fkfZ8dtNxyTZwJVQ0IyLYMw5TC1KxBmgLu-A1IwiE3CnHs3NPCHnUKPXZhDrrXZ5wa1bsoI3_Pt-JIc7i-2wygGOWu2WPT5Z2Krf0VS9oqChjcpE9uaHkyEs01ZeYYwwZCIEB83mzJuSazH5Qkqrc3PEESWWGdqpbicgKMiU_E8REkIO6Piaaqf9JvqxVQ%253D\u0026ui_locales=en\u0026ux=shop";
  </script>
</body>
</html>

 

I guess that there are some troubles with authentication, but all the permissions should have been set and I can eg. get list of orders or so.

 

Any idea what's wrong?

 

thanks

 

Jiri

 

0 Likes
Highlighted
Shopify Partner
1777 211 370

This is an accepted solution.

Remove the # preceding the order ID.

Sergiu Svinarciuc | CTO @ visely.io
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution!
- To learn more about the awesome stuff we do head over to visely.io or our blog
0 Likes
Highlighted
New Member
2 0 0

Thanks, that helped. 

0 Likes
Highlighted
Tourist
9 0 1

Hi

 

Please can any one help on this issue.

 

URL:-https://myshop.myshopify.com/admin/api/2020-01/orders/998397116464/fulfillments.json

 

body:-{"fulfillment":{"location_id":"2985132069","tracking_number":"1234556","line_items":[{"id":"2326039363632"}],"notify_customer":"true"}}

 

Result/Error:-

 

<html>

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

  <script type="text/javascript">
    window.location = "https:\/\/app.shopify.com\/services\/login\/identity?destination_uuid=466ac203-d949-4b64-930c-8d5452ee10f3\u0026enforce_merge=false\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%3DPrinterpix%26state%3Dddhps6dqApmYdSLX5bziO3Fxz4nu6VpylCmbeRSud-iq8dg4kpKWQVBucjVD5ZMxA1-z7ScM34zcPutaImWqlXzQQVkZxY78FTJcVO_byoAPVxRG-blKZpwohJSFU6M9IHz9aiKldiR48TXMcBAWW4DWWs-0eKqRs-mKDyo-lCGW8HSaYQhZ9iRRMy0XFp_cuW1FGeWq6uaHxvOsw6AuSEj22txHsw0cNKcuL-5G69k%253D\u0026ui_locales=en\u0026ux=shop";
  </script>
</body>

</html>
0 Likes
Highlighted
Shopify Partner
1777 211 370

What is the exact call you are making? Is it a POST? What headers are you sending in the request? From the response you are getting looks like you are not passing the API token in the headers.

Sergiu Svinarciuc | CTO @ visely.io
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution!
- To learn more about the awesome stuff we do head over to visely.io or our blog
0 Likes
Highlighted
Tourist
9 0 1

Thank you for your reply,

 

Yes it is POST method,  I am passing Accept and Content-type 

 

Accept="application/json"

Content-type ="application/json"

 

Thanks

Sravanthi

 

 

0 Likes
Highlighted
Tourist
9 0 1

Untitled.png

0 Likes
Highlighted
Shopify Partner
1777 211 370

Are you sending a valid X-Shopify-Access-Token  in the headers? Is it the token you've specifically created for the store which API you are trying to hit?

Sergiu Svinarciuc | CTO @ visely.io
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution!
- To learn more about the awesome stuff we do head over to visely.io or our blog
0 Likes
Highlighted
Tourist
9 0 1

I am Passing Basic Authentication username name and password  which are already working for to download orders.

 

Thanks

Sravanthi

0 Likes
Highlighted
Shopify Partner
1777 211 370

Can you try the same call using CURL instead of Postman?

Sergiu Svinarciuc | CTO @ visely.io
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution!
- To learn more about the awesome stuff we do head over to visely.io or our blog
0 Likes