put https://api.xandar.instaleap.io/jobs//update-delivery-code
This endpoint allows your systems to update the delivery code associated with a job. The delivery code is used for validation during the final delivery step in the Shopper App.
🚚 Most common scenario or integration point
Use this endpoint when the delivery code needs to be updated due to customer request or internal error. The code is validated in the Shopper App before completing the final delivery step.
The job must already exist, and the new delivery code must follow validation rules (see restrictions below).
📌 Use Cases
- Customer lost or changed the delivery code.
- Instaleap or the client wants to regenerate a new code.
- The delivery process was interrupted and the code must be reset.
✏️ Considerations
- The job must have been created with "add_delivery_code": true.
- The new delivery code:
- Must be exactly 4 digits (e.g., "7654").
- Must be numeric.
- Must be updated before the final delivery step starts.
- The delivery code is shown to the customer in the Live Status Tracker.
- The Shopper App will require the driver to enter the correct delivery code to finish delivery.
Request Payload Example
{
"delivery_code": "7654"
}
Response Codes
200 OK
— Delivery code updated successfully400 Bad Request
— Invariant violation or invalid request structure401 Unauthorized
— Invalid or missing authentication credentials404 Not Found
— Job ID not found in the system422 Unprocessable Entity
— Delivery code is invalid (e.g. not numeric or not 4 digits)500 Internal Server Error
— Unexpected error on the server