Updating a Delivery
After creating a draft job, use the PATCH /jobs/{job_id}/deliveries endpoint to edit a delivery. Please note that our system currently exclusively supports single pickup jobs, so any modifications to pickup fields in a delivery will be universally applied to all associated deliveries on the same job.
During the Draft status, you have the flexibility to edit all aspects of a delivery.
Upon the confirmation of the job, which makes it available to couriers, a refined set of editable fields is enforced. Subsequently, only fields that do not affect the pricing are allowed to be modified. Below is a comprehensive list of statuses along with the editable aspects of the delivery:
- Draft: All aspects of the delivery can be edited.
- Booked: Pickup and drop-off fields that do not affect the quote.
- Courier Proposed: Pickup and drop-off fields that do not affect the quote.
- Accepted by Courier: Pickup and drop-off fields that do not affect the quote.
- At Pickup: Drop-off fields that do not affect the quote.
- En Route: Drop-off fields that do not affect the quote.
For additional information on job statuses, please refer to the Job Statuses page.
The fallback handover fields fallback_handover_method, safe_place_location and leave_safe_instructions are an exception: they can only be set or changed while the job is in Draft. Sending them for a confirmed job returns a 422, and once saved they cannot be removed, only changed to a different value while the job is still in Draft.
Updating the Delivery Sequence
If the job that you're adding the delivery to has a fixed sequence and the update to the delivery changes the sequence_number then the overall sequence of the deliveries will be adjusted accordingly.
Below is a list of scenarios along with how the sequence will be adjusted:
| Scenario | Impact on Sequence |
|---|---|
| Sequence number is updated to be greater than the current value. | All deliveries with a sequence number greater than the original value and less than or equal to the new value will have their sequence numbers decreased by 1. |
| Sequence number is updated to be less than the current value. | All deliveries with a sequence number less than the original value and greater than or equal to the new value of the updated delivery will have their sequence numbers increased by 1. |
Updated 9 days ago
