COVERITLIVE API - POLL/UPDATE (V. 2.0)

The Request

This method allows users to update currently existing polls. The only facet of the poll that can be updated is its visibility (whether it is showing or hidden). The text of the poll (question and answers) cannot be updated, to avoid discrepancies in poll results if users vote prior to the poll being updated.

URL:
https://api.coveritlive.com/remote/2/poll/update
Response Format:
JSON
HTTP Method(s):
POST
API Rate Limited:
false
In addition to the parameters listed in the Request Parameters section, the poll/update method also includes the following parameters:

Parameter Description Required
event_code The event code for the event in which the poll is being updated. Each CiL event that is created is assigned a unique event code that identifies it in the database - The event owner can find this value after creating a new event, by selecting the "altcast_code" which is found in their Viewer Window embed code (e.g. the event code is "46e6cd22b5" in "altcast_code=46e6cd22b5"). This value is also returned by the event/list API method. yes
poll_id The id of the poll to be updated. Returned by the poll/list and poll/create API methods. yes
status

The visibility of the poll, which is being updated. Possible values include:

publish - show the poll. Is only valid if the poll being updated is in a hidden state.

hide - hide the poll. Is only valid if the poll being updated is in a published state.

yes

The Response

There is no extra data returned from a poll/update request, so the response has the same fields as a general response.


Example response to a successful poll/update request:


{
	"result":"success",
	"message":"true",
	"type":"poll",
	"action":"update",
	"version":2,
}

poll/update Error Responses

A variety of error responses (in addition to the common error responses) to poll/update requests, and instructions on how to rectify them:

result response message response solution
missing_poll_id_param Required parameter empty: poll_id. Ensure the poll_id request parameter is present when making a poll/update request.
invalid_poll_id_param The poll_id request parameter did not contain a valid poll id. When populating the poll_id request parameter, ensure it contains a valid poll id. Poll ids are returned by poll/list and poll/create requests.
missing_status_param Required parameter empty: status. Ensure the status request parameter is present when making a poll/update request.
invalid_status_param The status parameter is invalid. Valid values include: publish, hide. Ensure the status request parameter is set to either publish or hide.
poll_ended The poll specified by poll_id has already been ended. Polls that have been ended cannot be updated.
poll_published The poll specified by poll_id has already in a published state. Polls that are already in a published state cannot be published again.
poll_hidden The poll specified by poll_id has already in a hidden state. Polls that are already in a hidden state cannot be hidden again.