API Docs
API Reference
Rate Last Mile

Rate Last Mile API

Rate Last Mile API provides a quote for last-mile delivery services. This article introduces the general Rate Last Mile API for easily understanding and applying this API.

Introduction

Rate Last Mile API is used to calculate and return the estimated cost for delivering a shipment from the final distribution center to its end destination, typically the customer’s location. It ensures that the customer selects the most cost-effective solution for last-mile deliveries, enhancing overall logistics efficiency.

API Request

API: POST http://service.serviceapp.com/PayAndBillAPI/api/RateEngine/Unisco/lastmile
Auth Header: Authorization: APIKey 45655B2AE0A5F38FB554D8960346D84F27E85E83EC23788A27A353CB86EBE10C
Body Request:

Body ParameterSub ParamRequiredDescriptionNote
UserID-YUser ID1072
DataYDimension Data
OriginZipYFrom Zipcode"90401"
DestZipYTo Zipcode"94116"
LengthYLength"20"
WidthYWidth"20"
HightYHeight"40"
WeightYWeight"120"

Example

Request

curl --location --request POST 'http://service.serviceapp.com/PayAndBillAPI_test/api/RateEngine/Unisco/lastmile' \
--header 'Content-Type: application/json' \
--header 'Authorization: APIKey 45655B2AE0A5F38FB554D8960346D84F27E85E83EC23788A27A353CB86EBE10C' \
--data-raw '{
    "UserID":1072,
    "Data":{
        "OriginZip":"90401",
        "DestZip":"94116",
        "Length":"20",
        "Width":"20",
        "Hight":"40",
        "Weight":"120"
    }
}'

Response

// Success return
{
    "Result": [
        {
            "name": "Last Mile Cost",
            "Price": "98.0000"
        },
        {
            "name": "ROC",
            "Price": "40.0000"
        },
        {
            "name": "WG",
            "Price": "85.0000"
        }
    ],
    "Page": null,
    "ErrorMsg": "",
    "ErrorSeverity": 0,
    "ErrorSource": "PayandBillLog",
    "Status": true
}