Resources
Find what you need here

API Getting Started

Learn how to integrate with the Drayrates API to access market rates, generate quotes, and manage your pricing programmatically.

Authentication

All API requests require authentication using API keys:

curl -X GET "https://api.drayrates.ai/api/v1/rates" \
  -H "Authorization: Bearer YOUR_API_KEY"

Base URL

All API requests should be made to:

https://api.drayrates.com/v1

Rate Limits

  • 1000 requests per minute for standard plans
  • Custom limits available for enterprise plans
  • Burst limits may apply

Response Format

All responses are returned in JSON format:

{
  "success": true,
  "data": {},
  "meta": {
    "request_id": "req_123",
    "timestamp": "2024-01-20T12:00:00Z"
  }
}

Error Handling

Standard HTTP status codes:

  • 200: Success
  • 400: Bad Request
  • 401: Unauthorized
  • 403: Forbidden
  • 429: Too Many Requests
  • 500: Server Error

Error response format:

{
  "success": false,
  "error": {
    "code": "invalid_request",
    "message": "Detailed error message"
  }
}