Endpoint URLs


The 3PL must update the current status of the task as it is updated through the Status interaction provided by Instaleap. This is of type POST and the fields it receives are the following

task_idId of the task within Instaleap
statusTask states. They must be sent in the correct order (see chart):

1. ASSIGNED: The driver was assigned and heads to the store.
2. ARRIVED_TO_STORE:The driver arrives at the store.
3. GOING_TO_DESTINATION: The driver has received all the order packages and is now heading towards the destination.
4. ARRIVED_TO_DESTINATION: The driver arrives at the destination.
5. DELIVERED: The order was delivered successfully. Order finalized.

- CANCELLED: The 3PL does not have the capacity to fulfill this order
-DELIVERY_CODE_UPDATED: When it is necessary to update the delivery code that the client will see from the LSW of Instaleap
- CONTACT_INFO_UPDATED: This status does not change the progress of the task, it is a status that can be sent to update the information about the driver (delivery_info)
delivery_info (state wise)Information about the driver. This information will be updated in the Control Tower. If the 3PL is able to send the name, phone number and photo, it can do so from the first status update (ASSIGNED). You can also update the resource info by sending the status CONTACT_INFO_UPDATED
delivery_codeThe code that the customer must provide to the driver to be able to make the delivery, this is optional and can be sent in the DELIVERY_CODE_UPDATED state
status_reason(optional)This field must have the reason why an order was canceled by the 3PL. This is optional and can be sent in the CANCELLED state.

The sending of the states must follow the following order, starting with the ASSIGNED state, since the PROCESSING state visible in the graph is the state with which the task starts in Instaleap. This order ensures the correct flow of task completion

In the special case of the ASSIGNED status, this depends on additional information required from the assigned delivery resource ("delivery_info") such as the name, contact phone number and a url of a photo, this information is only required when receiving this status.

    "task_id": "b4e23f2b-3eeb-4b6c-b196-aa6be921769d",
    "status": "ASSIGNED",
    "delivery_info": {
        "name": "Test Delivery",
        "phone": "+573201234567",
        "photo_url": ""

Example response:

    "status_reason": "STATUS_UPDATED",

CANCELLED payload example:

    "task_id": "b4e23f2b-3eeb-4b6c-b196-aa6be921769d",
    "status": "CANCELLED",
    "status_reason":  "En conductor no la pudo realizar"

DELIVERY_CODE_UPDATED payload example:

    "task_id": "b4e23f2b-3eeb-4b6c-b196-aa6be921769d",
    "status": "DELIVERY_CODE_UPDATED",
    "delivery_code":  "123ABC"