Fixture Official
Table of Contents
Fixture Official
What is Fixture Official? The Fixture Official is the Official or Assistant Referee of the Fixture. It is created by associating a Person directly to the Fixture
When to use
If the real-life referees for the Fixture are available they can be proposed to the Fixture.
How to use
In order to create Fixture Official First the Person and the Fixture must exist or be created. And then the Fixture Official can be proposed or requested on endpoint /v2/fixtures/{gss_fixture_id}/officials
of Fixtures API v2
Example workflow
GET GSS Fixtures from Fixtures API v2
curl --location --request GET 'https://ci.fixtures.api.geniussports.com/v2/fixtures' \ --header 'x-api-key: <<api_key>>' \ --header 'Content-Type: application/json' \ --header 'Authorization: <<id_token>>' \ --data-raw ''
Successful response would be with status code 200 and JSON data in format:
{ "page": 0, "pageSize": 0, "totalItems": 0, "items": [ { "metadataProperties": [ // The sport specific rules set to the fixture both derived, overriden or set to the current fixture only { "name": "string", "value": "string" } ], "id": 0, // GSS Fixture Id "createdOn": "2021-11-29T12:08:59.387Z", "modifiedOn": "2021-11-29T12:08:59.387Z", "startDate": "2021-11-29T12:08:59.387Z", // Start date of the fixture "name": "string", "season": { "Id": 0, // GSS Season Id to which the fixture is associated "Name": "string", "Ref": "/seasons/{Id}" }, "eventStatusType": "string", // Whether it is finished, inprogress or notstarted. "locality": { "Id": 0, // GSS Locality Id (if set) where the fixture will be played "Name": "string", "ref": "/localities/{id}" // Endpoint on which the Locality is available }, "timezone": { "Id": 0, // GSS Timezone Id in which the fixture will be played "Name": "string", "Ref": "/timezones/{Id}" }, "venue": { "Id": 0, // GSS Venue Id on which the fixture will be played "Name": "string", "Ref": "/venues/{Id}" }, "sport": { "Id": 0, // GSS Sport Id for which the fixture will be played "Name": "string", "ref": "/sports/{id}" // Endpoint on which Sport is available }, "competition": { "Id": 0, // GSS Competition Id to which the fixture is associated "Name": "string", "Ref": "/competitions/{Id}" }, "round": { "Id": 0, // GSS Round Id (if set) to which the fixture is associated "Name": "string", "Ref": "/rounds/{Id}" }, "genderType": "string", "competitors": [ { "id": 0, // GSS Competitor Id "name": "string", // GSS Competitor Name "competitorType": "string", // GSS Competitor Type "ref": "/competitors/{competitorType}/{id}" } ] } ], "self": "string", "previous": "string", "next": "string", "first": "string", "last": "string" }
Get Fixture Officials from Fixtures API v2
curl --location --request GET 'https://ci.fixtures.api.geniussports.com/v2/fixtures/{gss_fixtures_id}/officials' \ --header 'x-api-key: <<api_key>>' \ --header 'Content-Type: application/json' \ --header 'Authorization: <<id_token>>' \ --data-raw ''
Successful response would be with status code 200 and JSON data in format:
Read Data Points
Field | Type | Nullable | Description |
---|---|---|---|
id | int64|unsigned | The numeric identifier of the Fixture Official | |
sport | SportEmbed | The numeric identifier, name and a reference of the Sport for which the contract was created | |
person | object|PersonEmbed | The Person | |
personRole | string|in: Referee, Official | Defines the person role in the Fixture: 0 - Referee→ The official referee of the Fixture 1 - Official→ Any person associated in some way to the Fixture | |
createdOn | timestamp | The timestamp when the data entity was created | |
modifiedOn | timestamp | The timestamp when the data entity was last updated | |
updatesCount | int32|unsigned | The amount of times the data entity was updated |
Create/ Update Data Points
Field | Type | Required For Create | Required For Update | Description |
---|---|---|---|---|
fixtureId | int64|unsigned|from path |
| The GSS Fixture Id with which the proposed | |
personId | int64|unsigned |
| The GSS Person Id with which the proposed | |
personRole | int32|in: 0, 1 |
| Defines the person role in the Fixture: 0 - Referee→ The official referee of the Fixture 1 - Official→ Any person associated in some way to the Fixture |
Validations
Description | On Create | On Update | On Delete | Response Code | Error Message |
---|---|---|---|---|---|
Fixture must exist |
| 400 | Not found. Missing Fixture entity with id: {proposed fixture id} | ||
Person must not already be part of the Fixture | 400 | Person {proposed person id} is already part of fixture {proposed fixture id} as {the person role}! | |||
Person must be part of the Fixture | 400 | Not found. Missing Fixture Official relation between fixture {proposed fixture id} and person {proposed person id}! | |||
Person must not be part of the active contracts of any of the Fixture’s non TBD Competitors |
|
| 400 | Person {person id} proposed as {proposed role} cannot be part of the active contracts of competitor {competitor id} as the competitor is part of the fixture! | |
Person must exist | 400 | Not found. Missing Person entity with id: {proposed person id} | |||
Person must be active |
|
| 400 | Person with id {person id} is not active | |
Person must have the sport associated |
|
| 400 | Person cannot be used in sport {proposed sport id} as the sports associated with the person are: {sport ids separated by ', '} |