Rate Guide API (1.0.0)

Download OpenAPI specification:Download

Documentation for Rate Guide endpoints

Authentication

JWTAuthentication

Security Scheme Type HTTP
HTTP Authorization Scheme bearer
Bearer format "JWT"

Authentication API

All rate guide endpoints require a valid JWT. A token can be generated by sending your username and password in the request body to the POST /api/token/ endpoint. The new access token should then be included in the Authorization header of the subsequent requests (e.g. Authorization: JWT <token>).

Obtain a Token Pair

Takes a set of user credentials and returns an access and refresh JSON web token pair to prove the authentication of those credentials.

Request Body schema: application/json
username
required
string

Username of the user.

password
required
string

Password of the user.

Responses

Request samples

Content type
application/json
{
  • "username": "foo",
  • "password": "bar"
}

Response samples

Content type
application/json
{
  • "refresh": "string",
  • "access": "string"
}

Token Refresh

Takes a refresh type JSON web token and returns an access type JSON web token if the refresh token is valid.

Request Body schema: application/json
refresh
required
string

Refresh token to fetch new Access token.

Responses

Request samples

Content type
application/json
{
  • "refresh": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
}

Response samples

Content type
application/json
{
  • "access": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
}

Verify a Token

Takes a token and indicates if it is valid. This view provides no information about a token’s fitness for a particular use.

Request Body schema: application/json
token
required
string

Access token to be validated.

Responses

Request samples

Content type
application/json
{
  • "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
}

Response samples

Content type
application/json
{
  • "detail": "Token is invalid or expired",
  • "code": "token_not_valid"
}

Quote API

Request a quote for a future shipment.

Create a new Quote-Request

Create a new quote with the required parameters. The quote creation is asynchronous and the quote will be created in the background.

The status can be checked with the /api/quote-requests/{id} endpoint. It can be either pending, failed or ready. If ready, the total price can be read from the 'quote.price' field of the response body.

Authorizations:
Request Body schema: application/json
mode
required
string (EquipmentModeEnum)
Enum: "FTL" "LTL"

Valid equipment modes for the quote.

equipment_type
required
string (EquipmentTypeEnum)
Enum: "DRV" "RFR" "FBE"

Valid equipment types for the quote.

weight
string <decimal>

expected weight of the load.

channel
required
string

Which system originated the quote (for example, the TMS name).

customer_reference
string

Reference for customer tracking

required
object (QuoteRequirements)

Shipment requirements

required
object (Shipper)

Shipper properties

required
Array of objects (Stop) 2 items [ items ]

Pickup and delivery information. If either pickup or delivery dates are unknown, the system will calculate them based on the estimated transit time. If no date is informed, 48h of lead time is assumed. It is preferred to send as many stop details as possible to get a more accurate price.

Array of objects (ShipmentItem) [ items ]

Item information, to track what is being shipped.

Responses

Request samples

Content type
application/json
{
  • "mode": "FTL",
  • "equipment_type": "DRV",
  • "weight": "string",
  • "channel": "string",
  • "customer_reference": "string",
  • "requirements": {
    },
  • "shipper": {
    },
  • "stops": [
    ],
  • "items": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "status": "pending",
  • "status_message": "string",
  • "error_details": "string",
  • "quote": {
    }
}

Retrieve Quote-Request

Retrieve the quote-request with the given id.

Authorizations:
path Parameters
quote_request_id
required
string <uuid>

ID of the Quote-Request

Responses

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "status": "pending",
  • "status_message": "string",
  • "error_details": "string",
  • "quote": {
    }
}

Get Carrier Suggestions

Recommend which carriers within Loadsmart carrier base could be a good candidate to move a load that was quoted in RateGuide. The response will contain up to 20 suggestions ordered by quality. The lower the index in the list, the best is the suggestion.

Authorizations:
JWTAuthentication (suggested_carriers.add_carrier_suggestion)
path Parameters
quote_id
required
string <uuid>

ID of the Quote

Responses

Response samples

Content type
application/json
{
  • "results": [
    ]
}

Get Suggested Carrier Contacts

List of contacts of a given carrier

Authorizations:
JWTAuthentication (suggested_carriers.view_carrier_suggestion)
path Parameters
quote_id
required
string <uuid>

ID of the Quote

carrier_id
required
string <uuid>

ID of the Carrier in Loadsmart network

Responses

Response samples

Content type
application/json
{
  • "results": [
    ]
}

Shipper API

Services to manage shippers

Create a new Shipper

Authorizations:
Request Body schema: application/json
name
required
string <= 255 characters

The name of the shipper (required when creating a new shipper)

email
string or null <email>

Shipper's email

status
string (Status)
Default: "active"
Enum: "active" "inactive"
fuel_rate
number >= 0

The rate per mile to be considered on the fuel surcharge calculation

has_quote_response_integration
boolean
Default: false

Indicates if it is possible to send a quote response to the shipper via integration

tms_url
string <url>

Shipper TMS URL

mileage_provider
required
string (MileageProvider)
Default: "PCM_CURRENT"
Enum: "PCM_CURRENT" "PCM18" "PCM19" "PCM20" "PCM21" "PCM22" "PCM23" "PCM24" "PCM25" "PCM26" "PCM27" "PCM28" "PCM29" "PCM30" "PCM31" "PCM32" "PCM33" "PCM34" "gmaps"

Defines which mileage provider will be used when quoting for the given shipper

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "email": "user@example.com",
  • "status": "active",
  • "fuel_rate": 0,
  • "has_quote_response_integration": false,
  • "tms_url": "string",
  • "mileage_provider": "PCM_CURRENT"
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "email": "user@example.com",
  • "status": "active",
  • "fuel_rate": 0,
  • "has_quote_response_integration": false,
  • "tms_url": "string",
  • "mileage_provider": "PCM_CURRENT"
}

List shippers

Authorizations:
JWTAuthentication (quotes.view_shipper)
Request Body schema: application/json
limit
integer (Limit) <= 50
Default: 50

The number of elements to be sent back in a single request.

offset
integer (Offset)
Default: 0

Offset says to skip that many elements

object or null

Responses

Request samples

Content type
application/json
{
  • "limit": 50,
  • "offset": 0,
  • "filters": {
    }
}

Response samples

Content type
application/json
{
  • "count": 0,
  • "next": {
    },
  • "previous": {
    },
  • "results": [
    ]
}