{
  "info": {
    "_postman_id": "315bf88d-a5e4-45cb-bd73-e3c20d570dc2",
    "name": "Status Match API",
    "description": "Collection for testing Status Match API and Match Score endpoints in Sportslive Web application.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "_exporter_id": "44774653"
  },
  "item": [
    {
      "name": "Event & Schedule Data",
      "item": [
        {
          "name": "Get event for today",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "secret",
                "value": "{{secret}}",
                "type": "text"
              },
              {
                "key": "Accept",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{base_url}}/match/event?date=08-07-2026",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "match",
                "event"
              ],
              "query": [
                {
                  "key": "date",
                  "value": "08-07-2026",
                  "description": "Optional date filter format DD-MM-YYYY"
                }
              ]
            },
            "description": "Retrieves active event for today along with associated courts."
          },
          "response": []
        }
      ]
    },
    {
      "name": "Match Operations",
      "item": [
        {
          "name": "Start Match Status (via Court ID)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "secret",
                "value": "{{secret}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Accept",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"event_id\": 15,\n    \"court_id\": 45,\n    \"class_name\": \"Men's Singles\",\n    \"gender_category\": \"Male\",\n    \"participant_one_name\": \"John Doe\",\n    \"participant_two_name\": \"Jane Smith\",\n    \"participant_code_one\": \"P001\",\n    \"participant_code_two\": \"P002\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{base_url}}/match/start",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "match",
                "start"
              ]
            },
            "description": "Starts a match status and recording session for a specified court."
          },
          "response": []
        },
        {
          "name": "Check Match Status (Query Param)",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "secret",
                "value": "{{secret}}",
                "type": "text"
              },
              {
                "key": "Accept",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{base_url}}/match/status?court_id=45",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "match",
                "status"
              ],
              "query": [
                {
                  "key": "court_id",
                  "value": "45"
                }
              ]
            },
            "description": "Checks active match status for a court_id."
          },
          "response": []
        },
        {
          "name": "Stop Match Status (Body ID)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "secret",
                "value": "{{secret}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Accept",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"court_id\": 45\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{base_url}}/match/stop",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "match",
                "stop"
              ]
            },
            "description": "Stops active match session for court_id or status_match_id."
          },
          "response": []
        }
      ]
    },
    {
      "name": "Score Operations",
      "item": [
        {
          "name": "Get Real-time Score",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "secret",
                "value": "{{secret}}",
                "type": "text"
              },
              {
                "key": "Accept",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{base_url}}/match/score?court_id=45",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "match",
                "score"
              ],
              "query": [
                {
                  "key": "court_id",
                  "value": "45"
                }
              ]
            },
            "description": "Retrieves current match score, active set/game, and participant details."
          },
          "response": []
        },
        {
          "name": "Update Game Score (Besar - Direct Score)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "secret",
                "value": "{{secret}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Accept",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"court_id\": 45,\n    \"score_one\": 16,\n    \"score_two\": 12\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{base_url}}/match/score/game",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "match",
                "score",
                "game"
              ]
            },
            "description": "Directly sets game score for participant 1 and participant 2."
          },
          "response": []
        },
        {
          "name": "Update Game Score (Besar - Action)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "secret",
                "value": "{{secret}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Accept",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"court_id\": 45,\n    \"action\": \"add_one\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{base_url}}/match/score/game",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "match",
                "score",
                "game"
              ]
            },
            "description": "Increments or decrements score via action: add_one, add_two, sub_one, sub_two."
          },
          "response": []
        },
        {
          "name": "Update Point Score (Kecil - Direct point_one & point_two)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "secret",
                "value": "{{secret}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Accept",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"court_id\": 45,\n    \"point_one\": \"15\",\n    \"point_two\": \"0\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{base_url}}/match/score/point",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "match",
                "score",
                "point"
              ]
            },
            "description": "Directly sets tennis/padel point score using point_one and point_two string values ('0', '15', '30', '40', 'deuce', 'adv-one', 'adv-two')."
          },
          "response": []
        },
        {
          "name": "Update Point Score (Kecil - Action)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "secret",
                "value": "{{secret}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Accept",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"court_id\": 45,\n    \"action\": \"add_one\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{base_url}}/match/score/point",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "match",
                "score",
                "point"
              ]
            },
            "description": "Increments or decrements point score via action: add_one, add_two, sub_one, sub_two."
          },
          "response": []
        },
        {
          "name": "Update Set (Close & Start Next Set)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "secret",
                "value": "{{secret}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Accept",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"court_id\": 45,\n    \"action\": \"add\",\n    \"winner\": \"team-one\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{base_url}}/match/score/set",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "match",
                "score",
                "set"
              ]
            },
            "description": "Closes active set and initializes new set. Set winner can be 'team-one' or 'team-two'."
          },
          "response": []
        },
        {
          "name": "Update Set (Remove Set & Return to Prev)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "secret",
                "value": "{{secret}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Accept",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"court_id\": 45,\n    \"action\": \"sub\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{base_url}}/match/score/set",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "match",
                "score",
                "set"
              ]
            },
            "description": "Removes current set and returns to previous set."
          },
          "response": []
        },
        {
          "name": "Reset Score",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "secret",
                "value": "{{secret}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Accept",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"court_id\": 45\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{base_url}}/match/score/reset",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "match",
                "score",
                "reset"
              ]
            },
            "description": "Resets all score data for active match and restarts at set 1, game 1."
          },
          "response": []
        }
      ]
    }
  ],
  "event": [],
  "variable": [
    {
      "key": "base_url",
      "value": "https://sportsliveid.com/api"
    },
    {
      "key": "secret",
      "value": "sportslive"
    }
  ]
}
