vocdoni / interoperability

Private repository to manage the interoperability between protocol, API, SDK, UIs and documentation
1 stars 0 forks source link

Implement POST /elections/id for getting the next election ID #107

Closed jordipainan closed 5 months ago

jordipainan commented 7 months ago

Request:

curl -X POST https://<api-server-url>/elections/id -H 'Content-Type: application/json' -d '{
    "organizationId": "<hexbytes>",
    "censusOrigin": <number>,
    "envelopeType": {
        "serial": <true/false>,
        "anonymous": <true/false>,
        "encryptedVotes": <true/false>,
        "uniqueValues": <true/false>,
        "costFromWeight": <true/false>
    }
}'

Response

{
    "electionID": "some-encoded-election-id-string"
}
marcvelmer commented 7 months ago

done in the SDK: https://github.com/vocdoni/vocdoni-sdk/pull/316