"line_items":"expected Hash to be a Array" when trying to create fulfillment

Highlighted
New Member
1 0 1

Hi everyone.

I'm trying to send next params to /admin/api/2020-04/orders/{order_id}/fulfillments.json

Array
(
    [fulfillment] => Array
        (
            [location_id] => 47670722709
            [tracking_number] => 
            [line_items] => Array
                (
                    [0] => Array
                        (
                            [variant_id] => 34586053542037
                            [quantity] => 1
                        )

                )

        )

)

json {
"fulfillment" :{
"location_id" :47670722709,
"tracking_number" :null,
"line_items" : [
{
"id":5547874910357
}
]
}
}

and got next error  "line_items":"expected Hash to be a Array".

Have no idea why - doing exactly as in documentation

https://shopify.dev/docs/admin-api/rest/reference/shipping-and-fulfillment/fulfillment?api[version]=...

 

could anyone help me please?

1 Like
New Member
2 0 1

We are also having the same issue, and it seems over the past few weeks multiple people on the forums are also having this issue. Does anyone have any ideas? Is this an issue on the Shopify end?

1 Like