Overview
The Match Formation API returns the home and away player arrangements for a specific match. Each formation entry contains the player profile, match-specific shirt number, team, assigned match position, normalized pitch coordinates, and starting-lineup status. The response separates the two teams intoarrFormation.home and arrFormation.away. Use boolLineup to distinguish starters from non-starters:
true: the player is part of the starting lineup.false: the player is a non-starter or substitute included in the formation data.
objPlayer.position describes the player’s master profile positions, while strPosition describes the position assigned for this match. Similarly, objPlayer.number is the player-profile number, whereas intShirtNumber is the shirt number used in this match and should be preferred for lineup displays.
The payload does not repeat the requested match identifier inside object. Consumers should associate the response with the match_id used in the request.
Typical Use Cases
- Render home and away formations on a football pitch.
- Display starting lineups and substitutes.
- Build broadcast lineup graphics.
- Show match-specific positions and shirt numbers.
- Compare registered player positions with match assignments.
- Populate match-center formation views.
- Power tactical lineup and pre-match presentation screens.
Parameters
The API module. This value is fixed and must always be
api.The endpoint name. This value is fixed and must always be
MatchFormation.The API version. Use
V3.The unique KoraStats match identifier. In this example, use
129958.The response language code. Use
en for English.The response format. Use
json.Your KoraStats API key. Keep this value secure and do not expose it in public or client-side applications.
Endpoint
GEThttps://premium.korastats.pro/api.php
Code Examples
Response Example
Response Fields
Response Envelope
| Field | Type | Description |
|---|---|---|
result | boolean | Indicates whether the request completed successfully. |
title | string | Short response status title. |
message | string | Human-readable result message. |
object | object | Formation payload for the requested match. |
Formation Container
| Field | Type | Description |
|---|---|---|
object.arrFormation | object | Container holding the home and away formation entries. |
object.arrFormation.home | array(object) | Home-team formation entries. |
object.arrFormation.away | array(object) | Away-team formation entries. |
Formation Entry
The same schema is used for every item in thehome and away arrays. Paths below use [side] to represent either array.
| Field | Type | Description |
|---|---|---|
object.arrFormation.[side][].objPlayer | object | Player profile associated with the formation entry. |
object.arrFormation.[side][].intShirtNumber | integer | Match-specific shirt number. Prefer this value when displaying the lineup. |
object.arrFormation.[side][].objTeam | object | Team represented by the player in this match. |
object.arrFormation.[side][].strPosition | string | Match-specific position code, such as GK, CB, LB, RB, DM, CM, AM, LW, RW, or CF. |
object.arrFormation.[side][].decX | number | Player’s normalized horizontal pitch coordinate. Values in this response use a 0–100 pitch scale. |
object.arrFormation.[side][].decY | number | Player’s normalized vertical pitch coordinate. Values in this response use a 0–100 pitch scale. |
object.arrFormation.[side][].boolLineup | boolean | true for a starting player; false for a non-starter or substitute. |
Player Object
| Field | Type | Description |
|---|---|---|
objPlayer._type | string | Object discriminator. The value is PLAYER. |
objPlayer.id | integer | Unique player identifier. |
objPlayer.name | string | Player’s full display name. |
objPlayer.nickname | string | null | Player’s nickname or preferred display name. |
objPlayer.dob | string | null | Date of birth in YYYY-MM-DD format. |
objPlayer.number | integer | null | Shirt number stored on the player’s profile. This can differ from intShirtNumber. |
objPlayer.position | object | Player’s registered primary and secondary positions. |
objPlayer.nationality | object | null | Player’s nationality when available. |
Player Position Object
| Field | Type | Description |
|---|---|---|
objPlayer.position.primay | object | null | Player’s registered primary position. The API currently returns the field name as primay. |
objPlayer.position.primay._type | string | Object discriminator. The value is POSITION. |
objPlayer.position.primay.id | integer | Unique position identifier. |
objPlayer.position.primay.name | string | Primary position code. |
objPlayer.position.secondary | object | null | Player’s registered secondary position. |
objPlayer.position.secondary._type | string | Object discriminator. The value is POSITION. |
objPlayer.position.secondary.id | integer | Unique secondary-position identifier. |
objPlayer.position.secondary.name | string | Secondary position code. |
Team Object
| Field | Type | Description |
|---|---|---|
objTeam._type | string | Object discriminator. The value is TEAM. |
objTeam.id | integer | Unique team identifier. |
objTeam.name | string | Team name. |
Nationality Object
| Field | Type | Description |
|---|---|---|
objPlayer.nationality._type | string | Object discriminator. The value is NATIONALITY. |
objPlayer.nationality.id | integer | Unique nationality identifier. |
objPlayer.nationality.name | string | Nationality name. |
Use
strPosition for the player’s role in this match. Do not assume it matches objPlayer.position.primay.name, which describes the player’s registered profile position.Use
intShirtNumber for match lineup displays. objPlayer.number is profile-level data and can contain a different value.Error Response
Ifmatch_id is missing, the API returns a bad-request response using the standard KoraStats error envelope.