← Touchline

Club app API

Club apps push registrations, staff, team sheets and stats into Touchline in real time, so clubs never re-type anything. Any vendor can integrate.

Basics

  • Ask the union or club admin for an API key (Integrations page). Send it on every request: Authorization: Bearer tl_live_…
  • The key identifies the club; all writes are scoped to it. Only clubs with an active or trial subscription may write.
  • JSON in, JSON out. Writes are idempotent on source_app + external_id.
  • Rate limit: 120 requests per minute per key (HTTP 429 when exceeded).
  • Dates are yyyy-mm-dd; times are ISO-8601 UTC.

Errors

{
  "error": "validation_failed",
  "message": "Some fields are invalid",
  "issues": [
    {
      "path": "guardians.0.cell",
      "message": "String must contain at least 9 character(s)"
    }
  ]
}

Codes: 400 invalid_json · 401 unauthorized · 403 subscription_inactive / not_your_fixture · 404 not_found · 422 validation_failed · 429 rate_limited.

POST/api/v1/players

Upsert a player registration

Idempotent on (club, source_app, external_id). Existing people are matched on normalised identity number + date of birth. Creates or resubmits a registration as "submitted" for union approval; approved registrations stay approved.

Request
{
  "source_app": "crusaders_crew",
  "external_id": "ply_8812",
  "season": 2026,
  "id_type": "sa_id",
  "identity_number": "150612 5089 081",
  "first_name": "Liam",
  "surname": "van Wyk",
  "dob": "2015-06-12",
  "gender": "male",
  "school": "Durbanville Primary",
  "grade": "5",
  "guardians": [
    {
      "name": "Anri van Wyk",
      "cell": "082 555 0101",
      "email": "anri@example.co.za",
      "relationship": "Mother"
    }
  ],
  "emergency_contact": {
    "name": "Pieter van Wyk",
    "cell": "083 555 0202",
    "relationship": "Father"
  },
  "medical": {
    "boksmart_answers": {
      "concussion_last_12_months": false,
      "heart_condition": false
    },
    "doctor_clearance_required": false,
    "medical_aid": "Discovery",
    "medical_aid_number": "123456789"
  },
  "photo_base64": "<base64 jpeg, optional>",
  "photo_consent": "internal",
  "consents": [
    {
      "kind": "indemnity",
      "granted": true,
      "text_snapshot": "I, the parent/guardian…",
      "granted_by": "Anri van Wyk"
    }
  ]
}
Response
{
  "person_id": "uuid",
  "registration_id": "uuid",
  "status": "submitted",
  "age_group": "U11",
  "warnings": []
}
POST/api/v1/players/:externalId/documents

Upload ID, birth certificate or doctor clearance

Send the file inline as base64, or set request_upload_url to get a signed URL and PUT the file there (valid 2 hours).

Request
{
  "kind": "birth_certificate",
  "content_type": "application/pdf",
  "request_upload_url": true
}
Response
{
  "document_id": "uuid",
  "kind": "birth_certificate",
  "upload": {
    "method": "PUT",
    "url": "https://…",
    "content_type": "application/pdf",
    "expires_in_seconds": 7200
  }
}
POST/api/v1/staff

Upsert a coach, manager or first aider

team_ids are Touchline team ids (see the team ids on fixtures).

Request
{
  "source_app": "rosta",
  "external_id": "stf_42",
  "id_type": "sa_id",
  "identity_number": "8001015009087",
  "first_name": "Johan",
  "surname": "Botha",
  "role": "coach",
  "team_ids": [
    "uuid"
  ]
}
Response
{
  "person_id": "uuid",
  "staff_registration_id": "uuid",
  "role": "coach",
  "team_ids": [
    "uuid"
  ]
}
GET/api/v1/fixtures?season=2026&team=<uuid>

Fixtures for your club's teams

Both query parameters are optional. Allowed even when a subscription is suspended.

Response
{
  "fixtures": [
    {
      "id": "uuid",
      "kickoff_at": "2026-03-14T08:30:00Z",
      "status": "scheduled",
      "field": "Field 2",
      "home_team_id": "uuid",
      "away_team_id": "uuid",
      "venues": {
        "name": "Bellville RFC"
      },
      "home": {
        "label": "U11A",
        "clubs": {
          "name": "Durbanville RFC"
        }
      },
      "away": {
        "label": "U11A",
        "clubs": {
          "name": "Bellville RFC"
        }
      }
    }
  ]
}
PUT/api/v1/teamsheets/:fixtureId

Create or replace your team sheet

Call as often as you like; every call stores a new version. Every player must already have been pushed via POST /players.

Request
{
  "source_app": "crusaders_crew",
  "players": [
    {
      "external_id": "ply_8812",
      "jersey": 9,
      "position": "Scrumhalf",
      "is_captain": true
    }
  ],
  "staff": [
    {
      "external_id": "stf_42",
      "role": "coach"
    }
  ]
}
Response
{
  "team_sheet_id": "uuid",
  "version": 3,
  "created_at": "2026-03-13T17:02:11Z"
}
POST/api/v1/matches/:fixtureId/stats

Per-player stats after the game

Only confirmed-sheet players may receive stats. Club edits close 72 hours after official match confirmation. Player points (including 7-point penalty tries) and cards must reconcile with the official result before union verification. Every edit resets verification for the whole team.

Request
{
  "source_app": "crusaders_crew",
  "players": [
    {
      "external_id": "ply_8812",
      "stats": {
        "tries": 2,
        "conversions": 1,
        "penalties": 0,
        "drop_goals": 0,
        "penalty_tries": 0,
        "yellow_cards": 0,
        "red_cards": 0,
        "minutes_played": 60,
        "reserve_used": false
      }
    }
  ]
}
Response
{
  "fixture_id": "uuid",
  "players": 1,
  "reconciliation": {
    "ok": true,
    "points": 12,
    "confirmed_score": 12,
    "issues": []
  }
}
GET/api/v1/sync-status

What the union approved, rejected or flagged

Show this in your app so clubs can fix problems without logging into Touchline.

Response
{
  "can_push": true,
  "approved": [
    {
      "external_id": "ply_8812",
      "status": "approved"
    }
  ],
  "pending": [],
  "rejected": [
    {
      "external_id": "ply_9001",
      "status": "rejected",
      "reason": "Birth certificate unreadable"
    }
  ],
  "ineligible": [],
  "compliance_issues": [
    {
      "external_id": "stf_42",
      "document": "BokSmart",
      "status": "expired",
      "expires_at": "2026-02-28"
    }
  ]
}

Webhooks

Set a webhook URL per key. Touchline POSTs JSON and signs the raw body with your signing secret:

X-Touchline-Event: registration.approved
X-Touchline-Signature: sha256=<hex HMAC-SHA256(secret, raw body)>

Events: registration.approved, registration.rejected, fixture.published, fixture.updated, teamsheet.locked, teamsheet.confirmed, result.confirmed, result.disputed, stats.verified, compliance.expiring.

Manager-confirmed results

POST /api/v1/matches/{id}/result — your team's per-player stats. The score is calculated (try 5, conversion 2, penalty 3, drop goal 3); you cannot send a score. Every player must be on your latest submitted team sheet. Optional scoreboard_points is checked against the calculated score.

{ "source_app": "crusaders_crew", "scoreboard_points": 19,
  "players": [{ "external_id": "p-12", "tries": 2, "conversions": 2, "penalties": 1 },
              { "external_id": "p-7", "yellow_cards": 1 }] }

POST /api/v1/matches/{id}/confirm — { "confirm": true } or { "confirm": false, "reason": "..." }. Once both teams confirm, the result is the official match report. Disputes, or no confirmation within the union window (default 48 hours), go to DRSU. Fixtures with an assigned DRSU official are signed off by the official instead.

GET /api/v1/sync-status also returns teamsheets: [{ fixture_id, version, status, locked, flags }].

{
  "id": "uuid",
  "event": "registration.rejected",
  "created_at": "2026-03-02T09:14:00Z",
  "data": {
    "registration_id": "uuid",
    "external_id": "ply_9001",
    "reason": "Birth certificate unreadable"
  }
}
// Node example
const sig = crypto.createHmac("sha256", secret).update(rawBody).digest("hex");
if (req.headers["x-touchline-signature"] !== "sha256=" + sig) return res.status(401).end();

Respond with 2xx within 10 seconds. Failed deliveries can be replayed from the Integrations page.