Create a new quote based on market rates and your pricing strategy.
POST /api/v1/quotes
Parameter | Type | Required | Description |
---|
origin | string | Yes | Origin city or zip code |
destination | string | Yes | Destination city or zip code |
equipment_type | string | Yes | Type of equipment (e.g., 'dryvan', 'reefer') |
pickup_date | string | Yes | Requested pickup date (YYYY-MM-DD) |
special_requirements | array | No | Array of special requirements |
customer_reference | string | No | Customer's reference number |
curl -X POST 'https://api.drayrates.ai/api/v1/quotes' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"origin": "USLAX",
"destination": "USCHI",
"equipment_type": "dryvan",
"pickup_date": "2024-04-01",
"special_requirements": ["liftgate", "inside_delivery"],
"customer_reference": "PO-123456"
}'
{
"quote": {
"quote_id": "Q-2024-123456",
"status": "active",
"expiry_date": "2024-03-27T23:59:59Z",
"pricing": {
"base_rate": 2850.0,
"fuel_surcharge": 425.0,
"accessorial_charges": {
"liftgate": 75.0,
"inside_delivery": 100.0
},
"total_rate": 3450.0,
"currency": "USD"
},
"service_details": {
"estimated_transit_days": 3,
"guaranteed_service": false,
"pickup_date": "2024-04-01",
"estimated_delivery_date": "2024-04-04"
}
}
}
Get details of an existing quote.
GET /api/v1/quotes/{quote_id}
Parameter | Type | Required | Description |
---|
quote_id | string | Yes | Unique quote identifier |
curl -X GET 'https://api.drayrates.ai/api/v1/quotes/Q-2024-123456' \
-H 'Authorization: Bearer YOUR_API_KEY'
{
"quote": {
"quote_id": "Q-2024-123456",
"status": "active",
"created_at": "2024-03-20T15:30:00Z",
"expiry_date": "2024-03-27T23:59:59Z",
"pricing": {
"base_rate": 2850.0,
"fuel_surcharge": 425.0,
"accessorial_charges": {
"liftgate": 75.0,
"inside_delivery": 100.0
},
"total_rate": 3450.0,
"currency": "USD"
},
"service_details": {
"estimated_transit_days": 3,
"guaranteed_service": false,
"pickup_date": "2024-04-01",
"estimated_delivery_date": "2024-04-04"
},
"customer_reference": "PO-123456"
}
}
Retrieve a list of quotes with optional filtering.
GET /api/v1/quotes
Parameter | Type | Required | Description |
---|
status | string | No | Filter by quote status ('active', 'expired', 'converted') |
start_date | string | No | Filter by creation date range start (YYYY-MM-DD) |
end_date | string | No | Filter by creation date range end (YYYY-MM-DD) |
limit | integer | No | Number of quotes to return (default: 20, max: 100) |
offset | integer | No | Number of quotes to skip (default: 0) |
curl -X GET 'https://api.drayrates.ai/api/v1/quotes?status=active&start_date=2024-03-01' \
-H 'Authorization: Bearer YOUR_API_KEY'
{
"quotes": [
{
"quote_id": "Q-2024-123456",
"status": "active",
"created_at": "2024-03-20T15:30:00Z",
"total_rate": 3450.0,
"currency": "USD",
"route": {
"origin": "USLAX",
"destination": "USCHI"
}
}
],
"pagination": {
"total_count": 45,
"limit": 20,
"offset": 0
}
}
Status Code | Description |
---|
400 | Bad Request - Invalid parameters |
401 | Unauthorized - Invalid API key |
404 | Not Found - Quote not found |
429 | Too Many Requests - Rate limit exceeded |
500 | Internal Server Error |
{
"error": {
"code": "QUOTE_NOT_FOUND",
"message": "The requested quote could not be found",
"details": {
"quote_id": "Q-2024-INVALID"
}
}
}