-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Alexander Simmerl
committed
Mar 28, 2017
1 parent
b8e4ee4
commit 3abd66b
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Invite flow | ||
|
||
To enable a better on-boarding experience we need a way to correlate users and their inviter. One way is to keep a list of invites of a user that stores a unique id (e.g. facebook id, or generate random identifier) which can be kept through until the invitee hits the signup. If the invitee signs up and the conenction to the inviter is preserved we can automatically create connections for those so they can hit the ground running. | ||
|
||
### API | ||
|
||
To create an invite from the current user the following endpoint should be called. The key and value are entirely up to the caller to decide, but must match one of the key/value pairs in the [`social_ids`](https://github.com/tapglue/snaas/wiki/the-user-object#social-ids) of the invitee during signup. Given the Facebook id of the invitee is known: | ||
|
||
``` | ||
> POST /me/invites | ||
{ | ||
"facebook": "1234" | ||
} | ||
< 204 No Content | ||
``` | ||
|
||
Then during singup the same information should be provvided for the user. | ||
|
||
``` | ||
> POST /users?invite-connections=true | ||
{ | ||
... | ||
"social_ids": { | ||
"facebook": "1234" | ||
} | ||
... | ||
} | ||
``` |