Placeholders

In some cases, you may come across situations where you need to handle data for teams or fixtures that are not yet available or finalised.

To address this, our API provides support for placeholder teams and fixtures.

Placeholders are temporary entities and should be replaced with actual team and fixture data once the relevant information becomes available in our system.

Placeholders

A placeholder participant represents a participant that has not been fully defined or is yet to be confirmed. It allows you to reserve a spot or reference a team without having complete information about it. Placeholder participants are useful when you need to maintain consistency in your data structure, even if specific details about a participant are not known at a given time.

When dealing with placeholder participants in fixtures, it is essential to recognise that certain details may be missing or incomplete. Information like the teams involved, venue, date, or other fixture-specific attributes may not be available at the time of placeholder creation. Therefore, it is crucial to handle this placeholder data in a way that clearly communicates the temporary or provisional nature of the information.

Identifying a placeholder

A placeholder team can be identified by its unique identifier which is available under the field: "placeholder". This field can be set to true or false when a team is a placeholder for that fixture. Additionally, a fixture can be a placeholder, as mentioned above. You can find the same field, "placeholder" in a request to a fixture entity. This one can also be set to true or false.

If you take a look at the example below, you can see that both the fixture and the participants are placeholders in this case.

{
    "data": {
        "id": 18716194,
        "sport_id": 1,
        "league_id": 1327,
        "season_id": 20833,
        "stage_id": 77460772,
        "group_id": null,
        "aggregate_id": null,
        "round_id": null,
        "state_id": 1,
        "venue_id": null,
        "name": "1st position Group D vs 2nd position Group B",
        "starting_at": "2023-07-02 19:00:00",
        "result_info": null,
        "leg": "1/1",
        "details": null,
        "length": 90,

        "has_odds": false,
        "starting_at_timestamp": 1688324400,
        "participants": [
            {
                "id": 260209,
                "sport_id": 1,
                "country_id": 190324,
                "venue_id": null,
                "gender": "neutral",
                "name": "1st position Group D",
                "short_code": null,
                "image_path": "https://cdn.sportmonks.com/images/soccer/team_placeholder.png",
                "founded": null,
                "type": "domestic",
  
                "last_played_at": null,
                "meta": {
                    "location": "home",
                    "winner": null,
                    "position": null
                }
            }

Best Practices

To effectively utilise placeholder teams and fixtures within our API, consider the following best practices:

When retrieving or displaying data related to a placeholder team or fixture, clearly indicate the provisional status and any missing information to avoid confusion for consumers.

Regularly update the fixtures that have placeholders to ensure that your customers are aware of any changes.

Last updated