Skip to content
This repository has been archived by the owner on Feb 23, 2022. It is now read-only.
JaymeP edited this page Feb 10, 2022 · 26 revisions

Documentation for the Back End Resources for Amplify

API Reference and Usage

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

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.

Letter Versions

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.
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.
⚠️ NOT YET IMPLEMENTED! ⚠️

Lob

API Reference

Endpoints to validate constituent/volunteer residential addresses and send physical letters/postcards via the Lob API.

Query Result
GET /api/lob/templates/:templateId Returns a single Letter Template object for a campaign based on templateId path parameter.
⚠️ Deprecated former URL: GET /api/lob/:templateId ⚠️
POST /api/lob/addressVerification Verifies if a single Address object is considered a valid, deliverable, residential address within the United Status.
Expected POST body example:
{"line1":"123 Street Name","line2":null,"city":"SomeCity","state":"CA","zip":"12345-6789"}

Representatives

API Reference

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

Query Result
GET /api/representatives/:zipCode Returns list of Representatives based on zipCode path parameter.

Volunteers

API Reference

Endpoints related to constituents/volunteers.

Query Result
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.
⚠️ NOT YET IMPLEMENTED! ⚠️