{% extends "base.html" %} {% block title %}API Key: {{ api_key.name }} — {{ club.name }}{% endblock %} {% block content %}
{{ new_raw_key }}
| Prefix | {{ api_key.prefix }}… |
|---|---|
| Status | {% if api_key.is_active %}Active{% else %}Revoked{% endif %} |
| Created | {{ api_key.created_at|date:"N j, Y g:i a" }} |
| Last used | {{ api_key.last_used_at|date:"N j, Y g:i a"|default:"Never" }} |
Track activity for this key in club history — search for {{ api_key.prefix }}.
| Add club members | {% if api_key.can_add_club_members %}Enabled{% else %}Disabled{% endif %} |
|---|---|
| Read club member list | {% if api_key.can_read_club_member_list %}Enabled{% else %}Disabled{% endif %} |
| Update club members | {% if api_key.can_update_club_members %}Enabled{% else %}Disabled{% endif %} |
| Add BAP points | {% if api_key.can_add_bap_points %}Enabled{% else %}Disabled{% endif %} |
X-API-Key header (or Authorization: Api-Key <key>).Content-Type: application/json and send a JSON body.
POST https://{{ site_domain }}/api/v1/clubs/{{ club.slug }}/members/{"name":"Mike","email":"mike@example.com"}
GET https://{{ site_domain }}/api/v1/clubs/{{ club.slug }}/members/?name=mike —
or use the same text filter as the admin member list: ?filter=expired, ?filter=mike, etc.
(tokens: discord, current, expired, expiring, never paid, or any name/email text)
PATCH https://{{ site_domain }}/api/v1/clubs/{{ club.slug }}/members/{{ example_member_id|default:"123" }}/{"email":"mike@example.com"}
POST https://{{ site_domain }}/api/v1/clubs/{{ club.slug }}/members/{{ example_member_id|default:"123" }}/bap-awards/{"points":5,"notes":"Bred angelfish","email":"mike@example.com"}
Map incoming field names to club member fields. Unmapped fields are passed through unchanged if they match an allowed field name.
Members store a single name field. If first_name and/or last_name are sent (or mapped) instead, they will be combined into name.
Field mapping applies to club member create and update payloads. BAP point requests always use the fixed points, date, and notes fields directly.
| External field (incoming) | Internal field | |
|---|---|---|
{{ mapping.external_field }} |
{{ mapping.internal_field }} |
No mappings yet.
{% endif %} {% if api_key.is_active %}{{ field }}{% if not forloop.last %}, {% endif %}{% endfor %}