close anchor

Votes

To get information on votes:

This endpoint provides data based on user-input voting logged for individual content entries in which each vote is an integer (positive or negative) enabling flexibility in terms of whether an expression treats votes as likes, thumbs up or down, incorporates weighted voting based on user type, etc.

GET /content/votes

Parameters

Param Type Description Optional
content string The UUID of a content entry by which to filter votes.
user string The UUID of a user by which to filter votes. If an empty value is provided, this endpoint will deliver only those votes identified with no user.
order string Indicate, by providing a comma-delimited list, the field(s) by which to order entries found. Include a '-' prefix if descending order is preferred in a given field ('+' is inferred by default). If empty or not provided, these valid fields will not be explicitly included: date_time.
page integer Identify the page on which to begin delivering entries. If not provided, the default value of 1 will be inferred.
limit integer Indicate a total of up to 100 entries to be delivered. If not provided, the default value of 10 will be inferred.

Data Fields

The data object provided by this endpoint includes the properties below:

Field Type Description
id string The UUID of the vote for which data is being provided.
date_time string The date/time this entry was initially posted, being provided in ISO 8601 format.
content object The content entry identified with this voting data. Includes only the content id.
user object The user by whom this vote was posted. Includes only the user id.
data integer The integer logged for this vote.

To post a vote to an entry:

POST /content/votes

This endpoint provides for posting an individual vote to a content entry, thereby influencing the vote total for that entry.

Parameters

Provide the input field(s) below as a JSON-encoded data object:

Param Type Description Optional
content string The UUID of the content entry.
user string The UUID of the user to be identified with this vote. If provided, log this user in. This enables updating and/or tracking of votes on a per-user basis, if desired.
data integer The integer to be logged for this vote.

The data object provided by this endpoint is the content entry including updated voting data.

Errors

If there is an endpoint transaction failure, or a problem with user input data, an error is provided:

ID/Type Description
integer_not_provided The data value provided is not an integer.

To post votes to an entry:

POST /content/votes

This endpoint provides for posting a batch of votes to a content entry, thereby influencing the vote total for that entry.

Parameters

Provide the input field(s) below as a JSON-encoded data object:

Param Type Description
content string The UUID of the content entry.
data array The votes to be logged, being a one-dimensional array in which each value is an integer.

The data object provided by this endpoint is the content entry including updated voting data.

Errors

If there is an endpoint transaction failure, or a problem with user input data, an error is provided:

ID/Type Description
integer_not_provided The data provided includes a value which is not an integer.

To delete a vote:

DELETE /content/votes

This endpoint provides for deleting an individual vote on a content entry.

Parameters

Param Type Description
id string The UUID of the vote to be deleted.

The data object provided by this endpoint is the content entry including updated voting data.

Register for an Invitation
Thank you!
We'll be in touch.
First Name*
Last Name*
(optional) Business Name
Role*
Email*