- If you would like to test the communication feature to send an email, fill in
sender_email
andsender_password
environment variables indocker-compose.yml
. - The email needs to be a valid gmail. Ensure this account setting is set to ALLOW
docker-compose up
This will instantiate a local postgres db with sample data and run a flask server on port 5000 .
Base API prefix: /chronicle
- Users
- GET /users, /users/{userId}
- POST /users. Sample payload:
{ "firstName": "Greatest", "lastName": "Ever", "email": "[email protected]", "phone": "4128004543", "companyId": 1, "accountId": 1234563349, "groupId": 1 }
- Groups
- GET /groups, /groups/{groupId}
- POST /groups. Sample payload:
{ "description": "The main target demographic of Company 1", "companyId": 1 }
- Messages
- GET /messages, /messages/{messageId}
- POST /messages. Sample payload:
{ "message": "The main target demographic of Company 1", "companyId": 1, "groupId": 1, "channelType": "EMAIL" }
- PUT /messages. Sample payload:
{ "messageId": 1, "message": "Hi :first_name,\n\nThis is a test email to remind you your minimum payment is due for :account_id by tomorrow.\n\n- Chronicle", "companyId": 1, "groupId": 1, "channelType": "EMAIL", "active": true }
- Communication - to send specified message to users of the specified group via email
- POST /communication. Sample payload:
{ "messageId": 1, "companyId": 1, "groupId": 1, "channelType": "EMAIL" }
- POST /communication. Sample payload: