-
Notifications
You must be signed in to change notification settings - Fork 5
Rogue
The Gambit Campaigns POST /receive-message
endpoint integrates with the Rogue API v2 to get and create User Campaign activity:
GET /activity?filter[northstar_id]=:userId&filter[campaign_run_id]=:campaignRunId
For each request, Gambit checks whether a Signup exists for the userId
and campaignRunId
body params passed.
The Signup's total_quantity_submitted
and reportback
properties are inspected via middleware to determine if User has completed the Campaign.
POST /signups
If a Signup doesn't exist, Gambit executes a POST /signups
request to create a new Signup, passing a source
, campaign_id
, campaign_run_id
and user_id
.
POST /posts
If this the User's first Post for their Signup, and it has a draft ReportbackSubmission with quantity
, photo
, caption
, and why_participated
properties set, Gambit executes a POST /posts
request to create a new Post.
If the User has already submitted a Post, the why_participated
is not passed, as Gambit doesn't ask for it a second time.