Have your say in Community Polls: What was/is your greatest motivation to start your own business?
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Updating an order risk is being failed

Updating an order risk is being failed

remy727
Shopify Partner
44 2 26

To update the order risk, I do this:

client = ShopifyAPI::Clients::Rest::Admin.new(session: session)
response = client.put(path: "orders/#{order_id}/risks/#{risk_id}.json", body: { "risk": payload })

But it always prompts 401 unauthorized.

If you report this error, please include this id: b073b240-346a-4fd8-85fa-5fc2b7e62ade.

My request id is
b073b240-346a-4fd8-85fa-5fc2b7e62ade

 

Any help would be great.

 

Thank you in advance!

Looking for a Shopify App developer? Please contact me at remy.wang727@gmail.com
Reply 1 (1)

ShopifyDevSup
Shopify Staff
1453 238 525

Hi remy727,

 

Thanks for your post. Please ensure the following (related docs: [Order Risk PUT - Shopify Dev Docs]):

 

  • the App has the write_orders scope on the store in question, 
  • the order ID is valid, 
  • the Order Risk that's attempting to be modified was created by the same app that's attempting to modify it 

If all of those are ok then please reach out [to Partner Support using the email option] and select the 'App Development & API' topic for further assistance. Please be sure to include details about the specific store, which App was making the API call, as well as a date/time/timezone for the request id.

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