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

Intermodal Region

Operations

Order

Operations

Warehouse

Operations

Pickup Number Agent

Operations

Create Pickup Number Agent

Request

The API endpoint is designed to create a pickup number agent.

Security
bearerAuth
Bodyapplication/jsonrequired
namestringrequired

Pickup Number Agent Name

emailsArray of strings(email)required

Array of Email

curl -i -X POST \
  https://api.drayeasy.com/api/v2/pickupNumberAgents \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "string",
    "emails": [
      "user@example.com"
    ]
  }'

Responses

created successfully

Bodyapplication/json
dataobject(PickupNumberAgent)
Response
application/json
{ "data": { "id": 0, "name": "string", "emails": [], "user_id": 0, "user": {} } }

Search Pickup Number Agents

Request

The API endpoint is used to fetch pickup number agents by their names.

Security
bearerAuth
Query
namestring

Filter pickup number agents by name

curl -i -X GET \
  'https://api.drayeasy.com/api/v2/pickupNumberAgents/{pickupNumberAgentId}?name=string' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

List of pickup number agents matching the search criteria

Bodyapplication/json
idinteger

Agent ID

namestring

Agent name

emailsArray of strings(email)

Agent email addresses

user_idinteger

Associated user ID

userobject(User)
Response
application/json
{ "id": 0, "name": "string", "emails": [ "user@example.com" ], "user_id": 0, "user": { "name": "Name1", "email": "email1@email.com", "company": "Company1" } }

Update Pickup Number Agent

Request

The API endpoint is designed to update a pickup number agent.

Security
bearerAuth
Path
pickupNumberAgentIdintegerrequired

ID of the pickup number agent to update

Bodyapplication/jsonrequired
namestringrequired

Pickup Number Agent Name

emailsArray of strings(email)required

Array of Email

curl -i -X PUT \
  'https://api.drayeasy.com/api/v2/pickupNumberAgents/{pickupNumberAgentId}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "string",
    "emails": [
      "user@example.com"
    ]
  }'

Responses

Pickup Number Agent updated successfully

Bodyapplication/json
dataobject
Response
application/json
{ "data": { "id": 0, "name": "string", "emails": [], "user_id": 0, "user": {} } }

Delete Pickup Number Agent

Request

This endpoint is used to delete a specific pickup number agent based on their ID.

Security
bearerAuth
Path
pickupNumberAgentIdintegerrequired

ID of the pickup number agent to delete

curl -i -X DELETE \
  'https://api.drayeasy.com/api/v2/pickupNumberAgents/{pickupNumberAgentId}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Pickup Number Agent deleted successfully