GithubHelp home page GithubHelp logo

chase360's Introduction

Chase 360

Overview

The Base URL is: http://chase360.herokuapp.com/

Login

The URL is POST {BASE_URL}/verify.json

Request

post :verify, { email: "[email protected]" }

Response

{
    "user_id": 980190962,
    "user_email": "[email protected]",
    "user_role": "manager",
    "message": "You are logged in",
    "status": "success"
    "setup": true
}

Setting up a Profile

The URL is POST {BASE_URL}/users/{:id}.json

Request

post { name: "Trevor Kimenye", company_id: 1, phone_number: "254722876889", department_id: 1, id: 1, branch_id: 1, image: "" }

Response

{
    "id" : 980190962,
    "status" : "success"
}

Request Companies

Request

The Url is GET  {BASE_URL}/companies.json

Response

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"
            }
        ]
    }
]

Requesting a Single Company

Request

The Url is GET {BASE_URL}/companies/{:id}.json

E.g http://chase360.herokuapp.com/companies/2.json

Response

{
    "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": ""
        }
    ]
}

Departments

Request

The Url is GET {BASE_URL}/departments.json

Response

Submitting a Lead

Request

The Url is POST {BASE_URL}/leads.json

params { name, email, phone_number, submitted_by_id, product_id, branch_id, note, assigned_to_id }

Response

{
    "id": 1
}

Closing a lead

Request

The Url is POST {BASE_URL}/leads.json

params { id }

Response

{
    "id": 1
}

Feed

You can get a feed of recent activity for a user

Request

The URL is GET {BASE_URL}/users/{id}/feed.json

Response

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"
    }
  ]
}

Getting the Relationship Officers for a company

You can the ROs who are capable to be assigned a lead

Request

The URL is GET {BASE_URL}/company/{id}/users.json

Response

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
      }
   ]
}

Retrieving Leads

You can get a listing of all the leads currently saved

Request

The URL is GET {BASE_URL}/leads.json

params { submitted_by_id }

Response

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"
    }
]

Push Notifications

The following push notifications can be sent from the application

Miles Received

This is sent whenever a user performs an action that earns them miles.

Title
```
    You have been awarded 30 Miles.
```
Json
{   
    "reason": "Installing 360 Me",
    "user_id": 3,
    "miles":30,
    "total_miles": 30,
    "notification_type": "MilesAwarded"
}

Lead Assigned

This is sent whenever a user is assigned a lead

Title
```
    You have been assigned a lead.
```
Json
{
    "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"
} 

OAuth

Uses Google Developer console for OAuth

chase360's People

Contributors

anyangocynthia avatar kimenye avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.