Skip to content

Bill Tracking API Quick Reference

Essential Information

ItemValue
Base URLhttps://engagifii-billtracking.azurewebsites.net
API Version1.0
Auth Headersapi-version: 1.0
tenant-code: YOUR_TENANT_CODE
Content Typeapplication/json
Rate Limit1000 req/hour, 100 req/min

Quick Authentication

bash
# All requests require these headers:
curl -X GET "https://engagifii-billtracking.azurewebsites.net/api/1.0/endpoint" \
  -H "api-version: 1.0" \
  -H "tenant-code: YOUR_TENANT_CODE" \
  -H "Content-Type: application/json"

Common Endpoints

Reference Data (GET)

/api/1.0/dropdown/states         # Get all states
/api/1.0/dropdown/sessions       # Get sessions
/api/1.0/dropdown/committees     # Get committees  
/api/1.0/dropdown/billtypes      # Get bill types
/api/1.0/dropdown/users          # Get users

Activity Logging (POST)

/api/1.0/activity/log/save       # Save activity log
/api/1.0/activity/log/list       # List activity logs

Bill Events (POST)

/api/1.0/bill/event/calendar     # Get calendar events
/api/1.0/bill/event/calendar/count # Get event count
/api/1.0/bill/event/subscribe    # Subscribe to events

Advocacy (Mixed)

GET  /api/1.0/Advocacy/getChampaignTemplate/{id}
POST /api/1.0/Advocacy/saveChampaignTemplate
POST /api/1.0/Advocacy/list
DELETE /api/1.0/Advocacy/ChampaignTemplate/{id}

Capitol Reports

GET  /api/1.0/CapitolReport/get-legislationDays/{stateId}
POST /api/1.0/CapitolReport/save-legislationDays/{stateId}
POST /api/1.0/CapitolReport/save-report/{stateId}

Common Request Bodies

Activity Log

json
{
  "userId": "user123",
  "action": "VIEW_BILL",
  "entityType": "BILL",
  "entityId": "12345",
  "timestamp": "2025-01-28T10:30:00Z"
}

Calendar Filter

json
{
  "startDate": "2025-01-01",
  "endDate": "2025-01-31",
  "stateIds": [1, 2, 3],
  "pageNumber": 1,
  "pageSize": 50
}

Pagination

json
{
  "pageNumber": 1,
  "pageSize": 50,
  "sortBy": "fieldName",
  "isAscending": false
}

Response Formats

Success Response

json
{
  "data": {...},
  "success": true,
  "message": "Operation successful"
}

Paginated Response

json
{
  "collection": [...],
  "pagingModel": {
    "pageNumber": 1,
    "pageSize": 50,
    "totalRecords": 500,
    "totalPages": 10
  }
}

Error Response

json
{
  "error": "ErrorType",
  "message": "Error description",
  "details": {
    "code": "ERROR_CODE",
    "timestamp": "2025-01-28T10:30:00Z"
  }
}

HTTP Status Codes

CodeMeaningAction Required
200SuccessNone
400Bad RequestFix request data
401UnauthorizedCheck headers
403ForbiddenCheck permissions
404Not FoundVerify resource ID
429Rate LimitedWait and retry
500Server ErrorRetry with backoff

Rate Limit Headers

http
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 950
X-RateLimit-Reset: 1706441400
Retry-After: 60

Quick Examples

Get States (JavaScript)

javascript
fetch('https://engagifii-billtracking.azurewebsites.net/api/1.0/dropdown/states', {
  headers: {
    'api-version': '1.0',
    'tenant-code': 'YOUR_TENANT_CODE',
    'Content-Type': 'application/json'
  }
})
.then(res => res.json())
.then(data => console.log(data));

Save Activity Log (Python)

python
import requests

response = requests.post(
    'https://engagifii-billtracking.azurewebsites.net/api/1.0/activity/log/save',
    headers={
        'api-version': '1.0',
        'tenant-code': 'YOUR_TENANT_CODE',
        'Content-Type': 'application/json'
    },
    json={
        'userId': 'user123',
        'action': 'VIEW_BILL',
        'entityType': 'BILL',
        'entityId': '12345'
    }
)

Get Calendar Events (cURL)

bash
curl -X POST "https://engagifii-billtracking.azurewebsites.net/api/1.0/bill/event/calendar" \
  -H "api-version: 1.0" \
  -H "tenant-code: YOUR_TENANT_CODE" \
  -H "Content-Type: application/json" \
  -d '{
    "startDate": "2025-01-01",
    "endDate": "2025-01-31",
    "stateIds": [1, 2, 3]
  }'

Retry Strategy

javascript
// Exponential backoff example
async function retryRequest(fn, maxRetries = 3) {
  for (let i = 0; i < maxRetries; i++) {
    try {
      return await fn();
    } catch (error) {
      if (error.status === 429 || error.status >= 500) {
        const delay = Math.pow(2, i) * 1000;
        await new Promise(r => setTimeout(r, delay));
      } else {
        throw error;
      }
    }
  }
}

Common Filters

Date Range

json
{
  "startDate": "YYYY-MM-DD",
  "endDate": "YYYY-MM-DD"
}

Multi-Select IDs

json
{
  "stateIds": [1, 2, 3],
  "sessionIds": [10, 20],
  "committeeIds": [100, 200]
}
json
{
  "text": "search term",
  "searchFields": ["title", "summary"]
}

Enumerations

Event Types

  • HEARING
  • VOTE
  • COMMITTEE_MEETING
  • FLOOR_SESSION

Report Types

  • 1 - Summary
  • 2 - Detailed
  • 3 - Executive
  • 4 - Weekly
  • 5 - Monthly
  • 6 - End of Session

Tracking Status

  • NOT_TRACKED
  • TRACKING
  • WATCHING
  • PRIORITY
  • ARCHIVED

Bill Position

  • SUPPORT
  • OPPOSE
  • NEUTRAL
  • MONITOR
  • NO_POSITION

Troubleshooting Checklist

  • [ ] Both required headers present?
  • [ ] Tenant code is correct?
  • [ ] API version is 1.0?
  • [ ] Content-Type is application/json?
  • [ ] Request body is valid JSON?
  • [ ] Date format is YYYY-MM-DD?
  • [ ] Using HTTPS not HTTP?
  • [ ] Within rate limits?

Support Contacts


Last Updated: January 2025 | Version 1.0