Skip to content

Instantly share code, notes, and snippets.

@seanrucker
Last active August 29, 2015 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save seanrucker/5acd3be1f27b158aab3d to your computer and use it in GitHub Desktop.
Save seanrucker/5acd3be1f27b158aab3d to your computer and use it in GitHub Desktop.
## Create A Visit
`POST /visits`
````javascript
{
uuid: "ABC123",
majorNumber: "12984",
customer: {
customerID: "800000516109",
name: "Sean",
email: "srucker@gmail.com",
attributes: {
gender: "male"
}
},
device: "iPhone 5S",
operatingSystem: "iOS",
operatingSystemVersion: "8.1",
version: "0.24.1"
}
````
## Enter Location
`POST /visits/:id/events`
````javascript
{
object: "location",
action: "enter",
timestamp: "2015-01-08"
}
````
## Exit Location
POST /visits/:id/events
{
object: "location",
action: "exit",
timestamp: "2015-01-08"
}
## Enter Touchpoint
POST /visits/:id/events
{
object: "touchpoint",
action: "enter",
timestamp: "2015-01-08",
touchpoint: "ab123"
}
## Exit Touchpoint
POST /visits/:id/events
{
object: "touchpoint",
action: "exit",
timestamp: "2015-01-08",
touchpoint: "ab123"
}
## Open app while visiting a Touchpoint
POST /visits/:id/events
{
object: "touchpoint",
action: "open",
timestamp: "2015-01-08",
touchpoint: "ab123"
}
## View a Card
POST /visits/:id/events
{
object: "card",
action: "view",
timestamp: "2015-01-08",
card: "abc123"
}
## Click a link in a Card
POST /visits/:id/events
{
object: "card",
action: "click",
timestamp: "2015-01-08",
card: "abc123",
url: "rover://view?id=def456"
}
## Save a card
POST /visits/:id/events
{
object: "card",
action: "save",
timestamp: "2015-01-08",
card: "abc123"
}
## Discard a card
POST /visits/:id/events
{
object: "card",
action: "discard",
timestamp: "2015-01-08",
card: "abc123"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment