How to keep your database in SYNC

This is one of the most vital how-to guides. We’ll discuss how you can keep your database in sync with ours. Let’s imagine you want to know all the fixtures of one specific day. You want to show these matches to your application users and send updates to them. You can use our fixtures by date endpoint to accomplish this.

In this example, we’ll take the date of 2022-09-03.

https://api.sportmonks.com/v3/football/fixtures/date/2022-09-03?api_token=YOUR_TOKEN

Now, sometimes fixtures are deleted due to technical reasons. These fixtures will be removed from the API response.

If you only use the previous request and a fixture is removed, then it won't be in your response. This results in your database not being in sync with ours.

Luckily, we have a solution for this. If you add &filters=deleted to your request, you will get all the fixtures that are deleted from that specific date.

https://api.sportmonks.com/v3/football/fixtures/date/2022-09-03?api_token=YOUR_TOKEN&filters=deleted&include=state

Adding &filters=deleted allows you to keep your database in sync with ours.

We've included the state to have a textual representation of the fixtures' state.

Last updated