TABLE OF CONTENTS
API METHODS

Web Services

In addition to our web application, BillTrack50 allows remote access to data to subscribing members through the use of a web services api. Web services provide functionality that enable separate systems to communicate with each other using standard web protocols such as HTTP, TCP/IP and JSON. Using a simple standards based communication model opens the exposed functionality to a wide variaty of system and programming languages, and is a natural extension of our main web site. Our web services api should interest any business interested in integrating legislative bill searching direct into their web site or application. With the 2.0 version of web services BillTrack50 is opening the door to providing access to company specific data in addition to the publicly available bill and legislator data. The new web service will continue to grow as we provide additional endpoints to allow greater access to your data and help you power your legislative information needs.

API Usage Guidelines

We are excited to provide companies access to their data remotely so they can integrate data into their own applications and websites. For this reason we request that you follow the following guidelines for using our web service API.

COMMERCIAL USAGE
This is a service to our paying subscribers to provide legislative searching directly into their applications, and websites. Selling the legislative data to a third party is not allowed and a violation of our usage guidelines. If you are unsure if your service qualifies as selling data, or if you want to discuss a commercial usage partnerships, please contact us for more information. 

RATE LIMITS
In order to keep our service responsive for all of our customers we are imposing two API call rate limits. The service will only allow 5 requests per second, and a maximum of 5,000 requests per 24-hour period. When a rate limit is reached, you will receive a return code of 429 indicating the authentication succeeded, but the rate limit was exceeded. In addition to the code, a standard message value will provide additional details. You will continue to receive this message until enough time has passed to bring the call rate back below the rate limits. All API calls contribute to the overall API call rate. If you are expecting to generate significant traffic through the API service, please let us know. 


RESULTS LIMITS
The number of results returned from a search is also limited. Very large result sets present a potential large network transfer in addition to presenting difficulties in displaying and actually digesting large amounts of data. In the occurrence of a large search result set, the web service will only return a specified top number of results to the caller. In addition it will provide a count of the number of records that actually matched.

 
LOCAL STORAGE
Information retrieved from the web service can be stored and cached for a period of 24 hours. All data obtained from the API is still subject to our Terms of Use.

API Overview

The BillTrack50 web services api is a restful web service. REST uses standard HTTP(S) request/response mechanisms where all responses will be formatted in JSON. JSON is a preferred response type because it is generally less verbose while retaining its self describing flexible structure. The REST endpoints can be used to access your BillTrack50 account directly from your applications. All request responses will return with standard data elements that describe the success/failure state of the service call in addition to a set of data elements that are specific to the individual call. Please refer to the individual method details for more specifics. 

All requests should use utf-8 character encoding. 


AUTHORIZATION
To access the web api, we require that you request an apikey from us. The apikey is associated with a company account and lets us know who is accessing the web services api, and how often it is being called. For that reason, the apikey is required to be sent with every web service request as part of the Authorization Header. It is important to note that since the apikey is associated with the company account, it has access to all of the companies data and is not affected by any permissions set at a user level. It is important to keep this value protected. 

The Authorization header should be formatted in the form "Authorization: apikey {your-apikey}" where the term {your-apikey} represents the apikey value received from BillTrack50 and may be requested through our contact form.

JSONP
The 2.0 web services api does not support JSONP which allows a webpage to make a data request across domains. The reason we have chosen to drop JSONP is it would require the users to include their apikey credentials into webpage which would allow the user to access that value. Once obtained they could use it to retrieve any data exposed by the webservice. While currently all the endpoints are read only in nature, some data may be sensitive in nature and need to be protected.

SSL (SECURE SOCKETS LAYER)
In order to further protect our users data all requests must be made over SSL. SSL allows us to encrypt all potentially sensitive information that is sent to or from our service to prevent any eavesdropping attacks that may occur.

<hr>

GET https://www.billtrack50.com/BT50Api/2.0/json/Sessions/{StateCode}

PARAMETERS

ParameterData Type Required Default Description StateCode String Yes n/a Two letter state code to retrieve sessions for.

EXAMPLE PARAMETERS
StateCode: "CO"
EXAMPLE JSON RESPONSE
{
  "StatusCode": 200,
  "Message": "Success",
  "Sessions": [
    {
      "SessionID": 48,
      "StateCode": "CO",
      "SessionName": "2011 Regular Session",
      "CurrentSession": false
    },
    {
      "SessionID": 49,
      "StateCode": "CO",
      "SessionName": "2012 Regular Session",
      "CurrentSession": false
    },
    {
      "SessionID": 53,
      "StateCode": "CO",
      "SessionName": "2016 Regular Session",
      "CurrentSession": true
    }
  ]
}

GET https://www.billtrack50.com/BT50Api/2.0/json/Bills/{BillID} 
PARAMETERS
Parameter Data Type Required Default Description BillID Integer Yes n/a BillTrack50 numerical bill id.

EXAMPLE PARAMETERS
BillID: 625433

EXAMPLE JSON RESPONSE

{
  "StatusCode": 200,
  "Message": "Success",
  "Bill": {
    "BillID": 625433,
    "StateBillID": "HB156",
    "StateCode": "AK",
    "BillName": "School Accountability Measures; Fed. Law",
    "Summary": "An Act relating to a parent's right to direct the education of a child; relating to the duties of the state Board of Education and Early Development, the Department of Education and Early Development, school boards, and school districts; relating to public school curriculum and assessments; relating to compliance with federal education laws; relating to public school accountability; relating to a statewide assessment plan and review of education laws and regulations; repealing the minimum expenditure for instruction for school districts; relating to sex education, human reproduction education, and human sexuality education; relating to suicide awareness and prevention training; relating to contracts for student assessments; relating to questionnaires and surveys administered in public schools; relating to physical examinations for teachers.",
    "Session": "29th Legislature",
    "Sponsors": "Jim Colver,Michael Dunleavy,Lynn Gattis,Wes Keller,Peter Micciche,Lora Reinbold,Tammie Wilson",
    "Subjects": "",
    "KeyWords": "School,District,School District,School Board,Correspondence Study Student,State,Education,Training,Public School,Schools,Section,Department,Public Schools,School Age Child,Program,Sec.,Regional School Board,Sexual Abuse,parent,Paragraph",
    "LastAction": "MANIFEST ERROR(S)",
    "ActionDate": "2016-06-27T00:00:00",
    "Actions": 79,
    "Versions": 7,
    "Votes": 10,
    "BillProgress": "3 - Crossed Over",
    "PassedFlag": false,
    "OfficialDocument": "http://www.legis.state.ak.us/basis/get_bill.asp?session=29&bill=HB156",
    "Created": "3/20/2015",
    "Changes": [
      "New Action",
      "New Vote"
    ]
  }
}

GET https://www.billtrack50.com/BT50Api/2.0/json/Bills?SearchText={SearchText}&StateCodes={StateCodes}&SessionID={SessionID}

SearchText: "Environmental Conservation"
StateCodes: "AK,CO"


EXAMPLE JSON RESPONSE

{
"StatusCode":200,
"Message":"Success",
"Bills":
[{
"BillID":537272,
"StateBillID":"HB14",
"StateCode":"AK",
"BillName":"Ban Plastic Microbeads In Cosmetics",
"Summary":"An Act banning the manufacture, sale, or offering for sale of a cosmetic that contains plastic microbeads; and providing for an effective date.",
"Session":"29th Legislature",
"Sponsors":"Max Gruenberg, Andrew Josephson",
"Subjects":"",
"KeyWords":"Synthetic Plastic Microbeads,Sale,Drug,Device,Food,Solid Plastic Particles,Following Acts,Identification Device,False Advertisement,Good Faith,Improper Labeling,New Paragraph,delivery,Drug Substitution,Environmental Conservation,Peace Officers,Proper Authority,Prohibited Act,Frozen Fish,Fresh Fish",
"LastAction":"PREFILE RELEASED 1/9/15",
"ActionDate":"1/21/2015",
"Actions":4,
"Versions":1,
"Votes":0,
"BillProgress":"2 - In Committee",
"PassedFlag":false,
"OfficialDocument":"http://www.legis.state.ak.us/basis/get_bill.asp?session=29&bill=HB14",
"Created":"3/20/2015",
"Changes":["New Action", "Associated Document"]
},
{
"BillID":559949,
"StateBillID":"HB71",
"StateCode":"AK",
"BillName":"Budget: Capital",
"Summary":"An Act making appropriations, including capital appropriations and other appropriations; making appropriations to capitalize funds; and providing for an effective date.",
"Session":"29th Legislature",
"Sponsors":"",
"Subjects":"",
"KeyWords":"Hd,Allocations Items Funds,Federal Allocations Items,Funds Funds Funds,Items Funds Funds,Alaska Marine Highway",
"LastAction":"REFERRED TO FINANCE",
"ActionDate":"1/23/2015",
"Actions":4,
"Versions":1,
"Votes":0,
"BillProgress":"2 - In Committee",
"PassedFlag":false,
"OfficialDocument":"http://www.legis.state.ak.us/basis/get_bill.asp?session=29&bill=HB71",
"Created":"3/20/2015"
}]
}

GET

https://www.billtrack50.com/BT50Api/2.0/json/Bills/{BillID}/Votes 
PARAMETERSParameterData TypeRequiredDefaultDescriptionBillIDStringYesn/aBillTrack50's internal numerical bill identifier, not the state specific bill number.

EXAMPLE PARAMETERS

BillID: 625433

EXAMPLE JSON RESPONSE

{
"StatusCode":200,
"Message":"Success",
"Votes":
[{
"VoteID":492294,
"Chamber":"House",
"Motion":"House: Adopt",
"YesVotes":21,
"NoVotes":18,
"OtherVotes":1,
"VoteDate":"5/5/2016"
},
{
"VoteID":492219,
"Chamber":"House",
"Motion":"House: Adopt",
"YesVotes":20,
"NoVotes":19,
"OtherVotes":1,
"VoteDate":"5/4/2016"
},
{
"VoteID":483964,
"Chamber":"Senate",
"Motion":"Senate: Third Reading - Final Passage Effective Dates",
"YesVotes":15,
"NoVotes":5,
"OtherVotes":0,
"VoteDate":"4/17/2016"
}]
}

GET

https://www.billtrack50.com/BT50Api/2.0/json/Bills/{BillID}/Sponsors

PARAMETERS

ParameterData TypeRequiredDefaultDescriptionBillIDStringYesn/aBillTrack50's internal numerical bill identifier, not the state specific bill number.

EXAMPLE PARAMETERS
BillID: 625433
EXAMPLE JSON RESPONSE
{
  "StatusCode": 200,
  "Message": "Success",
  "Sponsors": [
    {
      "District": "AK009",
      "LegislatorID": 21133,
      "KnowWhoPersonID": 531852,
      "Name": "Joann Downey",
      "LegislatorParty": "D",
      "Role": "",
      "State": "NJ",
      "Primary": true
    },
    {
      "District": "AK000E",
      "LegislatorID": 21132,
      "KnowWhoPersonID": 531850,
      "Name": "Eric Houghtaling",
      "LegislatorParty": "D",
      "Role": "State Senator",
      "State": "NJ",
      "Primary": true
    },
    {
      "District": "AK007",
      "LegislatorID": 19367,
      "KnowWhoPersonID": 465666,
      "Name": "Joe Lagana",
      "LegislatorParty": "D",
      "Role": "",
      "State": "NJ",
      "Primary": true
    },
    {
      "District": "AK0000",
      "LegislatorID": 2212,
      "KnowWhoPersonID": 209985,
      "Name": "John McKeon",
      "LegislatorParty": "D",
      "Role": "State Senator",
      "State": "NJ",
      "Primary": true
    },
    {
      "District": "AK014",
      "LegislatorID": 3692,
      "KnowWhoPersonID": 241274,
      "Name": "Paul Moriarty",
      "LegislatorParty": "D",
      "Role": "State Representative",
      "State": "NJ",
      "Primary": true
    }
  ]
}

GET

https://www.billtrack50.com/BT50Api/2.0/json/Legislators?LegislatorName={LegislatorName}&StateCodes={StateCodes}

PARAMETERS

ParameterData TypeRequiredDefaultDescriptionLegislatorNameStringYesn/aAll or part of the legislators first or last name. A minimum of 3 characters are required before any results will returned.StateCodesStringNoAll StatesA comma separated list of state codes used to filter bills to specific states. Leaving this blank will search all states.

EXAMPLE PARAMETERS
LegislatorName: "Buck"
StateCodes: "CA,CO"

EXAMPLE JSON RESPONSE

{
  "StatusCode": 200,
  "Message": "Success",
  "Legislators": [
    {
      "LegislatorID": 17940,
      "KnowWhoPersonID": 396924,
      "Name": "Perry Buck",
      "Party": "R",
      "StateCode": "CO",
      "Role": "State Representative",
      "District": "CO049",
      "InOffice": true
    },
    {
      "LegislatorID": 21015,
      "KnowWhoPersonID": 545490,
      "Name": "Janet Buckner",
      "Party": "D",
      "StateCode": "CO",
      "Role": "State Representative",
      "District": "CO040",
      "InOffice": true
    },
    {
      "LegislatorID": 18137,
      "KnowWhoPersonID": 408929,
      "Name": "John Buckner",
      "Party": "D",
      "StateCode": "CO",
      "Role": "",
      "District": "",
      "InOffice": false
    }
  ]
}

GET

https://www.billtrack50.com/BT50Api/2.0/json/Legislators/{LegislatorID}/Bills 

PARAMETERS
ParameterData TypeRequiredDefaultDescriptionLegislatorIDStringYesn/aBillTrack50's internal legislator identifier.

EXAMPLE PARAMETERS

LegislatorID: 6060

EXAMPLE JSON RESPONSE

{
  "StatusCode": 200,
  "Message": "Success",
  "SponsoredBill": [
    {
      "LegislatorID": 6060,
      "LegislatorName": "Donna Lichtenegger",
      "SponsorType": "primary sponsor",
      "PrimarySponsorFlag": true,
      "BillID": 756477,
      "StateBillID": "HB48",
      "StateCode": "MO",
      "BillName": "Authorizes, upon voter approval, certain sales taxes in the certain political subdivisions",
      "Summary": "AN ACT To repeal sections 94.900, 94.902, 321.242, and 321.246, RSMo, and to enact in lieu thereof five new sections relating to local sales tax. ",
      "Session": "2017 Regular Session",
      "LastAction": "Reported Do Pass (H) - AYES: 13 NOES: 0 PRESENT: 0",
      "ActionDate": "4/6/2017",
      "Actions": 21,
      "Versions": 3,
      "Votes": 0,
      "BillProgress": "6 - Dead/Failed/Vetoed",
      "PassedFlag": true,
      "OfficialDocument": "http://www.house.mo.gov/Bill.aspx?bill=HB48&year=2017&code=R"
    },
    {
      "LegislatorID": 6060,
      "LegislatorName": "Donna Lichtenegger",
      "SponsorType": "primary sponsor",
      "PrimarySponsorFlag": true,
      "BillID": 756255,
      "StateBillID": "HB46",
      "StateCode": "MO",
      "BillName": "Imposes civil penalties for poaching certain animals",
      "Summary": "AN ACT To amend chapter 252, RSMo, by adding thereto one new section relating to poaching, with penalty provisions.",
      "Session": "2017 Regular Session",
      "LastAction": "Referred: Conservation and Natural Resources(H)",
      "ActionDate": "1/12/2017",
      "Actions": 4,
      "Versions": 1,
      "Votes": 0,
      "BillProgress": "6 - Dead/Failed/Vetoed",
      "PassedFlag": true,
      "OfficialDocument": "http://www.house.mo.gov/Bill.aspx?bill=HB46&year=2017&code=R"
    }
  ]
}

GET

https://www.billtrack50.com/BT50Api/2.0/json/Legislators/{LegislatorID}/Votes 


PARAMETERS

ParameterData TypeRequiredDefaultDescriptionLegislatorIDStringYesn/aBillTrack50's internal legislator identifier.

EXAMPLE PARAMETERS

LegislatorID: 4613

EXAMPLE JSON RESPONSE

{
  "StatusCode": 200,
  "Message": "Success",
  "LegislatorVotes": [
    {
      "BillID": 588394,
      "StateCode": "MN",
      "StateBillID": "HF848",
      "Session": "89th Legislature 2015-2016",
      "VoteID": 496307,
      "Motion": "House: Repassage",
      "Passed": true,
      "VoteDate": "5/22/2016",
      "Vote": "Yea",
      "VoteNumber": 12
    },
    {
      "BillID": 731045,
      "StateCode": "MN",
      "StateBillID": "SF2986",
      "Session": "89th Legislature 2015-2016",
      "VoteID": 491921,
      "Motion": "House: Passage",
      "Passed": true,
      "VoteDate": "5/5/2016",
      "Vote": "Yea",
      "VoteNumber": 1
    }
  ]
}

GET

https://www.billtrack50.com/BT50Api/2.0/json/Votes/{VoteID} 


PARAMETERS

ParameterData TypeRequiredDefaultDescriptionVoteIDIntegerYesn/aBillTrack50 vote identifier. A list of votes can be queried for a specific bill using the bill votes endpoint.

EXAMPLE PARAMETERS

VoteID: "349926"

EXAMPLE JSON RESPONSE

{
  "StatusCode": 200,
  "Message": "Success",
  "Vote": {
    "VoteID": 349926,
    "Chamber": "House",
    "Motion": "House: HB 5 Third Reading Final Passage",
    "YesVotes": 38,
    "NoVotes": 1,
    "OtherVotes": 1,
    "VoteDate": "2/25/2015",
    "LegislatorVotes": [
      {
        "LegislatorID": 20478,
        "KnowWhoPersonID": 511079,
        "Name": "Adam Wool",
        "Party": "D",
        "District": "AK005",
        "Vote": "Yea"
      },
      {
        "LegislatorID": 18516,
        "KnowWhoPersonID": 401558,
        "Name": "Andrew Josephson",
        "Party": "D",
        "District": "AK017",
        "Vote": "Yea"
      },
      {
        "LegislatorID": 4613,
        "KnowWhoPersonID": 258133,
        "Name": "Wes Keller",
        "Party": "R",
        "District": "AK010",
        "Vote": "Yea"
      }
    ]
  }
}

GET

https://www.billtrack50.com/BT50Api/2.0/json/BillSheets 


PARAMETERS

None

EXAMPLE PARAMETERS

None

EXAMPLE JSON RESPONSE

{
  "StatusCode": 200,
  "Message": "Success",
  "BillSheets": [
    {
      "BillSheetID": 4197,
      "BillSheetName": "Health Insurance Reform",
      "BillSheetSummary": "",
      "BillCount": 560,
      "HiddenBillCount": 2,
      "Archived": false,
      "CreateDate": "6/1/2015",
      "UpdateDate": "4/27/2016"
    },
    {
      "BillSheetID": 1563,
      "BillSheetName": "Health Insurance Exchanges",
      "BillSheetSummary": "PPACA Tracker designed to help more easily track the changing state health insurance legislation.",
      "BillCount": 30,
      "HiddenBillCount": 0,
      "Archived": true,
      "CreateDate": "9/12/2012",
      "UpdateDate": "6/21/2016"
    }
  ]
}

GET

https://www.billtrack50.com/BT50Api/2.0/json/BillSheets/{BillSheetID}/Bills 


PARAMETERS

ParameterData TypeRequiredDefaultDescriptionBillSheetIDStringYesn/aBillTrack50's internal bill sheet identifier.

EXAMPLE PARAMETERS

BillSheetID: 1563

EXAMPLE JSON RESPONSE

{
  "StatusCode": 200,
  "Message": "Success",
  "Bills": [
    {
      "BillID": 723521,
      "StateCode": "ID",
      "StateBillID": "H0564",
      "BillName": "Appropriates $13,878,400 to the Office of Species Conservation for fiscal year 2017; limits the number of authorized full-time equivalent positions to 12.63; and expresses legislative intent with regard to sage-grouse conservation actions.",
      "Summary": "APPROPRIATIONS - OFFICE OF SPECIES CONSERVATION - Appropriates $13,878,400 to the Office of Species Conservation for fiscal year 2017; limits the number of authorized full-time equivalent positions to 12.63; and expresses legislative intent with regard to sage-grouse conservation actions.",
      "Session": "2016 Regular Session",
      "Sponsors": "",
      "Subjects": "",
      "Keywords": "Species Conservation,Costs Expenditures Payments,State Appropriated Funds,Personnel Operating Benefit,Economic Recovery Reserve,Full-Time Equivalent Positions,Additional Sage-Grouse Lek,Joint Finance-Appropriations Committee,Sage-Grouse Conservation Actions,Legislative Intent,Following Amounts,Expense Classes,Ftp Authorization,Miscellaneous Revenue,Federal Grant,Idaho Code,Nonfederal Lands,habitat restoration,Section",
      "LastAction": "Reported Signed by Governor on March 28, 2016 Session Law Chapter 243 Effective: 07/01/2016",
      "LastActionDate": "3/28/2016",
      "Actions": 22,
      "Versions": 1,
      "Votes": 2,
      "BillProgress": "5 - Signed",
      "PassedFlag": false,
      "OfficialDocument": "http://www.legislature.idaho.gov/legislation/2016/H0564.htm",
      "Created": "3/20/2015",
      "Changes": [
        "New Action",
        "New Vote"
      ]
    },
    {
      "BillID": 695614,
      "StateCode": "WY",
      "StateBillID": "SF0053",
      "BillName": "2016 Large project funding.",
      "Summary": "AN ACT relating to the Wyoming Wildlife and Natural Resource Funding Act; providing for funding of large projects under that act; specifying large projects approved for funding in 2016; requiring specified conservation easements to include the state of Wyoming as a third party beneficiary as specified; requiring certifications regarding kickbacks and gifts; providing appropriations; providing for reversion of funds; and providing for an effective date.",
      "Session": "2016 Budget Session",
      "Sponsors": "",
      "Subjects": "",
      "Keywords": "Natural Resource Trust,Conservation Easement,Resource Trust Account,Trust Account Board,Income Account,Total Project Budget,Bv Conservation Easement,Large Project,Wyoming Wildlife,Lazy Bv Conservation,Project Sponsor,Project Description,Unobligated Funds,Subsection,Project Grant,Ranch Conservation Easement,High Quality Farm,Core Population Area,Dollars,South Pass Aspen",
      "LastAction": "Assigned Chapter Number",
      "LastActionDate": "3/7/2016",
      "Actions": 27,
      "Versions": 2,
      "Votes": 6,
      "BillProgress": "5 - Signed",
      "PassedFlag": false,
      "OfficialDocument": "http://legisweb.state.wy.us/2016/Digest/SF0053.pdf",
      "Created": "3/20/2015"
    }
  ]
}

GET

https://www.billtrack50.com/BT50Api/2.0/json/Scorecards 


DESCRIPTION

Returns the list of all active scorecards for the company.

PARAMETERS None

EXAMPLE PARAMETERS None

EXAMPLE JSON RESPONSE

{
  "StatusCode": 200,
  "Message": "Success",
  "Scorecards": [
    {
      "ScorecardID": 1000,
      "StateCode": "KS",
      "ScorecardName": "Education Index",
      "Subtitle": "",
      "RatedBills": 33,
      "Categories": [
        {
          "CategoryID": 0,
          "CategoryName": "All Bills"
        },
        {
          "CategoryID": 1009,
          "CategoryName": "Standardized Testing"
        },
        {
          "CategoryID": 1010,
          "CategoryName": "Early Assessment"
        }
      ],
      "PublicFlag": true,
      "CreateDate": "12/7/2014",
      "UpdateDate": "6/24/2015"
    },
    {
      "ScorecardID": 1048,
      "StateCode": "US",
      "ScorecardName": "US Scorecard",
      "Subtitle": "",
      "RatedBills": 4,
      "Categories": [
        {
          "CategoryID": 0,
          "CategoryName": "All Bills"
        }
      ],
      "PublicFlag": false,
      "CreateDate": "3/8/2015",
      "UpdateDate": "3/8/2015"
    }
  ]
}

GET

https://www.billtrack50.com/BT50Api/2.0/json/Scorecards/{ScorecardID}/Bills 

PARAMETERS ParameterData TypeRequiredDefaultDescriptionScorecardIDStringYesn/aBillTrack50's internal scorecard identifier.

EXAMPLE PARAMETERS

ScorecardID: 1000

EXAMPLE JSON RESPONSE

{
  "StatusCode": 200,
  "Message": "Success",
  "Bills": [
    {
      "BillID": 309001,
      "StateCode": "KS",
      "StateBillID": "HB2014",
      "BillName": "Kansas clean water act.",
      "LastAction": "House Motion by Rep. Jennings to reconsider failed.",
      "LastActionDate": "3/26/2014",
      "Rating": 4,
      "Categories": [
        {
          "CategoryID": 1009,
          "CategoryName": "Tax Increases"
        }
      ],
      "Comments": "This bill provides strong new protections.",
      "ReferenceUrl": "",
      "ReferenceUrlText": ""
    },
    {
      "BillID": 453722,
      "StateCode": "KS",
      "StateBillID": "HB2430",
      "BillName": "Substitute for HB 2430 by Committee on Commerce, Labor and Economic Development - Promoting employment across Kansas act; benefits.",
      "LastAction": "House Approved by Governor on Wednesday, 14 May 2014",
      "LastActionDate": "5/30/2014",
      "Rating": -1,
      "Categories": [],
      "Comments": "",
      "ReferenceUrl": "",
      "ReferenceUrlText": ""
    }
  ]
}

GET

https://www.billtrack50.com/BT50Api/2.0/json/Scorecards/{ScorecardID}/Legislators/{LegislatorID}

PARAMETERS ParameterData TypeRequiredDefaultDescriptionScorecardIDStringYesn/aBillTrack50's internal scorecard identifier.LegislatorIDStringYesn/aBillTrack50's internal legislator identifier.

EXAMPLE PARAMETERS

ScorecardID: 1000
LegislatorID: 18718

EXAMPLE JSON RESPONSE

{
"StatusCode":200,
"Message":"Success",
"Legislator":
{
"LegislatorID":18718,
"FirstName":"Joshua",
"LastName":"Powell",
"Party":"R",
"Chamber":"House",
"District":"",
"CategoryScores":
[{
"CategoryID":0,
"CategoryName":"All Bills",
"VoteIndex":"76.0",
"TotalScore":"57.2"
"PossibleScore":"79"
},
{
"CategoryID":-1,
"CategoryName":"No Category",
"VoteIndex":"75.0",
"TotalScore":"44"
"PossibleScore":"79"
},
{
"CategoryID":1009,
"CategoryName":"Category1",
"VoteIndex":"72.6",
"TotalScore":"7.2"
"PossibleScore":"70"
},
{
"CategoryID":1010,
"CategoryName":"Category2",
"VoteIndex":"76.2",
"TotalScore":"5.2"
"PossibleScore":"76"
}]
}
}

GET

https://www.billtrack50.com/BT50Api/2.0/json/Scorecards/{ScorecardID}/Legislators?Category={CategoryID} 


PARAMETERS

ParameterData TypeRequiredDefaultDescriptionScorecardIDStringYesn/aBillTrack50's internal scorecard identifier.CategoryIDStringNo0ID of the category used to filter legislation for the scorecard. The list of categories can be retrieved using the /Scorecards endpoint. If no CategoryID is provided then the scores for the legislators will include all bills on the scorecard.

EXAMPLE PARAMETERS

ScorecardID: 1000
CategoryID: 1009

EXAMPLE JSON RESPONSE

{
  "StatusCode": 200,
  "Message": "Success",
  "Legislators": [
    {
      "LegislatorID": 6661,
      "FirstName": "Caryn",
      "LastName": "Tyson",
      "Party": "R",
      "Chamber": "Senate",
      "District": "KS012",
      "VoteIndex": "100.0",
      "TotalScore": "8"
    },
    {
      "LegislatorID": 18718,
      "FirstName": "Joshua",
      "LastName": "Powell",
      "Party": "R",
      "Chamber": "House",
      "District": "",
      "VoteIndex": "72.6",
      "TotalScore": "7.2"
    },
    {
      "LegislatorID": 20215,
      "FirstName": "Susie",
      "LastName": "Swanson",
      "Party": "R",
      "Chamber": "House",
      "District": "KS064",
      "VoteIndex": "0.0",
      "TotalScore": "-8"
    },
    {
      "LegislatorID": 7276,
      "FirstName": "Kathy",
      "LastName": "Wolfe Moore",
      "Party": "D",
      "Chamber": "House",
      "District": "KS036",
      "VoteIndex": "0.0",
      "TotalScore": "-8"
    }
  ]
}

GET

https://www.billtrack50.com/BT50Api/2.0/json/Scorecards/{ScorecardID}/Legislators/{LegislatorID}/Votes 


PARAMETERS

ParameterData TypeRequiredDefaultDescriptionScorecardIDIntegerYesn/aBillTrack50's internal scorecard identifier which can be retrieved from the scorecard endpoint.LegislatorIDIntegerYesn/aBillTrack50's legislator identifier which can be retrieved from the scorecard legislator endpoint.

EXAMPLE PARAMETERS

ScorecardID: 1000
LegislatorID: 15000

EXAMPLE JSON RESPONSE

{
  "StatusCode": 200,
  "Message": "Success",
  "BillVotes": [
    {
      "BillID": 456001,
      "StateBillID": "SB272",
      "BillName": "Eliminating the 3% limit on controlled shooting area acreage in a county.",
      "Motion": "Senate Final Action - Passed as amended - Yea: 39 Nay: 0",
      "VoteDate": "2/12/2014",
      "VoteRating": 1,
      "Vote": "Y",
      "Comment": "",
      "ReferenceUrl": "",
      "ReferenceUrlText": ""
    },
    {
      "BillID": 457215,
      "StateBillID": "HB2440",
      "BillName": "Emerging industry investment act; treatment of certain bioscience companies.",
      "Motion": "House Emergency Final Action - Passed - Yea: 116 Nay: 4",
      "VoteDate": "2/21/2014",
      "VoteRating": -1,
      "Vote": "Y",
      "Comment": "",
      "ReferenceUrl": "",
      "ReferenceUrlText": ""
    }
  ]
}

Response Codes & Messages

As a part of a standardized response format every response from the BT50 API web service will include a Response Code and a Message value. The response code will indicate the success or failure of the request, and the message will contain a brief text description with details of the response code.

RESPONSE CODES

Code

Purpose

200Success - Response to a successful api call.

401Unauthorized - Returned when the Authentication key was not provided or could not be validated.

403Forbidden - When authentication succeeded but authenticated user doesn't have access to the resource.

422Forbidden - The request was well-formed but was unable to be followed due to errors. Specifically the parameters could not be parsed and validated.

429Too Many Requests - When a request is rejected due to rate limiting.

500Internal Server Error - A generic error message, given when an unexpected exception encountered. An error message will be included for some details of the exception.