API Endpoints

Creation

When the delivery task is initiated within Instaleap (at optimal times), Instaleap sends detailed information to the 3PL so that it can begin managing the order.

This information is sent through the Create interaction, that is, to the URL provided by the 3PL. Said endpoint must be of type POST. Below is the information sent by Instaleap:

ParameterDescription
task_idId of the task within Instaleap. It is used to manage the task.
job_numberId defined by our clients to identify each order.
fleet_infoName and id of the fleet in Instaleap to which the task was assigned.
client_idClient ID within Instaleap.
created_atDate of sending the payload to the 3PL.
shopper_web_urlWeb link that allows access to more detailed information about the order and management tools if necessary
job_commentComment submitted by customer.
recipientInformation of the person in charge of receiving the order. (see internal fields in the example)
originPlace where the order must be picked up to be delivered. This is usually the location of the store. (see internal fields in the example)
destinationPlace where the order must be delivered to the end user. (see internal fields in the example)
job_itemsList of items that make up the order. (see internal fields in the example)
Possible values for ""unit"" and ""subunit"":
_Kilogram
:
kg - KG - kG - Kg
Pound:
LB - lB - Lb
Liter:
L - l
Milliliter:
ML - ml - mL - Ml
Gram:
g - G - GR - Gr - gr
Milligram:
mg - MG - Mg
Gallon:
gal - GAL - Gal

Possible values for state:

PENDING
ADDED
REMOVED
CANCELLED
REJECTED_BY_DRIVER
REJECTED_BY_USER
payment_infoInformation related to the order total, payment method and additional charges. (see internal fields in the example)

Values for "paymenttype":
CASH
: Cash payment
PREPAID: Payment by credit card.
PAYMENT_TERMINAL: Payment with card machine.
LOYALTY_CARD: Points or loyalty card.
PAYMENT_LINK: Payment by payment link
TRANSFER: Payment by transfer"
round_trip_info"enabled": true if the request is round trip
"reason": It is a string with the reason for the round trip or null in
if you do not have a defined reason
slot_infoObject that contains the slot information, contains the following fields:
from: start date
to: end date
reason: slot type, it can be of the following types:
FALLBACK
FALLBACK_EXPRESS
EXPRESS
STATIC
packages_quantitynumber of packages

Below is an example of the information that is sent in JSON format:

{
    "task_id": "b4e23f2b-3eeb-4b6c-b196-aa6be921769d",
    "job_number": "I23H6HN",
    "client_id": "TEST_ID",
    "created_at": "2021-12-29T21:30:04.411Z",
    "shopper_web_url": "https://3pl-app.instaleap.io/?env=production&providerId",
    "job_comment": "comentario",
    "round_trip_info" : {
        "enabled" : true,
        "reason" : "any reason"
    },
    "fleet_info": {
        "id" : "b4e23f2b-3eeb-4b6c-b196-aa6be921769d",
        "name": "fleet name"
    },
    "recipient": {
        "name": "Vicente Fernandez",
        "email": "[email protected]",
        "phone_number": "+52 22342342"
    },
    "origin": {
        "name": "Bodega Xilotzingo",
        "address": "Boulevard Valsequillo 7716, Col. Ex hacienda San Jose Xilotzingo 72590",
        "address_two": "",
        "description": "Cluster: R3-D28, Teléfono: 2645642",
        "country": "Mexico",
        "city": "Heroica Puebla de Zaragoza",
        "state": "",
        "zip_code": "",
        "latitude": 18.992891,
        "longitude": -98.200737,
        "store_reference": "3901"
    },
    "destination": {
        "name": "Bodega Aurrera Xilotzingo, Ex hacienda, San José Xilotzingo, Puebla, Mexico",
        "address": "Bodega Aurrera Xilotzingo, Ex hacienda, San José Xilotzingo, Puebla, Mexico",
        "address_two": "",
        "description": "Apto",
        "country": "Mexico",
        "city": "Puebla",
        "state": "Puebla",
        "zip_code": "0",
        "latitude": 18.9927414,
        "longitude": -98.2004911
    },
    "job_items": [
        {
            "id": "00750105535889",
            "name": "Té verde Fuze Tea sabor limón 600 ml",
            "comment": "",
            "quantity":  1,
            "sub_quantity": 1,
            "unit": "EA",
            "sub_unit": "EA",
            "price": 13.5,
            "weight": 1,
            "volume": 1,
            "package_reference": "-" , 
            "image_url": "",
            "reference": "",
            "attributes:": {
               "key":"value"
            },
            "state": "ADDED"
        }
    ],
    "payment_info": {
        "currency_code": "MXN",
        "prices": {
            "shipping_fee": 6000,
            "order_value": 450000
        },
        "payment": {
           "method": "PREPAID"
        }
    },
    "slot_info":{
     "from": "2023-09-21T14:00:00.000Z",
     "to":  "2023-09-21T15:59:00.000Z",
     "reason": "STATIC"
   },
   "packages_quantity": 5
}

Example of the expected response:

{
    "service_id": "your_id_123",
    "message": "SUCCESS"
}