Votes (v2)

Check vote inputs

Runs the wizard's rules on a body without saving anything. step picks one step (basic, options, settings); everything is checked when it is left out. The errors carry the wizard's exact words keyed by its field names (title, type, options, options.1.title, voting_deadline, voter_roles).

post/api/v2/votes/validate

Request

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

Request body

stepstring

Which step to check: basic, options, settings or all.

draftboolean
titlestring nullable

The question.

typeIdinteger nullable

The vote type id from the catalogue.

descriptionstring nullable

Must not be greater than 2000 characters.

tripExternalIdstring nullable

Must not be greater than 64 characters.

tripDestinationstring nullable

Must not be greater than 255 characters.

departureDatestring nullable

Must be a valid date in the format <code>Y-m-d</code>.

returnDatestring nullable

Must be a valid date in the format <code>Y-m-d</code>.

activePresetinteger nullable
anonymousboolean
allowMultipleOptionsboolean
rankedChoiceVotingboolean
showLiveResultsboolean
weightedVotingEnabledboolean
gamificationboolean
nameRequiredboolean
votingDeadlinestring nullable

Must be a valid date in the format <code>Y-m-d</code>.

consensusThresholdPercentinteger

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

Example request

{
  "step": "options",
  "title": "Where do we go for spring break?",
  "typeId": 1,
  "description": "Et animi quos velit et fugiat.",
  "tripExternalId": "d",
  "tripDestination": "l",
  "departureDate": "2026-10-16",
  "returnDate": "2026-10-16",
  "options": [
    {
      "title": "Lisbon"
    },
    {
      "title": "Porto"
    }
  ],
  "activePreset": 16,
  "allowMultipleOptions": true,
  "showLiveResults": true,
  "weightedVotingEnabled": true,
  "voterRoles": [
    {
      "name": "k",
      "role": "h"
    }
  ],
  "gamification": true,
  "votingDeadline": "2026-10-16",
  "consensusThresholdPercent": 22
}

Response

validboolean

Example response

{
  "valid": false,
  "errors": {
    "options": "Add at least two options so there is something to vote on."
  },
  "inputs": {
    "title": "Where do we go?",
    "options": []
  }
}

Changes

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