Skip to content

API explorer

Interactive reference generated from the OpenAPI document. This is the same contract published at https://api.padelrank.me/openapi.json.

Download: /openapi.json (portal mirror) or https://api.padelrank.me/openapi.json. Narrative docs stay in the sidebar. For AI agents, start at AI coding assistants.

This explorer is a static contract browser (safe without a sandbox). Copy examples from the guides and call the API from your backend with a test or live key. There is no separate sandbox host, and live write playgrounds are intentionally not embedded here.

PadelRank API 1.0.0
OpenAPI 3.1.0 · 21 operations shown
Download JSONLive API copy
GET/health

Liveness

Process is up. No authentication.

Responses
  • 200 — Process is up
GET/ready

Readiness

Database is reachable. Body uses status and reason, not the partner error envelope.

Responses
  • 200 — Database is reachable
  • 503 — Not ready. Body uses status and reason, not the partner error envelope.
GET/v1

Version and endpoint index

Requires a valid API key. No specific scope.

Responses
  • 200 — version, docs URL, and endpoint map
  • 401 — Response
  • 429 — Response
GET/v1/players/{username}read:players

Get a public player

Returns public profile fields and the partner-safe rating object. Unknown or private usernames return 404 with the same shape.

NameInRequiredSchema
usernamepathyes{ "type": "string", "pattern": "^[a-z0-9_]{3,30}$" }
Responses
  • 200 — Player, rating, and created_at
  • 401 — Response
  • 403 — Response
  • 404 — Response
  • 422 — Response
  • 429 — Response
GET/v1/players/searchread:players

Prefix search of public usernames

Ordered by username. q is a literal prefix. % and _ are not wildcards.

NameInRequiredSchema
qqueryyes{ "type": "string", "minLength": 2, "maxLength": 64 }
limitqueryno{ "type": "integer", "minimum": 1, "maximum": 50, "default": 20 }
offsetqueryno{ "type": "integer", "minimum": 0, "maximum": 1000, "default": 0 }
Responses
  • 200 — results plus limit, offset, total, has_more
  • 401 — Response
  • 403 — Response
  • 422 — Response
  • 429 — Response
POST/v1/playerswrite:players

Register a player

Same username returns 200 with created false, including a concurrent duplicate. There is no delete endpoint. Requires a live key with write:players.

Request body
{
  "username": "maria_s",
  "display_name": "Maria Silva",
  "country_code": "PT"
}
Responses
  • 200 — Username already existed. created false
  • 201 — Created. Body includes id, username, created true
  • 401 — Response
  • 402 — Response
  • 403 — Response
  • 422 — Response
  • 429 — Response
GET/v1/rankingsread:rankings

Public leaderboard

Ordered by PadelRank score, highest first. rank is the position inside this filtered page, starting at offset + 1. country_code is an exact code. city is a case-insensitive exact match, not a substring.

NameInRequiredSchema
country_codequeryno{ "type": "string", "minLength": 2, "maxLength": 2, "pattern": "^[A-Z]{2}$" }
cityqueryno{ "type": "string", "minLength": 1, "maxLength": 80 }
limitqueryno{ "type": "integer", "minimum": 1, "maximum": 100, "default": 50 }
offsetqueryno{ "type": "integer", "minimum": 0, "maximum": 10000, "default": 0 }
Responses
  • 200 — rankings plus limit, offset, total, has_more
  • 401 — Response
  • 403 — Response
  • 422 — Response
  • 429 — Response
GET/v1/players/{username}/formread:players

Rolling form for a public player

Recent completed-match form card for engagement and fantasy eligibility. form_index is an opaque 0–100 product score.

NameInRequiredSchema
usernamepathyes{ "type": "string", "pattern": "^[a-z0-9_]{3,30}$" }
windowqueryno{ "type": "integer", "minimum": 1, "maximum": 50, "default": 10 }
Responses
  • 200 — Form card
  • 401 — Response
  • 403 — Response
  • 404 — Response
  • 422 — Response
  • 429 — Response
GET/v1/players/{username}/partnersread:intelligence

Top partnership affinities

Players this athlete has partnered with most successfully in completed matches.

NameInRequiredSchema
usernamepathyes{ "type": "string", "pattern": "^[a-z0-9_]{3,30}$" }
limitqueryno{ "type": "integer", "minimum": 1, "maximum": 50, "default": 10 }
Responses
  • 200 — Ranked partners
  • 401 — Response
  • 403 — Response
  • 404 — Response
  • 429 — Response
GET/v1/players/{username}/integrityread:intelligence

Integrity risk band

Opaque risk band and signal labels for league hosts. Heuristic product signal — not proof of misconduct.

NameInRequiredSchema
usernamepathyes{ "type": "string", "pattern": "^[a-z0-9_]{3,30}$" }
Responses
  • 200 — Integrity card
  • 401 — Response
  • 403 — Response
  • 404 — Response
  • 429 — Response
POST/v1/intelligence/predictread:intelligence

Team balance for four distinct public players

player_ids order is team A left, team A right, team B left, team B right. draw_probability is a relative pairing score, not a promise the match will be tied. balance_rating is high at 0.12 or above, medium at 0.07 or above, otherwise low. Allowed for test keys. Metered as a predict call.

Request body
{
  "$ref": "#/components/schemas/PredictRequest"
}
Responses
  • 200 — draw_probability, balance_rating, team_a, team_b
  • 401 — Response
  • 403 — Response
  • 422 — Invalid roster or a player is missing or private
  • 429 — Response
GET/v1/intelligence/chemistryread:intelligence

Partnership chemistry for two public players

How two players perform when they share a team. synergy_score is opaque 0–100. Metered as a predict call.

NameInRequiredSchema
player_aqueryyes{ "type": "string", "format": "uuid" }
player_bqueryyes{ "type": "string", "format": "uuid" }
Responses
  • 200 — Chemistry card
  • 401 — Response
  • 403 — Response
  • 422 — Response
  • 429 — Response
POST/v1/intelligence/sessionread:intelligence

Plan balanced rounds for N public players

Americano-style or fixed-order session planner. Maximises relative balance per foursome and rotates sit-outs when needed. Metered as a predict call.

Request body
{
  "$ref": "#/components/schemas/SessionRequest"
}
Responses
  • 200 — Round plan
  • 401 — Response
  • 403 — Response
  • 422 — Response
  • 429 — Response
GET/v1/matcheswrite:matchesread:players

List matches submitted by the calling partner

Scope: write:matches or read:players. Newest first. Optional filters: external_ref (exact) and status (pending, completed, disputed, cancelled). Does not include other partners' matches.

NameInRequiredSchema
limitqueryno{ "type": "integer", "minimum": 1, "maximum": 100, "default": 20 }
offsetqueryno{ "type": "integer", "minimum": 0, "maximum": 10000, "default": 0 }
external_refqueryno{ "type": "string", "minLength": 1, "maxLength": 128 }
statusqueryno{ "type": "string", "enum": [ "pending", "completed", "disputed", "cancelled" ] }
Responses
  • 200 — matches plus limit, offset, total, has_more
  • 401 — Response
  • 403 — Response
  • 422 — Response
  • 429 — Response
POST/v1/matcheswrite:matches

Submit a 2v2 result

trust_tier selects authority. partner_attested, tournament_official, and imported are completed and update ratings before the response. An official result moves ratings further than an attested or imported result. player_confirmed stays pending and does not update ratings. The winner and the trust tier determine the update. Set scores, when sent, must agree with the winner. A drawn set is rejected. Court side is required and stored. Retries with the same external_ref or Idempotency-Key and the same winner and trust tier return 200 idempotent_replay and do not apply the result again. A different winner or trust tier for that ref returns 409. There is no delete endpoint.

NameInRequiredSchema
Idempotency-Keyheaderno{ "type": "string", "minLength": 8, "maxLength": 128, "pattern": "^[A-Za-z0-9._:-]{8,128}$" }
Request body
{
  "external_ref": "your-app-match-9821",
  "played_at": "2026-06-16T18:30:00Z",
  "winning_team": "A",
  "trust_tier": "partner_attested",
  "participants": [
    {
      "username": "maria_s",
      "team": "A",
      "court_position": "left"
    },
    {
      "username": "joao_p",
      "team": "A",
      "court_position": "right"
    },
    {
      "username": "ana_r",
      "team": "B",
      "court_position": "left"
    },
    {
      "username": "pedro_l",
      "team": "B",
      "court_position": "right"
    }
  ]
}
Responses
  • 200 — Idempotent replay
  • 201 — Created. rating_applied is true when a rating write committed.
  • 401 — Response
  • 402 — Response
  • 403 — Response
  • 409 — Same ref, different result
  • 422 — Invalid body or unknown participant
  • 429 — Response
  • 500 — Stored as disputed when the rating write fails
GET/v1/matches/{id}write:matchesread:players

Read a match submitted by the calling partner

Scope: write:matches or read:players. Includes set_scores and a partner-safe scoreline summary when sets were stored. Another partner's match is returned as not found.

NameInRequiredSchema
idpathyes{ "type": "string", "format": "uuid" }
Responses
  • 200 — Match, participants, optional set scores and scoreline
  • 401 — Response
  • 403 — Response
  • 404 — Response
  • 429 — Response
GET/v1/matches/{id}/rating-storywrite:matchesread:players

Partner-safe post-match rating narrative

Human-readable reasons for score movement after a completed rated match. Scope: write:matches or read:players.

NameInRequiredSchema
idpathyes{ "type": "string", "format": "uuid" }
Responses
  • 200 — Narrative per participant, or available false when no rating events exist
  • 401 — Response
  • 403 — Response
  • 404 — Response
  • 429 — Response
GET/v1/webhookswrite:webhooks

List webhook endpoints

Responses
  • 200 — Active endpoints for the partner
  • 401 — Response
  • 403 — Response
  • 429 — Response
POST/v1/webhookswrite:webhooks

Register a webhook endpoint

HTTPS only. signing_secret is returned once. Deliveries send X-PadelRank-Timestamp and X-PadelRank-Signature (HMAC-SHA256 of timestamp.body).

Request body
{
  "$ref": "#/components/schemas/CreateWebhookRequest"
}
Responses
  • 201 — Created; includes signing_secret
  • 401 — Response
  • 402 — Response
  • 403 — Response
  • 422 — Response
  • 429 — Response
DELETE/v1/webhooks/{id}write:webhooks

Revoke a webhook endpoint

NameInRequiredSchema
idpathyes{ "type": "string", "format": "uuid" }
Responses
  • 200 — Revoked
  • 401 — Response
  • 403 — Response
  • 404 — Response
  • 429 — Response
POST/v1/external-ratings/upsertwrite:external-ratings

Import external priors

Stores a provider value for players that already exist. Optional normalized_score uses the public score scale. This does not change the PadelRank score. dry_run validates without writing. Upsert key is player plus provider. At most 500 entries per request.

Request body
{
  "provider_id": "your_provider",
  "dry_run": false,
  "entries": [
    {
      "profile_id": "11111111-1111-4111-8111-111111111111",
      "external_player_ref": "ext-maria",
      "normalized_score": 2800
    }
  ]
}
Responses
  • 200 — Upserted, or dry_run true
  • 401 — Response
  • 402 — Response
  • 403 — Response
  • 404 — Unknown provider
  • 409 — Provider inactive
  • 422 — Invalid body or unknown players
  • 429 — Response
Reusable schemas (28)
{
  "Rating": {
    "type": "object",
    "additionalProperties": false,
    "required": [
      "padelrank_score",
      "confidence_level",
      "confidence_label",
      "matches_played"
    ],
    "properties": {
      "padelrank_score": {
        "type": "integer",
        "minimum": 0,
        "description": "Public skill score generated by the proprietary ranking engine. Floored at 0. Not capped.",
        "example": 2840
      },
      "confidence_level": {
        "type": "string",
        "enum": [
          "provisional",
          "established",
          "verified"
        ],
        "description": "Machine-readable confidence band based on completed matches and rating stability."
      },
      "confidence_label": {
        "type": "string",
        "description": "Human-readable confidence label for UI display.",
        "example": "Medium confidence"
      },
      "matches_played": {
        "type": "integer",
        "minimum": 0,
        "description": "Count of completed matches that contributed to the rating."
      }
    }
  },
  "Player": {
    "type": "object",
    "additionalProperties": false,
    "required": [
      "id",
      "username",
      "display_name",
      "country_code",
      "city",
      "rating",
      "created_at"
    ],
    "properties": {
      "id": {
        "type": "string",
        "format": "uuid"
      },
      "username": {
        "type": "string",
        "pattern": "^[a-z0-9_]{3,30}$",
        "example": "maria_s"
      },
      "display_name": {
        "type": [
          "string",
          "null"
        ],
        "example": "Maria Silva"
      },
      "country_code": {
        "type": [
          "string",
          "null"
        ],
        "minLength": 2,
        "maxLength": 2,
        "example": "PT"
      },
      "city": {
        "type": [
          "string",
          "null"
        ],
        "example": "Lisbon"
      },
      "rating": {
        "$ref": "#/components/schemas/Rating"
      },
      "created_at": {
        "type": "string",
        "format": "date-time"
      }
    }
  },
  "PlayerSearchHit": {
    "type": "object",
    "additionalProperties": false,
    "required": [
      "id",
      "username",
      "display_name",
      "country_code",
      "city"
    ],
    "properties": {
      "id": {
        "type": "string",
        "format": "uuid"
      },
      "username": {
        "type": "string"
      },
      "display_name": {
        "type": [
          "string",
          "null"
        ]
      },
      "country_code": {
        "type": [
          "string",
          "null"
        ]
      },
      "city": {
        "type": [
          "string",
          "null"
        ]
      }
    }
  },
  "RankingRow": {
    "type": "object",
    "additionalProperties": false,
    "required": [
      "rank",
      "id",
      "username",
      "display_name",
      "country_code",
      "city",
      "rating"
    ],
    "properties": {
      "rank": {
        "type": "integer",
        "description": "Position inside this filtered page, starting at offset + 1."
      },
      "id": {
        "type": "string",
        "format": "uuid"
      },
      "username": {
        "type": "string"
      },
      "display_name": {
        "type": [
          "string",
          "null"
        ]
      },
      "country_code": {
        "type": [
          "string",
          "null"
        ]
      },
      "city": {
        "type": [
          "string",
          "null"
        ]
      },
      "rating": {
        "$ref": "#/components/schemas/Rating"
      }
    }
  },
  "CreatePlayerRequest": {
    "type": "object",
    "additionalProperties": false,
    "required": [
      "username"
    ],
    "properties": {
      "username": {
        "type": "string",
        "pattern": "^[a-z0-9_]{3,30}$",
        "description": "Lowercased public handle. 3–30 characters: a-z, 0-9, underscore.",
        "example": "maria_s"
      },
      "display_name": {
        "type": "string",
        "minLength": 1,
        "maxLength": 80,
        "example": "Maria Silva"
      },
      "country_code": {
        "type": "string",
        "pattern": "^[A-Z]{2}$",
        "description": "ISO 3166-1 alpha-2, uppercased.",
        "example": "PT"
      },
      "city": {
        "type": "string",
        "minLength": 1,
        "maxLength": 80,
        "example": "Lisbon"
      },
      "profile_is_public": {
        "type": "boolean",
        "default": true,
        "description": "Private profiles are not returned by GET player, search, rankings, or predict."
      }
    }
  },
  "CreatePlayerResponse": {
    "type": "object",
    "additionalProperties": false,
    "required": [
      "id",
      "username",
      "created"
    ],
    "properties": {
      "id": {
        "type": "string",
        "format": "uuid"
      },
      "username": {
        "type": "string"
      },
      "created": {
        "type": "boolean",
        "description": "true when a new row was inserted; false when the username already existed."
      }
    }
  },
  "PredictRequest": {
    "type": "object",
    "additionalProperties": false,
    "required": [
      "player_ids",
      "format"
    ],
    "properties": {
      "format": {
        "type": "string",
        "enum": [
          "2v2"
        ]
      },
      "player_ids": {
        "type": "array",
        "minItems": 4,
        "maxItems": 4,
        "items": {
          "type": "string",
          "format": "uuid"
        },
        "description": "Four distinct public player ids in court order: team A left, team A right, team B left, team B right."
      }
    },
    "example": {
      "format": "2v2",
      "player_ids": [
        "11111111-1111-4111-8111-111111111111",
        "22222222-2222-4222-8222-222222222222",
        "33333333-3333-4333-8333-333333333333",
        "44444444-4444-4444-8444-444444444444"
      ]
    }
  },
  "PredictResponse": {
    "type": "object",
    "additionalProperties": false,
    "required": [
      "draw_probability",
      "balance_rating",
      "team_a",
      "team_b"
    ],
    "properties": {
      "draw_probability": {
        "type": "number",
        "description": "Relative pairing score for this foursome. Higher means more even among pairings you compare. Not a promise the match will be tied.",
        "example": 0.11
      },
      "balance_rating": {
        "type": "string",
        "enum": [
          "high",
          "medium",
          "low"
        ],
        "description": "high when draw_probability >= 0.12, medium when >= 0.07, otherwise low."
      },
      "team_a": {
        "type": "array",
        "minItems": 2,
        "maxItems": 2,
        "items": {
          "type": "string",
          "format": "uuid"
        }
      },
      "team_b": {
        "type": "array",
        "minItems": 2,
        "maxItems": 2,
        "items": {
          "type": "string",
          "format": "uuid"
        }
      }
    }
  },
  "MatchParticipantInput": {
    "type": "object",
    "additionalProperties": false,
    "required": [
      "team",
      "court_position"
    ],
    "properties": {
      "profile_id": {
        "type": "string",
        "format": "uuid"
      },
      "username": {
        "type": "string",
        "pattern": "^[a-z0-9_]{3,30}$"
      },
      "team": {
        "type": "string",
        "enum": [
          "A",
          "B"
        ]
      },
      "court_position": {
        "type": "string",
        "enum": [
          "left",
          "right"
        ]
      }
    },
    "description": "Provide profile_id or username (at least one)."
  },
  "SetScore": {
    "type": "object",
    "additionalProperties": false,
    "required": [
      "set_number",
      "team_a_games",
      "team_b_games"
    ],
    "properties": {
      "set_number": {
        "type": "integer",
        "minimum": 1,
        "maximum": 5
      },
      "team_a_games": {
        "type": "integer",
        "minimum": 0,
        "maximum": 20
      },
      "team_b_games": {
        "type": "integer",
        "minimum": 0,
        "maximum": 20
      },
      "is_tiebreak": {
        "type": "boolean",
        "default": false
      }
    }
  },
  "CreateMatchRequest": {
    "type": "object",
    "additionalProperties": false,
    "required": [
      "played_at",
      "winning_team",
      "participants"
    ],
    "properties": {
      "external_ref": {
        "type": "string",
        "minLength": 1,
        "maxLength": 128,
        "description": "Partner-owned idempotency reference for this result.",
        "example": "your-app-match-9821"
      },
      "played_at": {
        "type": "string",
        "format": "date-time",
        "description": "When the match was played (ISO 8601).",
        "example": "2026-06-16T18:30:00Z"
      },
      "winning_team": {
        "type": "string",
        "enum": [
          "A",
          "B"
        ]
      },
      "trust_tier": {
        "type": "string",
        "enum": [
          "partner_attested",
          "player_confirmed",
          "tournament_official",
          "imported"
        ],
        "default": "partner_attested",
        "description": "Authority of the result. partner_attested, tournament_official, and imported complete and may update ratings. player_confirmed stays pending and does not update ratings in this version. Official results move ratings further than attested or imported ones."
      },
      "set_scores": {
        "type": "array",
        "maxItems": 5,
        "items": {
          "$ref": "#/components/schemas/SetScore"
        },
        "description": "Optional. Must agree with winning_team. Drawn sets are rejected."
      },
      "participants": {
        "type": "array",
        "minItems": 4,
        "maxItems": 4,
        "items": {
          "$ref": "#/components/schemas/MatchParticipantInput"
        },
        "description": "Exactly four players: each team needs left and right."
      }
    }
  },
  "CreateMatchResponse": {
    "type": "object",
    "additionalProperties": false,
    "required": [
      "id",
      "status",
      "rating_applied"
    ],
    "properties": {
      "id": {
        "type": "string",
        "format": "uuid"
      },
      "status": {
        "type": "string",
        "enum": [
          "pending",
          "completed",
          "disputed",
          "cancelled"
        ]
      },
      "rating_applied": {
        "type": "boolean",
        "description": "true only when a rating update was saved for this request."
      },
      "idempotent_replay": {
        "type": "boolean",
        "description": "Present and true when the same ref returned an existing match."
      }
    }
  },
  "PartnerMatch": {
    "type": "object",
    "additionalProperties": false,
    "required": [
      "id",
      "played_at",
      "winning_team",
      "status",
      "trust_tier",
      "external_ref",
      "created_at"
    ],
    "properties": {
      "id": {
        "type": "string",
        "format": "uuid"
      },
      "played_at": {
        "type": "string",
        "format": "date-time"
      },
      "winning_team": {
        "type": "string",
        "enum": [
          "A",
          "B"
        ]
      },
      "status": {
        "type": "string",
        "enum": [
          "pending",
          "completed",
          "disputed",
          "cancelled"
        ]
      },
      "trust_tier": {
        "type": "string",
        "enum": [
          "partner_attested",
          "player_confirmed",
          "tournament_official",
          "imported"
        ]
      },
      "external_ref": {
        "type": [
          "string",
          "null"
        ]
      },
      "created_at": {
        "type": "string",
        "format": "date-time"
      }
    }
  },
  "MatchParticipantView": {
    "type": "object",
    "additionalProperties": false,
    "required": [
      "profile_id",
      "username",
      "team",
      "court_position",
      "won"
    ],
    "properties": {
      "profile_id": {
        "type": "string",
        "format": "uuid"
      },
      "username": {
        "type": [
          "string",
          "null"
        ]
      },
      "team": {
        "type": "string",
        "enum": [
          "A",
          "B"
        ]
      },
      "court_position": {
        "type": "string",
        "enum": [
          "left",
          "right"
        ]
      },
      "won": {
        "type": "boolean"
      }
    }
  },
  "ScorelineSummary": {
    "type": "object",
    "additionalProperties": false,
    "required": [
      "total_sets",
      "total_games",
      "close_sets",
      "blowout_sets",
      "straight_sets",
      "tie_break_sets",
      "max_set_game_gap",
      "closeness"
    ],
    "properties": {
      "total_sets": {
        "type": "integer"
      },
      "total_games": {
        "type": "integer"
      },
      "close_sets": {
        "type": "integer"
      },
      "blowout_sets": {
        "type": "integer"
      },
      "straight_sets": {
        "type": "boolean"
      },
      "tie_break_sets": {
        "type": "integer"
      },
      "max_set_game_gap": {
        "type": "integer"
      },
      "closeness": {
        "type": "string",
        "enum": [
          "tight",
          "normal",
          "one_sided"
        ]
      }
    }
  },
  "MatchDetail": {
    "allOf": [
      {
        "$ref": "#/components/schemas/PartnerMatch"
      },
      {
        "type": "object",
        "required": [
          "participants"
        ],
        "properties": {
          "participants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MatchParticipantView"
            }
          },
          "set_scores": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SetScore"
            }
          },
          "scoreline": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ScorelineSummary"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      }
    ]
  },
  "FormCard": {
    "type": "object",
    "additionalProperties": false,
    "required": [
      "window",
      "matches_in_window",
      "wins",
      "losses",
      "win_rate",
      "close_match_rate",
      "official_match_share",
      "rating_delta",
      "form_index",
      "form_label"
    ],
    "properties": {
      "window": {
        "type": "integer"
      },
      "matches_in_window": {
        "type": "integer"
      },
      "wins": {
        "type": "integer"
      },
      "losses": {
        "type": "integer"
      },
      "win_rate": {
        "type": "number"
      },
      "close_match_rate": {
        "type": [
          "number",
          "null"
        ]
      },
      "official_match_share": {
        "type": "number"
      },
      "rating_delta": {
        "type": "integer"
      },
      "form_index": {
        "type": "integer",
        "minimum": 0,
        "maximum": 100,
        "description": "Opaque 0–100 form score for partner UIs. Not an internal rating parameter."
      },
      "form_label": {
        "type": "string",
        "enum": [
          "hot",
          "steady",
          "cold",
          "unknown"
        ]
      }
    }
  },
  "ChemistryCard": {
    "type": "object",
    "additionalProperties": false,
    "required": [
      "sample_matches",
      "wins",
      "losses",
      "win_rate",
      "synergy_score",
      "confidence_level",
      "preferred_side_a",
      "preferred_side_b"
    ],
    "properties": {
      "sample_matches": {
        "type": "integer"
      },
      "wins": {
        "type": "integer"
      },
      "losses": {
        "type": "integer"
      },
      "win_rate": {
        "type": "number"
      },
      "synergy_score": {
        "type": "integer",
        "minimum": 0,
        "maximum": 100,
        "description": "Opaque partnership score for partner UIs."
      },
      "confidence_level": {
        "type": "string",
        "enum": [
          "low",
          "medium",
          "high"
        ]
      },
      "preferred_side_a": {
        "type": "string",
        "enum": [
          "left",
          "right",
          "either"
        ]
      },
      "preferred_side_b": {
        "type": "string",
        "enum": [
          "left",
          "right",
          "either"
        ]
      }
    }
  },
  "SessionRequest": {
    "type": "object",
    "additionalProperties": false,
    "required": [
      "player_ids"
    ],
    "properties": {
      "format": {
        "type": "string",
        "enum": [
          "americano",
          "fixed_teams"
        ],
        "default": "americano"
      },
      "rounds": {
        "type": "integer",
        "minimum": 1,
        "maximum": 20,
        "default": 3
      },
      "player_ids": {
        "type": "array",
        "minItems": 4,
        "maxItems": 32,
        "items": {
          "type": "string",
          "format": "uuid"
        }
      }
    }
  },
  "SessionMatchPlan": {
    "type": "object",
    "additionalProperties": false,
    "required": [
      "team_a",
      "team_b",
      "draw_probability",
      "balance_rating"
    ],
    "properties": {
      "team_a": {
        "type": "array",
        "minItems": 2,
        "maxItems": 2,
        "items": {
          "type": "string",
          "format": "uuid"
        }
      },
      "team_b": {
        "type": "array",
        "minItems": 2,
        "maxItems": 2,
        "items": {
          "type": "string",
          "format": "uuid"
        }
      },
      "draw_probability": {
        "type": "number"
      },
      "balance_rating": {
        "type": "string",
        "enum": [
          "high",
          "medium",
          "low"
        ]
      }
    }
  },
  "CreateWebhookRequest": {
    "type": "object",
    "additionalProperties": false,
    "required": [
      "url"
    ],
    "properties": {
      "url": {
        "type": "string",
        "format": "uri",
        "description": "HTTPS callback URL.",
        "example": "https://example.com/hooks/padelrank"
      },
      "events": {
        "type": "array",
        "items": {
          "type": "string",
          "enum": [
            "match.completed",
            "rating.updated"
          ]
        },
        "default": [
          "match.completed",
          "rating.updated"
        ]
      }
    }
  },
  "WebhookEndpoint": {
    "type": "object",
    "additionalProperties": false,
    "required": [
      "id",
      "url",
      "events",
      "is_active",
      "created_at"
    ],
    "properties": {
      "id": {
        "type": "string",
        "format": "uuid"
      },
      "url": {
        "type": "string",
        "format": "uri"
      },
      "events": {
        "type": "array",
        "items": {
          "type": "string",
          "enum": [
            "match.completed",
            "rating.updated"
          ]
        }
      },
      "is_active": {
        "type": "boolean"
      },
      "created_at": {
        "type": "string",
        "format": "date-time"
      },
      "last_success_at": {
        "type": [
          "string",
          "null"
        ],
        "format": "date-time"
      },
      "failure_count": {
        "type": "integer"
      },
      "signing_secret": {
        "type": "string",
        "description": "Returned only on create. Store it; it is not shown again."
      }
    }
  },
  "ExternalRatingEntry": {
    "type": "object",
    "additionalProperties": false,
    "required": [
      "profile_id"
    ],
    "properties": {
      "profile_id": {
        "type": "string",
        "format": "uuid"
      },
      "external_player_ref": {
        "type": [
          "string",
          "null"
        ],
        "maxLength": 255
      },
      "raw_rating": {
        "type": [
          "number",
          "null"
        ]
      },
      "raw_label": {
        "type": [
          "string",
          "null"
        ],
        "maxLength": 120
      },
      "normalized_score": {
        "type": [
          "number",
          "null"
        ],
        "minimum": 0,
        "maximum": 5000,
        "description": "Optional prior on the public PadelRank score scale. Does not change the live score."
      },
      "rating_observed_at": {
        "type": "string",
        "format": "date-time"
      },
      "metadata": {
        "type": "object",
        "additionalProperties": true,
        "description": "Partner-defined key/value metadata for the import row."
      }
    }
  },
  "ExternalRatingsUpsertRequest": {
    "type": "object",
    "additionalProperties": false,
    "required": [
      "provider_id",
      "entries"
    ],
    "properties": {
      "provider_id": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64,
        "description": "Configured provider identifier for the calling partner."
      },
      "dry_run": {
        "type": "boolean",
        "description": "When true, validate without writing."
      },
      "entries": {
        "type": "array",
        "minItems": 1,
        "maxItems": 500,
        "items": {
          "$ref": "#/components/schemas/ExternalRatingEntry"
        }
      }
    }
  },
  "ExternalRatingsUpsertResponse": {
    "type": "object",
    "additionalProperties": false,
    "required": [
      "ok",
      "provider_id",
      "total"
    ],
    "properties": {
      "ok": {
        "type": "boolean",
        "enum": [
          true
        ]
      },
      "dry_run": {
        "type": "boolean"
      },
      "provider_id": {
        "type": "string"
      },
      "total": {
        "type": "integer",
        "minimum": 1
      }
    }
  },
  "Error": {
    "type": "object",
    "required": [
      "error",
      "message"
    ],
    "properties": {
      "error": {
        "type": "string",
        "description": "Stable machine-readable error code.",
        "example": "validation_error"
      },
      "message": {
        "type": "string",
        "description": "Human-readable explanation."
      },
      "request_id": {
        "type": "string",
        "description": "Correlates with the X-Request-Id response header."
      },
      "reason": {
        "type": "string"
      },
      "required_scopes": {
        "type": "array",
        "items": {
          "type": "string"
        }
      },
      "quota": {
        "type": "integer"
      },
      "used": {
        "type": "integer"
      },
      "match_id": {
        "type": "string",
        "format": "uuid"
      },
      "player_id": {
        "type": "string",
        "format": "uuid"
      },
      "unknown_count": {
        "type": "integer"
      }
    }
  },
  "Page": {
    "type": "object",
    "required": [
      "limit",
      "offset",
      "total",
      "has_more"
    ],
    "properties": {
      "limit": {
        "type": "integer"
      },
      "offset": {
        "type": "integer"
      },
      "total": {
        "type": "integer"
      },
      "has_more": {
        "type": "boolean"
      }
    }
  },
  "VersionIndex": {
    "type": "object",
    "required": [
      "version",
      "docs",
      "endpoints"
    ],
    "properties": {
      "version": {
        "type": "string",
        "example": "1"
      },
      "docs": {
        "type": "string",
        "format": "uri"
      },
      "endpoints": {
        "type": "object",
        "additionalProperties": {
          "type": "string"
        },
        "description": "Map of logical names to path templates."
      }
    }
  }
}
API explorer · PadelRank Developers