Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Crypto-Project-ENSTA/back-end/llms.txt

Use this file to discover all available pages before exploring further.

Use this endpoint to partially update the election configuration before the election opens. Because it follows HTTP PATCH semantics, you only send the fields you want to change — the server merges your updates into the existing record and leaves every other field untouched. You can update the voter count, the ballot question, the candidate list, or any combination of the three in a single request.
PATCH only modifies the fields you provide. Any field you omit in the request body remains unchanged in the database.
Update the configuration before starting the election. Making changes after calling the start-vote endpoint may cause inconsistencies between the stored config and ballots already issued to voters.

Request

PATCH /config/voting-system-config

Body

All fields are optional. Include only the fields you want to update.
num_voters
integer
Update the total number of voters allowed in this election.
vote_theme
string
Update the ballot question or election topic shown to voters.
choices
string[]
Replace the full list of candidate or option names. Provide all desired choices — this field overwrites the existing list.

Response

The endpoint returns the full updated configuration record.
num_voters
integer
required
The configured total number of voters after the update.
vote_theme
string
The ballot question or election topic after the update.
choices
string[]
The complete list of candidate or option names after the update.

HTTP status codes

CodeMeaning
200Configuration updated successfully. Returns the full updated config.

Examples

curl -X PATCH https://your-api/config/voting-system-config \
  -H "Content-Type: application/json" \
  -d '{"vote_theme": "2025 Annual General Meeting"}'
{
  "num_voters": 100,
  "vote_theme": "2025 Annual General Meeting",
  "choices": ["Option A", "Option B", "Option C"]
}

Build docs developers (and LLMs) love