DM Web Services Documentation

GetLastMileRate

Returns last-mile freight rate estimates for a given origin, destination, service level, and freight details.

All responses are HTTP 200. Check the status field for Success or Error.


Function Overview

  • Purpose: Get last-mile freight rate quotes based on origin/destination, service level, line items, and accessorials.
  • REST Endpoint: POST /api/public/v1/rating/GetLastMileRate
  • SOAP Operation: GetLastMileRate(LastMileRateRequest)
  • Authentication: Required -- Bearer token in HTTP Authorization header

REST Interface

Headers

Authorization: Bearer <token>
Content-Type: application/json

Request Body

{
  "originZipCode": "75201",
  "destinationZipCode": "78701",
  "rateDate": "2026-05-08T00:00:00Z",
  "serviceLevel": "OHS",
  "totalWeight": 500,
  "lineItems": [
    {
      "class": 100,
      "weight": 500,
      "description": "General Freight",
      "pieces": 1,
      "length": 48,
      "width": 40,
      "height": 40
    }
  ],
  "accessorials": [
    {
      "accessorialType": "Liftgate",
      "locationType": 1
    }
  ]
}

Request Fields

FieldTypeRequiredDescription
originZipCodestringYesOrigin ZIP code
destinationZipCodestringYesDestination ZIP code
rateDatedatetimeNoDate for the rate quote. Defaults to today if omitted or zero.
serviceLevelstringYesService level code (e.g. "OHS") or full name (e.g. "Outside Home - Signature"). See table below.
totalWeightintNoTotal shipment weight in pounds
lineItemsarrayYesAt least one line item required. See line item fields below.
accessorialsarrayNoOptional accessorial charges. See accessorial fields below.

Line Item Fields

FieldTypeDescription
classintFreight class (e.g. 100, 150, 200)
weightintWeight in pounds
descriptionstringItem description
piecesintNumber of pieces
lengthintLength in inches
widthintWidth in inches
heightintHeight in inches

Accessorial Fields

FieldTypeDescription
accessorialTypestringAccessorial type name (e.g. "Liftgate", "Inside Delivery")
locationTypeint0 = Pickup, 1 = Delivery

Service Levels

CodeFull Name
OHSOutside Home - Signature
OHNOutside Home No Signature
IHTIn-Home Threshold
ROCRoom of Choice
ROPRoom of Choice - Remove
WGLWhite Glove Light Assembly/Disassembly
WGCWhite Glove Complex Assembly

Either the code or the full name is accepted.

Response -- Success

{
  "status": "Success",
  "errors": [],
  "rates": [
    {
      "carrierName": "Test Carrier",
      "carrierReference": "TSTC",
      "transitDays": 3,
      "mileage": 500,
      "serviceLevel": "Outside Home - Signature",
      "grossCharges": 200.00,
      "discount": 10.00,
      "netCharges": 220.00,
      "fuelSurcharge": 30.00,
      "accessorialCharges": 0.00,
      "totalCharges": 250.00,
      "errorText": "",
      "lineItemRates": [
        {
          "class": 100,
          "billedClass": 100,
          "weight": 500,
          "description": "General Freight",
          "pieces": 1,
          "ratePer100": 40.00,
          "totalLineItemCharge": 200.00
        }
      ],
      "accessorials": [
        {
          "name": "Liftgate",
          "location": "Delivery",
          "charge": 75.00
        }
      ]
    }
  ]
}

Response -- Error

{
  "status": "Error",
  "errors": ["OriginZipCode is required.", "At least one LineItem is required."],
  "rates": []
}

Response Fields

FieldDescription
status"Success" or "Error"
errorsError messages when status is "Error"
ratesArray of rate results. May contain multiple carrier quotes.
rates[].carrierNameCarrier display name
rates[].carrierReferenceCarrier reference code
rates[].transitDaysEstimated transit days
rates[].mileageDistance in miles
rates[].serviceLevelService level on the quote
rates[].grossChargesPre-discount charges
rates[].discountDiscount amount
rates[].netChargesNet charges after discount
rates[].fuelSurchargeFuel surcharge
rates[].accessorialChargesTotal accessorial charges
rates[].totalChargesTotal charges (net + fuel + accessorials)
rates[].errorTextCarrier-specific error text (empty on clean quote)
rates[].lineItemRatesPer-line-item rate breakdown
rates[].accessorialsPer-accessorial charge breakdown

SOAP Interface

WSDL

/soap/public/v1/rating?singlewsdl

Authentication

SOAP uses the same HTTP Authorization: Bearer <token> header as REST. No SOAP security header element.

SOAP Request

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
                  xmlns:rat="http://dmwebservices.com/rating/public/v1">
  <soapenv:Body>
    <rat:GetLastMileRate>
      <rat:request>
        <rat:OriginZipCode>75201</rat:OriginZipCode>
        <rat:DestinationZipCode>78701</rat:DestinationZipCode>
        <rat:RateDate>2026-05-08T00:00:00Z</rat:RateDate>
        <rat:ServiceLevel>OHS</rat:ServiceLevel>
        <rat:TotalWeight>500</rat:TotalWeight>
        <rat:LineItems>
          <rat:RateLineItem>
            <rat:Class>100</rat:Class>
            <rat:Weight>500</rat:Weight>
            <rat:Description>General Freight</rat:Description>
            <rat:Pieces>1</rat:Pieces>
            <rat:Length>48</rat:Length>
            <rat:Width>40</rat:Width>
            <rat:Height>40</rat:Height>
          </rat:RateLineItem>
        </rat:LineItems>
        <rat:Accessorials>
          <con:Accessorial xmlns:con="http://dmwebservices.easyfreight.com/contracts/v1">
            <con:AccessorialType>Liftgate</con:AccessorialType>
            <con:LocationType>1</con:LocationType>
          </con:Accessorial>
        </rat:Accessorials>
      </rat:request>
    </rat:GetLastMileRate>
  </soapenv:Body>
</soapenv:Envelope>

Downloads


Related Resources