REST API Documentation

Authentication

The API uses Basic Authentication over SSL combined with an API token. Each client application will need to request a username and password from ElectionsOnline which is to be passed in the header of each request to the API. Additionally, each client application will need to submit a parameter named key with a value equal to the API token associated with their account through the header of each request. Client’s may retrieve their API token by:

  1. Logging into My Account.
  2. Click the My Info tab on the welcome screen.
  3. Click My account profile link.
  4. Find the API token at the top of the profile.

Differences between the new REST and old SOAP API

When consuming the three ballot web services (1. step_one, 2. step_two, 3. step_three), be aware of the following changes:

  • It is not necessary to submit the voterType or ballotType parameters to any of the services.
  • Opening and closing FORM tags are no longer included in the response. Client applications that previously had to strip those out of the response no longer need to do that. Instead, wrap the response inside your own FORM tags.

Tips for Developers

Popular documentation tools (for example, Swagger) are not well suited for the ElectionsOnline API because unlike many APIs, these services—or at least the three ballot services—are not primarily intended to permit CRUD (Create, Read, Update and Delete) operations on data. Rather, the API’s ballot resource—and its three sub-resources (step_one, step_two, step_three) support actual application logic and user flow through the process of:

  1. viewing a ballot.
  2. confirming the selections made by a voter on that ballot.
  3. inserting the ballot into the system.

For this reason, the step_one and step_two representations of the ballot resource return HTML as the response. Any Content-Type or Accept directive in the request header to retrieve a response in any other format is ignored and HTML returned instead. This HTML is ready for output in a web browser and may be styled to blend in with a consuming site’s look and feel as explained under the section Styling the Ballot.

Add to that the fact that many of the parameters passed into these services are posted through the FORM scope, and documentation tools built around submitting GET requests for a JSON or XML response do not work well. Instead, it is recommended that developers take advantage of Chrome’s Postman extension (visit www.google.com and search for “Chrome Postman”) since it permits submitting multiple form variables and previewing the response in HTML.

Special Note for ColdFusion Websites

The ElectionsOnline API is built in ColdFusion. That means that for the three ballot services (step_one, step_two and step_three) any website also built using ColdFusion may simply submit a voter’s ballot selections (in other words, the FORM scope after clicking a Submit button on the ballot) to the web service as a native ColdFusion structure and bypass parsing over that FORM scope to create an XML object containing a voter’s selections (Examples of creating this XML are included below where appropriate). See the ColdFusion API documentation for more information and code samples.

Styling the Ballot

By default, the ballot will not have any styling applied and subsequently not look very nice. To change that and apply the same styles used when the ballot is hosted on the ElectionsOnline site, follow these steps:

  1. Log into My account.
  2. Click the Preview ballot button associated with your election. (If that button does not display, you may also click the Submit a paper ballot link.)
  3. Once the ballot displays, view the source code for that page.
  4. Copy the style sheet from the HEAD section on this page and paste it into each of your ballot pages.

By copying the style sheet from a current ballot on the ElectionsOnline site, you are ensured of having the most up-to-date styles in use with the ballot at any given time. Once the style sheet has been copied into your own ballot pages, you may leave it as-is, or make any changes you wish to those styles in order to make the ballot blend in perfectly with your own site’s look and feel.

The API Methods
  • Values in curly brackets are variables provided by the consuming application.
  • Election ID is the election ID generated by ElectionsOnline for each election. This value is displayed in your ElectionsOnline account associated with each election, or you may get it programmatically from the /elections endpoint.
  • The documentation references the three models for conducting an election, 1. fully hosted, 2. passed authentication, and 3. fully integrated. Those models are represented at the Election Model Flowcharts.

Get elections

Description: Gets general data about elections useful for displaying an announcement about an upcoming election, or the deadline to vote in a currently-running election. Also contains election IDs useful for creating endpoints to other resources.

HTTP Method: GET

Endpoint
https://www.electionsonline.com/rest/v1/elections
Notes
Append ?startdate=yyyy/mm/dd to the endpoint to select only elections beginning after the specified date.
Sample request
GET /rest/v1/elections HTTP/1.1
Host: www.electionsonline.com
Authorization: Basic ACH2aWRzaW1twesORNdAcHJhMCHvcmlhbg==
key: 08BF6D9D-YC16-72F4-385AD9AF30CCF877
Sample response
[{"ID": 1549,
	"UUID": "xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx",
	"PUBLISHRESULTS": 1,
	"ELECTIONNAME": "Sample Election",
	"STARTDATE": "June, 06 2016 00:00:00",
	"ENDDATE": "June, 13 2016 23:59:00",
	"BIODEADLINE": "June, 03 2016 23:59:00"},
  {"ID": 1562,
	"UUID": "xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx",
	"PUBLISHRESULTS": 0,
	"ELECTIONNAME": "Demonstration Election",
	"STARTDATE": "June, 29 2016 00:00:00",
	"ENDDATE": "June, 29 2016 00:00:00",
	"BIODEADLINE": "June, 29 2016 00:00:00"}]

Get specific election

Description: Gets general data about a specific election.

HTTP Method: GET

Endpoint
https://www.electionsonline.com/rest/v1/elections/{electionID}
Sample request
GET /rest/v1/elections/{electionID} HTTP/1.1
Host: www.electionsonline.com
Authorization: Basic ACH2aWRzaW1twesORNdAcHJhMCHvcmlhbg==
key: 08BF6D9D-YC16-72F4-385AD9AF30CCF877
Sample response
[{"ID": 1549,
	"UUID": "xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx",
	"PUBLISHRESULTS": 1,
	"ELECTIONNAME": "Sample Election",
	"STARTDATE": "June, 06 2016 00:00:00",
	"ENDDATE": "June, 13 2016 23:59:00",
	"BIODEADLINE": "June, 03 2016 23:59:00"}]

Get ballot step one

Description: Display the ballot in an external website and style the look and feel to match that external site. Once a voter makes selections on this representation of the ballot, they proceed to the step_two representation to confirm their selections. If service is consumed using ColdFusion, see the supplemental CF documentation for this service.

HTTP Method: POST

Endpoint
https://www.electionsonline.com/rest/v1/elections/{electionID}/ballot/step_one
Notes
The body of the request is a collection of key-value pairs most easily created by treating the parameters listed below as form fields.
  • VoterID is a unique numeric identifier for each voter.
  • Voted is a boolean value denoting the voting status of voters. 0 for those who have not voted, 1 for those who have.
  • VoterGroup should default to 0 when voter groups are not associated with an election. When in use however, this parameter should match the appropriate voter group code defined in the election setup for voters who are in a given voter group.
  • SIGs, like voterGroup should default to 0 when not in use. When used, this parameter should match the SIG code associated with any positions when the voter should have those positions included on the ballot.
  • Weight should default to 1, but may be any integer value to reflect the weight of a voter’s ballot in cases where some voters’ ballots carry more weight than others.
  • js is a boolean parameter. 1 for browsers that support javascript, 0 for those that don’t. This impacts the behavior of the candidate biographies.
Sample request
POST /rest/v1/elections/{electionID}/ballot/step_one HTTP/1.1
Host: www.electionsonline.com
Authorization: Basic ACH2aWRzaW1twesORNdAcHJhMCHvcmlhbg==
key: 08BF6D9D-YC16-72F4-385AD9AF30CCF877
Cache-Control: no-cache
Content-Type: application/x-www-form-urlencoded

voterID=10&voted=0&voterGroup=123&sigs=0&weight=1&js=1
Response
The response will be a string of HTML. Simply output the string to the desired location on the web page and apply styles as described in the above section Styling the Ballot.

Get ballot step two

Description: Display the confirmation page showing the selections made by the voter on the previous page (step_one). From this page, a voter proceeds to the step_three representation of the ballot where their selections are saved into the system. If service is consumed using ColdFusion, see the supplemental CF documentation for this service.

HTTP Method: POST

Endpoint
https://www.electionsonline.com/rest/v1/elections/{electionID}/ballot/step_two
Notes
The body of the request is a collection of key-value pairs most easily created by treating the parameters listed below as form fields.
  • Ballot is distinct in that it is a snippet of XML you create based on the selections made by the voter on the previous page. The following sample demonstrates the format of XML you must end up with. For demonstration purposes, this sample assumes:
    1. The ballot contains the positions President (id = 8812) and Treasurer (id = 8813).
    2. Both positions permit the voter to select as few as 0 or as many as 1 of the candidates contesting those positions as configured by the election administrator in the position settings.
    3. The voter selected Robert Harrison for President and Terry McAllister for Treasurer.
    4. The voter either provided no comments, or comments are not enabled for either position
    To create this XML, you must parse through the FORM scope created when the ballot is submitted by the voter on step_one. Look for the FORM scope variable, positions. This comma-delimited list of the positions on the ballot may be looped over and the various XML nodes created during each loop iteration.
    ‹positions›
       ‹position›
          ‹positionID›8812‹/positionID›
          ‹positionName›President‹/positionName›
          ‹positionMax›1‹/positionMax›
          ‹positionMin›0‹/positionMin›
          ‹candidates›Robert Harrison‹/candidates›
          ‹comments›‹/comments›
       ‹/position›
          ‹position›
          ‹positionID›8813‹/positionID›
          ‹positionName›Treasurer‹/positionName›
          ‹positionMax›1‹/positionMax›
          ‹positionMin›0‹/positionMin›
          ‹candidates›Terry McAllister‹/candidates›
          ‹comments›‹/comments›
       ‹/position›
    ‹/positions›
    
  • VoterID is a unique numeric identifier for each voter.
  • Weight should default to 1, but may be any integer value to reflect the weight of a voter’s ballot in cases where some voters’ ballots carry more weight than others.
  • Languages is a comma-delimited string of the languages codes support by the system (en for English, es for Spanish, de for German, fr for French, it for Italian, ch for Chinese, br and Portuguese).
Sample request
POST /rest/v1/elections/{electionID}/ballot/step_two HTTP/1.1
Host: www.electionsonline.com
Authorization: Basic ACH2aWRzaW1twesORNdAcHJhMCHvcmlhbg==
key: 08BF6D9D-YC16-72F4-385AD9AF30CCF877
Content-Type: application/x-www-form-urlencoded
Cache-Control: no-cache

ballot=‹positions›‹position›‹positionID›8812‹/positionID›‹positionName›
President‹/positionName›‹positionMax›1‹/positionMax›‹positionMin›0‹/positionMin›
‹candidates›Robert Harrison‹/candidates›‹comments›‹/comments›‹/position›
‹position›‹positionID›8813‹/positionID›‹positionName›Treasurer‹/positionName›
‹positionMax›1‹/positionMax›‹positionMin›0‹/positionMin›‹candidates›Terry McAllister
‹/candidates›‹comments›‹/comments›‹/position›‹/positions›&voterID=123&weight=1&languages=en
Response
The response will be a string of HTML. Simply output the string to the desired location on the web page and apply styles as described in the above section Styling the Ballot.

Get ballot step three

Description: Inserts the ballot into the system right after the voter confirms their selections on the step_two representation of the ballot resource. If service is consumed using ColdFusion, see the supplemental CF documentation for this service.

HTTP Method: POST

Endpoint
https://www.electionsonline.com/rest/v1/elections/{electionID}/ballot/step_three
Notes
The body of the request is a collection of key-value pairs most easily created by treating the parameters listed below as form fields.
  • Ballot is the exact same snippet of XML created in the step_two service.
  • VoterID is a unique numeric identifier for each voter.
  • Weight should default to 1, but may be any integer value to reflect the weight of a voter’s ballot in cases where some voters’ ballots carry more weight than others.
  • VoterGroup is the same variable used in the step_one ballot representation.
  • SIGs, is the same variable used in the step_one ballot representation.
  • Languages is a comma-delimited string of the languages codes support by the system (en for English, es for Spanish, de for German, fr for French, it for Italian, ch for Chinese, br and Portuguese).
Sample request
POST /rest/v1/elections/{electionID}/ballot/step_three HTTP/1.1
Host: www.electionsonline.com
Authorization: Basic ACH2aWRzaW1twesORNdAcHJhMCHvcmlhbg==
key: 08BF6D9D-YC16-72F4-385AD9AF30CCF877
Content-Type: application/x-www-form-urlencoded
Cache-Control: no-cache

ballot=‹positions›‹position›‹positionID›8812‹/positionID›‹positionName›President‹/positionName›‹positionMax›1‹/positionMax›‹positionMin›0‹/positionMin›‹candidates›Robert Harrison‹/candidates›‹comments›‹/comments›‹/position›‹position›‹positionID›8813‹/positionID›‹positionName›Treasurer‹/positionName›‹positionMax›1‹/positionMax›‹positionMin›0‹/positionMin›‹candidates›Terry McAllister‹/candidates›‹comments›‹/comments›‹/position›‹/positions›&voterID=123&weight=1&voterGroup=0&sigs=0&languages=en
Sample response
{"heading":"Thank you.", "message":"Your ballot has been accepted.", "status":"1"}

Get ballot count

Description: Gets a count of all ballots cast for an election. Useful for driving increased voter participation as described at Social Proof to Increase Voter Turnout.

HTTP Method: GET

Endpoint
https://www.electionsonline.com/rest/v1/elections/{electionID}/count
Notes
Notice in the sample request that it is not necessary to send a key parameter through the request header as it is with other services.
Sample request
GET /rest/v1/elections/2206/ballot/count HTTP/1.1
Host: www.electionsonline.com
Authorization: Basic ACH2aWRzaW1twesORNdAcHJhMCHvcmlhbg==
Cache-Control: no-cache
Response
The response will contain nothing but an integer.

Get voter groups

Description: Gets all voter groups associated with a specific election.

HTTP Method: GET

Endpoint
https://www.electionsonline.com/rest/v1/elections/{electionID}/votergroups
Sample request
GET /rest/v1/elections/{electionID}/votergroups HTTP/1.1
Host: www.electionsonline.com
Authorization: Basic ACH2aWRzaW1twesORNdAcHJhMCHvcmlhbg==
key: 08BF6D9D-YC16-72F4-385AD9AF30CCF877
Cache-Control: no-cache
Sample response
[{"VOTERGROUPCODE": "all",
	"VOTERGROUPNAME": "All positions",
	"ELECTIONID": 1807},
 {"VOTERGROUPCODE": "nevoters",
	"VOTERGROUPNAME": "Northeast voters",
	"ELECTIONID": 1807}]

Get positions

Description: Gets all positions associated with an election.

HTTP Method: GET

Endpoint
https://www.electionsonline.com/rest/v1/elections/{electionID}/positions
Notes
When adding candidates to a ballot, use this service to ensure the candidate is associated with the correct position.
Sample request
GET /rest/v1/elections/{electionID}/positions HTTP/1.1
Host: www.electionsonline.com
Authorization: Basic ACH2aWRzaW1twesORNdAcHJhMCHvcmlhbg==
key: 08BF6D9D-YC16-72F4-385AD9AF30CCF877
Cache-Control: no-cache
Sample response
[{"POSITIONID": 2446,
	"POSITIONNAME": "Secretary",
	"ELECTIONID": 2206,
	"ELECTIONNAME": "Annual Board of Directors",
	"SIGS": ""},
  {"POSITIONID": 2447,
	"POSITIONNAME": "Student Members",
	"ELECTIONID": 2206,
	"ELECTIONNAME": "Annual Board of Directors",
	"SIGS": "student}]

Get a single position

Description: Gets a single position associated with an election.

HTTP Method: GET

Endpoint
https://www.electionsonline.com/rest/v1/elections/{electionID}/positions/{positionID}
Sample request
GET /rest/v1/elections/{electionID}/positions/{positionID} HTTP/1.1
Host: www.electionsonline.com
Authorization: Basic ACH2aWRzaW1twesORNdAcHJhMCHvcmlhbg==
key: 08BF6D9D-YC16-72F4-385AD9AF30CCF877
Cache-Control: no-cache
Sample response
[{"POSITIONID": 2446,
	"POSITIONNAME": "Secretary",
	"ELECTIONID": 2206,
	"ELECTIONNAME": "Annual Board of Directors",
	"SIGS": ""}]

Get candidates

Description: Gets the candidates for a specific position.

HTTP Method: GET

Endpoint
https://www.electionsonline.com/rest/v1/elections/{electionID}/positions/{positionID}
/candidates
Sample request
GET /rest/v1/elections/{electionID}/positions/{positionID}/candidates HTTP/1.1
Host: www.electionsonline.com
Authorization: Basic ACH2aWRzaW1twesORNdAcHJhMCHvcmlhbg==
key: 08BF6D9D-YC16-72F4-385AD9AF30CCF877
Sample response
[{"CANDIDATEID": 6191, "CANDIDATENAME": "Jackie McPherson"},
  {"CANDIDATEID": 6253, "CANDIDATENAME": "Terry Farragut"}]

Get specific candidate

Description: Get a specific candidate.

HTTP Method: GET

Endpoint
https://www.electionsonline.com/rest/v1/elections/{electionID}/positions/{positionID}
/candidates/{candidateID}
Sample request
GET /rest/v1/elections/{electionID}/positions/{positionID}/candidates/{candidateID} HTTP/1.1
Host: www.electionsonline.com
Authorization: Basic ACH2aWRzaW1twesORNdAcHJhMCHvcmlhbg==
key: 08BF6D9D-YC16-72F4-385AD9AF30CCF877
Sample response
[{"CANDIDATEID":6191,"CANDIDATENAME":"Jackie McPherson"}]

Add a candidate

Description: Add a candidate to a position.

HTTP Method: PUT

Endpoint
https://www.electionsonline.com/rest/v1/elections/{electionID}/positions/{positionID}
/candidates
Notes
  • The entire body of the request is treated as the name of the candidate so include nothing but the candidate's name in the body. For example, in the sample request below, the candidate being added is named Jerry M. Ward.
  • Forbidden characters are removed during the PUT operation. Forbidden characters are anything other than: dash, apostrophe, the period and letters.
Sample request
PUT /rest/v1/elections/{electionID}/positions/{positionID}/candidates HTTP/1.1
Host: www.electionsonline.com
Authorization: Basic ACH2aWRzaW1twesORNdAcHJhMCHvcmlhbg==
key: 08BF6D9D-YC16-72F4-385AD9AF30CCF877
Cache-Control: no-cache

Jerry M. Ward
Sample response
{"candidateID": 6254, "candidateName": "Jerry M. Ward", "bios": 1}

Delete a candidate

Description: Delete a candidate.

HTTP Method: DELETE

Endpoint
https://www.electionsonline.com/rest/v1/elections/{electionID}/positions/{positionID}
/candidates/{candidateID}
Sample request
DELETE /rest/v1/elections/{positionID}/positions/{positionID}/candidates/{candidateID} HTTP/1.1
Host: www.electionsonline.com
Authorization: Basic ACH2aWRzaW1twesORNdAcHJhMCHvcmlhbg==
key: 08BF6D9D-YC16-72F4-385AD9AF30CCF877
Cache-Control: no-cache
Sample response
[{"CANDIDATEID": 6254,"CANDIDATENAME": "Robert Lorring"}]

Get voters

Description: Gets all voters for fully-hosted elections. For passed-authentication or fully-integrated elections, where a voter roster is never loaded into the ElectionsOnline system, this is not applicable. One use of this service would be to determine who has voted and send email reminders only to those who have not for clients who choose to send email reminder using their own email service.

HTTP Method: GET

Endpoint
https://www.electionsonline.com/rest/v1/elections/{electionID}/voters
Notes
The default behavior is to get all voters, but the response may be filtered to only those voters who have voted, or those who have not. To filter, simply append ?filter=voted or ?filter=notvoted to the URI.
Sample request
GET /rest/v1/elections/{electionID}/voters HTTP/1.1
Host: www.electionsonline.com
Authorization: Basic ACH2aWRzaW1twesORNdAcHJhMCHvcmlhbg==
key: 08BF6D9D-YC16-72F4-385AD9AF30CCF877
Cache-Control: no-cache
Sample response
[{"ID":1911,
	"FIRSTNAME":"Pete",
	"LASTNAME":"Lopez",
	"EMAIL":"lopez@phony.net",
	"USERNAME":"plopez",
	"PASSWORD":"3ndhs84c",
 	"VOTED":"No",
	"WEIGHT":1,
	"VOTERGROUP":"prez",
	"SIGS":"chapterOne"},
{"ID":1912,
	"FIRSTNAME":"Charlie",
	"LASTNAME":"West",
	"EMAIL":"cwest@phony.net",
	"USERNAME":"cwest",
	"PASSWORD":"s98dxs23",
	"VOTED":"No",
	"WEIGHT":2,
	"VOTERGROUP":"prez",
	"SIGS":"chapterOne"}]

Get specific voter

Description: Gets information for a specific voter.

HTTP Method: GET

Endpoint
https://www.electionsonline.com/rest/v1/elections/{electionID}/voters/{voterID}
Sample request
GET /rest/v1/elections/{electionID}/voters/{voterID} HTTP/1.1
Host: www.electionsonline.com
Authorization: Basic ACH2aWRzaW1twesORNdAcHJhMCHvcmlhbg==
key: 08BF6D9D-YC16-72F4-385AD9AF30CCF877
Cache-Control: no-cache
Sample response
[{"ID":1912,
	"FIRSTNAME":"Charlie",
	"LASTNAME":"West",
	"EMAIL":"cwest@phony.net",
	"USERNAME":"cwest",
	"PASSWORD":"s98dxs23",
	"VOTED":"No",
	"WEIGHT":2,
	"VOTERGROUP":"prez",
	"SIGS":"chapterOne"}]

Add voter roster

Description: Import an entire voter roster for fully-hosted elections. For passed authentication and fully integrated elections, voters authenticate at an external website so there is no need to load the roster into the ElectionsOnline system.

HTTP Method: PUT

Endpoint
https://www.electionsonline.com/rest/v1/elections/{electionID}/voters
Notes
Putting a voter roster completely deletes any voter records that might already exist. Therefore, if you submit a voter roster, then realize some voters are missing and do not wish to add them one at a time using the Add a voter service, you will need to put the entire roster again to make sure all voters are included. Because existing voter records are deleted, it is not possible to use this service after the start of an election since that could lead to numerous complications.
Sample request
PUT /rest/v1/elections/{electionID}/voters HTTP/1.1
Host: www.electionsonline.com
Authorization: Basic ACH2aWRzaW1twesORNdAcHJhMCHvcmlhbg==
key: 08BF6D9D-YC16-72F4-385AD9AF30CCF877
Content-Type: application/json
Cache-Control: no-cache

{"voters":[{"firstname":"Terry", "lastname":"McMurray", "email":"terry@phony.net", "username":"tmcmurray", "password":"demoPW1", "weight":1, "votergroup":"student", "sigs":""}, {"firstname":"Robin", "lastname":"Brown", "email":"robin@phony.com", "username":"rbrown", "password":"demoPW2", "weight":21, "votergroup":"pro", "sigs":"chapterfive"}]}
Sample response
{"Records imported":"2837"}

Add a voter

Description: Add a single voter to an existing voter roster.

HTTP Method: POST

Endpoint
https://www.electionsonline.com/rest/v1/elections/{electionID}/voters
Notes
Unlike Add voter roster, multiple identical requests to this service will create duplicate records in the voter roster.
Sample request
POST /rest/v1/elections/{electionID}/voters HTTP/1.1
Host: www.electionsonline.com
Authorization: Basic ACH2aWRzaW1twesORNdAcHJhMCHvcmlhbg==
key: 08BF6D9D-YC16-72F4-385AD9AF30CCF877
Content-Type: application/json
Cache-Control: no-cache

{"firstname":"Terry","lastname":"McMurray","email":"terry@phony.net","username":"tmcmurray","password":"demoPW1","weight":1,"votergroup":"student","sigs":""}
Sample response
{"Message":"Voter added"}

Get voter IDs for passed authentication voters

Description: In a passed authentication election, voters log in at an external website, then are passed over to ElectionsOnline to vote. In the process, their distinct ID in the originating website is stored at ElectionsOnline. Use this service to retrieve those IDs and update your own database flagging the voters as voted so they may be filtered out of receiving further email reminders, and just to maintain record of who voted.

HTTP Method: GET

Endpoint
https://www.electionsonline.com/rest/v1/elections/{electionID}/voters/passed
Sample request
GET /rest/v1/elections/{electionID}/voters/passed HTTP/1.1
Host: www.electionsonline.com
key: 08BF6D9D-YC16-72F4-385AD9AF30CCF877
Authorization: Basic ACH2aWRzaW1twesORNdAcHJhMCHvcmlhbg==
Cache-Control: no-cache
Sample response
6103,4982,1085,10876,2374,1984

Get token for passed authentication

Description: Get an authentication token for a voter who logs in at an external site, then is passed over to the ElectionsOnline site for viewing and casting the ballot.

HTTP Method: POST

Endpoint
https://www.electionsonline.com/rest/v1/elections/{electionID}/token
Notes
The response is a JSON object (see Sample response below) containing either a voter token, or a plain-English description of why a token was not returned. For example, if the voter has already voted, a message to that effect, rather than a token will be in the response. Always check the response to verify it is a valid token in the format xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx. If so, append the token to the URL below. Requests to that URL, when they contain a valid token, redirect voters to the ballot.

https://www.electionsonline.com/vote/sso.cfm?token=xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx.
Sample request
POST /rest/v1/elections/{electionID}/token HTTP/1.1
Host: www.electionsonline.com
Authorization: Basic ACH2aWRzaW1twesORNdAcHJhMCHvcmlhbg==
key: 08BF6D9D-YC16-72F4-385AD9AF30CCF877
Content-Type: application/x-www-form-urlencoded
Cache-Control: no-cache

firstname=Robert&lastname=Royal&voterID=1268&weight=1&votergroup=0&sigs=0
Sample response
{"Token":"4DEA76C3-03BB-4A2E-FF69C625AC3358A8"}