Associations & Eligibility Providers
How TeeTime integrates with golf associations for eligibility (pricing/search) and handicap posting.
Providers & codes
| Provider | Code | Used for |
|---|---|---|
| SAGA network | SAGA_NETWORK | Default reciprocity/eligibility (network pricing) |
| GolfRSA | GOLFRSA | Club search + course/tee metadata + posting |
| DotGolf WHS | DOTGOLF | Course search + course/tee metadata + posting |
| Nedbank Greentime | NEDBANK_GREENTIME | Benefit validation/discounts |
| Discovery Vitality | DISCOVERY_VITALITY | Benefit validation/discounts |
APIs
GET /api/associations/golfrsa/clubs?search=— GolfRSA club search (home-club mapping + eligibility hints).GET /api/associations/dotgolf/courses?search=&countryCode=— DotGolf course search.GET /api/associations/course-tee-info?provider=GOLFRSA|DOTGOLF&associationCourseId=...&teeColour=— course/tee rating, slope, par (used by handicap posting and course mapping).- Pricing/search endpoints accept optional eligibility context (
tenantId,membershipNumber,providerCode, optionalhomeClubCode/handicap) and degrade to visitor rates if unavailable or invalid.
Unknown providers return 404; association lookup failures are logged but should not block pricing flows.
Data & storage
- Reciprocity + networks:
ReciprocityAgreement,ReciprocityRateConfig,ClubNetworkMembership(seebenefits.md). - Provider validation + audit:
BenefitProvider,BenefitProviderAssignment,BenefitMembership,BenefitApplication. - Shared datasource:
TEETIME_DATABASE_URL(benefits/associations disable gracefully when unset).
Workflows
- Pricing eligibility: Visitor pricing and multi-club streams forward
{ tenantId, membershipNumber, providerCode, homeClubCode?, handicap? }to apply reciprocity discounts. If validation fails or provider is down, pricing falls back to standard visitor rates with a reason code. - Handicap posting:
HandicapPostingService(tournaments module) posts scorecards to GolfRSA/DotGolf when enabled. Requires course mapping + course/tee metadata (via/api/associations/course-tee-info) and active membership. Posting failures are logged for replay.
Configuration
- Provider credentials and toggles live alongside tee-time env vars; see
configuration.mdandprovider-config.mdfor exact keys (GOLFRSA__*,DOTGOLF__*, etc.). - Ensure outbound network access to provider APIs and Redis/DB connectivity for caching and persistence.
Troubleshooting
- Discounts not applied: ensure clients send
{ tenantId, membershipNumber, providerCode }; check logs for eligibility/association warnings. - Course/tee metadata missing: call
/api/associations/course-tee-infofor the provider/course/tee; verify mapping exists. - Provider unavailable or unknown: API returns 404; pricing/search should continue with visitor rates.
- Posting failures: review tournament logs and provider responses; verify credentials and course mappings before replaying.