2023-01版本Shopify Fulfillments API调用报Not Found错误求助
排查Shopify /fulfillments.json API 404错误
核心问题:API端点路径错误
从2021-07版本开始,Shopify履约流程切换到Fulfillment Order工作流,当你使用line_items_by_fulfillment_order参数创建履约时,不能再调用旧的/admin/api/{version}/fulfillments.json端点,必须使用绑定履约订单ID的专属端点,否则会返回404 Not Found。
修正步骤
更换API端点
将请求URL修改为绑定目标履约订单ID的专属路径:https://logixgrid-save.myshopify.com/admin/api/2023-01/fulfillment_orders/5247929286964/fulfillments.json调整请求体结构
新端点已关联具体履约订单,请求体中可移除line_items_by_fulfillment_order层级,直接指定要履约的订单项:{ "fulfillment": { "message": "The package was shipped this morning.", "notify_customer": false, "tracking_info": { "number": 1562678, "url": "https://www.my-shipping-company.com", "company": "my-shipping-company" }, "line_items": [ { "id": 1058737495, "quantity": 1 } ] } }验证基础条件
- 确认
fulfillment_order_id: 5247929286964在测试店铺中存在,且状态为open或scheduled(未完成、未取消)。 - 检查访问令牌
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拥有write_fulfillments权限。
- 确认
修正后的完整curl命令
curl --location --request POST 'https://logixgrid-save.myshopify.com/admin/api/2023-01/fulfillment_orders/5247929286964/fulfillments.json' \ --header 'X-Shopify-Access-Token: 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' \ --header 'Content-Type: application/json' \ --data-raw '{ "fulfillment": { "message": "The package was shipped this morning.", "notify_customer": false, "tracking_info": { "number": 1562678, "url": "https://www.my-shipping-company.com", "company": "my-shipping-company" }, "line_items": [ { "id": 1058737495, "quantity": 1 } ] } }'
内容的提问来源于stack exchange,提问作者Jaskaran Singh
相关产品推荐
相关产品推荐

