> For the complete documentation index, see [llms.txt](https://docs.limio.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.limio.com/api/session-api/session.md).

# Session

Session-scoped endpoints for authenticated end-users. Retrieve entitlements and permissions for the current user session.

## Get User Entitlements

> Retrieve the entitlements for the current user session. Entitlements represent the products, features, or content the authenticated user is entitled to access based on their active subscriptions. Commonly used by storefronts to gate content or show personalised offers.

```json
{"openapi":"3.1.0","info":{"title":"Limio Commerce API","version":"1.0.0"},"tags":[{"name":"Session","description":"Session-scoped endpoints for authenticated end-users. Retrieve entitlements and permissions for the current user session."}],"servers":[{"url":"https://{tenant}/api","description":"Limio environment API","variables":{"tenant":{"default":"your-environment.prod.limio.com","description":"Your Limio environment hostname, e.g. `acme.prod.limio.com` or `acme-sandbox.prod.limio.com`."}}}],"security":[{"sessionAuth":[]}],"components":{"securitySchemes":{"sessionAuth":{"type":"http","scheme":"bearer","bearerFormat":"Session Token","description":"Session-scoped Bearer token for authenticated end-user operations. Used by the Limio SDK to retrieve user-specific data such as entitlements. Tokens are issued during the checkout or login flow."}},"schemas":{"UserSessionEntitlementsResponse":{"type":"object","properties":{"owner":{"type":"string","description":"The limio identity that owns the session."},"entitlements":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"The entitlement code"},"startDate":{"type":"string","format":"date","description":"The start date of the entitlement"},"endDate":{"type":"string","format":"date","description":"The end date of the entitlement"},"effectiveDate":{"type":"string","format":"date","description":"The effective date of this request"},"type":{"type":"string","enum":["subscription"]}}}}}}},"responses":{"401Response":{"description":"Unauthorized — the request lacks valid authentication credentials. Verify your Bearer token or API key is correct and has not expired.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"502Response":{"description":"Bad Gateway — an upstream service returned an unexpected response. This typically indicates an issue with the request payload (e.g. invalid field values, missing required fields) or a transient infrastructure error. Retry the request, and if the issue persists, verify the request body matches the expected schema.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Human-readable error description."}}}}}}}},"paths":{"/session/entitlements":{"get":{"operationId":"getEntitlements","tags":["Session"],"summary":"Get User Entitlements","description":"Retrieve the entitlements for the current user session. Entitlements represent the products, features, or content the authenticated user is entitled to access based on their active subscriptions. Commonly used by storefronts to gate content or show personalised offers.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSessionEntitlementsResponse"}}}},"401":{"$ref":"#/components/responses/401Response"},"502":{"$ref":"#/components/responses/502Response"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.limio.com/api/session-api/session.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
