Skip to main content
This guide walks through how to update the pickup or delivery configuration for an existing service order. Use it when a customer needs to change their delivery window, address, or provider after an order has been placed.

API Endpoints Overview

  • GET /stores/:storeId/delivery-windows: Get available delivery time slots for a new window
  • PATCH /service-order/:serviceOrderId/transportation: Update the pickup or delivery configuration

Notes

Orders in CANCELLED, COMPLETED, or EN_ROUTE_TO_CUSTOMER status cannot be rescheduled.

Step 1. Get an available delivery window

Use GET /stores/:storeId/delivery-windows to fetch the new time slots you want to offer to the customer. This is the same endpoint used during order creation. Refer to the Create Order workflow for full details on the query parameters. From the response, save the id, startTime, and endTime for the window you want to use.
Code Example

Step 2. Reschedule the delivery

Call PATCH /service-order/:serviceOrderId/transportation with at least one of pickup or delivery.
deliveryWindow is a pair of Unix timestamps in milliseconds: [startTime, endTime]. Convert the startTime and endTime values from the delivery windows response to milliseconds before sending.
Reschedule the return delivery only:
Code Sample
Reschedule both pickup and return in one call:
Code Sample
Cancel a scheduled delivery:
Code Sample
If rescheduling changes the delivery cost, include paymentMethodToken to cover the difference. If the order uses invoicing or no payment is required, you can omit it or pass null.

Step 3. Handle the response

On success the API returns the updated order details. Check orderTotal, pickupDeliveryFee, and returnDeliveryFee to confirm the updated costs reflect the new window selection.
Code Example