Drayage API documentation
Drayage API (1.0.0)
- Production serverhttps://api.drayeasy.com/api/v2/users/profile
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
https://api.drayeasy.com/api/v2/users/profile \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'Successful response
The maximum number of search queries allowed within a defined time frame.
The number of search queries a user can still perform before hitting the limit.
Time in seconds until the search rate limit is reset to its maximum value.
The maximum number of create rate requests a user can make within a set period.
The available quota of create rate requests before reaching the allocated limit.
{ "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 }
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.
- Production serverhttps://api.drayeasy.com/api/v2/cities
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://api.drayeasy.com/api/v2/cities?query=Ontario%2CCA&unlocode=USONT' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'{ "data": [ { … } ] }
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
2: HAZMAT, 3: REEFER. For example, [2, 3] refers to the hazmat and reefer container. empty array or null refers to general cargo
Cargo value, if not provided, premium will be 0, minimum is 0, maximum is 1000000
- Production serverhttps://api.drayeasy.com/api/v2/rates/advanceSearch
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
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>'{ "data": { "intermodal_region": { … }, "to_city": { … }, "currency": "USD", "remaining_limit": 18, "rates": [ … ], "premium": 56, "quote_id": "string" } }
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
Name of the warehouse facility
Complete street address of the warehouse
Indicates if this is a residential address. Default is false
Postal/ZIP code of the warehouse location
Specifies who handles appointments:
- 0 - Unknown
- 1 - No appointment needed
- 2 - Customer handles appointments
- 3 - DrayEasy handles appointments
Additional notes or instructions for customers
Starting working day:
- 0 - Sunday
- 1 - Monday
- 2 - Tuesday
- 3 - Wednesday
- 4 - Thursday
- 5 - Friday
- 6 - Saturday
Ending working day:
- 0 - Sunday
- 1 - Monday
- 2 - Tuesday
- 3 - Wednesday
- 4 - Thursday
- 5 - Friday
- 6 - Saturday
Start of working hours in 24-hour format (HH:mm)
End of working hours in 24-hour format (HH:mm)
Time zone of the warehouse location
List of contact persons for the warehouse
Contact roles:
- APT - Appointment scheduling
- SALES - Sales related contact
- DISPATCH - Dispatch operations
- ACCOUNTING - Accounting matters
- Production serverhttps://api.drayeasy.com/api/v2/warehouses
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
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"
}
]
}'{ "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": [ … ] } }
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.
- Production serverhttps://api.drayeasy.com/api/v2/warehouses/{warehouseId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
https://api.drayeasy.com/api/v2/warehouses/2376 \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'{ "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": [ … ] } }
0: Sunday, 1: Monday, 2: Tuesday, 3: Wednesday, 4: Thursday, 5: Friday, 6: Saturday
0: Sunday, 1: Monday, 2: Tuesday, 3: Wednesday, 4: Thursday, 5: Friday, 6: Saturday
Array of Contacts
One or more of this set of data: APT, SALES, DISPATCH, ACCOUNTING
- Production serverhttps://api.drayeasy.com/api/v2/warehouses/{warehouseId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
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"
}
]
}'{ "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": [ … ] } }
- Production serverhttps://api.drayeasy.com/api/v2/warehouses/{warehouseId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X DELETE \
'https://api.drayeasy.com/api/v2/warehouses/{warehouseId}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'