Skip to content
campaiDeveloper
campai.com

Misc · Assemblies

POST/{organizationId}/{mandateId}/misc/assemblies/{assemblyId}/votes/update

Update vote

Changes a motion or an election of a meeting: its agenda item, title, text, proposer, majority, statute clause, the people excluded from it and the number of posts. Once one of its rounds was started, the majority, the excluded people and the number of posts stay as they were.

Permissions

Send an API key of the organization in the path, using the X-API-Key header.

Permission checks in detail
Required permissions
  • mandate.read
  • assembly.edit
Also checked, depending on the request and the records it touches
  • user.read
  • apiKey.read
  • contact:member.read
  • contact:address.read
  • contact:customer.read
  • contact:sponsor.read
  • contact:contributor.read
  • contact:employee.read
  • contact:supplier.read
  • contact.read

Request

Path parameters

  • organizationIdidrequired
  • mandateIdidrequired
  • assemblyIdidrequired

Body

Content-Type: application/json

  • voteIdidrequired
  • agendaItemIdid
  • titlestring

    1–200 characters

  • textstring

    at most 50000 characters

  • proposerstringnullable

    at most 200 characters

  • majoritystring
    simple absolute twoThirds threeQuarters allMembers relative
  • statuteClausestringnullable

    at most 500 characters

  • needsRegistrationboolean
  • excludedid[]

    at most 1000 items

  • electionobject
    2 properties
    • postsintegerrequired

      1–100

    • numberedbooleanrequired
  • orderinteger

    at least 0

Request
curl --fail-with-body --silent --show-error --max-time 30 --globoff \
  --request POST 'https://cloud.campai.com/api/YOUR_ORGANIZATION_ID/YOUR_MANDATE_ID/misc/assemblies/YOUR_ASSEMBLY_ID/votes/update' \
  --header 'X-API-Key: YOUR_API_KEY'

No request that worked has been recorded yet, so the body is not shown.

Response

200 Successful response

Content-Type: application/json

  • voteobject
    22 properties
    • _idid
    • createdAtstring · date-timenullable
    • updatedAtstring · date-timenullable
    • removedAtstring · date-timenullable
    • createdByobjectnullable
    • updatedByobjectnullable
    • removedByobjectnullable
    • __ignoreTriggersstringnullable
    • organizationid
    • assemblyid
    • agendaItemid
    • kindstring
      motion election
    • titlestring

      1–200 characters

    • textstring

      at most 50000 characters

    • proposerstringnullable

      at most 200 characters

    • electionobjectnullable
      3 properties
      • postsinteger

        1–100

      • numberedboolean
      • candidatesobject[]

        at most 100 items

        5 properties
        • _idid
        • personobject
          7 properties
          • namestring
          • typestring
          • nameNormalizedstring
          • nameSortstring
          • contactidnullable
          • imageobjectnullable
            4 properties
            • resourcestring

              at least 1 characters

            • fileNamestring

              at most 128 characters

            • contentTypestring

              at most 75 characters

            • fileSizeBytesinteger

              at least 0

          • userobjectnullable
            4 properties
            • namestring
            • typestring
            • userIdstring
            • imageobjectnullable
              4 properties
              • resourcestring

                at least 1 characters

              • fileNamestring

                at most 128 characters

              • contentTypestring

                at most 75 characters

              • fileSizeBytesinteger

                at least 0

        • participantidnullable
        • orderinteger

          at least 0

        • acceptedOfficebooleannullable
    • majoritystring
      simple absolute twoThirds threeQuarters allMembers relative
    • statuteClausestringnullable

      at most 500 characters

    • needsRegistrationboolean
    • excludedid[]
    • outcomeobjectnullable
      3 properties
      • resultstring
        accepted rejected elected tie pending open
      • electedid[]
      • roundid
    • orderinteger

      at least 0

Response200
{
  "vote": {
    "_id": "000000000000000000000001",
    "organization": "000000000000000000000001",
    "assembly": "000000000000000000000001",
    "agendaItem": "000000000000000000000001",
    "kind": "motion",
    "title": "string",
    "text": "string",
    "proposer": "string",
    "election": {
      "posts": 1,
      "numbered": true,
      "candidates": [
        {
          "_id": "000000000000000000000001",
          "person": {
            "name": "string",
            "type": "contact",
            "nameNormalized": "string",
            "nameSort": "string",
            "contact": "000000000000000000000001",
            "image": {
              "resource": "string"
            },
            "user": {
              "name": "string",
              "type": "user",
              "userId": "string",
              "image": {
                "resource": "string"
              }
            }
          },
          "participant": "000000000000000000000001",
          "order": 0,
          "acceptedOffice": true
        }
      ]
    },
    "majority": "simple",
    "statuteClause": "string",
    "needsRegistration": true,
    "excluded": [
      "000000000000000000000001"
    ],
    "outcome": {
      "result": "accepted",
      "elected": [
        "000000000000000000000001"
      ],
      "round": "000000000000000000000001"
    },
    "order": 0
  }
}

Errors

No errors of its own are known for this endpoint.

Errors nearly every request can meet are listed under Errors.