Webhooks for Trainings API

Gewijzigd op Thu, 26 Oct 2023 om 12:02 PM

Webhooks for Trainings API makes it possible for Springest's partners to get real-time updates by setting up a Webhook. There is no need to get all the information you need from Springest each time there is an update. You will simply keep track of changes we share with you and update where needed.

Request Webhook

As a partner you will only need to share the URL so we can POST the information. Please contact us if you are interested.

Share URL

As a partner you should start a server that listens to POST requests. Springest will use the URL for this server to set up the Webhook. Below you can see the information that will be posted by Springest to the URL. 

To get a better idea of how this works please read the following documentation as a example: 

Post to URL

Springest posts JSON to each configured Webhook URL with the required information. The Post result contains an array of changes. Each 'change' shall include:

  • Type of action: 
    • import: An import has been completed for institute. All trainings for this institute has been updated.
    • update: Object has been added/updated to API overview.
    • destroy: Object has been removed from API overview. 
  • Object: training, institute
  • ID: a number of training-id or institute-id
  • URL: URL to call the api and get the information. (Unless action is destroy)

Example JSON

    "changes": [
            "action": "import",
            "object": "institute",
            "id": 234234,
            "url": "http://api.springest.nl/institutes/234234"
            "action": "update",
            "object": "training",
            "id": 345345,
            "url": "http://api.springest.nl/trainings/345345"
            "action": "destroy",
            "object": "training",
            "id": 34534        

How to use:

On the server you should run a script that reads the information from the POST request. The information in the post allows you can easily update your data by making calls to our API. Below I will describe what type of calls you should make for the previous Example JSON.

Please look at the  API documentation for more information.

Storing all the data:

We store all in the information in our database in case there is an server outage on your side. Also, we keep trying to resend the information to your URL until it is working again. 

Technical Requirements

  • Mediapartners should have a URL available for Springest to use as a webhook.
  • Springest should be able to configure a webook (with name, URL, description) for partner.
  • Springest should be able post JSON to url with required information on a (almost) real-time basis.
  • Springest shall delay JSON and bundle information to prevent multiple changes on same ID (duplicate work).
  • JSON shall include an array of changes
  • A change shall include type of action: import, update, destroy
  • A change shall include object: training, institute
  • A change shall include ID: a number of training-id or institute-id
  • A change shall include URL: URL to call the api and get the information. (Unless action is destroy)
  • The URL shall not include the format extension and API key.

Was dit artikel nuttig?

Dat is fantastisch!

Hartelijk dank voor uw beoordeling

Sorry dat we u niet konden helpen

Hartelijk dank voor uw beoordeling

Laat ons weten hoe we dit artikel kunnen verbeteren!

Selecteer tenminste een van de redenen
CAPTCHA-verificatie is vereist.

Feedback verzonden

We stellen uw moeite op prijs en zullen proberen het artikel te verbeteren