Admin Scoring Formats

Update a scoring format

A rules change is refused while any non-pending match is scored under the format, directly or through its tournament — create a new format instead. Display fields (name, subtitle, description, real_world_use, display_overrides, position, active) stay editable at all times.

patch/v1/admin/scoring_formats/{id}

Request

  • Base URL
    https://api.hify.club
  • Auth
    API key in header X-User-Token

Request body

idinteger
sport'padel' | 'pickleball'

The sports row, named by its lowercase name. Accepted on write and echoed on read. A sport the platform does not have, or has but cannot score, is refused.

sport_idinteger

The resolved sports row, returned alongside sport.

slugstring

Stable identifier. Partner feeds name a format by this.

namestring
subtitlestring nullable

Short display name for the referee-facing card. Its presence is what makes the compiler emit match_format_info at all.

descriptionstring nullable
real_world_usestring nullable
display_overridesobject

Bespoke copy overriding the generated match_format_info.

activeboolean
rules_versioninteger

Bumped on every rules change and stamped into the snapshot, so a played match traces to an exact row and revision.

positioninteger
scoring_config_snapshotobject

What a device would be given for a match scored under this format. Returned on every response so an edit can be confirmed without a second request. When the format plays a different deuce on set or match point, the snapshot carries a top-level deuce_overrides object keyed set_point / match_point, each shaped like deuce. Absent otherwise.

Example request

{
  "id": 12,
  "slug": "ipt_race_to_8",
  "name": "IPT Race to 8",
  "subtitle": "IPT Race to 8",
  "rules": {
    "match": {
      "win": {
        "target": 6,
        "margin": 2
      },
      "deciding": {
        "win": {
          "target": 6,
          "margin": 2
        },
        "label": "Super tiebreak"
      }
    },
    "levels": [
      {
        "type": "set",
        "win": {
          "target": 6,
          "margin": 2
        },
        "tiebreak": {
          "trigger_at": 6,
          "win": {
            "target": 6,
            "margin": 2
          }
        },
        "deciding_overrides": {
          "tiebreak": {
            "trigger_at": 6,
            "win": {
              "target": 6,
              "margin": 2
            }
          }
        }
      }
    ],
    "serve": {
      "starting_score": "0-0-2"
    }
  },
  "rules_version": 1
}

Response

Updated

idinteger
sport'padel' | 'pickleball'

The sports row, named by its lowercase name. Accepted on write and echoed on read. A sport the platform does not have, or has but cannot score, is refused.

sport_idinteger

The resolved sports row, returned alongside sport.

slugstring

Stable identifier. Partner feeds name a format by this.

namestring
subtitlestring nullable

Short display name for the referee-facing card. Its presence is what makes the compiler emit match_format_info at all.

descriptionstring nullable
real_world_usestring nullable
display_overridesobject

Bespoke copy overriding the generated match_format_info.

activeboolean
rules_versioninteger

Bumped on every rules change and stamped into the snapshot, so a played match traces to an exact row and revision.

positioninteger
scoring_config_snapshotobject

What a device would be given for a match scored under this format. Returned on every response so an edit can be confirmed without a second request. When the format plays a different deuce on set or match point, the snapshot carries a top-level deuce_overrides object keyed set_point / match_point, each shaped like deuce. Absent otherwise.

Example response

{
  "id": 12,
  "slug": "ipt_race_to_8",
  "name": "IPT Race to 8",
  "subtitle": "IPT Race to 8",
  "rules": {
    "match": {
      "win": {
        "target": 6,
        "margin": 2
      },
      "deciding": {
        "win": {
          "target": 6,
          "margin": 2
        },
        "label": "Super tiebreak"
      }
    },
    "levels": [
      {
        "type": "set",
        "win": {
          "target": 6,
          "margin": 2
        },
        "tiebreak": {
          "trigger_at": 6,
          "win": {
            "target": 6,
            "margin": 2
          }
        },
        "deciding_overrides": {
          "tiebreak": {
            "trigger_at": 6,
            "win": {
              "target": 6,
              "margin": 2
            }
          }
        }
      }
    ],
    "serve": {
      "starting_score": "0-0-2"
    }
  },
  "rules_version": 1
}

Changes