Introduction

Greetings from the Upper team!

We are pleased to give you our API access to help you do better with daily delivery operations. Integrate any application with ease, and let the automated software collect your data before you go on to plan and optimize routes using Upper’s advanced features.

Basically, the API (Application Programming Interface) allows you to transfer the data from one system to another one. For such seamless data transfer, we have enabled API integration for the business owners like you.

So, whenever you need the data such as addresses, start time, end time, contact name, email, personal note, etc, you can get them with the help of an API token. In short, you will be able to get the necessary parameters to the route planner from any existing system.

The REST API supports multiple languages which means it works with systems using PHP, Go, Erland, cURL (using cmd and Bash), Perl, VB.NET, VBScript, Java, Python, Node, C++, or C#. So, why wait? Connect with multiple systems using your API key.

Got questions or suggestions for us? Why not get in touch with us at [email protected]

Authentication

Business owners having access to API can find the key from profile > settings > WS API. Or else, simply follow the link (https://crew.upperinc.com/setting).

Our team looks forward to handing over an API key in order to help you perform quick route optimization. Below is how does it look like:

x-api-token: {{API TOKEN}}

Admin API'S

Create Route Stop

curl --location -g --request POST '{{base_url}}addDeliveryTask' \
                  --header 'x-api-token: api_token' \
                  --header 'Content-Type: application/x-www-form-urlencoded' \
                   --data-urlencode 'address=6460 S Dixie Hwy, South Miami, Florida' \
                     --data-urlencode 'start_time=10:00:00' \
                     --data-urlencode 'end_time=12:00:00' \
                     --data-urlencode 'contact_name=John' \
                     --data-urlencode 'phone_number=(305) 661-0778' \
                     --data-urlencode '[email protected]' \
                     --data-urlencode 'note=note' \
                     --data-urlencode 'city=South Miami' \
                     --data-urlencode 'state=Florida' \
                     --data-urlencode 'country=United States' \
                     --data-urlencode 'zipcode=33143' \
                     --data-urlencode 'latitude=25.696858' \
                     --data-urlencode 'longitude=-80.298168' \
                     --data-urlencode 'company_name=Kathryne Company' \
                     --data-urlencode 'stop_type=Delivery' \
                     --data-urlencode 'stop_priority=High' \
                     --data-urlencode 'parcel_count=' \
                     --data-urlencode 'stop_duration=' 

               

The above command returns JSON structured like this:

{
               "response_status": "1",
               "message": "success"
            }
            

This endpoint create route stop.

HTTP Request

POST {{base_url}}addDeliveryTask

Header Parameters

Parameter Default Description Required
x-api-token "" api_token Yes

Query Parameters

Parameter Default Description Required
address "" The Address #1 and/or Address #2 of the stop. Yes
start_time "" The start time for this stop's time window constraint. No
end_time "" The end time for this stop's time window constraint. No
contact_name "" The name of the stop, typically your customer’s name. No
phone_number "" The phone number of the stop, typically your customer’s phone number to allow the driver to call them or send an SMS. No
email "" The email of the stop, typically your customer’s email. No
note "" The optional note that will accompany the driver’s instructions. Notes do not affect the optimization process. A free form string. No
city "" The city of the stop. No
state "" The state/province of the stop. No
country "" The country of the stop. No
zipcode "" The zip code of the stop. No
latitude "" The latitude of the stop. No
longitude "" The longitude of the stop. No
company_name "" Typically customer's business name of the stop. No
stop_type "" (Delivery/Pickup) No
stop_priority "" (Normal/Urgent/Crucial/High/Medium/Low) No
parcel_count "" Parcel Count No
stop_duration "" Stay at stop No

Get Stop Details

curl --location -g --request GET '{{base_url}}getStopDetail?stop_id=6460' \
            --header 'x-api-token: api_token' \
            
            
            
            

The above command returns JSON structured like this:

{
               "response_status": "1",
               "message": "Stop Details data successfully get"
               "data":{
               "id": "6460",
               "driver_name": "Driver 1",
               "route_name": "Route 11",
               "stop_status": "None",
               "address": "6460 S Dixie Hwy, South Miami, Florida",
               "latitude": "25.696858",
               "longitude": "-80.298168",
               "contact_name": "John",
               "company_name": "Kathryne Company",
               "phone": "(305) 661-0778",
               "email": "[email protected]",
               "note": "note",
               "city": "South Miami",
               "state": "Florida",
               "country": "United States",
               "zipcode": "33143",
               "earliest_time": "10:00:00",
               "latest_time": "12:00:00",
               "stop_type": "Delivery",
               }    
}
               

This endpoint will return stop details which you have added in Add Delivery Task API.

HTTP Request

GET {{base_url}}getStopDetail

Header Parameters

Parameter Default Description Required
x-api-token "" api_token Yes

Query Parameters

Parameter Default Description Required
stop_id "" Stop ID of Delivery Task Yes

Get Routes

curl --location -g --request GET '{{base_url}}getRoutes' \
            --header 'x-api-token: api_token' \
            
            
            
            

The above command returns JSON structured like this:

{
    "code": "200",
    "message": "Data get successfully"
    "data":[
      {
    "id": "29314",
    "route_name": "Florida Delivery",
    "route_date": "2022-08-10",
    "assigned_drivers": "Nicole D. Joshua",
    "route_status": "Dispatch",
    "stop_duration": 900,
    "optimization_preference": "Time",
    "unit": "Miles",
    "drive_preference": "7",
    "vehicle": "Small Truck",
    "navigation_map": "Apple",
    "trafic_consider": "N",
    "curbside": null,
    "pickup_delivery": "Auto",
    "total_stops": 4,
    "total_drivers": 1,
    "total_time": 3123,
    "total_service_time": 3600,
    "total_distance": 33308,
    "total_delivered_stops": 0,
    "total_missed_stops": 0
    },    
    {
    "id": "29317",
    "route_name": "Southwest Delivery",
    "route_date": "2022-08-10",
    "assigned_drivers": "",
    "route_status": "Upcoming",
    "stop_duration": 900,
    "optimization_preference": "Time",
    "unit": "Miles",
    "drive_preference": "7",
    "vehicle": "Small Truck",
    "navigation_map": "Apple",
    "trafic_consider": "N",
    "curbside": null,
    "pickup_delivery": "Auto",
    "total_stops": 4,
    "total_drivers": 0,
    "total_time": null,
    "total_service_time": null,
    "total_distance": null,
    "total_delivered_stops": 0,
    "total_missed_stops": 0
    }  
    ]  
}


    

This endpoint will return the route list of the current date.

HTTP Request

GET {{base_url}}getRoutes

Header Parameters

Parameter Default Description Required
x-api-token "" api_token Yes

Get Route Stop

curl --location -g --request GET '{{base_url}}getRouteStop?route_id=29314' \
            --header 'x-api-token: api_token' \
            
            
            
            

The above command returns JSON structured like this:

Copy to Clipboard
{ "code": "200", "message": "Data get successfully" "data":[ { "id": "9085", "driver": "Nicole D. Joshua", "v_email": "[email protected]", "v_contact": "644621340", "country": "France", "total_distance": 90848, "total_time": 8635, "v_company_logo_thumb": null, "v_image_thumb": null, "route_stops": [ { "id": 990667, "i_user_id": 9085, "stop_status": "None", "address": "Silver Vase, Southwest 217th Avenue, Homestead, FL, USA", "latitude": "25.5209428", "longitude": "-80.5417392", "address_type": "Start", "stop_order": -1, "contact_name": "", "company_name": "", "phone": "", "email": "", "note": "", "city": "Miami-Dade County", "state": "Florida", "country": "United States", "zipcode": "33031", "earliest_time": null, "latest_time": null, "parcel_place": null, "stop_type": null, "start_time": null, "arrival_time": null, "arrival_status": "None", "Product Id 1": null, "Product Id 2": null, "Product Id 3": null, "Product Id 4": null, "Product Id 5": null, "stop_log": null, "parcel_images": [] }, { "id": 990595, "i_user_id": 9085, "stop_status": "None", "address": "Copper's Nursery, Inc., Southwest 312th Street, Homestead, FL, USA", "latitude": "25.4767829", "longitude": "-80.5471029", "address_type": "Stop", "stop_order": 1, "contact_name": "Miceal Clark", "company_name": "Miceal Inc", "phone": "", "email": "[email protected]", "note": "Florida city flower delivery - St 3rd, House no. 7", "city": "Miami-Dade County", "state": "Florida", "country": "United States", "zipcode": "33030", "earliest_time": null, "latest_time": null, "parcel_place": null, "stop_type": null, "start_time": null, "arrival_time": null, "arrival_status": "None", "Product Id 1": "", "Product Id 2": "", "Product Id 3": "", "Product Id 4": "", "Product Id 5": "", "stop_log": null, "parcel_images": [ { "id": 520, "i_route_stop_id": 990595, "v_image": "https://uprt.cc/img/cGFyY2VsLTUyMA==" } ], "customer_notes": [] }, { "id": 990594 , "i_user_id": 9085 , "stop_status": "None" , "address": "Homestead, FL, USA" , "latitude": "25.4687224" , "longitude": "-80.4775569" , "address_type": "Stop" , "stop_order": 2 , "contact_name": "" , "company_name": "" , "phone": "" , "email": "" , "note": "" , "city": "Miami-Dade County" , "state": "Florida" , "country": "United States" , "zipcode": "" , "earliest_time": null , "latest_time": null , "parcel_place": null , "stop_type": null , "start_time": null , "arrival_time": null , "arrival_status": "None" , "Product Id 1": "", "Product Id 2": "", "Product Id 3": "", "Product Id 4": "", "Product Id 5": "", "stop_log": null, "parcel_images": [ { "id": 519, "i_route_stop_id": 990594, "v_image": "https://uprt.cc/img/cGFyY2VsLTUxOQ==" } ], "customer_notes": [] }, { "id": 990668, "i_user_id": 9085, "stop_status": "None", "address": "Henry's Range, Southwest 228th Avenue, Homestead, FL, USA", "latitude": "25.4704514", "longitude": "-80.56198909999999", "address_type": "End", "stop_order": -1, "contact_name": "", "company_name": "", "phone": "", "email": "", "note": "", "city": "Miami-Dade County", "state": "Florida", "country": "United States", "zipcode": "33030", "earliest_time": null, "latest_time": null, "parcel_place": null, "stop_type": null, "start_time": null, "arrival_time": null, "arrival_status": "None", "Product Id 1": null, "Product Id 2": null, "Product Id 3": null, "Product Id 4": null, "Product Id 5": null, "stop_log": null, "parcel_images": [], "customer_notes": [] } ] } ] }

This endpoint will return the route’s detail by ID.

HTTP Request

GET {{base_url}}getRouteStop

Header Parameters

Parameter Default Description Required
x-api-token "" api_token Yes

Query Parameters

Parameter Default Description Required
route_id "" ID of particular route Yes

WebHooks

Upper Route Planner allows you to use webhook we can notify you about the events. You can register a new webhook at our platform ("https://crew.upperinc.com/setting").

Events

Errors

The Upper Route Planner API uses the following error codes:

Error Code Meaning
400 Bad Request -- Your request is invalid.
401 Unauthorized -- Your API key is wrong.
404 Not Found -- The specified request could not be found.
500 Internal Server Error -- We had a problem with our server. Try again later.
503 Service Unavailable -- We're temporarily offline for maintenance. Please try again later.