Postponing Delivery for 7 Days with Shopify's API: What's the Right Approach?

I’m trying to push back a delivery by a week using Shopify’s API. I’ve been messing with the order UPDATE endpoint, but I’m not getting anywhere. Here’s what I’ve tried:

POST /admin/api/2023-04/orders/12345678.json
{
  "order": {
    "id": 12345678,
    "fulfillment_status": null,
    "fulfillments": [
      {
        "id": 87654321,
        "location_id": 11223344,
        "tracking_number": "ABCDEF123456789",
        "tracking_url": "https://tracking.example.com/ABCDEF123456789",
        "status": "delayed",
        "delayed_until": "2023-06-05T00:00:00Z"
      }
    ],
    "line_items": [
      {
        "id": 98765432,
        "fulfillment_status": null
      }
    ]
  }
}

This didn’t do the trick. Can someone point me to the right API and payload to use? I just need to set the order’s shipping to be delayed for a week. Any help would be awesome!

I’ve worked with Shopify’s API for delaying shipments before, and I can confirm that the order UPDATE endpoint isn’t the way to go. You need to use the Fulfillment API instead. Specifically, you should be looking at the fulfillment delay endpoint.

The endpoint you want is:

POST /admin/api/2023-04/fulfillments/{fulfillment_id}/delay.json

In your request body, include:

{
“fulfillment”: {
“new_deliver_at”: “2023-06-05T00:00:00Z”
}
}

Make sure the fulfillment hasn’t been marked as shipped yet. If it has, you might need to cancel and recreate it. This approach should solve your problem of postponing the delivery by a week.

hey, i had this issue too. the trick is to use the fulfillment delay endpoint, not the order update one. It’s like this:

POST /admin/api/2023-04/fulfillments/{fulfillment_id}/delay.json

with this body:

{
“fulfillment”: {
“new_deliver_at”: “2023-06-05T00:00:00Z”
}
}

just make sure the order hasn’t shipped yet. hope this helps!

I’ve encountered a similar issue before. The key point is that trying to delay a delivery using the order update endpoint won’t work because Shopify’s API expects such changes to be handled via the Fulfillment API. Instead, you should target the fulfillment delay endpoint:

POST /admin/api/2023-04/fulfillments/{fulfillment_id}/delay.json

Include the following in your request body:

{
“fulfillment”: {
“new_deliver_at”: “2023-06-05T00:00:00Z”
}
}

Remember, this method is only applicable if the fulfillment hasn’t been marked as shipped. If it has, you might have to cancel and recreate the fulfillment. I hope this helps resolve your issue.