Jen143 Jen143 - 1 year ago 117
JSON Question

Cannot update fulfillment in Shopify

I have this:

in updating the fulfillment.

I have this following json data to update:

{ "fulfillment": {"id":3604167143,"order_id":4015640143,"status":"success","tracking_numbers":"6J700123456","variant_inventory_management":"shopify"}}

It returns a 400 error - Bad request.

Is there anything I've missed in passing the data to update? Thanks.

Answer Source

You'll want to send tracking_numbers as an array, rather than a string. Try something like this:

    "fulfillment": {
        "id": 3604167143,
        "order_id": 4015640143,
        "status": "success",
        "tracking_numbers": ["6J700123456"],
        "variant_inventory_management": "shopify"

If you look in the body of the response from Shopify then you can sometimes find more info about what went wrong.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download