Skip to content

Amplify API Reference

kazvee edited this page Oct 30, 2023 · 2 revisions

Brief summary of each API's endpoints. For details, click the Full API reference links on this page or in the sidebar.

Address Verification

Full API Reference

Endpoints to validate constituent/volunteer residential addresses and send physical mailings via the Lob API. :warning: The previous syntax (GET /api/lob/:templateId) has been deprecated and is no longer valid.

Query Result
POST /api/lob/addressVerification Verifies if a single Address object is considered a valid, deliverable, residential address within the United Status.

Campaigns

Full API Reference

Endpoints to retrieve internal information about campaigns being supported by ProgramEquity. Future implementation will enable adding data to the campaigns table.

Query Result
GET /api/campaigns Returns list of Campaigns
GET /api/campaigns/:id Returns a single campaign object based on id path parameter.
⚠️ NOT YET IMPLEMENTED!
POST /api/campaigns
Provides ability to integrate and submit data to the campaigns database table.

Create Letter

Create a new letter and specify a letter template.

Full API Reference

Letter Versions

Full API Reference

Endpoints related to the letters uploaded per campaign into Lob.

Query Result
GET /api/letter_versions/:campaignId Provides ability to retrieve data from letter_versions database based on the associated campaignId path parameter. For example, display_letter uses it to return a Lob HTML object.
⚠️ NOT YET IMPLEMENTED!
GET /api/letter_versions/???
Returns a single Letter object based on some parameter.
⚠️ NOT YET IMPLEMENTED!
POST /api/letter_versions/???
Provides ability to integrate and submit data to the letter_versions database table.

Letter templates

Full API Reference

Accessing a letter template used in a campaign.

⚠️ The previous syntax (GET /api/lob/:templateId) has been deprecated and is no longer valid.

Query Result
GET /api/lob/templates/:templateId Returns a single Letter Template object for a campaign based on templateId path parameter.

Representatives

Full API Reference

Endpoints to retrieve public information about government representatives via the Cicero API.

⚠️ The previous syntax (GET /api/representatives/:zipCode) relates to the Google Civic API, which is no longer being used. The Cicero API is now used for legislative district matching.

Query Result
GET /api/official?search_postal={{postal_code}}&search_country={{2_character_country_code}}&key={{api_key}} Returns list of JSON objects with Representative information for the provided country and Zip code query parameters.

Volunteers

⚠️ NOT YET IMPLEMENTED! Endpoints related to constituents/volunteers.

Query Result
⚠️ NOT YET IMPLEMENTED!
GET /api/volunteers/:volunteerId
Returns a single Volunteer object based on the volunteerId path parameter.
⚠️ NOT YET IMPLEMENTED!
POST /api/volunteers/???
Provides ability to integrate and submit data to the volunteers database table.
Clone this wiki locally