Skip to main content

Guide Locations API

The Guide Locations API manages the locations where guides provide their services. Each guide can operate in multiple cities, regions, or destinations, helping tourists find guides available in their desired travel locations.

Base Endpoint

/api/guide_locations

Guide Location Model

guideLocationId
integer
required
Unique identifier for the guide location
userId
integer
required
User ID of the guide
locationName
string
required
Name of the location where the guide operates (e.g., “Cancún”, “Oaxaca”, “Mexico City”)

Add Location to Guide

Add a new service location for a guide.
POST /api/guide_locations

Request Body

userId
integer
required
User ID of the guide
locationName
string
required
Name of the service location

Example Request

curl -X POST "http://localhost:8080/api/guide_locations" \
  -H "Content-Type: application/json" \
  -d '{
    "userId": 12,
    "locationName": "Guanajuato"
  }'

Example Response

{
  "guideLocationId": 1,
  "userId": 12,
  "locationName": "Guanajuato"
}

Get All Guide Locations

Retrieve all guide location records.
GET /api/guide_locations

Example Request

curl -X GET "http://localhost:8080/api/guide_locations"

Example Response

[
  {
    "guideLocationId": 1,
    "userId": 12,
    "locationName": "Guanajuato"
  },
  {
    "guideLocationId": 2,
    "userId": 12,
    "locationName": "San Miguel de Allende"
  },
  {
    "guideLocationId": 3,
    "userId": 15,
    "locationName": "Oaxaca"
  }
]

Get Guide Location by ID

Retrieve a specific guide location by ID.
GET /api/guide_locations/{id}

Path Parameters

id
integer
required
Guide location ID

Example Request

curl -X GET "http://localhost:8080/api/guide_locations/1"

Example Response

{
  "guideLocationId": 1,
  "userId": 12,
  "locationName": "Guanajuato"
}

Update Guide Location

Update an existing guide location.
PUT /api/guide_locations/{id}

Path Parameters

id
integer
required
Guide location ID

Request Body

userId
integer
required
User ID of the guide
locationName
string
required
Updated location name

Example Request

curl -X PUT "http://localhost:8080/api/guide_locations/1" \
  -H "Content-Type: application/json" \
  -d '{
    "userId": 12,
    "locationName": "Guanajuato City"
  }'

Example Response

{
  "guideLocationId": 1,
  "userId": 12,
  "locationName": "Guanajuato City"
}

Remove Guide Location

Delete a guide location by ID.
DELETE /api/guide_locations/{id}

Path Parameters

id
integer
required
Guide location ID

Example Request

curl -X DELETE "http://localhost:8080/api/guide_locations/1"

Example Response

204 No Content

Usage Examples

Get All Locations for a Guide

To get all service locations for a specific guide:
# Get all locations
curl -X GET "http://localhost:8080/api/guide_locations" \
  | jq '.[] | select(.userId == 12)'

Add Multiple Locations for a Guide

To add multiple service locations for a guide:
# Add Guanajuato
curl -X POST "http://localhost:8080/api/guide_locations" \
  -H "Content-Type: application/json" \
  -d '{"userId": 12, "locationName": "Guanajuato"}'

# Add San Miguel de Allende
curl -X POST "http://localhost:8080/api/guide_locations" \
  -H "Content-Type: application/json" \
  -d '{"userId": 12, "locationName": "San Miguel de Allende"}'

# Add León
curl -X POST "http://localhost:8080/api/guide_locations" \
  -H "Content-Type: application/json" \
  -d '{"userId": 12, "locationName": "León"}'

Common service locations for guides in Mexico:
LocationStateRegion
CancúnQuintana RooCaribbean Coast
Playa del CarmenQuintana RooRiviera Maya
TulumQuintana RooRiviera Maya
Mexico CityCDMXCentral Mexico
OaxacaOaxacaSouthern Mexico
GuanajuatoGuanajuatoBajío
San Miguel de AllendeGuanajuatoBajío
Puerto VallartaJaliscoPacific Coast
GuadalajaraJaliscoWestern Mexico
MeridaYucatánYucatán Peninsula
Cabo San LucasBaja California SurBaja Peninsula
PueblaPueblaCentral Mexico

Guide Profiles

Manage guide profiles

Destinations

Browse official destination listings

Build docs developers (and LLMs) love