Quick Start
Integrate Chatelier in 5 minutes. Search hotels, check availability, and create bookings — all with simple REST API calls.
Step 1: Discover the API
Start by fetching our Agent Card. This JSON file describes all available capabilities, making it easy for AI agents to understand what Chatelier can do.
curl https://api.chatelier.net/.well-known/agent.jsonThe response includes all available skills, input schemas, and usage examples. This follows the A2A (Agent-to-Agent) protocol for easy discovery.
Step 2: Search Hotels
Find available hotels by location and dates. The API returns detailed information including prices, photos, and amenities.
curl -X POST https://api.chatelier.net/a2a/tasks \
-H "Content-Type: application/json" \
-d '{
"skillId": "search_hotels",
"input": {
"location": "Sri Lanka",
"checkin": "2025-01-15",
"checkout": "2025-01-17",
"guests": 2
}
}'| Parameter | Type | Description |
|---|---|---|
locationrequired | string | City, country, or region name |
checkinrequired | string | Check-in date (YYYY-MM-DD) |
checkoutrequired | string | Check-out date (YYYY-MM-DD) |
guests | number | Number of guests (default: 2) |
Response Example
{
"task": {
"status": "completed",
"output": {
"hotels": [
{
"slug": "voda-hotel",
"name": "VODA Hotel & Spa",
"tagline": "Boutique beachfront hotel with infinity pool",
"location": {
"city": "Weligama",
"country": "Sri Lanka"
},
"price": {
"from": 85,
"currency": "USD"
},
"rating": 4.7,
"photos": ["https://..."]
}
]
}
}
}Step 3: Check Availability
Get real-time room availability and pricing for a specific hotel. This queries the hotel's PMS directly for accurate data.
curl -X POST https://api.chatelier.net/a2a/tasks \
-H "Content-Type: application/json" \
-d '{
"skillId": "check_availability",
"input": {
"hotel_id": "voda-hotel",
"checkin": "2025-01-15",
"checkout": "2025-01-17",
"guests": 2
}
}'Step 4: Create Booking
Create a reservation with guest details. The response includes the payment address where the guest should send USDC.
agent_referral in your booking request to earn 3% commission. See the AI Partner Program for details.curl -X POST https://api.chatelier.net/a2a/tasks \
-H "Content-Type: application/json" \
-d '{
"skillId": "create_booking",
"input": {
"hotel_id": "voda-hotel",
"room_type_id": "room-uuid-from-availability",
"checkin": "2025-01-15",
"checkout": "2025-01-17",
"guest": {
"name": "John Doe",
"email": "john@example.com",
"phone": "+1234567890"
},
"agent_referral": {
"agent_id": "my-travel-agent",
"agent_name": "My Travel AI",
"wallet_address": "0x1234...5678"
}
}
}'Response Example
{
"task": {
"status": "completed",
"output": {
"booking_id": "b7a8c9d0-1234-5678-abcd-ef0123456789",
"confirmation_number": "VODA-ABC123",
"status": "pending_payment",
"total_amount": 170.00,
"currency": "USD",
"payment": {
"method": "USDC",
"network": "Base",
"receiver": "0x0Cd2499744636Fa7dC154E2D71D1326afeE653D7",
"amount": 170.00,
"expires_at": "2025-01-10T12:00:00Z"
},
"payment_url": "https://api.chatelier.net/pay/b7a8c9d0-1234-..."
}
}
}Step 5: Confirm Payment
After the guest sends payment, call confirm_payment to verify the blockchain transaction and finalize the booking.
curl -X POST https://api.chatelier.net/a2a/tasks \
-H "Content-Type: application/json" \
-d '{
"skillId": "confirm_payment",
"input": {
"booking_id": "b7a8c9d0-1234-5678-abcd-ef0123456789"
}
}'The API checks the Base blockchain for incoming USDC transfers to the hotel's wallet. Once payment is verified, the booking status changes to "confirmed" and the guest receives their voucher.