Data Service
Notifications Data Service exists at: https://github.com/joinhandshake/notifications/tree/main/services/data
Test Curl Commands
# GET notifications/{notification_id}
curl -s -v \
-H "Authorization: Bearer apitoken" \
-H "Content-Type: application/json" \
http://localhost:5551/v1/notifications/{notification_id} | jq
# GET notifications/email/{email_notification_id}
curl -s -v \
-H "Authorization: Bearer apitoken" \
-H "Content-Type: application/json" \
http://localhost:5551/v1/notifications/email/{email_notification_id} | jq
# GET notifications/in-app/{in_app_notification_id}
curl -s -v \
-H "Authorization: Bearer apitoken" \
-H "Content-Type: application/json" \
http://localhost:5551/v1/notifications/in-app/{in_app_notification_id} | jq
# POST notifications
curl -s -v \
-X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer apitoken" \
-d '{"notification_name":"approve_event", "notification_version":"1", "user_id":125, "attributes": {"event_id":12345}}' \
http://localhost:5551/v1/notifications | jq
# POST notifications/email
# Required: notification_id from parent notification
curl -s -v \
-X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer apitoken" \
-H "X-Idempotency-Id: edd54e5e-0c22-4b28-b896-9919a2296e32" \
-d '{"notification_id":"bb14948c-0b33-40f1-ba37-3c3d2539de7b", "sending_platform":"mailgun", "email_address":"user125@joinhandshake.com"}' \
http://localhost:5551/v1/notifications/email | jq
# POST notifications/email/batch
# Note: create a parent notification first to get the notification_id
curl -s -v \
-X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer apitoken" \
-H "X-Idempotency-Id: edd54e5e-0c22-4b28-b896-9919a2296e32" \
-d '{ "email_notifications": [{"notification_id":"95daf493-54ed-4a5a-9fe2-eac635ebab5d", "sending_platform":"mailgun", "email_address":"user125@joinhandshake.com"},{"notification_id":"ce003f90-083d-448c-91c3-5f875ca00006", "sending_platform":"mailgun", "email_address":"user125@joinhandshake.com"}]}' \
http://localhost:5551/v1/notifications/email/batch | jq