Introduction
Welcome to the LeadPages Experience API documentation. The experience api was created to help collect and manage a user's journey through the various leadpages projects avaiable. It does this by assigning and storing contextual information (in the form of milestones) about a user. A user's journey through the appliation would look like a series of milestones that they would need to accomplish. This data can then be used to display messages, send emails (via a 2nd party), or somehow congratulate the user on a goal that has been set and accomplished.
This API adheres to the LeadPages HTTP API Standards document.
Endpoints
/experience/v1
Ping
/experience/v1/ping
A no-op endpoint that can be used to check what the currently-deployed version of the API is.
http GET http://dockerhost:8011/integration/v1/ping
{
"_meta": {
"_version": "0.1.0"
},
"_status": {
"code": 200
}
}
Request
GET /experience/v1/ping
| Body | |
|---|---|
| Empty | |
Response
| Body | |
|---|---|
_meta._version |
StringThe current internal version number of the API. |
_meta |
Dictionary |
| Responses | |
|---|---|
200 OK |
|
| Errors | |
|---|---|
| Empty | |
Experiences
/experience/v1/experiences
A endpoint for managing data to help track and contextualize a customers experiences in app. Experiences are the representation of a customer that will contain mostly meta data about the customer's current journey.
Request
GET /experience/v1/experiences
Get all of the customer experience object
| Body | |
|---|---|
| Empty | |
| Query string | |
|---|---|
limit |
Regexp?(\d+)The maximum number of items to return in the response. |
cursor |
String?A string representing where a previous request "left off" |
Response
| Body | |
|---|---|
_meta |
ListingMetaMeta information about the response. |
_items |
List[Experience] |
| Responses | |
|---|---|
200 OK |
|
| Errors | |
|---|---|
404 Not Found |
unknown message |
Request
POST /experience/v1/experiences
Add a new customer experience representation
| Body | |
|---|---|
name |
String?Full name of the user |
signupDate |
DateTimeDate that the user signed up |
cancelDate |
DateTime?Date that the user canceled |
accountId |
StringUser's account id |
optins |
Integer?Total number of optins an experience has across all mediums |
recommendedTemplatesTag |
String?Tag that is used to surface recommended templates on templates listing |
email |
Email?Users Leadpages email address, needed to map user to Drip data |
leadpagesApiKey |
String?Api key created on Leadpages account granting access to other leadpages services |
recommendedTemplateIds |
String?Recommended template ids for user |
Response
| Body | |
|---|---|
_meta |
MetaMeta information about the resource. |
name |
String?Full name of the user |
signupDate |
DateTimeDate that the user signed up |
cancelDate |
DateTime?Date that the user canceled |
accountId |
StringUser's account id |
optins |
Integer?Total number of optins an experience has across all mediums |
recommendedTemplatesTag |
String?Tag that is used to surface recommended templates on templates listing |
email |
Email?Users Leadpages email address, needed to map user to Drip data |
leadpagesApiKey |
String?Api key created on Leadpages account granting access to other leadpages services |
recommendedTemplateIds |
String?Recommended template ids for user |
| Responses | |
|---|---|
200 OK |
|
201 Created |
|
| Errors | |
|---|---|
| Empty | |
Experience
/experience/v1/experiences/{uuid}
Request
GET /experience/v1/experiences/{uuid}
Get a specific customer experience. The experience can also be expanded to contain all of the milestones related to the experience
| Body | |
|---|---|
| Empty | |
Response
| Body | |
|---|---|
_meta |
MetaMeta information about the resource. |
name |
String?Full name of the user |
signupDate |
DateTimeDate that the user signed up |
cancelDate |
DateTime?Date that the user canceled |
accountId |
StringUser's account id |
optins |
Integer?Total number of optins an experience has across all mediums |
recommendedTemplatesTag |
String?Tag that is used to surface recommended templates on templates listing |
email |
Email?Users Leadpages email address, needed to map user to Drip data |
leadpagesApiKey |
String?Api key created on Leadpages account granting access to other leadpages services |
recommendedTemplateIds |
String?Recommended template ids for user |
| Responses | |
|---|---|
200 OK |
|
| Errors | |
|---|---|
400 Bad Request |
unknown message |
404 Not Found |
experience '{}' not found |
Request
PUT /experience/v1/experiences/{uuid}
Replace existing customer experience
| Body | |
|---|---|
name |
String?Full name of the user |
signupDate |
DateTimeDate that the user signed up |
cancelDate |
DateTime?Date that the user canceled |
accountId |
StringUser's account id |
optins |
Integer?Total number of optins an experience has across all mediums |
recommendedTemplatesTag |
String?Tag that is used to surface recommended templates on templates listing |
email |
Email?Users Leadpages email address, needed to map user to Drip data |
leadpagesApiKey |
String?Api key created on Leadpages account granting access to other leadpages services |
recommendedTemplateIds |
String?Recommended template ids for user |
Response
| Body | |
|---|---|
_meta |
MetaMeta information about the resource. |
name |
String?Full name of the user |
signupDate |
DateTimeDate that the user signed up |
cancelDate |
DateTime?Date that the user canceled |
accountId |
StringUser's account id |
optins |
Integer?Total number of optins an experience has across all mediums |
recommendedTemplatesTag |
String?Tag that is used to surface recommended templates on templates listing |
email |
Email?Users Leadpages email address, needed to map user to Drip data |
leadpagesApiKey |
String?Api key created on Leadpages account granting access to other leadpages services |
recommendedTemplateIds |
String?Recommended template ids for user |
| Responses | |
|---|---|
200 OK |
|
| Errors | |
|---|---|
400 Bad Request |
unknown message |
404 Not Found |
experience '{}' not found |
Request
DELETE /experience/v1/experiences/{uuid}
Remove existing customer experience. Note this is a soft delete, and items can be restored
| Body | |
|---|---|
| Empty | |
Response
| Body | |
|---|---|
| Empty | |
| Responses | |
|---|---|
204 No Content |
|
| Errors | |
|---|---|
400 Bad Request |
unknown message |
404 Not Found |
experience '{}' not found |
Milestonetemplates
/experience/v1/milestonetemplates
Endpoint to handle creating milestone templates, that will be used to track the user's progress through the application. A copy of the milestone template's fields will be copied into the milestones list when assigning a template to a user. These templates offer a way for partners external to engineering to setup templates that can then be assigned to a user.
Request
GET /experience/v1/milestonetemplates
Enumerate over Milestone Templates
| Body | |
|---|---|
| Empty | |
| Query string | |
|---|---|
limit |
Regexp?(\d+)The maximum number of items to return in the response. |
cursor |
String?A string representing where a previous request "left off" |
Response
| Body | |
|---|---|
_meta |
ListingMetaMeta information about the response. |
_items |
List[MilestoneTemplate] |
| Responses | |
|---|---|
200 OK |
|
| Errors | |
|---|---|
| Empty | |
Request
POST /experience/v1/milestonetemplates
Add a new Milestone Template
| Body | |
|---|---|
name |
StringName of milestone |
description |
StringDescription of milestone |
completionTrigger |
Enum('event', 'optin')Type of trigger that will complete milestones based off this template |
completionValue |
String?Value that is checked to ensure proper completion of milestone. Optin triggered milestones should a number |
Response
| Body | |
|---|---|
_meta |
MetaMeta information about the resource. |
name |
StringName of milestone |
description |
StringDescription of milestone |
completionTrigger |
Enum('event', 'optin')Type of trigger that will complete milestones based off this template |
completionValue |
String?Value that is checked to ensure proper completion of milestone. Optin triggered milestones should a number |
| Responses | |
|---|---|
201 Created |
|
| Errors | |
|---|---|
| Empty | |
Milestonetemplate
/experience/v1/milestonetemplates/{uuid}
Request
GET /experience/v1/milestonetemplates/{uuid}
Get a specific Milestone Template
| Body | |
|---|---|
| Empty | |
Response
| Body | |
|---|---|
_meta |
MetaMeta information about the resource. |
name |
StringName of milestone |
description |
StringDescription of milestone |
completionTrigger |
Enum('event', 'optin')Type of trigger that will complete milestones based off this template |
completionValue |
String?Value that is checked to ensure proper completion of milestone. Optin triggered milestones should a number |
| Responses | |
|---|---|
200 OK |
|
| Errors | |
|---|---|
400 Bad Request |
unknown message |
404 Not Found |
milestone template '{}' not found |
Request
PUT /experience/v1/milestonetemplates/{uuid}
Replace existing milestone
| Body | |
|---|---|
name |
StringName of milestone |
description |
StringDescription of milestone |
completionTrigger |
Enum('event', 'optin')Type of trigger that will complete milestones based off this template |
completionValue |
String?Value that is checked to ensure proper completion of milestone. Optin triggered milestones should a number |
Response
| Body | |
|---|---|
_meta |
MetaMeta information about the resource. |
name |
StringName of milestone |
description |
StringDescription of milestone |
completionTrigger |
Enum('event', 'optin')Type of trigger that will complete milestones based off this template |
completionValue |
String?Value that is checked to ensure proper completion of milestone. Optin triggered milestones should a number |
| Responses | |
|---|---|
200 OK |
|
| Errors | |
|---|---|
400 Bad Request |
unknown message |
404 Not Found |
milestone template '{}' not found |
Request
DELETE /experience/v1/milestonetemplates/{uuid}
Remove existing milestone. Note this is a soft delete, and items can be restored
| Body | |
|---|---|
| Empty | |
Response
| Body | |
|---|---|
| Empty | |
| Responses | |
|---|---|
204 No Content |
|
| Errors | |
|---|---|
400 Bad Request |
unknown message |
404 Not Found |
milestone template '{}' not found |
Milestones
/experience/v1/milestones
A endpoint assign milestones to a specific customer experience. This is a composite model between experience and milestone templates. This endpoint will manage the progress, from the initial assignment of the milestone template to a user, all the way to marking a milestone completed. This endopint will allow an interested party to determine the status of milestone templates completion rate as well as which milestones have been assigned to what user.
Request
GET /experience/v1/milestones
Enumerate over milestones
| Body | |
|---|---|
| Empty | |
| Query string | |
|---|---|
limit |
Regexp?(\d+)The maximum number of items to return in the response. |
cursor |
String?A string representing where a previous request "left off" |
experienceId |
String?Id of the experience to search for |
milestoneId |
String?Id of the milestone template to search for |
Response
| Body | |
|---|---|
_meta |
ListingMetaMeta information about the response. |
_items |
List[Milestone] |
| Responses | |
|---|---|
200 OK |
|
| Errors | |
|---|---|
| Empty | |
Request
POST /experience/v1/milestones
Create a new Milestone (Note: Start date is created once the milestone has been assigned)
| Body | |
|---|---|
experienceId |
StringId of referenced experience entity |
milestoneId |
StringId of referenced milestone entity |
name |
StringMilestone name from Milestone template |
isCompleted |
Boolean?Flag to send through patch call to mark milestone as completed |
completedDate |
DateTime?Date that user completed the experience item |
haveShownCompletedModal |
Boolean?The user has seen a prompt that they completed this milestone |
havePushedToBigQuery |
Boolean?Milestone completion has been pushed to big query |
Response
| Body | |
|---|---|
_meta |
MetaMeta information about the resource. |
experienceId |
StringId of referenced experience entity |
milestoneId |
StringId of referenced milestone entity |
name |
StringMilestone name from Milestone template |
isCompleted |
Boolean?Flag to send through patch call to mark milestone as completed |
completedDate |
DateTime?Date that user completed the experience item |
haveShownCompletedModal |
Boolean?The user has seen a prompt that they completed this milestone |
havePushedToBigQuery |
Boolean?Milestone completion has been pushed to big query |
startDate |
DateTimeDate that user started the experience item |
| Responses | |
|---|---|
201 Created |
|
| Errors | |
|---|---|
404 Not Found |
milestone from template id '{}' already exists |
Milestone
/experience/v1/milestones/{uuid}
A endpoint for getting and updating Milestone to Experience relationships
Request
GET /experience/v1/milestones/{uuid}
Get a specific milestone
| Body | |
|---|---|
| Empty | |
Response
| Body | |
|---|---|
_meta |
MetaMeta information about the resource. |
experienceId |
StringId of referenced experience entity |
milestoneId |
StringId of referenced milestone entity |
name |
StringMilestone name from Milestone template |
isCompleted |
Boolean?Flag to send through patch call to mark milestone as completed |
completedDate |
DateTime?Date that user completed the experience item |
haveShownCompletedModal |
Boolean?The user has seen a prompt that they completed this milestone |
havePushedToBigQuery |
Boolean?Milestone completion has been pushed to big query |
startDate |
DateTimeDate that user started the experience item |
| Responses | |
|---|---|
200 OK |
|
| Errors | |
|---|---|
400 Bad Request |
unknown message |
404 Not Found |
milestone '{}' not found |
Request
PATCH /experience/v1/milestones/{uuid}
Mark an existing milestone as completed
| Body | |
|---|---|
isCompleted |
Boolean?Flag to send through patch call to mark milestone as completed |
haveShownCompletedModal |
Boolean?The user has seen a prompt that they completed this milestone |
havePushedToBigQuery |
Boolean?Milestone completion has been pushed to big query |
Response
| Body | |
|---|---|
_meta |
MetaMeta information about the resource. |
experienceId |
StringId of referenced experience entity |
milestoneId |
StringId of referenced milestone entity |
name |
StringMilestone name from Milestone template |
isCompleted |
Boolean?Flag to send through patch call to mark milestone as completed |
completedDate |
DateTime?Date that user completed the experience item |
haveShownCompletedModal |
Boolean?The user has seen a prompt that they completed this milestone |
havePushedToBigQuery |
Boolean?Milestone completion has been pushed to big query |
startDate |
DateTimeDate that user started the experience item |
| Responses | |
|---|---|
200 OK |
|
| Errors | |
|---|---|
400 Bad Request |
unknown message |
404 Not Found |
milestone '{}' not found |
Request
DELETE /experience/v1/milestones/{uuid}
Remove existing milestone. Note this is a soft delete, and items can be restored
| Body | |
|---|---|
| Empty | |
Response
| Body | |
|---|---|
| Empty | |
| Responses | |
|---|---|
204 No Content |
|
| Errors | |
|---|---|
400 Bad Request |
unknown message |
404 Not Found |
milestone '{}' not found |
Recommendedtemplates
/experience/v1/recommendedtemplates
A simple endpoint to request a listing of a users recommended templates to display in various areas of the main app.
Request
GET /experience/v1/recommendedtemplates
Returns recommended template objects
| Body | |
|---|---|
| Empty | |
| Query string | |
|---|---|
limit |
Regexp?(\d+)The maximum number of items to return in the response. |
cursor |
String?A string representing where a previous request "left off" |
experienceId |
String?Id of the experience to search for |
milestoneId |
String?Id of the milestone template to search for |
Response
| Body | |
|---|---|
_meta |
MetaMeta information about the resource. |
recommendedTemplateTag |
Enum('generate_leads', 'engage_audience', 'sell_product_or_service', 'new_site', 'create_landing', 'sell_product_service', 'promote_webinars_live', 'capture_email_list', 'health-fitness', 'none_above')Recommended template string assigned to user on experience |
| Responses | |
|---|---|
200 OK |
|
| Errors | |
|---|---|
| Empty | |
Definitions
Meta
| Meta | |
|---|---|
id |
StringThe resource's unique identifier. |
uri |
StringThe resource's absolute URI. |
created |
DateTimeWhen the resource was created. |
updated |
DateTimeWhen the resource was last updated. |
ListingMeta
| ListingMeta | |
|---|---|
limit |
IntegerThe requested limit on the number of items. |
total |
Integer?The number of items in the database. |
count |
IntegerThe total number of items in the response. |
cursor |
String?This is used in conjunction with limit to paginate through lists of items. |
Experience
| Experience | |
|---|---|
_meta |
MetaMeta information about the resource. |
name |
String?Full name of the user |
signupDate |
DateTimeDate that the user signed up |
cancelDate |
DateTime?Date that the user canceled |
accountId |
StringUser's account id |
optins |
Integer?Total number of optins an experience has across all mediums |
recommendedTemplatesTag |
String?Tag that is used to surface recommended templates on templates listing |
email |
Email?Users Leadpages email address, needed to map user to Drip data |
leadpagesApiKey |
String?Api key created on Leadpages account granting access to other leadpages services |
recommendedTemplateIds |
String?Recommended template ids for user |
MilestoneTemplate
| MilestoneTemplate | |
|---|---|
_meta |
MetaMeta information about the resource. |
name |
StringName of milestone |
description |
StringDescription of milestone |
completionTrigger |
Enum('event', 'optin')Type of trigger that will complete milestones based off this template |
completionValue |
String?Value that is checked to ensure proper completion of milestone. Optin triggered milestones should a number |
Milestone
| Milestone | |
|---|---|
_meta |
MetaMeta information about the resource. |
experienceId |
StringId of referenced experience entity |
milestoneId |
StringId of referenced milestone entity |
name |
StringMilestone name from Milestone template |
isCompleted |
Boolean?Flag to send through patch call to mark milestone as completed |
completedDate |
DateTime?Date that user completed the experience item |
haveShownCompletedModal |
Boolean?The user has seen a prompt that they completed this milestone |
havePushedToBigQuery |
Boolean?Milestone completion has been pushed to big query |
startDate |
DateTimeDate that user started the experience item |