When we create a fulfillment for an order using Shopify Rest API Returned an 302 error.

Jochen1
New Member
9 0 0

Hi,
When we create a fulfillment for an order using Shopify API through Altova map force mapping, we are not able to get response and API returned an error :"302 Found, Content-Type: text/html; charset=utf-8".

Is it something related to Whitelisting our Prod and Dev server IP’s. Please advise.

Please check and help on this. Please let us know any further information required in this regard. Thanks

 

API Issue.png

Replies 9 (9)
Jochen1
New Member
9 0 0

Hi,

Did any one get a chance to look in to this.Do we nee to take any action from our end. please advise

Alex
Shopify Staff
Shopify Staff
1561 81 338

If you're redirected when making an API call it's highly likely that you're sending your request with cookies, and you're being redirected to a front end login page.

 

Try the request with a minimal HTTP client like cUrl to test, or check your app code itself to verify whether this is the case.

 

Cheers.

Alex | 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 the Shopify Help Center or the Shopify Blog

Jochen1
New Member
9 0 0

Thanks,but i got the response when i tried to use from Post man. Only concern is why it is not getting from tool(EDI map force).

 

If the issue is with Redirection, it might not have got response from Post man. Please advise

Alex
Shopify Staff
Shopify Staff
1561 81 338

Are you saying this is only replicable in your app code? I don't know anything about your framework, but I have certainly seen web frameworks and libraries use cookies when the developer didn't necessarily intend to. Can you provide some additional information about your setup? If you can capture an X-Request-Id response header, I can check logs and more clearly tell you what happened.

 

Cheers.

Alex | 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 the Shopify Help Center or the Shopify Blog

Jochen1
New Member
9 0 0

While i am trying to POST api in Altova map force EDI server which i am using currently i got 302 issue.However, to crosscheck this, I used PostMan Online API platform and got the fulfillment create status response successfully followed by deleting cookies existed in this platform.Please find the requested detials below to investigate further

user is Aeratron


2.png

Jochen1
New Member
9 0 0

postman.PNG

This is the response i got from the Postman which is used the Same API in Altova map force server but 302 occured. This might helps you to analyse further.

I am sure that i used correct  access token , user and Pwd. so that i got response in Postman and app is authorised moreover. FYI..

Alex
Shopify Staff
Shopify Staff
1561 81 338

Okay. So if you're getting a 302 in your app and not Postman, that tells me that your app is somehow sending its requests with cookies. Is this a front end or a back end request? If it's a front end request, I would strongly recommend against that for security reasons and also it would possibly inherit the current client's (web browser's) cookies into its request. If it's a back end request, let me know, but you should also do some investigating into how sending these requests with cookies is possible.

 

Cheers.

Alex | 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 the Shopify Help Center or the Shopify Blog

Jochen1
New Member
9 0 0

Hi Alex, Thanks for your reply.

 

Yes, we are sending from backend through Map force EDI server. Using order num as parameter.In addition, we are embedding API url in this tool.

Jochen1
New Member
9 0 0

Any updates or inputs