Getting an Error when trying to fulfill an order

Getting an Error when trying to fulfill an order

travistqualfon
Visitor
1 0 0

We are developing a fulfillment app to get data for orders from Shopify into our fulfillment system. I am able to get the orders but when I post a fulfillment I am getting a strange response shown below. 

 

I am using Postman for testing then building it out one API at a time. 

 

The Order ID I am using is 4606998708436 which should be valid based on this... 

 

Screen Shot 2021-12-06 at 1.04.50 PM.png

https://{{api_key}}:{{api_password}}@{{store_name}}.myshopify.com/admin/api/{{api_version}}/orders/4606998708436/fulfillments.json

 

With this body... 

 

 

{
    "fulfillment": {
        "location_id": 66633203924,
        "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 am seeing in Postman....

 

 

 

<html>
  <body>
    <noscript>
      <a href="https://accounts.shopify.com/oauth/authorize?client_id=7ee65a63608843c577db8b23c4d7316ea0a01bd2f7594f8a9c06ea668c1b775c&amp;destination_uuid=e517d963-9c59-4b11-a854-360fc4f41222&amp;nonce=5cb4d671428866f136ad78a5533e9e9e&amp;prompt=merge&amp;redirect_uri=https%3A%2F%2Fqualfonteststore.myshopify.com%2Fadmin%2Fauth%2Fidentity%2Fcallback&amp;response_type=code&amp;scope=email%20https%3A%2F%2Fapi.shopify.com%2Fauth%2Fdestinations.readonly%20openid%20profile%20https%3A%2F%2Fapi.shopify.com%2Fauth%2Fpartners.collaborator-relationships.readonly%20https%3A%2F%2Fapi.shopify.com%2Fauth%2Fbanking.manage%20https%3A%2F%2Fapi.shopify.com%2Fauth%2Fshopify-chat.admin.graphql%20https%3A%2F%2Fapi.shopify.com%2Fauth%2Fflow.workflows.manage%20https%3A%2F%2Fapi.shopify.com%2Fauth%2Forganization-identity.manage&amp;state=98800d94aed344d289df869fcec5e682&amp;ui_locales=en&amp;ux=shop">Continue</a>
    </noscript>

    <script type="text/javascript" defer>
      window.location = "https:\/\/accounts.shopify.com\/oauth\/authorize?client_id=7ee65a63608843c577db8b23c4d7316ea0a01bd2f7594f8a9c06ea668c1b775c\u0026destination_uuid=e517d963-9c59-4b11-a854-360fc4f41222\u0026nonce=5cb4d671428866f136ad78a5533e9e9e\u0026prompt=merge\u0026redirect_uri=https%3A%2F%2Fqualfonteststore.myshopify.com%2Fadmin%2Fauth%2Fidentity%2Fcallback\u0026response_type=code\u0026scope=email%20https%3A%2F%2Fapi.shopify.com%2Fauth%2Fdestinations.readonly%20openid%20profile%20https%3A%2F%2Fapi.shopify.com%2Fauth%2Fpartners.collaborator-relationships.readonly%20https%3A%2F%2Fapi.shopify.com%2Fauth%2Fbanking.manage%20https%3A%2F%2Fapi.shopify.com%2Fauth%2Fshopify-chat.admin.graphql%20https%3A%2F%2Fapi.shopify.com%2Fauth%2Fflow.workflows.manage%20https%3A%2F%2Fapi.shopify.com%2Fauth%2Forganization-identity.manage\u0026state=98800d94aed344d289df869fcec5e682\u0026ui_locales=en\u0026ux=shop";
    </script>
  </body>
</html>

 

 

 

Screen Shot 2021-12-06 at 1.07.48 PM.png

 

When I copy the URL from the continue href I land on this page...

 

Screen Shot 2021-12-06 at 1.08.30 PM.png

 

Then I will select my account and land on this page...

 

Screen Shot 2021-12-06 at 1.09.14 PM.png

 

I really have no idea what I am doing wrong here but tried to give as much info as possible. Anyone have any idea what is going on here? I have even tried creating a second private app with new API keys but the same thing happens get requests for Orders and Locations both work but then fail on the post to fulfill an order. 

 

 

 

Replies 4 (4)

csam
Shopify Staff (Retired)
267 40 51

Hi @travistqualfon 

 

Looks like you're running in to an issue with authorization. Could you please try clearing all the cookies from Postman and give the request another try? Hope this helps!

 

Regards,

To learn more visit the Shopify Help Center or the Community Blog.

littleTree
Shopify Partner
4 0 0

I have the same problem. Have you solved it

Aga_Pawluczuk
Shopify Partner
3 1 0

I'm experiencing the same issue. Did anyone find a resolution to this issue?

ShopifyDevSup
Shopify Staff
1451 238 497

Hi @Aga_Pawluczuk

 

Have you tried removing cookies from your HTTP client and using a X-Shopify-Access-Token header in your requests instead of using basic authentication like those examples from 2021 above?

 

Our documentation on authentication also has the expected formatting in cURL.

 

Hope that helps.

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us 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