This guide will help you get started with the GG365 Golf API quickly.
Prerequisites
A GG365 API key (contact [email protected] to obtain one)
Basic knowledge of REST APIs and JSON
A development environment capable of making HTTPS requests
Step 1: Authentication
All API requests require an API key, which should be included in the X-Api-Key header.
GET /v1/courses HTTP/1.1
Host: api.golfglobe365.com
X-Api-Key: gg365_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Step 2: List Available Golf Courses
Retrieve a list of golf courses to display to your users.
GET /v1/courses?page=1&pageSize=10 HTTP/1.1
Host: api.golfglobe365.com
X-Api-Key: gg365_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Example response:
{
"data" : [
{
"id" : "clx9k2m1a0001" ,
"name" : "Marbella Golf Country Club" ,
"slug" : "marbella-golf-country-club" ,
"country" : "ES" ,
"region" : "Andalusia" ,
"city" : "Marbella" ,
"courseType" : "resort" ,
"holes" : 18 ,
"thumbnailUrl" : "https://cdn.golfglobe365.com/prod/course/marbella-golf-thumb.jpg" ,
"minPrice" : 75.00 ,
"currency" : "EUR" ,
"latitude" : 36.5150 ,
"longitude" : -4.8847
}
],
"meta" : {
"pagination" : {
"page" : 1 ,
"pageSize" : 10 ,
"totalItems" : 325 ,
"totalPages" : 33
}
}
}
Step 3: Search for Courses by Location
Find golf courses near a specific location using the geographic search endpoint.
GET /v1/courses?latitude=36.5150&longitude=-4.8847&distance=30 HTTP/1.1
Host: api.golfglobe365.com
X-Api-Key: gg365_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Step 4: Get Course Details
Retrieve detailed information about a specific course.
GET /v1/courses/clx9k2m1a0001 HTTP/1.1
Host: api.golfglobe365.com
X-Api-Key: gg365_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Step 5: Check Tee Time Availability
Look up available tee times for a specific date.
GET /v1/courses/clx9k2m1a0001/tee-times?date=2025-12-15&players=2 HTTP/1.1
Host: api.golfglobe365.com
X-Api-Key: gg365_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Step 6: Create a Booking
Make a booking for an available tee time.
POST /v1/bookings HTTP/1.1
Host: api.golfglobe365.com
Content-Type: application/json
X-Api-Key: gg365_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
{
"courseId": "clx9k2m1a0001",
"teeTimeId": "tt_20251215_0830_001",
"date": "2025-12-15",
"players": [
{
"firstName": "Michael",
"lastName": "Rodriguez",
"email": "[email protected] ",
"dateOfBirth": "1985-03-15",
"phone": "+34 600 123 456",
"handicap": 12.5,
"isLead": true
},
{
"firstName": "Sarah",
"handicap": 18.0
}
],
"agencyReference": "TRV-2025-00123",
"notes": "Client prefers morning tee times"
}
Example response:
{
"data" : {
"id" : "bk_clx9k5n2b0045" ,
"status" : "confirmed" ,
"bookingReference" : "GG365-2025-12345" ,
"agencyReference" : "TRV-2025-00123" ,
"course" : {
"id" : "clx9k2m1a0001" ,
"name" : "Marbella Golf Country Club"
},
"date" : "2025-12-15" ,
"time" : "08:30" ,
"players" : 2 ,
"pricing" : {
"currency" : "EUR" ,
"pricePerPlayer" : 85.00 ,
"totalAmount" : 170.00
},
"createdAt" : "2025-10-02T14:22:33Z"
}
}
Step 7: Retrieve Booking Details
Get information about an existing booking.
GET /v1/bookings/bk_clx9k5n2b0045 HTTP/1.1
Host: api.golfglobe365.com
X-Api-Key: gg365_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Step 8: Set Up Webhook Notifications
To receive real-time updates about booking status changes, set up a webhook endpoint in your system. Register your webhook URL in the GG365 dashboard.
POST /v1/webhooks HTTP/1.1
Host: api.golfglobe365.com
Content-Type: application/json
X-Api-Key: gg365_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
{
"url": "https://api.yourtravelagency.example/webhooks/gg365",
"events": ["booking.confirmed", "booking.cancelled", "booking.modified"],
"description": "Production booking notifications"
}
Complete Integration Flow
Display golf courses to users based on search criteria
Show course details when a user selects a specific course
Present available tee times for the user's selected date
Collect player information required for the booking
Create the booking using the booking endpoint
Track booking status through webhook notifications
Allow management of existing bookings (view, modify, cancel)
Sample Code
JavaScript/Node.js Example
const axios = require ( 'axios' );
const API_KEY = 'gg365_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' ;
const BASE_URL = 'https://api.golfglobe365.com/v1' ;
const api = axios. create ({
baseURL: BASE_URL ,
headers: {
'X-Api-Key' : API_KEY ,
'Content-Type' : 'application/json'
}
});
// Search for courses in Spain
async function findCoursesInSpain () {
try {
const response = await api. get ( '/courses' , {
params: {
country: 'ES' ,
pageSize: 20
}
});
return response.data;
} catch (error) {
console. error ( 'Error searching courses:' , error.response?.data || error.message);
throw error;
}
}
// Check tee time availability
async function checkTeeTimeAvailability ( courseId , date ) {
try {
const response = await api. get ( `/courses/${ courseId }/tee-times` , {
params: { date }
});
return response.data;
} catch (error) {
console. error ( 'Error checking tee times:' , error.response?.data || error.message);
throw error;
}
}
// Create a booking
async function createBooking ( bookingData ) {
try {
const response = await api. post ( '/bookings' , bookingData);
return response.data;
} catch (error) {
console. error ( 'Error creating booking:' , error.response?.data || error.message);
throw error;
}
}
// Example usage
async function main () {
// Find courses in Spain
const courses = await findCoursesInSpain ();
console. log ( `Found ${ courses . data . length } courses in Spain` );
if (courses.data. length > 0 ) {
// Get the first course
const firstCourse = courses.data[ 0 ];
console. log ( `Selected course: ${ firstCourse . name }` );
// Check tee time availability for tomorrow
const tomorrow = new Date ();
tomorrow. setDate (tomorrow. getDate () + 1 );
const teeTimeDate = tomorrow. toISOString (). split ( 'T' )[ 0 ];
const teeTimeAvailability = await checkTeeTimeAvailability (
firstCourse.id,
teeTimeDate
);
console. log ( `Available tee times: ${ teeTimeAvailability . data . length }` );
if (teeTimeAvailability.data. length > 0 ) {
// Select the first available tee time
const firstTeeTime = teeTimeAvailability.data[ 0 ];
console. log ( `Selected tee time: ${ firstTeeTime . time }` );
// Create a booking
const booking = await createBooking ({
courseId: firstCourse.id,
teeTimeId: firstTeeTime.id,
date: teeTimeDate,
players: [
{
firstName: "Michael" ,
lastName: "Rodriguez" ,
email: "[email protected] " ,
dateOfBirth: "1985-03-15" ,
phone: "+34 600 123 456" ,
handicap: 12.5 ,
isLead: true
},
{
firstName: "Sarah" ,
handicap: 18.0
}
],
agencyReference: "TRV-2025-" + Date. now ()
});
console. log ( 'Booking created!' );
console. log ( `Booking reference: ${ booking . data . bookingReference }` );
console. log ( `Status: ${ booking . data . status }` );
}
}
}
main (). catch (console.error);
Next Steps
Once you've completed the basic integration:
Implement error handling for robustness
Add webhook handling for real-time updates
Implement caching strategies for better performance
Add support for booking management (modification, cancellation)
Enhance your UI with course photos and detailed information
Refer to the Best Practices section for more advanced integration guidance.
Last modified on October 28, 2025