DM Web Services Documentation

BookLastMile

Books an existing shipment for last-mile delivery. The service loads all required shipment data by DM Load Number -- no additional fields are needed from the caller.

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


Function Overview

  • Purpose: Register a previously created shipment with the last-mile carrier and receive a carrier PRO number.
  • REST Endpoint: POST /api/public/v1/shipping/BookLastMile
  • SOAP Operation: BookLastMile(BookLastMileRequest)
  • Authentication: Required -- Bearer token in HTTP Authorization header

Pre-conditions

Before calling BookLastMile, the shipment record must have:

  • An existing active shipment created via CreateShipment
  • No CarrierProNumber already set -- duplicate booking is rejected
  • All shipment data required by the carrier must be present on the record

Contact your DM integration coordinator if you are unsure whether your shipment record is ready for booking.

REST Interface

Headers

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

Request Body

{
  "dmLoadNumber": 4363968
}

Request Fields

FieldTypeRequiredDescription
dmLoadNumberdecimalYesThe DM Load Number returned by CreateShipment

Response -- Success

{
  "status": "Success",
  "dmLoadNumber": 4363968,
  "carrierProNumber": "ABCDEF123456",
  "errors": []
}

Response -- Error

{
  "status": "Error",
  "dmLoadNumber": 0,
  "carrierProNumber": null,
  "errors": [
    "Shipment 4363968 already has a carrier PRO number assigned."
  ]
}

Response Fields

FieldDescription
status"Success" or "Error"
dmLoadNumberThe DM Load Number of the booked shipment (echoed from request)
carrierProNumberCarrier-assigned tracking/PRO number. Populated on success.
errorsArray of error messages when status is "Error".

Status Codes

  • 200 OK -- always returned; check status field for outcome
  • 401 Unauthorized -- invalid or missing token

SOAP Interface

WSDL

Live WSDL -- /soap/public/v1/shipping?singlewsdl

Authentication note: Pass your Bearer token as an HTTP header, not inside the SOAP envelope.
Authorization: Bearer <token>

SOAP Request

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
  <soapenv:Header/>
  <soapenv:Body>
    <BookLastMile xmlns="http://dmwebservices.com/shipping/public/v1">
      <request>
        <DMLoadNumber>4363968</DMLoadNumber>
      </request>
    </BookLastMile>
  </soapenv:Body>
</soapenv:Envelope>

SOAP Response -- Success

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
  <s:Body>
    <BookLastMileResponse xmlns="http://dmwebservices.com/shipping/public/v1">
      <result>
        <Status>Success</Status>
        <DMLoadNumber>4363968</DMLoadNumber>
        <CarrierProNumber>ABCDEF123456</CarrierProNumber>
        <Errors/>
      </result>
    </BookLastMileResponse>
  </s:Body>
</s:Envelope>

SOAP Response -- Error

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
  <s:Body>
    <BookLastMileResponse xmlns="http://dmwebservices.com/shipping/public/v1">
      <result>
        <Status>Error</Status>
        <DMLoadNumber>0</DMLoadNumber>
        <CarrierProNumber i:nil="true" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"/>
        <Errors xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <a:string>Shipment 4363968 already has a carrier PRO number assigned.</a:string>
        </Errors>
      </result>
    </BookLastMileResponse>
  </s:Body>
</s:Envelope>

Integration Samples


Related Resources