The Base URL is: http://chase360.herokuapp.com/
The URL is POST {BASE_URL}/verify.json
post :verify, { email: "[email protected]" }
{
"user_id": 980190962,
"user_email": "[email protected]",
"user_role": "manager",
"message": "You are logged in",
"status": "success"
"setup": true
}
The URL is POST {BASE_URL}/users/{:id}.json
post { name: "Trevor Kimenye", company_id: 1, phone_number: "254722876889", department_id: 1, id: 1, branch_id: 1, image: "" }
{
"id" : 980190962,
"status" : "success"
}
The Url is GET {BASE_URL}/companies.json
The response is an array of companies
[
{
"id": 1,
"name": "Chase Bank",
"description": "A cool bank",
"image_url": "/media/W1siZiIsIjIwMTQvMDYvMTcvMXNpc3",
"branches": [
{
"id": 2,
"name": "Wabera Street, Nairobi"
}
],
"products": [
{
"id": 1,
"name": "Savings account",
"description": "This is a simple savings account from chase bank",
"image_url": ""
}
],
"departments" : [
{
"id" : 1,
"name" : "Unit Trust"
}
]
}
]
The Url is GET {BASE_URL}/companies/{:id}.json
E.g http://chase360.herokuapp.com/companies/2.json
{
"id": 1,
"name": "Chase Bank",
"branches": [
{
"id": 2,
"name": "Wabera Street, Nairobi"
}
],
"products": [
{
"id": 1,
"name": "Savings account",
"description": "This is a simple savings account from chase bank",
"image_url": ""
}
]
}
The Url is GET {BASE_URL}/departments.json
The Url is POST {BASE_URL}/leads.json
params { name, email, phone_number, submitted_by_id, product_id, branch_id, note, assigned_to_id }
{
"id": 1
}
The Url is POST {BASE_URL}/leads.json
params { id }
{
"id": 1
}
You can get a feed of recent activity for a user
The URL is GET {BASE_URL}/users/{id}/feed.json
Returns a list of recently joined users(members) and leads assigned to that user
{
"leads" : [],
"id" : 1,
"members" : [
{
"id" : 2,
"image_url" : "http://localhost:3000",
"name" : "Trevor"
}
]
}
You can the ROs who are capable to be assigned a lead
The URL is GET {BASE_URL}/company/{id}/users.json
Returns a list of Relationship Officers for a company
{
"users":[
{
"role_id":"1",
"id":2,
"employeeID":null,
"email":"[email protected]",
"phone_number":"254712345544",
"backend_admin":null,
"created_at":"2015-07-13T12:19:15.370Z",
"updated_at":"2015-07-13T12:19:15.370Z",
"provider":null,
"uid":null,
"company_id":2,
"setup":true,
"name":"Test",
"image_uid":null,
"department_id":null,
"branch_id":null
}
]
}
You can get a listing of all the leads currently saved
The URL is GET {BASE_URL}/leads.json
params { submitted_by_id }
Depending on whether you have specifed a submitted_by_id you will get an array of all the leads in json
[
{
"id" : 1,
"product_id" : 1,
"branch_id": 1,
"submitted_by_id" : 1,
"status" : "New",
"email" : "[email protected]",
"phone_number" : "2541234567890"
}
]
The following push notifications can be sent from the application
This is sent whenever a user performs an action that earns them miles.
```
You have been awarded 30 Miles.
```
{
"reason": "Installing 360 Me",
"user_id": 3,
"miles":30,
"total_miles": 30,
"notification_type": "MilesAwarded"
}
This is sent whenever a user is assigned a lead
```
You have been assigned a lead.
```
{
"reason": "",
"user_id": 1,
"lead_id": 1,
"company_id", 2,
"product_id", 3,
"lead_name": "Trevor Kimenye",
"lead_email": "[email protected]",
"lead_phone_number": "254722200200",
"created_by_user_id": 2,
"created_by_user_name": "Super Referer",
"notification_type": "NewLead"
}
Uses Google Developer console for OAuth