Pardivelle API Documentation
Complete reference for integrating with the Pardivelle OAuth API
Quick Start
Get started with the Pardivelle API in minutes
Choose Your Authentication Method
Partner API Keys
Simple API key authentication for displaying experiences and creating reservations on your website.
OAuth 2.0
Full OAuth flow for accessing user data and performing actions on their behalf.
Partner API Quick Start
Create API Key
Generate your API key in the dashboard under API Keys section
Add to Headers
Include X-API-Key header in your requests
Make API Calls
Start fetching experiences and creating reservations
OAuth 2.0 Quick Start
Create OAuth App
Register your application in the OAuth dashboard
Get Access Token
Implement OAuth 2.0 flow to get user authorization
Make API Calls
Use the access token to call our REST endpoints
https://pardivelle.comAPI Endpoints
Available endpoints for accessing Pardivelle data
/api/public/experiencesGet Public Experiences (Partner API)
Retrieve experiences for a specific company using Partner API Key authentication
Headers
X-API-KeyYour Partner API Key (starts with sk_)
Content-TypeMust be application/json
Parameters
companyCompany slug to filter experiences (e.g., "xieltun")
categoryFilter by experience type
locationFilter by city or location name
limitMaximum number of results (default: 20, max: 100)
offsetPagination offset (default: 0)
Response
{
"experiences": [
{
"id": "exp_123",
"title": "Cenote Sacred Experience",
"description": "Immerse yourself in mystical waters...",
"slug": "cenote-sacred-experience",
"price_range": "$150 USD",
"duration": "per person",
"location": "Tulum, Quintana Roo, México",
"category": "spiritual",
"featured_image": "https://...",
"images": [
"https://..."
],
"rating": 4.9,
"reviews_count": 87,
"amenities": [
"transportation",
"guide",
"equipment"
],
"company_profiles": {
"name": "xieltun",
"logo_url": "https://...",
"verified": true
},
"spotlight_status": "select"
}
],
"pagination": {
"limit": 20,
"offset": 0,
"total": 4,
"has_more": false
}
}/api/public/reservationsCreate Reservation (Partner API)
Create a new reservation and generate Stripe checkout session
Headers
X-API-KeyYour Partner API Key (starts with sk_)
Content-TypeMust be application/json
Request Body
{
"experience_id": "exp_123",
"check_in_date": "2025-12-25",
"check_out_date": "2025-12-25",
"guest_count": 2,
"primary_guest_name": "John Doe",
"primary_guest_email": "john@example.com",
"primary_guest_phone": "+1234567890",
"special_requests": "Vegetarian meal options",
"origin": "xieltun"
}Response
{
"success": true,
"sessionId": "cs_test_...",
"url": "https://checkout.stripe.com/...",
"reservationNumber": "XIE20251012AB12",
"linkedToUser": false,
"metadata": {
"experience_name": "Cenote Sacred Experience",
"total_amount": 315.75,
"currency": "USD"
}
}/api/oauth/userGet User Information
Retrieve authenticated user profile information
Response
{
"id": "user_id",
"name": "John Doe",
"email": "john@example.com",
"picture": "https://avatar.url",
"phone": "+1234567890",
"luxury_preferences": {
"budget_range": "luxury",
"preferred_categories": [
"spa",
"dining"
]
},
"created_at": "2024-01-01T00:00:00Z"
}/api/oauth/experiencesGet Experiences
Retrieve available experiences and services
Parameters
companyFilter by company name
locationFilter by location (city, state, or country)
categoryFilter by experience type
limitMaximum number of results (default: 20)
offsetPagination offset (default: 0)
Response
{
"experiences": [
{
"id": "exp_123",
"name": "Cenote Adventure Tour",
"description": "Explore the mystical cenotes...",
"experience_type": "activity",
"base_price_amount": 150,
"base_price_currency": "USD",
"price_per": "person",
"min_capacity": 2,
"max_capacity": 12,
"city": "Tulum",
"state": "Quintana Roo",
"country": "Mexico",
"featured_image_url": "https://...",
"average_rating": 4.8,
"total_reviews": 156,
"amenities": [
"transportation",
"lunch",
"guide"
],
"highlights": [
"cenote swimming",
"cave exploration"
],
"spotlight_status": "select",
"companies": {
"name": "Xieltun Tours",
"logo_url": "https://...",
"is_verified": true
}
}
],
"pagination": {
"limit": 10,
"offset": 0,
"total": 25,
"has_more": true
}
}/api/oauth/destinationsGet Destinations
Retrieve available destinations and locations
Parameters
typeType of destination
regionFilter by region
countryFilter by country (for cities and localities)
featuredOnly featured destinations
limitMaximum number of results (default: 20)
offsetPagination offset (default: 0)
Response
{
"destinations": [
{
"id": "country_123",
"name": "Mexico",
"type": "country",
"description": "A vibrant country...",
"continent": "North America",
"region": "Central America",
"location": "Mexico",
"featured_image_url": "https://...",
"popular_for": [
"beaches",
"culture",
"cuisine"
],
"is_featured": true,
"is_spotlight_edition": true,
"total_cities": 15,
"total_experiences": 127,
"spotlight_rating": 5
}
],
"pagination": {
"limit": 10,
"offset": 0,
"total": 47,
"has_more": true
}
}Code Examples
Ready-to-use code snippets in multiple languages
// OAuth API Example
import { PardiveIleOAuthClient } from '@pardivelle/oauth-client'
const client = new PardiveIleOAuthClient({
clientId: 'your_client_id',
clientSecret: 'your_client_secret',
baseUrl: 'https://pardivelle.com'
})
// Get user profile
const user = await client.getUser()
// Get experiences
const experiences = await client.getExperiences({
category: 'activity',
location: 'Tulum',
limit: 10
})
// Partner API Example (API Key)
const PARTNER_API_KEY = 'sk_xxxxx_xxxxx_xxxxx'
// Fetch experiences for your company
const response = await fetch(
'https://pardivelle.com/api/public/experiences?company=xieltun&limit=10',
{
headers: {
'X-API-Key': PARTNER_API_KEY,
'Content-Type': 'application/json'
}
}
)
const data = await response.json()
// Create a reservation
const reservationResponse = await fetch(
'https://pardivelle.com/api/public/reservations',
{
method: 'POST',
headers: {
'X-API-Key': PARTNER_API_KEY,
'Content-Type': 'application/json'
},
body: JSON.stringify({
experience_id: 'exp_123',
check_in_date: '2025-12-25',
guest_count: 2,
primary_guest_name: 'John Doe',
primary_guest_email: 'john@example.com',
origin: 'xieltun'
})
}
)
const reservation = await reservationResponse.json()
// Redirect user to: reservation.urlOAuth Scopes
Available scopes for accessing different data types
profileAccess to user profile information
emailAccess to user email address
experiencesAccess to experiences and services data
destinationsAccess to destinations and locations data
OAuth 2.0 Flow
Step-by-step guide to implement OAuth authentication
Authorization Request
Redirect user to authorization URL:
client_id=YOUR_CLIENT_ID&
redirect_uri=YOUR_REDIRECT_URI&
response_type=code&
scope=profile email experiences&
state=RANDOM_CSRF_TOKEN&
code_challenge=BASE64URL_SHA256(code_verifier)&
code_challenge_method=S256
Authorization Code Exchange
Exchange code for access token (server-side confidential clients):
Content-Type: application/x-www-form-urlencoded
grant_type=authorization_code&
code=AUTHORIZATION_CODE&
redirect_uri=YOUR_REDIRECT_URI&
client_id=YOUR_CLIENT_ID&
client_secret=YOUR_CLIENT_SECRET&
code_verifier=ORIGINAL_RANDOM_VERIFIER
Mobile/public clients should use your backend exchange endpoint (or/api/oauth/mobile-exchange) and never ship a client secret.
API Requests
Use access token in Authorization header:
Authorization: Bearer ACCESS_TOKEN
Error Codes
Common error responses and how to handle them
401 UnauthorizedInvalid or expired access token. Refresh token or re-authenticate.
403 ForbiddenInsufficient permissions. Check required scopes for the endpoint.
404 Not FoundRequested resource does not exist or user doesn't have access.
429 Rate LimitedToo many requests. Wait before making additional requests.
Spotlight Certification Levels
Understanding Spotlight The Best certification status
Not Certified
No Spotlight certification
Under Review
Application pending
Spotlight Select
Entry level certification
Spotlight Premier
Premium certification
Spotlight Elite
Highest certification
Support & Resources
Additional resources and support channels