You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

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。

修正步骤

  1. 更换API端点
    将请求URL修改为绑定目标履约订单ID的专属路径:

    https://logixgrid-save.myshopify.com/admin/api/2023-01/fulfillment_orders/5247929286964/fulfillments.json
    
  2. 调整请求体结构
    新端点已关联具体履约订单,请求体中可移除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
                }
            ]
        }
    }
    
  3. 验证基础条件

    • 确认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

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.04 23:50:33