-
Notifications
You must be signed in to change notification settings - Fork 63
Campaigns API Endpoints
Manisha Priyadarshini edited this page Mar 22, 2022
·
2 revisions
These APIs access information in the campaigns
table within database.
/api/campaigns/:campaignId
Example query: https://murmuring-headland-63935.herokuapp.com/api/campaigns/4
A JSON object with information for a single, specific campaign identified by id
.
Example return object:
{
"campaign": {
"id": 1,
"organization": "M4BL",
"name": "The Breath Act",
"cause": "Civic Rights",
"type": "Grant",
"page_url": "www.thebreatheact.org",
"letters_sent": 0
}
}
GET /api/campaigns
Example query: https://murmuring-headland-63935.herokuapp.com/api/campaigns
An array of JSON objects with information for each campaign in the campaigns
table.
Example return object:
{
"Campaigns": [
{
"id": 1,
"organization": "M4BL",
"name": "The Breath Act",
"cause": "Civic Rights",
"type": "Grant",
"page_url": "www.thebreatheact.org",
"letters_sent": 0
},
{
"id": 2,
"organization": "AAAJ",
"name": "AAAJ",
"cause": "Education",
"type": "Accelerator",
"page_url": "www.aaaj.org",
"letters_sent": 0
}
]
}
POST /api/campaigns
- Home
- App Logic
- App Structure
- Getting Started
- Local Environment Setup
- Interacting with the Development Database
- User Background
- Features
- Data Structures
- API Quick Reference
- Single Campaign Mode (Beta)
- Front-end
- Components
- Pages
- State Management
- Amplify API reference (Database)
- Lob Mailing API integration
- Auth0 API Integration
- Stripe API integration
- Cicero API Integration
- Twilio API Integration