Implementation
What to do with the notification?
In order to receive notifications, you must supply us with a publicly accessible URL. If you require certificate, basic, apikey authentication or any custom headers you must also supply us with this information.
Your service must return a 200 OK
The only rule you must follow when receiving the notification is that your service returns us back a 200 OK status. Thats it.
Once a notification has been received, as a Client you are responsible to call the Sport API. The notification message will provide you with all the details you need in order to call the relevant API endpoint.
This can be found using the following JSON:
{
...
"url": "http://sport.api.press.net/v1/entity/1?ts=1453195816"
}
Alternatively you can provide your own mechanism to call the relevant resource by using a number of available JSON properties available to you, i.e. type.
Please Note
If you choose to construct the endpoint URL yourself, it is important that you attach the _ts query parameter to your request. This query parameter allows you to retrieve the latest data without hitting a cached response.
Your API request will also need to be authenticated, this can be done by attaching your apikey to the request header or as a request query parameter.
Updated over 6 years ago