Skip to main content

Guide Profile Expertise API

The Guide Profile Expertise API manages the many-to-many relationship between guide profiles and expertise area categories. This allows guides to showcase multiple areas of specialization on their profile to attract tourists seeking specific expertise.

Base Endpoint

/api/guide_profile_expertise

Guide Profile Expertise Model

This is a join table with a composite primary key.
userId
integer
required
User ID of the guide profile
expertiseId
integer
required
Expertise area category ID

Add Expertise to Guide Profile

Associate an expertise area with a guide profile.
POST /api/guide_profile_expertise

Request Body

userId
integer
required
User ID of the guide
expertiseId
integer
required
Expertise area ID to add

Example Request

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

Example Response

{
  "userId": 12,
  "expertiseId": 1
}

Get All Guide Profile Expertise

Retrieve all guide-expertise associations.
GET /api/guide_profile_expertise

Example Request

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

Example Response

[
  {
    "userId": 12,
    "expertiseId": 1
  },
  {
    "userId": 12,
    "expertiseId": 3
  },
  {
    "userId": 15,
    "expertiseId": 2
  }
]

Get Specific Guide Profile Expertise

Retrieve a specific guide-expertise association using the composite key.
GET /api/guide_profile_expertise/{userId}/{expertiseId}

Path Parameters

userId
integer
required
Guide user ID
expertiseId
integer
required
Expertise area ID

Example Request

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

Example Response

{
  "userId": 12,
  "expertiseId": 1
}

Update Guide Profile Expertise

Update a guide-expertise association (rarely used since it’s a simple join).
PUT /api/guide_profile_expertise/{userId}/{expertiseId}

Path Parameters

userId
integer
required
Guide user ID
expertiseId
integer
required
Expertise area ID

Request Body

userId
integer
required
User ID (must match path parameter)
expertiseId
integer
required
Expertise ID (must match path parameter)

Remove Expertise from Guide Profile

Remove an expertise association from a guide profile.
DELETE /api/guide_profile_expertise/{userId}/{expertiseId}

Path Parameters

userId
integer
required
Guide user ID
expertiseId
integer
required
Expertise area ID

Example Request

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

Example Response

204 No Content

Usage Examples

Get All Expertise Areas for a Guide

To get all expertise areas for a specific guide, filter the results by userId:
# Get all associations for guide user 12
curl -X GET "http://localhost:8080/api/guide_profile_expertise" \
  | jq '.[] | select(.userId == 12)'

Add Multiple Expertise Areas

To add multiple expertise areas to a guide profile, make multiple POST requests:
# Add Archaeological Sites expertise
curl -X POST "http://localhost:8080/api/guide_profile_expertise" \
  -H "Content-Type: application/json" \
  -d '{"userId": 12, "expertiseId": 1}'

# Add Local Cuisine expertise
curl -X POST "http://localhost:8080/api/guide_profile_expertise" \
  -H "Content-Type: application/json" \
  -d '{"userId": 12, "expertiseId": 3}'

# Add Cultural Heritage expertise
curl -X POST "http://localhost:8080/api/guide_profile_expertise" \
  -H "Content-Type: application/json" \
  -d '{"userId": 12, "expertiseId": 5}'

Best Practices

Guides should select 2-5 expertise areas that accurately represent their knowledge and experience. Having too many expertise areas may dilute credibility, while having too few may limit discoverability.
  • Archaeology Guide: Archaeological Sites + Cultural Heritage + Historical Architecture
  • Adventure Guide: Adventure Sports + Wildlife & Nature + Photography
  • Culinary Guide: Local Cuisine + Wine & Spirits + Artisan Crafts
  • Eco-Tourism Guide: Wildlife & Nature + Marine Biology + Wellness & Spirituality
  • Cultural Guide: Cultural Heritage + Artisan Crafts + Urban Exploration

Guide Profiles

Manage guide profiles

Guide Expertise Areas

Browse available expertise categories

Build docs developers (and LLMs) love