DM LTL Rating Service -- API Documentation

Error Handling

Understanding how the LTL Rating Service communicates errors and failure states.


Authentication Failures

When an invalid auth code is provided, most endpoints return null (HTTP 200 with a null JSON body) rather than an HTTP error status code. This is by design in the legacy API.

Endpoint TypeAuth Failure Response
Most rating endpointsnull (HTTP 200)
BaseRateOnlyHTTP 404 (NotFound)
RateShipmentHTTP 404 (NotFound)
BookShipment_V3InternalBookShipmentV3 with Status = "Failed: Unauthorized Access."
RequestBOL / Send204false
Important: Always check for null responses before attempting to deserialize. A null HTTP 200 response means your auth code was rejected.

Live Server Enforcement

The service uses a LiveServerIP configuration value to determine if it is running on a production server. On live servers, auth code validation is strictly enforced. On development/test servers, the Flock Freight endpoints allow the DM auth code to bypass some checks.

Client Resolution Failures

When using client auth codes, the service resolves the client's branch GUID from the database. If the branch cannot be identified (returns Guid.Empty), the endpoint returns null.

For BookShipment_V3, additional validation checks include:

  • Credit hold: If the client branch is on credit hold, the response status is "Failed:On Credit Hold."
  • State restrictions: If the shipper or consignee state is HI, AK, or PR, booking is rejected

Exception Handling

The Flock Freight endpoints use try/catch blocks that swallow exceptions and return an empty QuickQuoteResults object. This means:

  • An empty or zero-value response from Flock endpoints may indicate either no rates available or an internal error
  • Check both TotalCharge and TransitDays for non-zero values to confirm a valid rate was returned

Other endpoints may return default-constructed objects or empty lists when no results are found. The RateShipment_ByShipID endpoint explicitly adds an empty InternalRateDetail if no rate details exist.

Logging

Several endpoints log request and response XML to the Nebula log folder (configured via Nebulasuite_LogFolder in Web.config). Logged endpoints include RateShipment, QuickRateByDate, BookShipment, BookShipmentBase, and BookShipment_V3. Log entries include serialized XML of the request/response objects for troubleshooting.

Related Pages