Local delivery for orders created via apis

Topic summary

Main topic: enabling Shopify’s local delivery workflow for orders created via API.

  • Admin UI supports “Local Delivery” with actions like “prepare for delivery” and “mark as delivered.” Via REST (/orders.json), adding shipping_lines (e.g., code “Local Delivery”) only yields “mark as fulfilled,” not the delivery flow.

  • Suggested workaround: use the Fulfillments API (/admin/api/2022-01/orders/{id}/fulfillments.json) to reflect delivery stages by setting fulfillment status to “in_progress” (prepare) or “success” (delivered). A POST example was provided (code snippet central to the discussion).

  • Reported issue: this workaround doesn’t work for the original poster. Partial success with draft_orders + shipping_line, but some orders become ineligible for checkout even with a bogus payment gateway. They are engaging Shopify Support.

  • Open question: how to trigger customer email updates when fulfillment status changes. Shopify Flow currently doesn’t offer an email action, and no alternative was confirmed.

  • Key terms: “Local Delivery” (Shopify shipping method with special admin actions), “Fulfillment” (processing/delivery state of line items), “Draft order” (order created for later checkout). Discussion remains unresolved.

Summarized with AI on January 28. AI used: gpt-5.

When I create orders manually from the admin UI, I get an option to choose the shipping method as local delivery. On choosing this, I get options like prepare for delivery, mark as delivered, etc.

From admin rest API /orders.json, I am not able to figure out how to do this. If I don’t add shipping_lines, or add with code as “Local Delivery”, The only option i see is mark as fulfilled. (The delivery flow is not enabled.)

Any idea how to get this going?

Venky.

Hi @venkatramanm

Unfortunately, the delivery actions like “prepare for delivery” and “mark as delivered” are not directly available through the API.

Instead, you can update the fulfillment status of the order to reflect the delivery process. For example, you can use the /admin/api/2022-01/fulfillments.json endpoint to create a fulfillment and set the status to “in_progress” when preparing for delivery or “success” when marking as delivered.

POST /admin/api/2022-01/orders/ORDER_ID/fulfillments.json
{
  "fulfillment": {
    "status": "in_progress",
    "tracking_number": "",
    "notify_customer": true,
    "line_items": [
      {
        "id": LINE_ITEM_ID,
        "quantity": 1
      }
    ]
  }
}

Thanks for your reply, This solution does not work for me. I am getting some success with draft_orders and passing shipping_line but for some reason, Shopify keeps throwing me out as not eligible for check out after creating a few orders even if I am using bogus payment gateway. Working with support on this one.

1 Like

Hi Okur90,

This topic is very relevant to us, as we have many local delivery orders.

I wonder, after an order status is updated to “in process” or “Success”, how can I make Shopify email order updates to the customer?

How can I trigger an email to be sent? I tried Shopify Flow, but it seems that, at this time, Flow does not allow an email action.

Please advise if you are familiar with my request.

Thank you