locate-api

1.0.3 • Public • Published

LOC8 API

This is an api wrapper that connects to the LOC8 inventory management platform. It currently handles the following requests:

1. Authentication

You use the authentication module to handle login and registration requests

Login request

Attempt to login a user using an id number and a password. If the login request is successful it will return a session variable that can be used to manage the user's session.

Locate = require('locate-api')({ apiKey: 'AAABBBZZZ', mode: 'production' });
authenticate = Locate.AUTHENTICATE;
 
let options = {
  id_number: "",
  password: ""
};  
authenticate.loginUser(options)
  .then(function(response) {
    // Handle login
  })
  .catch(function(error) {
    throw error;
  });

Registration requests

Attempt to register a user. If the registration request is successful it will return a session variable that can be used to manage the user's session.

Locate = require('locate-api')({ apiKey: 'AAABBBZZZ', mode: 'production' });
authenticate = Locate.AUTHENTICATE;
 
let options = {
  first_name: "",
  last_name: "",
  other_names: "",
  id_number: "",
  id_type: "",
  msisdn: "",
  email: "",
  password: "",
  dob: "",
  gender: "",
};  
authenticate.registerUser(options)
  .then(function(response) {
    // Handle registration
  })
  .catch(function(error) {
    throw error;
  });

2. Merchant

You use the merchant module to handle the onboarding and update of a merchant

Register request

Attempt to register a new merchant. If the request is successful it returns a status ok and the merchant details

List request

Attempt to register a new merchant. If the request is successful it returns a status ok and the merchant details

Get request

Attempt to register a new merchant. If the request is successful it returns a status ok and the merchant details

Update request

Attempt to register a new merchant. If the request is successful it returns a status ok and the merchant details

Delete request

Attempt to register a new merchant. If the request is successful it returns a status ok and the merchant details

3. Node

4. Product

5. Inventory

Package Sidebar

Install

npm i locate-api

Weekly Downloads

1

Version

1.0.3

License

ISC

Unpacked Size

55.3 kB

Total Files

16

Last publish

Collaborators

  • thomasjgx