Skip to main content

API Endpoints

All endpoints require authentication and are prefixed with /v3/order:

Error Handling

Environment Differences

⚠️ Important: Currently, error behavior differs between sandbox and production environments: Recommendation: For now, handle both 400 and 404 responses as potential slot-unavailability scenarios.

Frequently Asked Questions

Q: Do I need to parse error messages to distinguish between different 400 errors?

Yes. Since multiple error types return 400 status codes, you must examine the error message content to determine the appropriate handling:
  • Time in the past: "This appointment slot is no longer available. Please select a new time." → Select new slot
  • Invalid booking key: "Invalid booking key format" → Fix request
  • Missing parameters: "radius must be provided when using zip_code" → Fix request
  • Order state issues: "Order is not in a state that allows booking..." → Contact support
HTTP status codes alone are insufficient because our API uses 400 for multiple distinct error categories that require different user experiences.

Error Categories

Slot Unavailability Errors

The user should select a different time slot

Input Validation Errors

Fix the request parameters

Order State Errors

Order workflow or business logic issues

Appointment Management Errors

Appointment-specific business rules

Authorization Errors

Access control issues

Service Availability Errors

System configuration or availability

Testing Error Scenarios

Sandbox Testing

  • Most validation errors can be tested in sandbox
  • Slot conflicts cannot be reliably tested (mock client always succeeds)
  • Use invalid parameters to test input validation

Production Testing

  • Test with caution using real appointments
  • Slot conflicts will return actual 404 errors from Quest
  • Time-based errors can be tested with past dates

Quest API Limitations

  • Timeout: 15 seconds read timeout, 5 seconds connection timeout
  • Slot availability: Real-time, can change between availability check and booking
  • Mock client: Doesn’t simulate all real-world scenarios
  • Rate limiting: Standard Quest API rate limits apply