From your first search
to an authenticated request.
One reference for cards, discounts and locations. Built from the two supplied HTTP API manuals, with development requests directed to ccdb-devel.eyca.org.
1. Explore public discounts
Open Search discounts, choose the GET or POST operation, set a small limit, and click Test Request. The response-format query parameter type=json is preselected in examples. Public search needs no login.
GET /public/api/discounts/search_discount?type=json&country=ES&keyword=hostel&limit=1&page=1
2. Connect a CCDB session
Use Create session with your development username and password. Copy the returned api_response.text session value. In the Authentication panel select SessionId and paste the value. Scalar adds session_id to protected requests. A session expires after 30 minutes without activity.
The preview uses explicit Session ID transport and does not send browser cookies. Cookie authentication is documented for integrations, but is not enabled in this preview. Manual login creates a session and login log; automated tests do not attempt login. Credentials are not prefilled or persisted across reloads.
3. Read protected data
Try read_card, list_card, count_card, preissue_list, read_discount or list_discount. Your account needs appropriate permissions; private discount management access is arranged with EYCA Office. Always inspect error, code and text as well as the HTTP status.
What this preview can send
| Operation | Preview behaviour |
|---|---|
| Documented searches, reads, lists, counts and ping | Enabled for GET and POST |
| Explicit login | Enabled; credentials entered by the user |
| Create, update, delete, allocate, redeem | Documented; request blocked locally |
| Card verification | Blocked: may activate a pre-issued card |
| Legacy GraphQL-like query | Listed; request grammar missing from the manual |
The preview restriction is a browser-side convenience. The API server remains responsible for authentication and permissions. Downloaded examples or external API clients are outside this preview restriction.
Source documents
This reference is based on CCDB HTTP API for Cards v2.3 and CCDB HTTP API for Discounts v2.3. Tracked insertions were included and tracked deletions excluded. The Cards cover still reads v2.2.4.
Validation results and source uncertainties
Maintaining this documentation
Edit openapi.yaml to add endpoints, change fields or update examples. Run npm run validate and npm run build, then upload the contents of dist/ to your web server. A backend, database and Scalar account are not needed. The JavaScript library and fonts are served locally or supplied by the operating system.
If a new read-only endpoint is added, review its actual side effects before adding it to public/request-policy.js. Writes stay documented and blocked in this development preview.