API for organizers.
1. Presentation
The Evenium API is a RESTful API which attempts to conform to the design principle of Representational State Transfer.
The api is a RESTful resource accessible via HTTP:
-
a base url: https://evenium.com/api/1/
-
get resources using GET method
-
create new resources with POST
-
remove resources with DELETE
-
update (or create when resource does not exist) using PUT
-
errors are signaled using HTTP code greater than 299 (and answer body may contain an entity describing the error)
API requires authentication. User must log in to retrieve an access token which needs to be propagated with subsequent requests. Access token propagation is done via custom header X-Evenium-Token :
https://evenium.com/api/some_method?some_param=xxx X-Evenium-Token: {token}
Answers / requests data format is XML or JSON.
2. Api at a glance
2.1. How to test ?
For GET queries you can directly type urls in your web browsers.
For other queries, you may:
-
use cURL in command line(see Client code examples)
-
use a browser plugin like Poster (Firefox) or Advanced Rest Client (Chrome)
2.2. Working in json
API supports both xml and json content type.
|
As an alternative, you can also postfix resources with |
2.3. Connecting
Use of API requires authentification. You need to pass an accessToken
parameter with your requests.
The simplest way to get such a token is to get it from your profile.
If you have a Facility account, go to:
Or, if you are using evenium.net platform:
You can only use HTTPS for your API call. |
2.4. Contacts
The 'address book' of the user.
Contacts are identified by an internal (Evenium) id. They can also be identified using a custom (external, user specific) id.
Contacts have predefined properties as well as dynamic fields. Fields are identified by a name, usually self-descriptive, sometimes a simple numerical code.
Below, an example of how to import some contacts.
PUT https://evenium.com/api/1/contacts
{
"contact": [
{
"customId": "TEST-4",
"firstName": "John",
"lastName": "December",
"title": "MISS",
"email": "arnaud@evenium.com",
"company": "F&C UK",
"field": [
{
"name": "FIXED_PHONE_NUMBER",
"value": "0147701506"
},
{
"name": "1032349",
"value": "Dinesh jain"
}
]
},
{
"id": "100000210004",
"customId": "TEST-5",
"firstName": "Sophie",
"lastName": "Bizeau",
"title": "MRS",
"email": "christophe@evenium.com",
"company": "F&C France",
"field": {
"name": "FUNCTION",
"value": "Medical advisor"
}
}
]
}
2.5. Working with guests
Guests are contacts that have been invited to an event.
They have a main registration status to the event (see Guest status).
They can possibly have event specific fields.
Look for an event, which title contains “convention” and starts after June 2010 :
GET https://evenium.com/api/1/events?title=convention&since=2010-06-01Z
{
"nbrResults": "2",
"maxResults": "100",
"firstResult": "0",
"more": "false",
"event": [
{
"id": "7623",
"title": "Vinci Energies convention",
"startDate": "2010-07-10T07:00:00.000Z",
"endDate": "2010-07-12T17:00:00.000Z",
"creationDate": "2009-12-12T10:08:26.000Z",
"status": "FUTURE"
},
{
"id": "8424",
"title": "Convention Citroën",
"startDate": "2010-06-15T06:00:00.000Z",
"endDate": "2010-06-17T16:00:00.000Z",
"creationDate": "2005-10-24T13:38:06.000Z",
"status": "FUTURE"
}
]
}
Then look for a guest named “smith”, invited to the event “Convention Citroën” :
GET https://evenium.com/api/1/events/8424/guests?lastName=smith
{
"nbrResults": "1",
"maxResults": "100",
"firstResult": "0",
"more": "false",
"guest": {
"contactId": "1997252",
"eventId": "8424",
"firstName": "Bob",
"lastName": "SMITH",
"title": "MR",
"email": "noreply@evenium.com",
"company": "Evenium",
"lastUpdate": "2010-04-02T17:21:53.000Z",
"status": "UNANSWERED",
"category": "1010",
"categoryLabel": "Organizor",
"field": [
{
"name": "ADDR_COUNTRY",
"value": "UK"
},
{
"eventOnly": "true",
"name": "COMMENTS",
"value": "I'm currently on the Dukan diet.
Please propose me a dinner menu accordingly"
}
]
}
}
And then force his registration status to CONFIRMED
PUT https://evenium.com/api/1/events/8424/guests/1997252/status Content-Type: application/x-www-form-urlencoded status=CONFIRMED
2.6. Synchronizing your CRM with Evenium
Scenario 1: periodically send new guests only to EVENIUM
PUT https://evenium.com/api/1/events/{eventId}/guests?mode=CREATE_ONLY
EventId may be Evenium event id OR your own event id prefixed:
PUT https://evenium.com/api/1/events/ext:MD-1325239/guests?mode=CREATE_ONLY
{
"guest": [
{
"firstName": "Bob",
"lastName": "Smith",
"title": "MR",
"email": "noreply@evenium.com",
"company": "Evenium"
},
{
"firstName": "Samantha",
"lastName": "Doe",
"title": "MRS",
"email": "noreply@evenium.com",
"company": "Evenium"
}
]
}
{
"processed": "2",
"created": "1",
"messages": [
{
"status": "ERROR",
"context": "Guest: Bob Smith",
"details": "Unable to create guest, duplicate found: 10001025205 - Bob Smith"
},
{
"status": "INFO",
"context": "Guest: Samantha Doe",
"details": "Successfully created"
}
]
}
Scenario 2: real-time integration
Either periodically poll Evenium for updates:
GET https://evenium.com/api/1/events/8424/guests?lastUpdate=2010-11-06T22:00:00+00:01
Or, if possible, when one of your users open a guest form on your CRM, fetch info for Evenium using your CRM internal IDs:
GET https://evenium.com/api/1/events/ext:MD-1325239/guests/ext:AF-40J7828C1
Either case, once the user submit changes on your CRM, update Evenium database:
PUT https://evenium.com/api/1/events/ext:MD-1325239/guests/ext:AF-40J7828C1
{
"email": "new-email@new-company.com",
"company": "New company"
}
3. Contacts
3.1. Contact resources ids
Resources of type contact are accessed by contactId, referred as {contactId} path parameter in the resource url.
{contactId} can be of two kinds:
- Evenium contact’s id
-
e.g.:
…/contacts/123456/…
or
…/contacts/id:123456/…
- Your CRM’s contact id
-
You can add a property _customId" to your contacts. You can also access your contacts through this id:
e.g.:
…/contacts/ext:TE567890/…
3.2. Get contact
URL |
|
method |
|
response body |
|
3.3. Get contact by custom id
custom id = id specific to your database
URL |
|
method |
|
response body |
|
3.4. Create contact
URL |
|
method |
|
contentType |
|
request body |
|
response body |
|
3.5. Update contact
URL |
|
method |
|
contentType |
|
request body |
|
3.6. Update contact by custom id
URL |
|
method |
|
contentType |
|
request body |
|
3.7. Get all contacts
URL |
|
method |
|
query params |
|
response body |
|
3.8. Import contacts
Create new contacts OR update existing ones.
URL |
|
method |
|
contentType |
|
request body |
|
response body |
|
3.9. Get contact’s events
URL |
|
method |
|
query params |
|
response body |
|
3.10. Get contact’s events by custom id
custom id = id specific to your database
URL |
|
method |
|
query params |
|
response body |
|
3.11. Remove contact
Be extremely wary if you want to use this api:
|
URL |
|
method |
|
response status |
|
4. Events
4.1. Event resources ids
Resources of type event are accessed by eventId, referred as {eventId} path parameter in the resource url.
{eventId} can be of two kinds:
- Evenium event’s id
-
e.g.:
…/events/123456/…
or
…/events/id:123456/…
- Your CRM’s event id
-
You can add a field
EXT_EVENT_ID
to your events. You can also access your events through this id:e.g.:
…/events/ext:EV-AB12CD34/…
4.2. Get event
URL |
/api/1/events/{eventId} |
method |
|
response body |
|
4.3. Get all events
URL |
|
method |
|
query params |
|
response body |
|
4.4. Create Events
Event creation is only available via a v2 api |
URL |
|
method |
|
query params |
|
request body |
|
response body |
|
For list of available moduleConfigs, see Optional modules.
5. Guests
5.1. Guest resources ids
Resources of type guest are accessed by eventId and contact_id (referred as _{eventId} and {contactId} path parameter in the resource url).
both can be of two kinds:
-
Evenium contact’s id
-
Your CRM’s contact id
Please see Event resources ids and Contact resources ids for more details.
5.2. Get guest
URL |
/api/1/events/{eventId}/guests/{contactId} /api/1/events/{eventId}/guests/guestCode/{guestCode} |
method |
|
query params |
e.g: fields=REGISTRATION,PRESENCE |
response body |
|
5.3. Create guest
Invite a contact on an event.
URL |
/api/1/events/{eventId}/guests |
method |
|
request body |
Invite an existing contact (status is optional)
Create a guest from scratch (status is optional as well)
|
5.4. Update guest
URL |
/api/1/events/{eventId}/guests/{contactId} |
method |
|
request body |
|
5.5. Update guest photo
URL |
/api/1/events/{eventId}/guests/{contactId}/photo |
method |
|
contentType |
|
request body |
Image using data URI scheme. See:
Supported media types:
|
5.6. Get guest status
URL |
/api/1/events/{eventId}/guests/{contactId}/status |
method |
|
response body |
|
5.7. Update guest status
URL |
/api/1/events/{eventId}/guests/{contactId}/status |
method |
|
contentType |
|
form params |
|
5.8. Get guest post status
URL |
/api/1/events/{eventId}/guests/{contactId}/postStatus |
method |
|
response body |
|
5.9. Update guest post status
URL |
/api/1/events/{eventId}/guests/{contactId}/postStatus |
method |
|
contentType |
|
form params |
|
5.10. Get all guests
URL |
/api/1/events/{eventId}/guests |
method |
|
query params |
|
response body |
|
5.11. Import guests
Create new guests OR update existing ones.
URL |
/api/1/events/{eventId}/guests |
method |
|
query params |
|
response body |
|
6. Event Parts / Sessions
6.1. Get event part
URL |
|
method |
|
response body |
|
6.2. Get all event parts
URL |
|
method |
|
query params |
|
response body |
|
6.3. Get registrations by event part
Fetch registrations to a given event part / session.
URL |
|
method |
|
query params |
|
response body |
|
7. Accommodations
Accommodations are not available on the evenium.net platform |
7.1. Get hotels
URL |
|
method |
|
query params |
e.g: fields=location,rooms |
response body |
|
7.2. Get guest accommodations
URL |
|
method |
|
response body |
|
8. Authentification
You usually do not need to ask for a token using your login and password. Use API Key instead, as explained in Connecting. |
8.1. Log in
URL |
|
method |
|
contentType |
|
query params |
|
form params |
|
response body |
|
response status |
|
Use https to connect. Non secure http connections are not allowed. |
Tokens are expired after logout. When providing an expired / invalid access token or no token at all, API will reply with a 401 status code and the following response:
|
8.2. Log out
URL |
|
method |
|
9. Client code examples
9.1. Using cURL
Useful options:
-
-X POST/PUT/DELETE
: specify http method -
-i
: show HTTP headers -
-H "Content-type: text/xml"
: add HTTP Header -
-d “param1=value¶m2=value”
: send parameters using"Content-type: application/xwww- form-urlencoded"
-
-T file_path
: send file as content
Some examples :
-
Log in:
curl -X POST -d "pwd=somepassword" "https://evenium.test/api/1/loginOAuth? login=SOMELOGIN"
-
GET a resource:
curl -H "X-Evenium-Token: xxxxxxx" "https://evenium.com/api/1/events"
-
PUT an xml resource as a file:
curl -i -H "X-Evenium-Token: xxxxxxx" -H 'Content-type: application/xml' -X PUT -T import_contacts.xml "http://evenium.com/api/1/contacts"
-
PUT using parameters:
curl -i -H "X-Evenium-Token: xxxxxxx" -X PUT -d "status=CANCELED" "http://evenium.com/api/1/events/123/guests/456/status"
10. Data Format
10.1. Compressing data
The API supports data compression using standard GZIP scheme. If you can support it, please consider using it as it could reduce the size of data exchanged by a 15 factor.
10.1.1. Sending compressed data:
Add the following to the request header:
Content-Encoding: gzip
10.1.2. Receiving compressed data:
If you are willing / able to receive compressed data, add the following to your request header:
Accept-Encoding: gzip, deflate
The server indicates data it is sending is compressed by adding the following to the response
Content-Encoding: gzip
10.2. Dates, timestamps
Dates format follows RFC 3339, for query params as well as message entities properties.
https://127.0.0.1/api/1/contacts?...&since= 2010-01-01T12:00:00+01:00 https://127.0.0.1/api/1/contacts?...& since=2010-01-01Z&until=2011-01-01Z https://127.0.0.1/api/1/events?...& since=2010-05-10-00:05&until=2010-05-15-05:00 ...<lastUpdate>2010-02-05T13:37:35.000Z</lastUpdate>...
Let’s consider the following date :
Feb 14 2010 at 00:00:00 (CET / in France for instance)
Here are valid representations of this date (Z stands for UTC):
2010-02-14+01:00 2010-02-14T00:00:00+01:00 2010-02-14T00:00:00.000+01:00 2010-02-13T23:00:00Z 2010-02-13T23:00:00.000Z
These ones are also valid but ambiguous and should be avoided as they refer to the default timezone of our servers (which happens to be Central European Time (CET) ):
2010-02-14 2010-02-14T00:00:00 2010-02-14T00:00:00.000
Date properties returned by the api are always normalized to UTC:
<lastUpdate>2010-02-05T13:37:35.000Z</lastUpdate>
Time offsets
We strongly recommend working with UTC dates, rather than trying to manually add a time offset, as in a given timezone, the time offset depends on the date itself (due to daylight savings for example). For example, in New York:
|
10.3. Internationalization
Some data or messages may be internationalized.
See RFC 3282 for the complete internet standard.
In a nutshell, to get internationalized content, you need to add a header to your request:
Accept-Language: fr,en
This header specifies the list of preferred languages tags (from most preferred to least preferred).
In most cases, a language tag is made of language code with an optional country code to specify a national variant:
Accept-Language: en_US
The language argument is a valid ISO Language Code. These codes are the lower-case, two-letter codes as defined by ISO-639. You can find a full list of these codes at a number of sites, such as:
http://www.ics.uci.edu/pub/ietf/http/related/iso639.txt
The country argument is a valid ISO Country Code. These codes are the upper-case, two-letter codes as defined by ISO-3166. You can find a full list of these codes at a number of sites, such as:
http://www.chemie.fu-berlin.de/diverse/doc/ISO_3166.html
11. Constants
11.1. Event status
Value | Backoffice name | Comments |
---|---|---|
FUTURE |
Open |
|
DRAFT |
Draft |
|
DELETED |
Deleted |
Event is not visible in backoffice any more |
CLOSED |
Closed |
|
ARCHIVED |
Archived |
|
CANCELED |
Canceled |
|
CLONEABLE |
Template |
An event template, not a real event. Not visible in backoffice. |
11.2. Guest status
Canceled status:
-
DELETED
-
CANCELED
-
REPLACED
-
DECLINED
Pending status:
-
PENDING
-
UNANSWERED
Confirmed status:
-
VALID
-
RESERVED
-
OVERBOOKED
-
EXTRA
-
CONFIRMED
11.3. Guest post status
-
UNKNOWN
-
NO_SHOW
-
PRESENT
11.4. Optional modules
Value | Description |
---|---|
EVENT_CONNEXME |
ConnexMe / interactive meetings |
EVENT_GUEST_EXPENSES |
Expense tracking and financial reporting |
EVENT_ONSITE |
Onsite / check-in |
EVENT_HIERARCHY |
Collaborative management |
11.5. Guest fields
11.5.1. Transport request fields:
Name | Description |
---|---|
TRANSPORT_WORKFLOW_STATUS |
Transport request status |
TRANSPORT_WORKFLOW_INFOS_WAYBACK_TYPE |
Transport request type |
TRANSPORT_WORKFLOW_INFOS_WAYTO_CITY |
Way to departure place |
TRANSPORT_WORKFLOW_INFOS_WAYTO_DATE |
Way to departure date |
TRANSPORT_WORKFLOW_INFOS_WAYTO_HOUR |
Way to departure hour |
TRANSPORT_WORKFLOW_INFOS_WAYBACK_CITY |
Way back arrival place |
TRANSPORT_WORKFLOW_INFOS_WAYBACK_DATE |
Way back arrival date |
TRANSPORT_WORKFLOW_INFOS_WAYBACK_HOUR |
Way back arrival hour |
12. Errors
TODO: error codes |