Skip to content
Aaron Schachter edited this page Jan 11, 2018 · 4 revisions

The Gambit Campaigns POST /receive-message endpoint integrates with the Rogue API v2 to get and create User Campaign activity:

Get a Signup

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.

Create a Signup

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.

Create a Post

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.

Clone this wiki locally