canonical: https://jentic.com/apis/lonvia.cl/lonvia

# Lonvia Cl API de Control de Acceso - Gimnasio

The Lonvia gym access control API decides whether a person may enter a gym, given their Chilean RUT. Door controllers, turnstiles, and front-desk systems send the RUT, in any format with or without dots and hyphen, and optionally a branch_id to validate membership for one location. The API checks that the user exists, that the membership status is active, and that it has not expired, then returns access true with the member's name and membership_expires date, or access false with a reason, and records every attempt, granted or denied.

## For AI agents

Check whether a gym member may enter by sending their Chilean RUT, optionally for a specific branch, and get back an access decision with the member's name and membership expiry.

## Scope

Does not sell or renew memberships, register new members, or book classes. Use for checking whether a member may enter the gym by RUT only.

## Capabilities

- Validate gym entry for a member by Chilean RUT with POST `/access/check` and receive an access true or false decision
- Restrict the check to one gym location by passing an optional branch_id
- Accept RUTs with or without dots and hyphen, such as 16.937.044-3, 16937044-3, or 169370443
- Return the member's name and membership_expires date when access is granted, and a reason such as no active membership when denied

## Use cases

### Front-desk agent access checks through Jentic

A front-desk assistant agent asks Jentic for the Lonvia access check, sends the RUT a visitor gives at reception, and tells staff whether the person may enter, showing the member's name and membership_expires date when access is granted. The X-API-Token header value stays in your self-hosted Jentic One instance instead of in the agent's prompt.

Example prompt: Search Jentic for 'check gym access by RUT', call POST `/access/check` with rut '16.937.044-3', and report the access value and membership_expires

### Turnstile and door integration

A door controller reads a member's RUT from a card, QR code, or keypad, posts it to the access check, and opens the turnstile only when the response carries access true. Because every attempt is recorded, granted and denied entries both leave a trail on the gym side.

Example prompt: Call POST `/access/check` with rut '169370443' and open the turnstile only if access is true

### Branch-specific membership validation

Gyms with several locations pass branch_id so the check validates membership for that branch only. A member with an active plan at one location is then refused at another branch their plan does not cover.

Example prompt: Call POST `/access/check` with rut '16937044-3' and branch_id 2, then report whether access is allowed at that branch

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/access/check` | Validate a member's gym access by RUT |

## Key resources

- **Access check** — A RUT-based entry decision with member name and membership expiry

## AI readiness

This API is usable in Jentic One now. Its AI-readiness score against Jentic's framework shows where it stands today and where improvements would make it even easier for agents to use.

- **Score:** 58 / 100
- **Maturity:** Foundational
- **Dimensions:**
  - Foundational Compliance: 94 / 100
  - Developer Experience & Jentic Compatibility: 82 / 100
  - AI-Readiness & Agent Experience: 32 / 100
  - Agent Usability: 94 / 100
  - Security: 50 / 100
  - AI Discoverability: 75 / 100
- **View full report:** https://jentic.com/apis/lonvia.cl/lonvia/scorecard
- **How the score is calculated:** https://docs.jentic.com/reference/api-readiness-framework/overview/
- **More about the dimensions:** https://docs.jentic.com/reference/api-readiness-framework/specification/#dimensional-model-overview

### Score it yourself

Every API in the directory is allowlisted, so you can re-score it with no key required.

- **Score your own API:** https://jentic.com/scorecard.md
- **Scoring CLI agent skill:** https://github.com/jentic/jentic-api-scorecard/blob/main/skills/jentic-api-scorecard/SKILL.md

```sh
npx @jentic/api-scorecard-cli score <openapi-url>
```

## Why Jentic

- **Setup:** Wiring this API by hand means sending its static token in the X-API-Token header and normalizing RUT formats yourself. Through Jentic you install once, import it from the API Directory, store the token once, and your agent calls it.
- **Permission scoping:** The spec exposes a single operation, POST `/access/check`, and the RUT and branch travel in the request body, so a rule bounds the agent to that access check rather than to particular members or branches.
- **Credential handling:** Your Lonvia token is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'check gym access by RUT' or 'is this member allowed in', and Jentic returns the Lonvia access check with its input schema so the agent sends the right fields without browsing the reference docs.

## Related APIs

- **Mindbody API** — Fitness studio management with clients, memberships, and class bookings
- **Gymflexa API** — Gym management platform

## FAQ

### What authentication does the Lonvia gym access control API use?

Per its OpenAPI spec, the API uses an apiKey scheme: a static token sent in the `X-API-Token` header. Through Jentic the token is stored encrypted by your own Jentic One instance and injected at call time, so it never enters the agent's prompt or logs.

### Can I check gym access for a specific branch with the Lonvia API?

Yes. POST `/access/check` accepts an optional branch_id alongside the required rut. When branch_id is set, the API validates membership for that branch only; without it, any active, unexpired membership grants access.

### What are the rate limits for the Lonvia gym access control API?

The OpenAPI spec does not specify rate limits. Ask the Lonvia team for current limits before connecting several turnstiles to the same token.

### How do I validate a member's access with the Lonvia API through Jentic?

Install Jentic One with `curl -fsSL https://raw.githubusercontent.com/jentic/jentic-one/main/tools/install.sh | sh`, add the API from the Jentic API Directory, and have your agent search for 'check gym access by RUT'. Jentic returns POST `/access/check` with its schema, and the agent sends the rut and, if needed, branch_id. To run it on your own infrastructure, install Jentic One from its GitHub repo.

### Is there a Lonvia MCP server?

You don't need an MCP server to give your agent the Lonvia gym access control API. Jentic connects it directly from the API Directory: import it, store your credential once, and your agent calls it.

### Can I limit what my agent is allowed to do with the Lonvia API?

Yes. Write a rule that allows only POST `/access/check`, so the agent can answer whether a RUT may enter and nothing more; with a single operation in the spec, that rule is the agent's whole reach, and every call it makes is logged in your Jentic One instance.

### What does the Lonvia API return when access is denied?

A 200 response with access false and a message explaining the reason, such as no active membership or user not found. A granted response carries access true, a message, and a user object with name and membership_expires. Invalid input returns 422 and a bad token returns 401.
