POST/endpoint/

Register Webhook

Register webhook

Implementation Notes

This API call allows you to set up a WebHook that receives data generated by EventsShop.

  • Once a WebHook is defined, data is automatically delivered to the specified endpoint.
  • The WebHook will send POST requests with JSON payloads corresponding to eventsinfo, eventimpact, or hoteldemand data.

Authentication:

  • The user must provide either Basic Auth (Username & Password) or OAuth 2.0 (Token).
  • If Basic Auth is used, the system will generate a new token.

Supported Authentication Types:

  • "authType": "Basic Auth"
  • "authType": "OAuth 2.0"

Mandatory Fields:

  • authType
  • endpoint

Example Input 1 (Basic Auth):


{ "authType": "Basic Auth", "endpoint": "http://35.84.42.213:5000/", "userName": "events", "password": "*******", "token": "********" }

Example Input 2 (OAuth 2.0):


{ "authType": "OAuth 2.0", "endpoint": "http://35.84.42.213:5000/", "userName": "events", "password": "*******", "token": "********" }

POST/endpoint/

Parameter Details

NameInTypeRequiredDescription
bodybodyobjectRequirednone
» authTypebodystringOptionalAuthentication method to use.
» endpointbodystringOptionalURL of the WebHook endpoint.
» userNamebodystringOptionalUsername for Basic Auth (leave empty for OAuth 2.0).
» passwordbodystringOptionalPassword for Basic Auth (leave empty for OAuth 2.0).
» tokenbodystringOptionalOAuth 2.0 Token (leave empty for Basic Auth).

Responses

StatusMeaningDescriptionSchema
202AcceptedSuccessfully registered the WebHook.None
400Bad RequestBad RequestNone
401UnauthorizedUnauthorizedNone
429Too Many RequestsToo Many RequestsNone
500Internal Server ErrorInternal Server Error.None

Example Request

# You can also use wget
curl -X POST https://api.events.example.com/api/v1/endpoint/ \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer {access-token}'

Example responses

202 Response
{
"authType": "Basic Auth",
"endpoint": "http://35.84.42.213:5000/",
"userName": "events",
"password": "*******",
"token": "********"
}

Body parameter

{
  "authType": "",
  "endpoint": "",
  "userName": "",
  "password": "",
  "token": "********"
}

Need Support?

Our team is here to help you integrate and make the most of our APIs. Get in touch for technical support, custom solutions, or any questions.