Subscriptions API Overview

The Subscriptions API is used to notify of changes in state of any of the Triathlon API resources. This is useful for example in keeping data synchronized with other services for example an external database that maintains a record of athlete profiles or for receiving live timing updates.

The simplest way to register a subscription is via the apps.api.triathlon.org management portal.

1629

Receive webhook notifications for changes of state in the Triathlon API

Users may subscribe to any of the available methods e.g. athletes.edit, athletes.delete, rankings.publish and receive notifications via a webhook with the data being POSTed to the subscribed URL. Be aware that some methods my result in a large volume of data being POSTed to your servers, please ensure your applications can handle the load.

👍

Webhook endpoints should respond with a status of 2xx to indicate the message has been received

Available Methods

🚧

Not all methods currently available

Currently only rankings and live timing subscriptions are available.

The Subscription methods accept the following notifications. The method column indicates the name to use when registering a new subscription and is linked to the corresponding matching API call that would trigger it (useful for determining response types).

MethodDetails
athlete.storeFired on a creation of a new athlete
athlete.updateFired on editing of an athlete
athlete.destroyFired on deleting of an athlete
athlete.mergeFired on merging of two athlete profiles
team.storeFired on creation of a new team
team.updateFired on editing of a team
team.destroyFired on deleting of a team
event.storeFired on creation of an event
event.updateFired on updating of an event
event.destroyFired on deleting of an event
program.storeFired on creation of a program
program.updateFired on editing of a program
program.destroyFired on deleting of a program
entry.storeFired on creation of a program entry
entry.updateFired on editing of a program entry
entry.destroyFired on deleting of a program entry
results.storeFired on creation of a result
results.updateFired on updating of a result
results.destroyFired on deleting of a result
article.storeFired on creation of an article
article.updateFired on updating of an article
article.destroyFired on deletion of an article
web_image.storeFired on creation of a web gallery image
hr_image.storeFired on creation of a high-resolution gallery image
video.storeFired on creation of a video
video.updateFired on updating of a video
video.destroyFired on deletion of a video
download.storeFired on creation of a download
download.updateFired on updating of a download
download.destroyFired on deletion of a download
federation.storeFired on creation of a Federation
federation.updateFired on updating of a Federation
federation.destroyFired on deletion of a Federation
course.storeFired on creation of a course
course.editFired on updating of a course
course.destroyFired on deletion of a course
ranking.publishFired on rankings being published
subscription.storeFired on creation of a subscription
subscription.updateFired on updating of a subscription
subscription.destroyFired on deletion of a subscription
timing.storeFired for a new live timing message

📘

Webhook Integration Services

Using services such as Zapier which may receive incoming webhooks you may integrate the Subscriptions API into a number of different services such as Twilio (if you wish to receive SMS messages), email or spreadsheet.

Retries

The Subscriptions API uses an exponential back-off style retry policy which increases the time delay between each retry. The Subscription API attempts 10 deliveries with an initial delay of 60 seconds. Should this fail you may include an email to be notified of a failed delivery which will occur after several hours of retries (see table below).

🚧

3xx responses will not be followed and will not be retried, only 4xx and 5xx responses

Retry CountNext RetryTotal Seconds Elasped
16161
276137
3141217
4361457
56851,001
61,3562,041
72,4613,817
84,1566,617
96,62110,777
1010,06016,681

Authentication

If authentication is required you may specify a token to be included in the incoming webhook which will be added as a URL parameter e.g. yoursite.com?token=my-secret-token

Debugging

The output of each of the webhooks corresponds to the method that is being called so you could consult the method documentation for the response type e.g. athletes.store responds with a 201 response and the same response as the calling method.

To debug webhooks consider using a service such as RequestBin to ensure you are receiving the response and then edit your subscription to match your production URL.