WebHook API for Publishers
Learn how to integrate our Eventport WebHook API for Publisher.
What are Webhooks?
Webhooks allow you to get information about events as they happen in near real-time. Just provide a URL and we'll send the data to you as the events take place.
To test our Webhook API before setting up scripts, the RequestBin tool is an excellent utility that helps you see data come across as various events happen in our system.
Configuring Webhooks
Webhooks are configured from your Eventport account. Here are the basic steps:
- Log in to your Eventport Publisher account
- Navigate to the API settings page
- Enter your WebHook URL and click "Save"
- Use the shown API Token to secure your WebHook endpoint.
The API Token is sent as query parameteraccessToken - Test your integration with our testing tool.
Securing Webhooks
We currently support either HTTP or HTTPS urls, so you can have security by using an SSL-enabled url.
But keep in mind that your endpoint is going to be wide-open on the internet, and you might not want others to be able to submit random data to your systems. There are two ways to protect your endpoint from unauthorized access.
With each request we send your secret API Token as query parameter accessToken. You should check incoming request for this token.
We also support HTTP Basic Authentication. You can usually enable this in your webserver for the endpoint. You need to give us the username and password via the Webhook URL in the settings. For example: https://username:[email protected]/endpoint.
Testing the Integration
We have developed a tool for testing the Webhook API integration. You can find it in the settings in Eventport (login required).
Versioning
You can select the version in which you would like to receive data from us in your settings . As the API currently only has one version, there is not much for you to do right now.
We will tell you about new versions that you can upgrade to and we will warn you early enough if we decide to deprecate or abandon an old version.
Events API
The data is sent as JSON in a POST request.
Request formats
Requests are sent when an event is:
- published
- updated
- cancelled
Out general format for requests is the following:
{
"type": "event",
"method": "post",
"version": "1.0",
"data": {
"event": "<EventObject>",
"profile": "<OrganizerProfileObject>"
}
}
{
"type": "event",
"method": "cancel",
"version": "1.0",
"data": {
"event": {
"_id": "<eventId>"
}
}
}
Example Requests
Here are full examples of requests.
{
"type": "event",
"method": "post",
"version": "1.0",
"data": {
"event": {
"profileId": "tj4zTLeFTkAunsnMh",
"autoUpdate": false,
"name": "Event Title",
"inlet": "2014-11-21T21:00:00.000Z",
"begin": "2014-11-21T21:00:00.000Z",
"end": "2014-11-22T01:00:00.000Z",
"openEnd": false,
"description": "",
"genres": [],
"types": [],
"repeating": false,
"location": {
"_id": "tj4zTLeFTkAunsnMh",
"name": "Eventport Testprofil",
"street": "Trappentreustrasse 35",
"postalcode": "80339",
"city": "Munich",
"homepage": "http://eventport.net",
"facebookPageId": "785890424771022"
},
"floors": [],
"mediaPartners": [],
"lineup": [],
"priceCategories": [],
"tickets": [],
"media": [],
"rescheduled": false,
"relocated": false,
"cancelled": false,
"channels": {
"publisherNewsletter": {
"description": "",
"useGeneralDescription": true
},
"facebook": {
"description": "",
"useGeneralDescription": true,
"postTimeType": 0,
"postTime": "2014-11-21T21:30:00.000Z",
"imported": false
},
"homepage": {
"description": "",
"useGeneralDescription": true,
"customFields": {}
}
},
"publisherReceivers": [],
"publisherReceiverGroups": [],
"userReceivers": [],
"_id": "K8qjtKSegBfbdGppg",
"changed": true,
"changedOn": "2014-11-21T18:18:04.378Z",
"organizer": "Eventport Testprofil"
},
"profile": {
"_id": "tj4zTLeFTkAunsnMh",
"name": "Eventport",
"street": "Heßstrasse 89",
"addressAddition": "",
"postalcode": "80797",
"city": "München",
"phone": "+49 176 123 456",
"email": "[email protected]",
"homepage": "http://www.eventport.net",
"facebookPageId": "459661150826745",
"description": "This is our example profile for Eventport.",
"counterparts": [
{
"name": "Max Mustermann",
"phone": "+49 176 123 4567",
"email": "[email protected]",
"roles": ["Marketing"]
}
]
}
}
}
{
"type": "event",
"method": "post",
"version": "1.0",
"data": {
"event": {
"profileId": "tj4zTLeFTkAunsnMh",
"autoUpdate": false,
"name": "Event Title 2",
"inlet": "2014-11-21T21:00:00.000Z",
"begin": "2014-11-21T21:00:00.000Z",
"end": "2014-11-22T01:00:00.000Z",
"openEnd": false,
"description": "This is the event description.\n\nIt can have line breaks.",
"genres": [
"House",
"Hip Hop"
],
"types": [
"Clubevent",
"Party"
],
"repeating": false,
"location": {
"_id": "tj4zTLeFTkAunsnMh",
"name": "Eventport Testprofil",
"street": "Trappentreustrasse 35",
"postalcode": "80339",
"city": "Munich",
"homepage": "http://eventport.net",
"facebookPageId": "785890424771022"
},
"floors": [
"Dancefloor",
"Lounge"
],
"mediaPartners": [
{
"name": "Media Partner Name",
"url": "https://www.google.com"
}
],
"priceCategories": [
{
"name": {
"id": "PRESALE_PRICE",
"text": "Pre-sale"
},
"price": 12,
"hasProcessingFee": false,
"conditions": "Limited to 500 tickets."
},
{
"name": {
"id": "BOX_OFFICE_PRICE",
"text": "Box office price"
},
"price": 15,
"hasProcessingFee": false
}
],
"tickets": [
{
"url": "http://eventim.de",
"text": "Eventim"
}
],
"media": [
{
"url": "https://www.youtube.com/watch?v=48YDO2yN0JE",
"text": "Random Video"
}
],
"rescheduled": false,
"relocated": false,
"cancelled": false,
"channels": {
"facebook": {
"description": "This is the event description.\n\nIt can have line breaks.",
"imported": false,
"postTime": "2014-11-21T21:30:00.000Z",
"postTimeType": 0,
"useGeneralDescription": true
},
"homepage": {
"customFields": {
},
"description": "<p>This is the event description. It can have line breaks.</p>",
"publishedOn": "2014-11-21T18:18:12.986Z",
"url": "ok",
"useGeneralDescription": true
},
"publisherNewsletter": {
"description": "This is the event description.\n\nIt can have line breaks.",
"useGeneralDescription": true
}
},
"publisherReceivers": [
],
"publisherReceiverGroups": [
],
"userReceivers": [
],
"_id": "K8qjtKSegBfbdGppg",
"changed": true,
"changedOn": "2014-11-24T00:29:56.383Z",
"embeddedCodes": [
{
"code": "<iframe width=\"560\" height=\"315\" src=\"//www.youtube.com/embed/48YDO2yN0JE\" frameborder=\"0\" allowfullscreen></iframe>",
"title": "Random YouTube Video"
}
],
"organizer": "Eventport Testprofil",
"preSaleBegin": "2014-11-20T00:00:00.000Z",
"publishedOn": "2014-11-24T00:29:20.147Z",
"remark": "A note for publishers."
},
"profile": {
"_id": "tj4zTLeFTkAunsnMh",
"name": "Eventport",
"street": "Heßstrasse 89",
"addressAddition": "",
"postalcode": "80797",
"city": "München",
"phone": "+49 176 123 456",
"email": "[email protected]",
"homepage": "http://www.eventport.net",
"facebookPageId": "459661150826745",
"description": "This is our example profile for Eventport.",
"counterparts": [
{
"name": "Max Mustermann",
"phone": "+49 176 123 4567",
"email": "[email protected]",
"roles": ["Marketing"]
}
]
}
}
}
{
"type": "event",
"method": "cancel",
"version": "1.0",
"data": {
"event": {
"_id": "tj4zTLeFTkAunsnMh"
}
}
}
Documentation format
A type in brackets means that it is an array of this type.
EventObject
| Attribute | Type | Label |
|---|---|---|
| _id | String | Event ID |
| profileId | String | Profile ID |
| name | String | Event title |
| subtitle | String | Subtitle |
| organizer | String | Organizer |
| remark | String | Notes for publishers |
| inlet | Date | Inlet date/time |
| begin | Date | Begin date and time |
| end | Date | |
| openEnd | Boolean | |
| location._id | String | |
| location.name | String | |
| location.street | String | |
| location.addressAddiction | String | |
| location.postalcode | String | |
| location.city | String | |
| location.homepage | String | |
| location.facebookPageId | Number | |
| floors | [String] | |
| types | [String] | A list of event types. |
| genres | [String] | Music genres |
| description | String | |
| mediaPartners | [Object] | |
| mediaPartners.$.name | String | |
| mediaPartners.$.url | String | |
| preSaleBegin | Date | |
| priceCategories | [Object] | |
| priceCategories.$.name | Object | |
| priceCategories.$.name.id | String | |
| priceCategories.$.name.text | String | |
| priceCategories.$.price | Number | |
| priceCategories.$.hasProcessingFee | Number | |
| priceCategories.$.conditions | String | |
| tickets | [Object] | |
| tickets.$.url | String | |
| tickets.$.text | String | |
| photos | [PhotoObject] | Photos |
| documents | [DocumentObject] | Documents |
| media | [Object] | |
| media.$.url | String | |
| media.$.text | String | |
| embeddedCodes | [Object] | |
| embeddedCodes.$.code | String | |
| embeddedCodes.$.title | String | |
| rescheduled | Boolean | |
| relocated | Boolean | |
| cancelled | Boolean | |
| publishedOn | Date | |
| channels.publisherNewsletter | Object | |
| channels.publisherNewsletter.description | String | Description for publishers |
| channels.publisherNewsletter.publishedOn | Date | |
| channels.publisherNewsletter.useGeneralDescription | Boolean | |
| channels.facebook | Object | |
| channels.facebook.id | String | |
| channels.facebook.postTimeType | Number | |
| channels.facebook.postTime | Date | |
| channels.facebook.description | String | Description for facebook |
| channels.facebook.publishedOn | Date | |
| channels.facebook.useGeneralDescription | Boolean | |
| channels.facebook.photoId | String | |
| autoUpdate | Boolean |
PhotoObject / DocumentObject
| Attribute | Type | Label | Description |
|---|---|---|---|
| _id | String | Object ID | |
| url | String | Photo / Document URL | |
| thumbnailUrl | String | Photo thumbnail URL | This only for photos |
| purposes | [String] | Purposes | see note below |
| title | String | Title |
| Photo purpose ID | Description |
|---|---|
| 0 | Photo avilable for publishers |
| 1 | The photo should be used on the homepage |
| 2 | The photo is used as Facebook cover photo |
| 3 | The front side of the event flyer |
| 4 | The back side of the event flyer |
| 5 | The photo is used in the publisher newsletter |
| 6 | The main photo for the homepage. Only one photo has this purpose. |
| Document purpose ID | Description |
|---|---|
| 0 | Document should be used on the homepage |
| 1 | Document avilable for Publishers |
OrganizerProfileObject
| Attribute | Type | Label | Description |
|---|---|---|---|
| _id | String | Profile ID | |
| addressAddiction | String | Address addiction | |
| city | String | City | |
| counterparts | [Object] | Conterparts | |
| counterparts.$.name | String | Name | |
| counterparts.$.phone | String | Phone number | |
| counterparts.$.email | String | Email address | |
| counterparts.$.roles | [String] | Roles | |
| description | String | Description | |
| String | |||
| facebookPageId | String | Facebook page ID | |
| homepage | String | Homepage | |
| phone | String | Phone number | |
| postalcode | String | ZIP | |
| street | String | Street |
Updated less than a minute ago
