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

Create Warehouse

Request

This endpoint allows you to create warehouses with various details including name, address, contacts, working hours, and appointment settings.

Key features:

  • Create warehouse with basic information
  • Set working hours and days
  • Add multiple contacts with different roles
  • Configure appointment settings
  • Specify residential/commercial status
Security
bearerAuth
Bodyapplication/jsonrequired
namestring[ 1 .. 255 ] charactersrequired

Name of the warehouse facility

Example: "Test Create Warehouse"
codestring

Unique identifier code for the warehouse

Example: "10222"
addressstringnon-emptyrequired

Complete street address of the warehouse

Example: "123 Warehouse Street"
is_residentialbooleanrequired

Indicates if this is a residential address. Default is false

Default false
Example: false
zipcodestring^[0-9]{5}(?:-[0-9]{4})?$required

Postal/ZIP code of the warehouse location

Example: "90001"
city_idinteger>= 1required

Unique identifier of the city where warehouse is located

Example: 1
appointment_byinteger

Specifies who handles appointments:

  • 0 - Unknown
  • 1 - No appointment needed
  • 2 - Customer handles appointments
  • 3 - DrayEasy handles appointments
Enum0123
Example: 1
live_or_dropinteger

Delivery type:

  • 0 - Unknown
  • 1 - Live unload
  • 2 - Drop and hook
Enum012
Example: 1
customer_memostring

Additional notes or instructions for customers

Example: "Please call 30 minutes before arrival"
working_day_frominteger

Starting working day:

  • 0 - Sunday
  • 1 - Monday
  • 2 - Tuesday
  • 3 - Wednesday
  • 4 - Thursday
  • 5 - Friday
  • 6 - Saturday
Enum0123456
Example: 1
working_day_tointeger

Ending working day:

  • 0 - Sunday
  • 1 - Monday
  • 2 - Tuesday
  • 3 - Wednesday
  • 4 - Thursday
  • 5 - Friday
  • 6 - Saturday
Enum0123456
Example: 5
working_hour_fromstring^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$

Start of working hours in 24-hour format (HH:mm)

Example: "08:00"
working_hour_tostring^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$

End of working hours in 24-hour format (HH:mm)

Example: "17:00"
time_zonestring

Time zone of the warehouse location

Enum"AST""EST""CST""MST""PST""AKST""HST"
Example: "PST"
contactsArray of objectsnon-emptyrequired

List of contact persons for the warehouse

contacts[].​typeArray of stringsnon-emptyrequired

Contact roles:

  • APT - Appointment scheduling
  • SALES - Sales related contact
  • DISPATCH - Dispatch operations
  • ACCOUNTING - Accounting matters
Items Enum"APT""SALES""DISPATCH""ACCOUNTING"
Example: ["APT","SALES"]
contacts[].​namestringnon-emptyrequired

Full name of the contact person

Example: "John Smith"
contacts[].​rolestring

Job title or role of the contact person

Example: "Warehouse Manager"
contacts[].​phonestring^[0-9-+()\s]*$

Contact phone number

Example: "555-123-4567"
contacts[].​faxstring

Fax number if available

Example: "555-123-4568"
contacts[].​emailstring(email)

Email address of the contact person

Example: "john@warehouse.com"
contacts[].​remarkstring

Additional notes about the contact

Example: "Preferred contact method: email"
curl -i -X POST \
  https://api.drayeasy.com/api/v2/warehouses \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Test Create Warehouse",
    "code": "10222",
    "address": "123 Warehouse Street",
    "is_residential": false,
    "zipcode": "90001",
    "city_id": 1,
    "appointment_by": 1,
    "live_or_drop": 1,
    "customer_memo": "Please call 30 minutes before arrival",
    "working_day_from": 1,
    "working_day_to": 5,
    "working_hour_from": "08:00",
    "working_hour_to": "17:00",
    "time_zone": "PST",
    "contacts": [
      {
        "type": [
          "APT",
          "SALES"
        ],
        "name": "John Smith",
        "role": "Warehouse Manager",
        "phone": "555-123-4567",
        "fax": "555-123-4568",
        "email": "john@warehouse.com",
        "remark": "Preferred contact method: email"
      }
    ]
  }'

Responses

created successfully

Bodyapplication/json
dataobject(Warehouse)
Response
application/json
{ "data": { "id": 2798, "name": "TEST", "code": "string", "zipcode": "90001", "appointment_by": 0, "customer_memo": "string", "live_or_drop": 0, "address": "TEST", "delivery_order_address": "TEST\nTEST\nLOS ANGELES, CA, USA 90001", "created_at": "2023-05-25T04:14:14.000000Z", "user": {}, "city": {}, "contacts": [] } }

Get Warehouse Details

Request

This endpoint retrieves specific details about a warehouse identified by its unique warehouseId. The response includes comprehensive information about the warehouse, such as its name, code, address, contact details, working hours, time zone, appointment settings, and other relevant information.

Security
bearerAuth
Path
warehouseIdintegerrequired

Unique identifier of the warehouse to retrieve

Example: 2376
curl -i -X GET \
  https://api.drayeasy.com/api/v2/warehouses/2376 \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Successful retrieval of warehouse details

Bodyapplication/json
dataobject(Warehouse)
Response
application/json
{ "data": { "id": 2798, "name": "TEST", "code": "string", "zipcode": "90001", "appointment_by": 0, "customer_memo": "string", "live_or_drop": 0, "address": "TEST", "delivery_order_address": "TEST\nTEST\nLOS ANGELES, CA, USA 90001", "created_at": "2023-05-25T04:14:14.000000Z", "user": {}, "city": {}, "contacts": [] } }

Update Warehouse

Request

This endpoint allows you to update an existing warehouse in the system. You need to provide the warehouseId of the warehouse you want to update.

Security
bearerAuth
Path
warehouseIdintegerrequired

ID of the warehouse to update

Bodyapplication/jsonrequired
idintegerrequired

Warehouse Id

namestringrequired

Warehouse Name

codestring

Warehouse Code

addressstringrequired

The Street Address

is_residentialbooleanrequired

Residential indicator

zipcodestringrequired

Warehouse Zipcode

city_idintegerrequired

The id of City

appointment_byinteger

0: Unknown, 1: No apt needed, 2: Customer, 3: DrayEasy

Enum0123
live_or_dropinteger

0: Unknown, 1: Live, 2: Drop

Enum012
customer_memostring

Customer Memo

working_day_frominteger

0: Sunday, 1: Monday, 2: Tuesday, 3: Wednesday, 4: Thursday, 5: Friday, 6: Saturday

Enum0123456
working_day_tointeger

0: Sunday, 1: Monday, 2: Tuesday, 3: Wednesday, 4: Thursday, 5: Friday, 6: Saturday

Enum0123456
working_hour_fromstring

Working Hour Begin

working_hour_tostring

Working Hour End

time_zonestring

Time zone

Enum"AST""EST""CST""MST""PST""AKST""HST"
contactsArray of objectsrequired

Array of Contacts

contacts[].​idinteger

Contact ID (required for existing contacts)

contacts[].​typeArray of strings

One or more of this set of data: APT, SALES, DISPATCH, ACCOUNTING

Items Enum"APT""SALES""DISPATCH""ACCOUNTING"
contacts[].​namestringrequired

Contact Name

contacts[].​rolestring

Contact Role

contacts[].​phonestring

Contact Phone

contacts[].​faxstring

Contact Fax

contacts[].​emailstring

Contact Email

contacts[].​remarkstring

Contact Remark

curl -i -X PUT \
  'https://api.drayeasy.com/api/v2/warehouses/{warehouseId}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "id": 0,
    "name": "string",
    "code": "string",
    "address": "string",
    "is_residential": true,
    "zipcode": "string",
    "city_id": 0,
    "appointment_by": 0,
    "live_or_drop": 0,
    "customer_memo": "string",
    "working_day_from": 0,
    "working_day_to": 0,
    "working_hour_from": "string",
    "working_hour_to": "string",
    "time_zone": "AST",
    "contacts": [
      {
        "id": 0,
        "type": [
          "APT"
        ],
        "name": "string",
        "role": "string",
        "phone": "string",
        "fax": "string",
        "email": "string",
        "remark": "string"
      }
    ]
  }'

Responses

Warehouse updated successfully

Bodyapplication/json
dataobject(Warehouse)
Response
application/json
{ "data": { "id": 2798, "name": "TEST", "code": "string", "zipcode": "90001", "appointment_by": 0, "customer_memo": "string", "live_or_drop": 0, "address": "TEST", "delivery_order_address": "TEST\nTEST\nLOS ANGELES, CA, USA 90001", "created_at": "2023-05-25T04:14:14.000000Z", "user": {}, "city": {}, "contacts": [] } }

Delete Warehouse

Request

This endpoint allows you to delete a specific warehouse identified by its unique warehouseId. Upon successful deletion, the warehouse and all associated data, including contacts, appointments, and other details, will be permanently removed from the system.

Security
bearerAuth
Path
warehouseIdintegerrequired

The ID of the warehouse to delete

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

Responses

Warehouse deleted successfully

Pickup Number Agent

Operations