Creating Fulfillment By API Returns Not Found Errors

Creating Fulfillment By API Returns Not Found Errors

Eric_Chen_66
Visitor
2 0 0

1、 Fetch fulfillment_order_id by https://mystorefr.myshopify.com/admin/api/2024-01/orders/5938409177405/fulfillment_orders.json
Response:
{
    "fulfillment_orders": [
        {
            "id": 6890437804349,
            "shop_id": 85353627965,
            "order_id": 5938409177405,
            "assigned_location_id": 95703499069,
            "request_status": "unsubmitted",
            "status": "open",
            "supported_actions": [
                "create_fulfillment",
                "hold"
            ],
            "line_items": [
                {
                    "id": 15225819365693,
                    "shop_id": 85353627965,
                    "fulfillment_order_id": 6890437804349,
                    "quantity": 1,
                    "line_item_id": 15083962925373,
                    "inventory_item_id": 49738501325117,
                    "fulfillable_quantity": 1,
                    "variant_id": 47690587177277
                }
            ]
        }
    ]
}


2、 Create a fulfillment https://mystorefr.myshopify.com/admin/api/2024-01/fulfillments.json  

and return 404 not found:
{
    "fulfillment": {
        "api_version": "2024-01",
        "line_items_by_fulfillment_order": [
            {
                "fulfillment_order_id": 6890437804349,
                "fulfillment_order_line_items": [
                    {
                        "id": "15225819365693",
                        "quantity": 1
                    }
                ],
                "line_items": [
                    {
                        "id": "15225819365693",
                        "quantity": 1
                    }
                ]
            }
        ],
        "tracking_info ": {
            "number": "604833730845",
            "company": "GLS"
        },
        "notify_customer": true
    }
}

Replies 2 (2)

BSSCommerce-B2B
Shopify Partner
565 114 137

Hi @Eric_Chen_66,

 

I have just looked around with Fulfillment API 2024-01. I think you could try to make some changes to your request payload

> there is no api_version field.

> there is no line_items field in line_items_by_fulfillment_order element properties .

fulfillment_order_line_items element id data type is an integer.

Try this payload

{
    "fulfillment": {
        "line_items_by_fulfillment_order": [
            {
                "fulfillment_order_id": 6890437804349,
                "fulfillment_order_line_items": [
                    {
                        "id": 15225819365693,
                        "quantity": 1
                    }
                ]
            }
        ],
        "tracking_info ": {
            "number": "604833730845",
            "company": "GLS"
        },
        "notify_customer": true
    }
}

 

If our suggestions are useful, please let us know by giving it a like, marking it as a solution.


B2B Solution & Custom Pricing |BSS: B2B Portal, Quote, Net 30 | BSS: B2B Login Lock Hide Price


Need help from our expert? Kindly share your request with us via community@bsscommerce.com


BSS Commerce - Full-service eCommerce Agency
Eric_Chen_66
Visitor
2 0 0

We tried and still response "Not Found", please check

1、 Fetch fulfillment_order_id by https://mystorefr.myshopify.com/admin/api/2024-01/orders/5943176659261/fulfillment_orders.json

Response: { "fulfillment_orders": [ { "id": 6895414509885, "shop_id": 85353627965, "order_id": 5943176659261, "assigned_location_id": 95703499069, "request_status": "unsubmitted", "status": "open", "supported_actions": [ "create_fulfillment", "hold" ], "line_items": [ { "id": 15234443804989, "shop_id": 85353627965, "fulfillment_order_id": 6895414509885, "quantity": 1, "line_item_id": 15092325810493, "inventory_item_id": 49738514366781, "fulfillable_quantity": 1, "variant_id": 47690600218941 } ], "international_duties": null, "fulfill_at": "2024-06-20T04:00:00+08:00", "fulfill_by": null, "fulfillment_holds": [ ], "created_at": "2024-06-20T04:15:52+08:00", "updated_at": "2024-06-20T04:15:52+08:00", "delivery_method": { "id": 903638942013, "method_type": "shipping", "min_delivery_date_time": null, "max_delivery_date_time": null } } ] }

2、 Create a fulfillment https://mystorefr.myshopify.com/admin/api/2024-01/fulfillments.json and return 404 not found:

{ "fulfillment": { "line_items_by_fulfillment_order": [ { "fulfillment_order_id": 6895414509885, "fulfillment_order_line_items": [ { "id": 15234443804989, "quantity": 1 } ] } ], "tracking_info ": { "number": 604835276242, "company": "GLS_DE" }, "notify_customer": true } } Response: { "errors": "Not Found" }