Voting

Create Vote

Create a new voting session with options.

post/api/v1/votes

Request

  • Base URL: https://www.endlesstravelplans.com
  • URL: https://www.endlesstravelplans.com/api/v1/votes
  • Auth: HTTP bearer

Request body

trip_external_idstring nullable

The <code>external_id</code> of an existing record in the trips table.

namestring required

The vote title.

descriptionstring nullable

Optional description.

vote_type_idinteger required

The vote type ID.

anonymousboolean

Allow anonymous voting.

allow_multiple_optionsboolean

Allow selecting multiple options.

ranked_choice_votingboolean
gamificationboolean
name_requiredboolean
show_live_resultsboolean
weighted_voting_enabledboolean
voting_deadlinestring nullable

Must be a valid date. Must be a date after or equal to <code>today</code>.

consensus_threshold_percentinteger nullable

Must be at least 1. Must not be greater than 100.

Example request

{
  "trip_external_id": "architecto",
  "name": "Where should we eat?",
  "description": "Pick your favorite restaurant",
  "vote_type_id": 1,
  "ranked_choice_voting": true,
  "name_required": true,
  "voting_deadline": "2052-11-08",
  "consensus_threshold_percent": 22,
  "options": [
    []
  ]
}

Response

Example response

{
  "vote": {
    "name": "Where should we eat?",
    "url": "a1b2c3d4e5"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.