Skip to main content

GET /candidate/:id

tip

Check out our GraphQL API for a more flexible approach to incorporate BallotReady data in your projects.

Parameters

  • election_id (optional): without an election ID certain fields (such as stances) will be empty. A candidate's stances are specifically linked to an election cycle, which is linked to an election_id
  • locale (optional): comma-separated list of IETF BCP 47 language tags (example: en,es). Defaults to en. Currently only applies to candidate's stances.
  • tenant_id (optional): the customer id

Request

curl -H 'x-api-key: APIKEY' https://api.civicengine.com/candidate/1

Response

Below is sample return dictionary for a candidate request. Note that "stances" are embedded within issues.stances. For instance, a candidate may have stances about the issue of National Security.

{
"thumb_url": string,
"urls": [
{
"url": string
"type": enum(twitter, facebook, website)
}
],
"first_name": string,
"last_name": string,
"middle_name": string,
"suffix": string,
"issues": [
{
"is_question": boolean,
"issue_id": int,
"name": string,
"question_text": string,
"stances": [
{
"reference_url": string,
"stance_id": int,
"candidate_id": int,
"locale": string,
"response_value": string,
"id": int,
"candidacy_id": int,
"description": string
}
]
}],
"endorsements": [
{
"logo_url": string,
"id": int,
"website_url": string,
"name": string
}],
"experience":[
{
"start_year": int,
"entry_type": string,
"company": string,
"end_year": int,
"duration": string,
"position": string
}
],
"candidacies": [
{
"is_running_mate": bool,
"position_id": int,
"election_day": string,
"state": string,
"sub_area_name_secondary": string,
"sub_area_value": string,
"party_short_name": string,
"party_name": string,
"position_name": string,
"incumbent": bool,
"row_order": int,
"sub_area_name": string,
"running mate": int,
"election_id": int,
"sub_area_value_secondary": string
},
...
],
"bar_association_evaluations": [],
"education":[]
}

Issue ID Description

When passing the election_id parameter, the response will include data in the issues object. The type of issue stance is described by ID and defined below.

IDDescription
6Education
5Economy
12Environment / Energy
62Criminal Justice / Public Safety
24Healthcare
18Government Reform
46Taxes / Budget
30Infrastructure / Transportation
23Guns
50Wages / Job Benefits
81Civil Rights
42Legislation
25Housing
29Immigration
47Defense / Veterans
45Social Services
67Abortion / Contraception
41Drug Policy
15Foreign Policy