This method will auto-generate an ID and create a new election. If an ID is specified for the election, an error will be thrown.
The election that you would like to be saved.
{- "id": "string",
- "committee_id": "string",
- "type": "national",
- "name": "string",
- "positions": [
- {
- "position_id": "string",
- "candidates": [
- {
- "contact_id": "string",
- "name_on_ballot": "string"
}
]
}
], - "measures": [
- {
- "id": "string",
- "name": "string"
}
], - "show_in_portal": true,
- "status": "draft",
- "open_date": "2019-08-24T14:15:22Z",
- "close_date": "2019-08-24T14:15:22Z",
- "sys_deleted_by_id": "string",
- "sys_version": 0,
- "sys_created_at": "2019-08-24T14:15:22Z",
- "sys_last_modified_at": "2019-08-24T14:15:22Z",
- "sys_created_by_id": "string",
- "sys_last_modified_by_id": "string",
- "sys_external_id": "string",
- "sys_locked": true,
- "sys_bulk_load_pk": "string",
- "sys_bulk_load_at": "string",
- "sys_bulk_load_id": "string",
- "sys_bulk_load_record_no": 0,
- "sys_bulk_load_source_file": "string",
- "sys_directive": "string",
- "sys_calculated_field_error": "string",
- "sys_snapshot_base_version": 0,
- "sys_configuration_snapshot_id": "string",
- "sys_last_security_context": { },
- "sys_calculated_field_errors": [
- {
- "field": "string",
- "error": "string"
}
]
}
{- "id": "string",
- "committee_id": "string",
- "type": "national",
- "name": "string",
- "positions": [
- {
- "position_id": "string",
- "candidates": [
- {
- "contact_id": "string",
- "name_on_ballot": "string"
}
]
}
], - "measures": [
- {
- "id": "string",
- "name": "string"
}
], - "show_in_portal": true,
- "status": "draft",
- "open_date": "2019-08-24T14:15:22Z",
- "close_date": "2019-08-24T14:15:22Z",
- "sys_deleted_by_id": "string",
- "sys_version": 0,
- "sys_created_at": "2019-08-24T14:15:22Z",
- "sys_last_modified_at": "2019-08-24T14:15:22Z",
- "sys_created_by_id": "string",
- "sys_last_modified_by_id": "string",
- "sys_external_id": "string",
- "sys_locked": true,
- "sys_bulk_load_pk": "string",
- "sys_bulk_load_at": "string",
- "sys_bulk_load_id": "string",
- "sys_bulk_load_record_no": 0,
- "sys_bulk_load_source_file": "string",
- "sys_directive": "string",
- "sys_calculated_field_error": "string",
- "sys_snapshot_base_version": 0,
- "sys_configuration_snapshot_id": "string",
- "sys_last_security_context": { },
- "sys_calculated_field_errors": [
- {
- "field": "string",
- "error": "string"
}
]
}
This method will look up a election by the specified ID and return it back.
curl -i -X GET \ 'https://membership.api.756794052567.rhythmsoftware.com/elections/:tenantId/:id?fields=string&consistentRead=string' \ -H 'Authorization: YOUR_API_KEY_HERE'
{- "id": "string",
- "committee_id": "string",
- "type": "national",
- "name": "string",
- "positions": [
- {
- "position_id": "string",
- "candidates": [
- {
- "contact_id": "string",
- "name_on_ballot": "string"
}
]
}
], - "measures": [
- {
- "id": "string",
- "name": "string"
}
], - "show_in_portal": true,
- "status": "draft",
- "open_date": "2019-08-24T14:15:22Z",
- "close_date": "2019-08-24T14:15:22Z",
- "sys_deleted_by_id": "string",
- "sys_version": 0,
- "sys_created_at": "2019-08-24T14:15:22Z",
- "sys_last_modified_at": "2019-08-24T14:15:22Z",
- "sys_created_by_id": "string",
- "sys_last_modified_by_id": "string",
- "sys_external_id": "string",
- "sys_locked": true,
- "sys_bulk_load_pk": "string",
- "sys_bulk_load_at": "string",
- "sys_bulk_load_id": "string",
- "sys_bulk_load_record_no": 0,
- "sys_bulk_load_source_file": "string",
- "sys_directive": "string",
- "sys_calculated_field_error": "string",
- "sys_snapshot_base_version": 0,
- "sys_configuration_snapshot_id": "string",
- "sys_last_security_context": { },
- "sys_calculated_field_errors": [
- {
- "field": "string",
- "error": "string"
}
]
}
This method will update an existing election with the specified ID.
The updated election that will be saved.
{- "id": "string",
- "committee_id": "string",
- "type": "national",
- "name": "string",
- "positions": [
- {
- "position_id": "string",
- "candidates": [
- {
- "contact_id": "string",
- "name_on_ballot": "string"
}
]
}
], - "measures": [
- {
- "id": "string",
- "name": "string"
}
], - "show_in_portal": true,
- "status": "draft",
- "open_date": "2019-08-24T14:15:22Z",
- "close_date": "2019-08-24T14:15:22Z",
- "sys_deleted_by_id": "string",
- "sys_version": 0,
- "sys_created_at": "2019-08-24T14:15:22Z",
- "sys_last_modified_at": "2019-08-24T14:15:22Z",
- "sys_created_by_id": "string",
- "sys_last_modified_by_id": "string",
- "sys_external_id": "string",
- "sys_locked": true,
- "sys_bulk_load_pk": "string",
- "sys_bulk_load_at": "string",
- "sys_bulk_load_id": "string",
- "sys_bulk_load_record_no": 0,
- "sys_bulk_load_source_file": "string",
- "sys_directive": "string",
- "sys_calculated_field_error": "string",
- "sys_snapshot_base_version": 0,
- "sys_configuration_snapshot_id": "string",
- "sys_last_security_context": { },
- "sys_calculated_field_errors": [
- {
- "field": "string",
- "error": "string"
}
]
}
{- "id": "string",
- "committee_id": "string",
- "type": "national",
- "name": "string",
- "positions": [
- {
- "position_id": "string",
- "candidates": [
- {
- "contact_id": "string",
- "name_on_ballot": "string"
}
]
}
], - "measures": [
- {
- "id": "string",
- "name": "string"
}
], - "show_in_portal": true,
- "status": "draft",
- "open_date": "2019-08-24T14:15:22Z",
- "close_date": "2019-08-24T14:15:22Z",
- "sys_deleted_by_id": "string",
- "sys_version": 0,
- "sys_created_at": "2019-08-24T14:15:22Z",
- "sys_last_modified_at": "2019-08-24T14:15:22Z",
- "sys_created_by_id": "string",
- "sys_last_modified_by_id": "string",
- "sys_external_id": "string",
- "sys_locked": true,
- "sys_bulk_load_pk": "string",
- "sys_bulk_load_at": "string",
- "sys_bulk_load_id": "string",
- "sys_bulk_load_record_no": 0,
- "sys_bulk_load_source_file": "string",
- "sys_directive": "string",
- "sys_calculated_field_error": "string",
- "sys_snapshot_base_version": 0,
- "sys_configuration_snapshot_id": "string",
- "sys_last_security_context": { },
- "sys_calculated_field_errors": [
- {
- "field": "string",
- "error": "string"
}
]
}
This method will patch an existing election with the specified ID, using the HTTP PATCH specification.
The patch directives conforming to RFC 6902.
[- {
- "op": "add",
- "path": "string",
- "value": "string"
}
]
{- "id": "string",
- "committee_id": "string",
- "type": "national",
- "name": "string",
- "positions": [
- {
- "position_id": "string",
- "candidates": [
- {
- "contact_id": "string",
- "name_on_ballot": "string"
}
]
}
], - "measures": [
- {
- "id": "string",
- "name": "string"
}
], - "show_in_portal": true,
- "status": "draft",
- "open_date": "2019-08-24T14:15:22Z",
- "close_date": "2019-08-24T14:15:22Z",
- "sys_deleted_by_id": "string",
- "sys_version": 0,
- "sys_created_at": "2019-08-24T14:15:22Z",
- "sys_last_modified_at": "2019-08-24T14:15:22Z",
- "sys_created_by_id": "string",
- "sys_last_modified_by_id": "string",
- "sys_external_id": "string",
- "sys_locked": true,
- "sys_bulk_load_pk": "string",
- "sys_bulk_load_at": "string",
- "sys_bulk_load_id": "string",
- "sys_bulk_load_record_no": 0,
- "sys_bulk_load_source_file": "string",
- "sys_directive": "string",
- "sys_calculated_field_error": "string",
- "sys_snapshot_base_version": 0,
- "sys_configuration_snapshot_id": "string",
- "sys_last_security_context": { },
- "sys_calculated_field_errors": [
- {
- "field": "string",
- "error": "string"
}
]
}
This method will delete a election with the specified ID.
curl -i -X DELETE \ https://membership.api.756794052567.rhythmsoftware.com/elections/:tenantId/:id \ -H 'Authorization: YOUR_API_KEY_HERE'
"string"