Prototype for board review — all people, orders and payments are fictional. Demo guide
Developers

REST API v1

The same API powers the iOS app, so integrations (Drupal SSO, email platform, QuickBooks, a future vendor) get full read/write coverage. Machine-readable spec: /api/v1/openapi.json (OpenAPI 3).

Quick start

curl -X POST https://ccaconcept.r3vhost.com/api/v1/auth/login \
  -H 'Content-Type: application/json' \
  -d '{"email":"you@example.com","password":"your-password"}'
# → {"token":"…","member":{…}}

curl https://ccaconcept.r3vhost.com/api/v1/me/card -H 'Authorization: Bearer <token>'

Tokens last 90 days and appear under Account → Login & security, where members can revoke them. Officer and staff tokens are limited to the same chapter scope as the back office. Errors are JSON with HTTP 401/403/404/422; validation errors include a fields map.

MethodPathAuthWhat it does
POST/api/v1/auth/loginpublic Log in; returns a bearer token. Send otp when two-step verification is on.
example body
{
    "email": "you@example.com",
    "password": "your-password",
    "otp": "123456",
    "device_name": "Alex's iPhone"
}
POST/api/v1/auth/logoutmember Revoke the current token.
GET/api/v1/planspublic Membership plans and prices.
POST/api/v1/joinpublic / officer Join. With an officer token it records an on-the-spot event signup (no password needed; member gets a set-password email).
example body
{
    "plan": "individual_1",
    "first_name": "Jamie",
    "last_name": "Lee",
    "email": "jamie@example.com",
    "password": "secret123",
    "address1": "1 Main St",
    "city": "Seattle",
    "state": "WA",
    "zip": "98103",
    "payment_method": "apple_pay"
}
GET/api/v1/memember Profile, chapters, vehicles, household, roles.
PATCH/api/v1/memember Update contact info / auto_renew.
example body
{
    "phone": "(206) 555-0100",
    "auto_renew": true
}
GET/api/v1/me/cardmember Digital card data incl. signed QR payload.
GET/api/v1/me/registrationsmember My event registrations.
GET/api/v1/me/transactionsmember Membership payment history.
POST/api/v1/me/renewmember Renew (mock payment).
example body
{
    "plan": "individual_3",
    "payment_method": "apple_pay"
}
POST/api/v1/me/vehiclesmember Add a vehicle.
example body
{
    "year": 2004,
    "model": "M3",
    "chassis": "E46",
    "is_track_car": true
}
GET/api/v1/eventspublic Upcoming events. Filters: type, chapter, state, q, mine=1, limit.
GET/api/v1/events/{id}public Event detail (includes my_registration when authenticated).
POST/api/v1/events/{id}/registermember Register; waitlists automatically when full.
example body
{
    "run_group": "Novice",
    "vehicle_id": 12,
    "waiver_name": "Alex Turner",
    "payment_method": "apple_pay"
}
GET/api/v1/chapterspublic All chapters; ?zip=98103 returns the matching chapter.
GET/api/v1/chapters/{id}public Chapter detail with officers and upcoming events.
GET/api/v1/store/productspublic Products with member pricing when authenticated.
POST/api/v1/store/orderspublic / member Place an order (mock payment).
example body
{
    "items": [
        {
            "product_id": 1,
            "qty": 1
        }
    ],
    "payment_method": "apple_pay",
    "ship_state": "WA"
}
GET/api/v1/officer/eventsofficer Events in my scope, for check-in.
GET/api/v1/officer/events/{id}/rosterofficer Roster with run groups, waivers, check-in state.
POST/api/v1/officer/checkinofficer Check in by scanned card QR or member number.
example body
{
    "event_id": 7,
    "qr_payload": "BMWCCA:216231:2027-01-01:abc123def456"
}
GET/api/v1/officer/lookupofficer Search members in my scope (?q=).
POST/api/v1/officer/join-linkofficer Create a "Scan to join" QR target for a chapter table (optionally tied to an event). Newcomers join on their own phone.
example body
{
    "event_id": 7
}
GET/api/v1/officer/join-link/{token}officer Who has joined with a scan-to-join code (poll for live updates).
GET/api/v1/membersofficer / staff Paged member list for integrations. Filters: status, chapter, q, expiring_days, updated_since, limit, offset.
GET/api/v1/members/{number}officer / staff Single member by member number.

Production roadmap

  • Webhooks (member.joined, member.renewed, member.lapsed, registration.created) with signed payloads and retries
  • OAuth2 / OIDC so Drupal and partner sites can offer “Log in with BMW CCA” (single sign-on)
  • Per-key rate limits, a sandbox environment, and a versioning policy (v1 kept for at least 12 months after v2)