Shopify api back ’422 {"errors":"Tracking information update failed."}‘ to me

I use /admin/api/2021-10/fulfillments/1069019882/update_tracking.json

I made this api request, and one of my stores returned {“errors”:“Tracking information update failed.”} to me

I have tried various solutions and cannot find out the cause of this problem. The same request, other stores can, but only one store can’t.

Through the shopify team, my problem has been solved. In addition to the permission of write_merchant_managed_fulfillment_orders, the permission of write_third_party_fulfillment_orders needs to be added.

thank you! giving the right permission helped me resolve vague error messages

thanks for your held @jiaLi ,

with python API i got this and it work’s:

import shopify

new_session = shopify.Session(shop_url, api_version, PASSWORD)
shopify.ShopifyResource.activate_session(new_session)

grab some orders with “test” tag, json.loads str->dict

result = json.loads(shopify.GraphQL().execute(‘{orders(first:10, query:“tag:test”){edges{node{id tags}}}}’))

data = [d.get(‘node’) for d in result.get(“data”).get(‘orders’).get(‘edges’)]
order_ids = [item.get(‘id’).split(‘/’)[-1] for item in data]

for id in order_ids:
order = shopify.Order.find(id)
print(“order”, order.id)

for f in order.fulfillments:
print(“fulfillement id”, f.id)
f.update_tracking(tracking_info={‘number’:‘YOANNTEST02’,“company”:“la poste”,“url”:None},notify_customer=False)
print(“modify tracking number”)