Skip to main content

Data Exchange and Appointment Booking Process

The schemas below are reference shapes for the contract between Avoca and your API — they illustrate the information Avoca can send and expects back, and are tailored to your system’s actual field names and formats during the integration process. Existing production integrations use flatter, partner-specific payloads over the payload handshake. Optional blocks (e.g. notifications_sent) apply only if your system provides them — customer notifications are typically sent by your system, not by Avoca.

Inbound Data Schema (AI → Your APIs)

Booking Request Schema
Availability Query Schema

Expected API Responses

Success – Availability Check
Success – Booking Creation
Error – Unavailable Slot
Error – Validation Failure
Error Codes We Expect
  • SLOT_UNAVAILABLE
  • VALIDATION_ERROR
  • CUSTOMER_NOT_FOUND
  • SERVICE_NOT_AVAILABLE
  • DUPLICATE_BOOKING
  • RATE_LIMIT_EXCEEDED
  • AUTHENTICATION_FAILED
  • AUTHORIZATION_FAILED
  • INTERNAL_SERVER_ERROR
  • SERVICE_UNAVAILABLE

Latency & Asynchronous Handling

Timeout Configuration
  • Availability queries: 5-second timeout
  • Booking creation: 10-second timeout
  • Customer updates: 5-second timeout
  • Webhook delivery: 30-second timeout
Retry Logic
  • Automatic retries: 3 attempts with exponential backoff (1 s, 2 s, 4 s)
  • Idempotency: All mutations include idempotency keys (Idempotency-Key: {unique_request_id})
  • Retry-safe: Only idempotent operations retried automatically
  • Circuit breaker: After 5 consecutive failures, 60-second cooldown period
Asynchronous Operations
202 Accepted response:
Polling:
Response:
Real-Time Conversational Handling – During live customer interactions (phone/chat):
  • User experience priority: Display “checking availability…” messaging
  • Progressive disclosure: Show partial results as they arrive
  • Graceful degradation: Offer callback/email options if systems slow
  • Optimistic UI: Tentatively show likely success while awaiting confirmation

Omnichannel Integration Flow

Voice Calls
SMS/Text
Email
Cross-Channel Continuity
  • Each customer interaction includes a session_id for conversation tracking
  • Customers can start on one channel (call) and complete on another (email link)
  • APIs should support lookup by customer identifier across channels