Created
September 17, 2015 14:28
-
-
Save jonstorer/08e02991a3e3c3d9c834 to your computer and use it in GitHub Desktop.
Proposed API Endpoints
This file contains hidden or 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
// MyStats | |
// /v1/comissions?created_at[gte]=Date&created_at[lt]=Date | |
[ | |
{ }, { } | |
] | |
// /v1/comission_summary?created_at[gte]=Date&created_at[lt]=Date | |
// HTTP Status 200 / OK | |
{ | |
"pcpoints": "13.00", | |
"pcretention": "86.2155%", | |
"locations": [ { | |
"name": "US", | |
"cashAccrued": "13.54", | |
"lastPaidAmount": "2790.58", | |
"lastPaidDate": "7-9-2015", | |
"twelveMonthPaidAmount" : "2790.58", | |
}, { | |
"name": "CA", | |
"cashAccrued": "13.54", | |
"lastPaidAmount": "2790.58", | |
"lastPaidDate": "7-9-2015", | |
"twelveMonthPaidAmount" : "2790.58", | |
} ] | |
} | |
// received updates from the api | |
// order by created_at descending | |
// paginate | |
// /v1/notifications?[page=1&][per_page=25] | |
[ | |
{ | |
"id" : 1, | |
"type": "Self", | |
"fullName": "Rick Grimes", | |
"string": "Prmoted to Director on June 6", | |
"emailAddress": "[email protected]", | |
"phoneNumber": "8168066080", | |
"prmotionData" : "June-1st" | |
}, { | |
"id" : 36, | |
"type": "Organization", | |
"fullName": "Ashley Smith", | |
"string": "Prmoted to Assocaite on May 26", | |
"emailAddress": "[email protected]", | |
"phoneNumber": "8168066080", | |
"prmotionData": "May-26" | |
} | |
] | |
// seems as though the units should be yearly|monthly|weekly|quarterly | |
// /v1/my/performance_club_summaries[?unit=monthly] | |
[ | |
{ | |
"period_start": "2015-01-01T05:00:00.000Z" | |
"period_end": "2015-01-31T23:59:59.000Z", | |
"recruits" : "1", | |
"counters" : "2" | |
}, { | |
"period_start": "2015-02-01T05:00:00.000Z" | |
"period_end": "2015-02-28T23:59:59.000Z", | |
"recruits" : "1", | |
"counters" : "2", | |
}, { | |
"period_start": "2015-03-01T05:00:00.000Z" | |
"period_end": "2015-03-31T:59:59.000Z", | |
"recruits" : "1", | |
"counters" : "2", | |
} | |
] | |
// /v1/org/performance_club_summaries[?unit=monthly] | |
[ | |
{ | |
"period_start": "2015-01-01T05:00:00.000Z" | |
"period_end": "2015-01-31T23:59:59.000Z", | |
"recruits" : "1", | |
"counters" : "2" | |
}, { | |
"period_start": "2015-02-01T05:00:00.000Z" | |
"period_end": "2015-02-28T23:59:59.000Z", | |
"recruits" : "1", | |
"counters" : "2", | |
}, { | |
"period_start": "2015-03-01T05:00:00.000Z" | |
"period_end": "2015-03-31T:59:59.000Z", | |
"recruits" : "1", | |
"counters" : "2", | |
} | |
] | |
// About Me | |
// /v1/me | |
{ | |
"id" : 1, | |
"fullName": "Hershel Greene", | |
"title": "Associate", | |
"fullTitle": "Independent Associate", | |
"photoURL": "https://passport.vml.com/sites/default/files/styles/large/public/user-photo/OS0C4926.jpg", | |
"siteURL": "https://www.legalshield.com", | |
"members": 12, | |
"recruits": 5, | |
"createdAt": Date, | |
"updatedAt": Date, | |
"titleLastUpdate": 924825600 | |
} | |
// MyWhy | |
// I don't know what this is | |
{ | |
"result": "success", | |
"errorMessage": "", | |
"myWhy" : "Becasue I like to do LegalShield things.", | |
"lastUpdate" : 924825600 | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment