If you want to create eventbaxx participants from anywhere – for example from your own website or mobile app – or if you want to retrieve participants from a specific eventbaxx, this is your place to be. We try our best to make this an easy and pleasurable experience for you.
What do you need to add or retrieve participants to/from an eventbaxx?
Eventbaxx ID
After loggin in with your eventbaxx-organizer account, hit the “create eventbaxx” dialouge. After creating the eventbaxx, you will notice the
Eventbaxx ID
from the browser URL like this:
www.eventbaxx.com/events/49/my-eventbaxx
.
In this case, the
Eventbaxx ID
is
49
.
Note: The API token is only visible if you own at least one eventbaxx with the API feature enabled (e.g. with the "PRO"-plan). If you want to revoke your current API token, simply click on "Revoke API token" and we will immediately generate a new token for you.
Your API token can be used for API requests towards all eventbaxx' that you own.
To prevent unauthorized participant calls or creations, API users need to authenticate by supplying their API token in the HTTP header.
AUTHORIZATION HEADER
Simply supply the eventbaxx API token in the HTTP header of your API call with the name "Authorization", like this:
curl -H "Authorization: Token 4c3d9ce826821dc0c5d15d753bd89ba4"
You created an eventbaxx, noted down the
Eventbaxx ID
and you know how to authenticate with our API? Then head on to create your eventbaxx participants.
The API endpoint to POST participant details to is:
https://api.eventbaxx.com/v1/participations/:event_id
Replace the
event_id
placeholder with the desired
Eventbaxx ID
and you're good to go.
The API endpoint to add participants accepts the following parameters:
email
: The e-mail of the participant.
Mandatory.
firstname
: The first name of the participant. Optional.
name
: The last name of the participant. Optional.
gender
: The gender of the participant (‘male’,‘female’,‘andy’). Optional.
tags
: Comma seperated tags to tag a participant (tag1,tag2,tag3). Optional.
send
: Set to
true
if you want to email the eventbaxx URL to this participant straight after creation. Note that the default e-mail template of your eventbaxx will be used (the one highlighted with a star). You don’t want to set this to true if your e-mail template is not configured yet. Default: false. Optional.
Limitations: Participants of an eventbaxx are unique through the email. This means if you post the same participant two times, it will only get added to the eventbaxx once.
A valid POST request to your eventbaxx with the ID
49
looks like this:
$ curl -i -X POST -d 'email=john@eventbaxx.com&firstname=John&name=Doe&gender=male'
\--header 'Authorization: Token 4c3d9ce826821dc0c5d15d753bd89ba4'
https://api.eventbaxx.com/v1/participations/49
The API responds with a
200
status code and the
bag_code
of the recently created participant:
HTTP/1.1 200 OK
MYKJEQSV
This bag-code can be used to access the created eventbaxx of the participant immediately:
https://www.eventbaxx.com/bags/MYKJEQSV
Note:The eventbaxx language is determined in the eventbaxx settings. You cannot change the language via the API.
Once your eventbaxx is boarded with participants, you might want to retrieve them.
The API endpoint to
GET
participants for a specific eventbaxx is this:
https://api.eventbaxx.com/v1/participations/:event_id
Replace the
event_id
placeholder with the desired
Eventbaxx ID
and you’re good to go
Participants contain of the following attributes:
id
integer | ID of the participant
event_id
integer | Eventbaxx ID of the eventbaxx this participant belongs to
firstname
string | First name of the participant (default: null)
name
string | Last name of the participant (default: null)
email
string | E-mail of the participant
gender
string | Gender of the participant (default: unspecified)
bag_sent
boolean | Indicates whether you sent this participant an eventbaxx yet (default: false)
tags
array | A list of tags associated to the participation (default: [])
bag_code
string | The unique bag code of this participation. Can be used to access his/her bag via URL (e.g. https://www.eventbaxx.com/bags/HANDZDBH)
created_at
datetime | Timestamp when this participant was created
A valid GET request to your eventbaxx with the ID
49
looks like this:
$ curl --header 'Authorization: Token 4c3d9ce826821dc0c5d15d753bd89ba4'
https://api.eventbaxx.com/v1/participations/49
The expected response is:
HTTP/1.1 200 OK
The response body is in JSON format:
[ {"event_id":102, "id":25204, "bag_code":"HUSYCAPN", "created_at":"2015-10-13T12:08:48.592Z", "bag_sent":false, "name":"Johannes", "firstname":"Schmitt", "email":"schmitt@eventbaxx.com", "gender":"male","tags":["tag1","tag2","tag3"]}, {"event_id":102, "id":25206, "bag_code":"YVNKFUGJ", "created_at":"2015-10-13T12:37:40.798Z", "bag_sent":false, "name":"Muller", "firstname":"Martin", "email":"muller@eventbaxx.com", "gender":"male"} ]