GolfGlobe365 GAMP
Endpoints

Booking Endpoints

GG365 Golf API

Documentation for the Golf Globe 365 API - Travel Agency Integration


Booking Endpoints

These endpoints allow you to create, manage, and retrieve golf course bookings.

Create a Booking

Code
POST /bookings

Creates a new golf course booking.

Request Body

JSONCode
{ "courseId": "course_123", "date": "2023-07-15", "teeTime": "08:30", "players": 4, "agencyBookingReference": "AG-12345", "playerDetails": [ { "firstName": "John", "lastName": "Smith", "email": "[email protected]", "phone": "+1 234 567 8900", "handicap": 15 }, // Additional players... ], "specialRequests": "Buggy required for 2 players", "contactLanguage": "en" }

Required Fields

FieldTypeDescription
courseIdstringID of the course to book
datestringBooking date (YYYY-MM-DD)
teeTimestringRequested tee time (HH)
playersintegerNumber of players (1-4)
agencyBookingReferencestringYour internal booking reference
playerDetailsarrayArray of player information objects

Response

JSONCode
{ "id": "booking_456", "status": "confirmed", "bookingReference": "GG-987654", "agencyBookingReference": "AG-12345", "course": { "id": "course_123", "name": "Marbella Golf Country Club" }, "date": "2023-07-15", "teeTime": "08:30", "players": 4, "playerDetails": [ // Player details... ], "pricing": { "currency": "EUR", "greenFee": 85.00, "totalAmount": 340.00, "priceBreakdown": { "greenFee": 85.00, "players": 4, "extras": [] } }, "specialRequests": "Buggy required for 2 players", "createdAt": "2023-06-01T14:22:33Z", "confirmationSentTo": "[email protected]" }

For online courses, the booking will be confirmed immediately. For offline courses, the booking will be in a pending state until confirmed by the golf course.

Get Booking Details

Code
GET /bookings/{bookingId}

Retrieves details of a specific booking.

Path Parameters

ParameterTypeDescription
bookingIdstringID of the booking to retrieve

Response

Returns the booking object with the same structure as the create booking response.

List Agency Bookings

Code
GET /bookings

Retrieves a list of all bookings made by your agency.

Query Parameters

ParameterTypeDescription
pageintegerPage number for pagination (default: 1)
limitintegerNumber of results per page (default: 20, max: 100)
statusstringFilter by booking status (confirmed, pending, cancelled)
startDatestringFilter for bookings on or after this date (YYYY-MM-DD)
endDatestringFilter for bookings on or before this date (YYYY-MM-DD)
agencyBookingReferencestringFilter by your internal booking reference

Response

JSONCode
{ "data": [ { "id": "booking_456", "status": "confirmed", "bookingReference": "GG-987654", "agencyBookingReference": "AG-12345", "course": { "id": "course_123", "name": "Marbella Golf Country Club" }, "date": "2023-07-15", "teeTime": "08:30", "players": 4, "pricing": { "currency": "EUR", "totalAmount": 340.00 }, "createdAt": "2023-06-01T14:22:33Z" }, // More bookings... ], "pagination": { "totalItems": 128, "totalPages": 7, "currentPage": 1, "limit": 20 } }

Update a Booking

Code
PATCH /bookings/{bookingId}

Updates an existing booking. Only certain fields can be modified after booking creation.

Path Parameters

ParameterTypeDescription
bookingIdstringID of the booking to update

Request Body

JSONCode
{ "players": 3, "playerDetails": [ // Updated player details... ], "specialRequests": "Updated request: Buggy required for all players", "agencyBookingReference": "AG-12345-UPDATED" }

Modifiable Fields

FieldDescription
playersNumber of players (can only be reduced, not increased)
playerDetailsPlayer information
specialRequestsSpecial requests or notes
agencyBookingReferenceYour internal booking reference

Response

Returns the updated booking object.

Cancel a Booking

Code
DELETE /bookings/{bookingId}

Cancels an existing booking.

Path Parameters

ParameterTypeDescription
bookingIdstringID of the booking to cancel

Query Parameters

ParameterTypeDescription
cancellationReasonstringOptional reason for cancellation

Response

JSONCode
{ "id": "booking_456", "status": "cancelled", "bookingReference": "GG-987654", "cancellationDetails": { "cancelledAt": "2023-06-05T09:12:45Z", "cancelledBy": "agency", "refundAmount": 340.00, "cancellationFee": 0.00, "reason": "Customer request: travel plans changed" } }

Cancellation policies vary by golf course. Some courses may charge a cancellation fee depending on how far in advance the booking is cancelled.

Booking Webhook Notifications

When the status of a booking changes, a webhook notification will be sent to your configured endpoint if you have set up webhooks. See the Webhooks section for more details on configuring and handling webhook notifications.

Last modified on