Skip to main content

Quick Start Guide

Get up and running with the LosCenotes Partner API in minutes.


Prerequisites

Before you begin, make sure you have:

  • A LosCenotes Partner account
  • Basic knowledge of REST APIs
  • A development environment (Node.js, Python, PHP, etc.)

Step 1: Get Your API Key

  1. Contact the LosCenotes team at partners@loscenotes.com
  2. Receive your production API key
  3. Start integrating!

API Key Format:

pk_live_abc123def456ghi789jkl012mno345pqr678stu

Step 2: Make Your First API Call

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

All API responses follow this structure:

{
"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:

All prices are in CENTS (centavos).

35000 = $350.00 MXN


Step 4: Calculate Pricing

Use the pricing endpoint for complete price calculations:

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:

{
"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

Validate and create a reservation:

1. Validate First

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

See the Checkout Guide for payment processing.


Common Headers

HeaderRequiredDescription
X-API-KeyYour API key
Content-Typeapplication/json
Accept-LanguageResponse language (es, en, fr)

What's Next?


Need Help?