API Supplemental Notes
To help you build great event registration experiences, here are a few notes which supplement our API reference.
Mobile Number
Mobile Number is a special field added to registration forms by enabling SMS event reminders on the Event Notification Settings page. Only US and Canadian numbers are accepted. The format is +15555555555
Note that the field name on standard registration forms is always Mobile Number, but on the special representative registration form the field name is Mobile Phone.
Example:
"data": "Mobile%20Number=+15555555555"
See also: /reference/posteventregistration
Option Fields
When posting data for option fields (checkboxes, radio buttons, select lists, and any special fields based on one of these, like State and Country):
- the key is the field label, as set in Control Center
- the value is the "code" from the Options section
Example:
"data": "State%20or%20Province=VA"
See also: /reference/posteventregistration
Files
Files can be added to a registration with one or more PUTs to /events/{event_code}/registrations/{registration_id}/files
PUT as multipart/form-data
and include the label of the registration field for the which the file is being uploaded and the filename.
Content-Type: multipart/form-data
Content-Disposition: form-data; name="Profile Picture"; filename="profile_pic.png"
The file type must be one of the types accepted by the specified registration field. Each time you PUT for the same field label, it will overwrite any prior file for that field. PUTs for different field labels allow multiple files to be uploaded for different fields on the same registration.
Example:
We have two file upload fields on the same registration form:
- Resume – an embedded document type field (max one per form; displays in-browser during chats)
- Portfolio – a generic file upload type (zero-to-many per form; must be downloaded to view)
Here are four successive calls to /events/{event_code}/registrations/{registration_id}/files
, including the name and filename attributes from the Content-Disposition
header:
1. PUT name="Resume"; filename="resume.docx" - HTTP 201 CREATED (new file added)
2. PUT name="Portfolio"; filename="portfolio.zip" - HTTP 201 CREATED (new file added)
3. PUT name="Resume"; filename="resume.pdf" - HTTP 200 OK (docx from step 1 replaced with new pdf)
4. GET - HTTP 200 OK w/ JSON object listing the files from steps 2 and 3
See also:
Updated about 1 year ago