Skip to content

Drayage API (1.0.0)

Drayage API documentation

Languages
Servers
Production server
https://api.drayeasy.com/api/v2/

User Profile

Request

Method: GET

Security
bearerAuth
curl -i -X GET \
  https://api.drayeasy.com/api/v2/users/profile \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Successful response

Bodyapplication/json
namestring

The full name of the user as registered in the system.

Example: "John Doe"
available_balancenumber

The available balance of the user.

Example: 90937.58
rate_search_limitinteger

The maximum number of search queries allowed within a defined time frame.

Example: 100
remaining_rate_search_limitinteger

The number of search queries a user can still perform before hitting the limit.

Example: 100
rate_search_limit_refresh_in_secondsinteger

Time in seconds until the search rate limit is reset to its maximum value.

Example: 100
requested_rate_create_limitinteger

The maximum number of create rate requests a user can make within a set period.

Example: 100
remaining_requested_rate_create_limitinteger

The available quota of create rate requests before reaching the allocated limit.

Example: 100
requested_rate_create_limit_refresh_in_secondsinteger

Time in seconds until the create rate limit is replenished to its full capacity.

Example: 100
Response
application/json
{ "name": "John Doe", "available_balance": 90937.58, "rate_search_limit": 100, "remaining_rate_search_limit": 100, "rate_search_limit_refresh_in_seconds": 100, "requested_rate_create_limit": 100, "remaining_requested_rate_create_limit": 100, "requested_rate_create_limit_refresh_in_seconds": 100 }

City Search

Request

This API endpoint offers a flexible way to retrieve information about cities by supporting search queries based on city names or UN/LOCODEs. It's designed to help users find detailed city data, including geographic coordinates and zip codes.

Note: Either the 'query' or 'unlocode' parameter must be present. However, 'unlocode' should be the only active option when both 'query' and 'unlocode' parameters are present.

Security
bearerAuth
Query
querystring

Search query for city name. Format: [CityName],[StateCode]

Example: query=Ontario,CA
unlocodestring

UN/LOCODE search parameter. This takes precedence over 'query' when both are present.

Example: unlocode=USONT
curl -i -X GET \
  'https://api.drayeasy.com/api/v2/cities?query=Ontario%2CCA&unlocode=USONT' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Cities found successfully

Bodyapplication/json
dataArray of objects
Response
application/json
{ "data": [ {} ] }

Rate Search

Request

This API endpoint is designed to facilitate detailed searches for freight rates across various intermodal regions. It allows users to specify criteria such as intermodal region ID, destination city ID, container size, cargo types, and whether the area has limited access.

Security
bearerAuth
Query
intermodal_region_idintegerrequired

The id of Intermodal Region

to_city_idintegerrequired

The id of City

cntr_sizeinteger

The container size (20, 40, 45). It is strongly recommended to send request with cntr_size parameter, if not, 40 will be used by default

Default 40
Enum204045
cargo_typesArray of integers

2: HAZMAT, 3: REEFER. For example, [2, 3] refers to the hazmat and reefer container. empty array or null refers to general cargo

Items Enum23
weightnumber(float)

Container weight value

weight_unitstring

Container weight unit, accept lb or kg only

Enum"lb""kg"
cargo_valuenumber(float)

Cargo value, if not provided, premium will be 0, minimum is 0, maximum is 1000000

Example: cargo_value=100000
is_limited_area_accessboolean

Limited area access

curl -i -X GET \
  'https://api.drayeasy.com/api/v2/rates/advanceSearch?intermodal_region_id=0&to_city_id=0&cntr_size=20&cargo_types=2&weight=0.1&weight_unit=lb&cargo_value=100000&is_limited_area_access=true' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Successful rate search response

Bodyapplication/json
dataobject
Response
application/json
{ "data": { "intermodal_region": {}, "to_city": {}, "currency": "USD", "remaining_limit": 18, "rates": [], "premium": 56, "quote_id": "string" } }

Rate Request

Operations

Get Rate Requests

Request

This endpoint is used to retrieve a list of rate requests. You can filter the results based on the Rate Request ID, Intermodal Region ID, and Destination City ID.

Security
bearerAuth
Query
idinteger

The id of the Rate Request

intermodal_region_idinteger

The id of Intermodal Region

to_city_idinteger

The id of To City

pageinteger

Current page of the list, default: 1

Default 1
per_pageinteger

Current per page of the list, default: 20

Default 20
curl -i -X GET \
  'https://api.drayeasy.com/api/v2/rateRequests?id=0&intermodal_region_id=0&to_city_id=0&page=1&per_page=20' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Successful response

Bodyapplication/json
dataArray of objects
linksobject
metaobject
Response
application/json
{ "data": [ {} ], "links": { "first": "https://api.drayeasy.com/api/v2/rateRequests?page=1", "last": "https://api.drayeasy.com/api/v2/rateRequests?page=1", "prev": "string", "next": "string" }, "meta": { "current_page": 1, "from": 1, "last_page": 1, "path": "https://api.drayeasy.com/api/v2/rateRequests", "per_page": "20", "to": 1, "total": 2 } }

Create Rate Request

Request

This endpoint is used to create rate requests. It requires specifying the Intermodal Region ID and the ID of the destination city. Optionally, you can provide a specific ZIP code and additional memo notes.

Security
bearerAuth
Bodyapplication/jsonrequired
intermodal_region_idintegerrequired

The id of Intermodal Region

Example: 94
to_city_idintegerrequired

The id of To City

Example: 115
to_zipcodestring

Specific Zipcode

Example: "91803"
memostring

Memo

Example: null
curl -i -X POST \
  https://api.drayeasy.com/api/v2/rateRequests \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "intermodal_region_id": 94,
    "to_city_id": 115,
    "to_zipcode": "91803",
    "memo": null
  }'

Responses

Rate request created successfully

Bodyapplication/json
dataobject
Response
application/json
{ "data": { "id": 1470, "to_zipcode": "91803", "status": "created", "rejected_reason": null, "created_at": "2022-12-01 13:58:25", "memo": null, "to_city_id": 115, "intermodal_region_id": 94, "intermodal_region": "Los Angeles/Long Beach - CA", "to_city": "Ontario, CA, USA", "remaining_limit": 100 } }

Intermodal Region

Operations

Order

Operations

Warehouse

Operations

Pickup Number Agent

Operations