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 inCANCELLED, 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 theid, 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 ofpickup or delivery.
Reschedule the return delivery only:
Code Sample
Code Sample
Code Sample
If rescheduling changes the delivery cost, includepaymentMethodTokento cover the difference. If the order uses invoicing or no payment is required, you can omit it or passnull.
Step 3. Handle the response
On success the API returns the updated order details. CheckorderTotal, pickupDeliveryFee, and returnDeliveryFee to confirm the updated costs reflect the new window selection.
Code Example