Quick Start Guide / Guía de Inicio Rápido
Get up and running with the LosCenotes Partner API in minutes.
Comienza a usar la API de Partners de LosCenotes en minutos.
Prerequisites / Requisitos Previos
Before you begin, make sure you have:
Antes de comenzar, asegúrate de tener:
- A LosCenotes Partner account / Una cuenta de Partner de LosCenotes
- Basic knowledge of REST APIs / Conocimiento básico de APIs REST
- A development environment (Node.js, Python, PHP, etc.) / Un ambiente de desarrollo
Step 1: Get Your API Key / Paso 1: Obtén tu Llave API
- Contact the LosCenotes team at partners@loscenotes.com / Contacta al equipo de LosCenotes
- Receive your production API key / Recibe tu llave API de producción
- Start integrating! / ¡Comienza a integrar!
API Key Format / Formato de Llave API:
pk_live_abc123def456ghi789jkl012mno345pqr678stu
Step 2: Make Your First API Call / Paso 2: Haz tu Primera Llamada API
Using cURL
curl -X GET "https://service-gateway.loscenotes.com/partner/cenotes" \
-H "X-API-Key: pk_live_your_api_key" \
-H "Content-Type: application/json" \
-H "Accept-Language: es"
Using JavaScript (fetch)
const response = await fetch('https://service-gateway.loscenotes.com/partner/cenotes', {
method: 'GET',
headers: {
'X-API-Key': 'pk_live_your_api_key',
'Content-Type': 'application/json',
'Accept-Language': 'es'
}
});
const data = await response.json();
console.log(data);
Using Python (requests)
import requests
response = requests.get(
'https://service-gateway.loscenotes.com/partner/cenotes',
headers={
'X-API-Key': 'pk_live_your_api_key',
'Content-Type': 'application/json',
'Accept-Language': 'es'
}
)
data = response.json()
print(data)
Using PHP (cURL)
<?php
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => 'https://service-gateway.loscenotes.com/partner/cenotes',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-API-Key: pk_live_your_api_key',
'Content-Type: application/json',
'Accept-Language: es'
]
]);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);
print_r($data);
Step 3: Handle the Response / Paso 3: Maneja la Respuesta
All API responses follow this structure / Todas las respuestas API siguen esta estructura:
{
"success": true,
"message": "cenotes.list_retrieved_successfully",
"data": [
{
"id": "cenote-uuid-1234",
"name": "Cenote Dos Ojos",
"displayName": "Cenote Dos Ojos",
"slug": "cenote-dos-ojos",
"location": {
"latitude": 20.3274,
"longitude": -87.3821,
"address": "Carretera Tulum-Coba km 15"
},
"basePrice": 35000,
"images": [
{
"url": "https://cdn.loscenotes.com/cenotes/dos-ojos/main.jpg",
"alt": "Vista aérea de Cenote Dos Ojos"
}
],
"availableLanguages": ["es", "en", "fr"]
}
],
"pagination": {
"total": 45,
"perPage": 10,
"currentPage": 1,
"lastPage": 5
},
"currency": {
"code": "MXN",
"symbol": "$"
}
}
⚠️ Important / Importante:
All prices are in CENTS (centavos). / Todos los precios están en CENTAVOS.
35000= $350.00 MXN
Step 4: Calculate Pricing / Paso 4: Calcular Precios
Use the pricing endpoint for complete price calculations:
Usa el endpoint de pricing para cálculos completos de precio:
curl -X POST "https://service-gateway.loscenotes.com/pricing/calculate-complete" \
-H "X-API-Key: pk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"itemType": "cenote",
"itemId": "cenote-uuid-here",
"ageBreakdown": {
"adult": 2,
"child": 1
}
}'
Response / Respuesta:
{
"success": true,
"message": "Cálculo de precio completado exitosamente",
"data": {
"basePrice": 35000,
"ageAdjustments": {
"adult": { "quantity": 2, "multiplier": 1.0, "subtotal": 70000 },
"child": { "quantity": 1, "multiplier": 0.8, "subtotal": 28000 },
"total": 98000
},
"summary": {
"subtotal": 98000,
"discounts": 0,
"total": 98000,
"currency": "MXN"
}
}
}
Step 5: Create a Reservation / Paso 5: Crear una Reservación
Validate and create a reservation:
Valida y crea una reservación:
1. Validate First / Primero Validar
curl -X POST "https://service-gateway.loscenotes.com/public/reservations/validate" \
-H "X-API-Key: pk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"cenoteId": "cenote-uuid",
"date": "2025-03-15",
"startTime": "09:00",
"endTime": "12:00",
"ageBreakdown": {
"adult": 2,
"child": 1
},
"guestEmail": "cliente@email.com",
"guestName": "Juan Pérez"
}'
2. Process Payment / Procesar Pago
See the Checkout Guide for payment processing.
Consulta la Guía de Checkout para procesamiento de pagos.
Common Headers / Headers Comunes
| Header | Required / Requerido | Description / Descripción |
|---|---|---|
X-API-Key | ✅ | Your API key / Tu llave API |
Content-Type | ✅ | application/json |
Accept-Language | ❌ | Response language (es, en, fr) / Idioma de respuesta |
What's Next? / ¿Qué Sigue?
- Authentication / Autenticación - Learn about API security / Aprende sobre seguridad
- Error Handling / Manejo de Errores - Handle errors gracefully / Maneja errores
- Pricing & Age Groups / Precios y Edades - Complete pricing guide / Guía completa de precios
- Checkout & Payments / Checkout y Pagos - Payment processing / Procesamiento de pagos
Need Help? / ¿Necesitas Ayuda?
- 📧 Email: partners@loscenotes.com
- 🌐 API Status: status.loscenotes.com