BackEnd_Development

AppSetup/AppRole 7

Description

Overview: Company is the top level entity for SmartApp, any businesses data is consolidated max upto Company Level(Top Level).

API Usage: This API can be used to get list of companies using SmartApp.

Signature: // @desc Get all companies // @route GET /api/v1/companies // @access Public

Headers
KeyValueDescription
Content-Typeapplication/json

JSON

Description

Overview: Company is the top level entity for SmartApp, any businesses data is consolidated max upto Company Level(Top Level).

API Usage: This API can be used to get dedails of one company using SmartApp.

Signature: // @desc Get single company // @route GET /api/v1/companies/:id // @access Public

Headers
KeyValueDescription
Content-Typeapplication/json

JSON

Description

Overview: Apps are used for Business Transactions within SmartApp.

API Usage: This API can be used to create new App for SmartApp.

Signature: // @desc Create new app // @route POST /api/v1/apps // @access Private (Admin)

Headers
KeyValueDescription
Content-Typeapplication/json

JSON

AuthorizationBearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVlOWNjNjE4MmFiNmQ5OWEwN2Y1ZDEyNSIsImlhdCI6MTU4NzM5MDQ0NiwiZXhwIjoxNTg5OTgyNDQ2fQ.KQz0NfA6i1FiNuGYSI_pZnF_xeVIMFg79qpYu8hKX4E
Body
{ "appRole": "Manager", "icon": "sap-icon://incident", "inUse": true, "status":"New", "app":["SUPP00001", "SUPP00003"] }
Description

Overview: Company is the top level entity for SmartApp, any businesses data is consolidated max upto Company Level(Top Level).

API Usage: This API can be used to update a company.

Signature: // @desc Update company // @route PUT /api/v1/companies/:id // @access Private

Headers
KeyValueDescription
Content-Typeapplication/json

JSON

AuthorizationBearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVlOWNjNjE4MmFiNmQ5OWEwN2Y1ZDEyNSIsImlhdCI6MTU4NzM5MDQ0NiwiZXhwIjoxNTg5OTgyNDQ2fQ.KQz0NfA6i1FiNuGYSI_pZnF_xeVIMFg79qpYu8hKX4E
Body
{ "role":"Approver" }
Description

Overview: Company is the top level entity for SmartApp, any businesses data is consolidated max upto Company Level(Top Level).

API Usage: This API can be used to update a company.

Signature: // @desc Delete company // @route DELETE /api/v1/companies/:id // @access Private

Headers
KeyValueDescription
Content-Typeapplication/json

JSON

AuthorizationBearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVlOWNjNjE4MmFiNmQ5OWEwN2Y1ZDEyNSIsImlhdCI6MTU4NzM5MDQ0NiwiZXhwIjoxNTg5OTgyNDQ2fQ.KQz0NfA6i1FiNuGYSI_pZnF_xeVIMFg79qpYu8hKX4E
Body
KeyValueDescription
file
Description

Title: Upload photo for company

Overview: Company is the top level entity for SmartApp, any businesses data is consolidated max upto Company Level(Top Level).

API Usage: This API can be used to upload company phots and pics.

Signature: // @desc Upload photo for company // @route PUT /api/v1/companies/:id/photo // @access Private

Headers
KeyValueDescription
Content-Typeapplication/json

JSON

AuthorizationBearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVlOWNjNjE4MmFiNmQ5OWEwN2Y1ZDEyNSIsImlhdCI6MTU4NzM5MDQ0NiwiZXhwIjoxNTg5OTgyNDQ2fQ.KQz0NfA6i1FiNuGYSI_pZnF_xeVIMFg79qpYu8hKX4E
Body
KeyValueDescription
file
Description

Title: Upload documents for the company

Overview: Company is the top level entity for SmartApp, any businesses data is consolidated max upto Company Level(Top Level).

API Usage: This API can be used to upload company documents(PDF, Word, Excel, Text).

Signature: // @desc Upload documents for the company // @route PUT /api/v1/companies/:id/document // @access Private

Headers
KeyValueDescription
Content-Typeapplication/json

JSON

file

AppSetup/Apps 7

Description

Overview: Company is the top level entity for SmartApp, any businesses data is consolidated max upto Company Level(Top Level).

API Usage: This API can be used to get list of companies using SmartApp.

Signature: // @desc Get all companies // @route GET /api/v1/companies // @access Public

Headers
KeyValueDescription
Content-Typeapplication/json

JSON

Query
KeyValueDescription
limit5
page2
Description

Overview: Company is the top level entity for SmartApp, any businesses data is consolidated max upto Company Level(Top Level).

API Usage: This API can be used to get dedails of one company using SmartApp.

Signature: // @desc Get single company // @route GET /api/v1/companies/:id // @access Public

Headers
KeyValueDescription
Content-Typeapplication/json

JSON

Description

Overview: Apps are used for Business Transactions within SmartApp.

API Usage: This API can be used to create new App for SmartApp.

Signature: // @desc Create new app // @route POST /api/v1/apps // @access Private (Admin)

Headers
KeyValueDescription
Content-Typeapplication/json

JSON

AuthorizationBearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVlOWNjNjE4MmFiNmQ5OWEwN2Y1ZDEyNSIsImlhdCI6MTU4NzM5MDQ0NiwiZXhwIjoxNTg5OTgyNDQ2fQ.KQz0NfA6i1FiNuGYSI_pZnF_xeVIMFg79qpYu8hKX4E
Body
{ "applicationID": "SUPP00004", "descriptions":[ { "Language":"EN", "appDescription":"Supplier Invoice App", "area": "Purchasing", "module": "Supplier Self Service" } ], "dataStore": "mongoDB", "icon": "sap-icon://incident", "inUse": true, "status":"New" }
Description

Overview: Company is the top level entity for SmartApp, any businesses data is consolidated max upto Company Level(Top Level).

API Usage: This API can be used to update a company.

Signature: // @desc Update company // @route PUT /api/v1/companies/:id // @access Private

Headers
KeyValueDescription
Content-Typeapplication/json

JSON

AuthorizationBearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVlOWNjNjE4MmFiNmQ5OWEwN2Y1ZDEyNSIsImlhdCI6MTU4NzM5MDQ0NiwiZXhwIjoxNTg5OTgyNDQ2fQ.KQz0NfA6i1FiNuGYSI_pZnF_xeVIMFg79qpYu8hKX4E
Body
{ "area":"Enterprise-Purchasing" }
Description

Overview: Company is the top level entity for SmartApp, any businesses data is consolidated max upto Company Level(Top Level).

API Usage: This API can be used to update a company.

Signature: // @desc Delete company // @route DELETE /api/v1/companies/:id // @access Private

Headers
KeyValueDescription
Content-Typeapplication/json

JSON

AuthorizationBearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVlOWNjNjE4MmFiNmQ5OWEwN2Y1ZDEyNSIsImlhdCI6MTU4NzM5MDQ0NiwiZXhwIjoxNTg5OTgyNDQ2fQ.KQz0NfA6i1FiNuGYSI_pZnF_xeVIMFg79qpYu8hKX4E
Body
KeyValueDescription
file
Description

Title: Upload photo for company

Overview: Company is the top level entity for SmartApp, any businesses data is consolidated max upto Company Level(Top Level).

API Usage: This API can be used to upload company phots and pics.

Signature: // @desc Upload photo for company // @route PUT /api/v1/companies/:id/photo // @access Private

Headers
KeyValueDescription
Content-Typeapplication/json

JSON

AuthorizationBearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVlOWNjNjE4MmFiNmQ5OWEwN2Y1ZDEyNSIsImlhdCI6MTU4NzM5MDQ0NiwiZXhwIjoxNTg5OTgyNDQ2fQ.KQz0NfA6i1FiNuGYSI_pZnF_xeVIMFg79qpYu8hKX4E
Body
KeyValueDescription
file
Description

Title: Upload documents for the company

Overview: Company is the top level entity for SmartApp, any businesses data is consolidated max upto Company Level(Top Level).

API Usage: This API can be used to upload company documents(PDF, Word, Excel, Text).

Signature: // @desc Upload documents for the company // @route PUT /api/v1/companies/:id/document // @access Private

Headers
KeyValueDescription
Content-Typeapplication/json

JSON

file

AppSetup/Others 3

Description

/api/v1/appschema

Headers
KeyValueDescription
Content-Typeapplication/json

JSON

Body
{ "appID": "ERP00002", "schemaApp": "Employee" }
Description

/api/v1/appschema

Headers
KeyValueDescription
Content-Typeapplication/json

JSON

Description

Add Validation Rule

/api/v1/validationrule

Headers
KeyValueDescription
Content-Typeapplication/json

JSON

Body
{ "rule":"UKPOSTCODE_VALIDATION", "type":"regEx", "value":"xxx" }

AppSetup/Roles 7

Description

Overview: Company is the top level entity for SmartApp, any businesses data is consolidated max upto Company Level(Top Level).

API Usage: This API can be used to get list of companies using SmartApp.

Signature: // @desc Get all companies // @route GET /api/v1/companies // @access Public

Headers
KeyValueDescription
Content-Typeapplication/json

JSON

Description

Overview: Company is the top level entity for SmartApp, any businesses data is consolidated max upto Company Level(Top Level).

API Usage: This API can be used to get dedails of one company using SmartApp.

Signature: // @desc Get single company // @route GET /api/v1/companies/:id // @access Public

Headers
KeyValueDescription
Content-Typeapplication/json

JSON

Description

Overview: Apps are used for Business Transactions within SmartApp.

API Usage: This API can be used to create new App for SmartApp.

Signature: // @desc Create new app // @route POST /api/v1/apps // @access Private (Admin)

Headers
KeyValueDescription
Content-Typeapplication/json

JSON

AuthorizationBearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVlOWNjNjE4MmFiNmQ5OWEwN2Y1ZDEyNSIsImlhdCI6MTU4NzM5MDQ0NiwiZXhwIjoxNTg5OTgyNDQ2fQ.KQz0NfA6i1FiNuGYSI_pZnF_xeVIMFg79qpYu8hKX4E
Body
{ "role": "Manager", "descriptions":[ { "Language":"EN", "appDescription":"Manager Role", "appHelp":"Approve - Request for Access Card", "area":"ERP" } ], "icon": "sap-icon://incident", "inUse": true, "status":"New" }
Description

Overview: Company is the top level entity for SmartApp, any businesses data is consolidated max upto Company Level(Top Level).

API Usage: This API can be used to update a company.

Signature: // @desc Update company // @route PUT /api/v1/companies/:id // @access Private

Headers
KeyValueDescription
Content-Typeapplication/json

JSON

AuthorizationBearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVlOWNjNjE4MmFiNmQ5OWEwN2Y1ZDEyNSIsImlhdCI6MTU4NzM5MDQ0NiwiZXhwIjoxNTg5OTgyNDQ2fQ.KQz0NfA6i1FiNuGYSI_pZnF_xeVIMFg79qpYu8hKX4E
Body
{ "area":"Enterprise-Purchasing2" }
Description

Overview: Company is the top level entity for SmartApp, any businesses data is consolidated max upto Company Level(Top Level).

API Usage: This API can be used to update a company.

Signature: // @desc Delete company // @route DELETE /api/v1/companies/:id // @access Private

Headers
KeyValueDescription
Content-Typeapplication/json

JSON

AuthorizationBearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVlOWNjNjE4MmFiNmQ5OWEwN2Y1ZDEyNSIsImlhdCI6MTU4NzM5MDQ0NiwiZXhwIjoxNTg5OTgyNDQ2fQ.KQz0NfA6i1FiNuGYSI_pZnF_xeVIMFg79qpYu8hKX4E
Body
KeyValueDescription
file
Description

Title: Upload photo for company

Overview: Company is the top level entity for SmartApp, any businesses data is consolidated max upto Company Level(Top Level).

API Usage: This API can be used to upload company phots and pics.

Signature: // @desc Upload photo for company // @route PUT /api/v1/companies/:id/photo // @access Private

Headers
KeyValueDescription
Content-Typeapplication/json

JSON

AuthorizationBearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVlOWNjNjE4MmFiNmQ5OWEwN2Y1ZDEyNSIsImlhdCI6MTU4NzM5MDQ0NiwiZXhwIjoxNTg5OTgyNDQ2fQ.KQz0NfA6i1FiNuGYSI_pZnF_xeVIMFg79qpYu8hKX4E
Body
KeyValueDescription
file
Description

Title: Upload documents for the company

Overview: Company is the top level entity for SmartApp, any businesses data is consolidated max upto Company Level(Top Level).

API Usage: This API can be used to upload company documents(PDF, Word, Excel, Text).

Signature: // @desc Upload documents for the company // @route PUT /api/v1/companies/:id/document // @access Private

Headers
KeyValueDescription
Content-Typeapplication/json

JSON

file

Data 7

Headers
KeyValueDescription
Content-Typeapplication/json

JSON

applicationidEDU00097
Body
{ "ID":"100003", "Status":"Requested", "StudentName":"Anita Jain", "StudentID":"A0044", "Email":"ramesh@yahoo.co.uk", "BookingFor":"ParentAppointment", "StudyYear":"Year6", "Section":"A", "TeacherName":"Mr. King", "Date":"2020-04-29", "Comment":"For Maths and English", "ParentName":"Mahesh D", "ParentEmail":"parent@smartphonebizapps.com" }
Headers
KeyValueDescription
Content-Typeapplication/json

JSON

applicationidEMPACC01
Body
{ "ID":"900002", "Status":"Requested", "Email":"ramesh@yahoo.co.uk", "Reason":"My Laptop Not Working", "Name":"Atul", "Surname":"Gupta", "RequestType":"LaptopRequest", "DateOfRequest":"2020-04-29", "EmployeeID":"12002" }
Headers
KeyValueDescription
Content-Typeapplication/json

JSON

applicationidEMPBOK01
Body
{ "ID":"500003", "Status":"Requested", "Email":"ramesh@yahoo.co.uk", "Reason":"CarPark Booking for Visitor", "CarPark":"BristolOfficeCarPark", "FirstName":"Atul", "LastName":"Gupta", "RequestType":"LaptopRequest", "StartDate":"2020-04-30", "EndDate":"2020-04-30", "EmployeeID":"12002", "CarRegistration":"BD51 SMR" }
Headers
KeyValueDescription
Content-Typeapplication/json

JSON

applicationidEMP00006
Body
{ "ID":"500004", "Status":"Approved", "Email":"ramesh@yahoo.co.uk", "EmployeeID":"12002", "DateRequested":"2020-04-30", "Detail":"SAP MM Training", "External":true, "EmpDev":true, "ProjectNeed":true, "Name":"Atul Gupta", "Cost":580, "Currency":"GBP", "ProjectCode":"RG-300-790", "Justification":"Training is required for current Project delivery", "Duration": "1 Weeks" }
Headers
KeyValueDescription
Content-Typeapplication/json

JSON

businessroleStudent
Headers
KeyValueDescription
Content-Typeapplication/json

JSON

businessroleEmployee

MasterData 3

Headers
KeyValueDescription
Content-Typeapplication/json

JSON

Body
{ "ID":"100001" "company": "5e9f1743f5cf01dabb80e85f", "companyName": "SmartPhone Biz Apps Ltd", "branch": "5e9f3100b5164ade3249b622", "branchName": "SmartPhone Biz Apps, UK", "userId": "5e9cc6182ab6d99a07f5d125", "EmployeeID":"1000", "Name":"Atul Gupta" }
Headers
KeyValueDescription
Content-Typeapplication/json

JSON

Body
{ "ID":"400015", "applicationID":"EDU00003", "transactionID":123124, "companyName": "SmartPhone Biz Apps Ltd", "branchName": "SmartPhone Biz Apps, UK", "areaName": "Consulting", "EmployeeID":"1000", "Name":"Atul Gupta", "postcode":"SL1 9DU", "email":"atul@smart.com", "SortCode":"JG103759A" }
Headers
KeyValueDescription
Content-Typeapplication/json

JSON

Body
KeyValueDescription
file

OrgSetup/Branch 8

Description

Overview: Branch is second level entity for SmartApp, Branch can be used to define access level for users. As an example: Company: XYZ Ltd Branch: XYZ London Office, XYZ Mumbai Office, XYZ Paris Office etc..

API Usage: This API can be used to get list of branches for a company using SmartApp.

Signature: // @desc Get branches // @route GET /api/v1/branches // @route GET /api/v1/companies/:companyId/branches // @access Private (Any one in the Company)

Headers
KeyValueDescription
Content-Typeapplication/json

JSON

Description

Overview: Branch is second level entity for SmartApp, Branch can be used to define access level for users. As an example: Company: XYZ Ltd Branch: XYZ London Office, XYZ Mumbai Office, XYZ Paris Office etc..

API Usage: This API can be used to get the details of a branch for a company using SmartApp.

Signature: // @desc Get single branch // @route GET /api/v1/branches/:id // @access Private (Any one in the Company)

Description

Overview: Branch is second level entity for SmartApp, Branch can be used to define access level for users. As an example: Company: XYZ Ltd Branch: XYZ London Office, XYZ Mumbai Office, XYZ Paris Office etc..

API Usage: This API can be used to create a branch for a company using SmartApp.

Signature: // @desc Add branch // @route POST /api/v1/companies/:companyId/branches // @access Private(Company Admin)

Headers
KeyValueDescription
Content-Typeapplication/json

JSON

AuthorizationBearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVlOWNjNjE4MmFiNmQ5OWEwN2Y1ZDEyNSIsImlhdCI6MTU4NzM5MDQ0NiwiZXhwIjoxNTg5OTgyNDQ2fQ.KQz0NfA6i1FiNuGYSI_pZnF_xeVIMFg79qpYu8hKX4E
Body
{ "branchName": "SmartPhone Biz Apps, UK", "website": "https://smartphonebizapps.com/", "phone": "(+44) 7850342883", "email": "atul@smartphonebizapps.com", "address": "47,Lower Cippenham Lane, Slough, Berkshire, SL15DG, GB", "sector": "IT", "status":"New" }
Description

Overview: Branch is second level entity for SmartApp, Branch can be used to define access level for users. As an example: Company: XYZ Ltd Branch: XYZ London Office, XYZ Mumbai Office, XYZ Paris Office etc..

API Usage: This API can be used to update branch for a company using SmartApp.

Signature: // @desc Update branch // @route PUT /api/v1/branches/:id // @access Private(Company Admin)

Headers
KeyValueDescription
Content-Typeapplication/json

JSON

AuthorizationBearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVlOWNjNjE4MmFiNmQ5OWEwN2Y1ZDEyNSIsImlhdCI6MTU4NzM5MDQ0NiwiZXhwIjoxNTg5OTgyNDQ2fQ.KQz0NfA6i1FiNuGYSI_pZnF_xeVIMFg79qpYu8hKX4E
Body
{ "branchName": "SmartPhone Biz Apps Ltd India" }
Description

Overview: Branch is second level entity for SmartApp, Branch can be used to define access level for users. As an example: Company: XYZ Ltd Branch: XYZ London Office, XYZ Mumbai Office, XYZ Paris Office etc..

API Usage: This API can be used to delete branch for a company using SmartApp.

Signature: // @desc Delete branch // @route DELETE /api/v1/branches/:id // @access Private(Company Admin)

Headers
KeyValueDescription
Content-Typeapplication/json

JSON

Description

Title: Get branches within a radius

Overview: Company is the top level entity for SmartApp, any businesses data is consolidated max upto Company Level(Top Level).

API Usage: This API can be used to find branch withing specified radius.

Signature: // @desc Get branches within a radius // @route GET /api/v1/branches/radius/:zipcode/:distance // @access Private(Anyone within Company)

Headers
KeyValueDescription
Content-Typeapplication/json

JSON

Description

Title: Upload photo for company

Overview: Company is the top level entity for SmartApp, any businesses data is consolidated max upto Company Level(Top Level).

API Usage: This API can be used to upload company phots and pics.

Signature: // @desc Upload photo for company // @route PUT /api/v1/companies/:id/photo // @access Private(Company Admin)

Headers
KeyValueDescription
Content-Typeapplication/json

JSON

AuthorizationBearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVlOWNjNjE4MmFiNmQ5OWEwN2Y1ZDEyNSIsImlhdCI6MTU4NzM5MDQ0NiwiZXhwIjoxNTg5OTgyNDQ2fQ.KQz0NfA6i1FiNuGYSI_pZnF_xeVIMFg79qpYu8hKX4E
Body
KeyValueDescription
file
Description

Title: Upload photo for company

Overview: Company is the top level entity for SmartApp, any businesses data is consolidated max upto Company Level(Top Level).

API Usage: This API can be used to upload company phots and pics.

Signature: // @desc Upload photo for company // @route PUT /api/v1/companies/:id/photo // @access Private(Company Admin)

Headers
KeyValueDescription
Content-Typeapplication/json

JSON

file

OrgSetup/Business Areas 7

Description

Overview: Business Area is second level entity for SmartApp, Business Area can be used to define access level for users. As an example: Company: XYZ Ltd Business Area: Purchasing, Sales, R&D, Marketing etc..

API Usage: This API can be used to get list of Business Area for a company using SmartApp.

Signature: // @desc Get branches // @route GET /api/v1/branches // @route GET /api/v1/companies/:companyId/branches // @access Private (Any one in the Company)

Headers
KeyValueDescription
Content-Typeapplication/json

JSON

Description

Overview: Business Area is second level entity for SmartApp, Business Area can be used to define access level for users. As an example: Company: XYZ Ltd Business Area: Purchasing, Sales, R&D, Marketing etc..

API Usage: This API can be used to get list of Business Area for a company using SmartApp.

Signature: // @desc Get single branch // @route GET /api/v1/branches/:id // @access Private (Any one in the Company)

Description

Overview: Business Area is second level entity for SmartApp, Business Area can be used to define access level for users. As an example: Company: XYZ Ltd Business Area: Purchasing, Sales, R&D, Marketing etc..

API Usage: This API can be used to get list of Business Area for a company using SmartApp.

Signature: // @desc Add branch // @route POST /api/v1/companies/:companyId/branches // @access Private(Company Admin)

Headers
KeyValueDescription
Content-Typeapplication/json

JSON

AuthorizationBearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVlOWNjNjE4MmFiNmQ5OWEwN2Y1ZDEyNSIsImlhdCI6MTU4NzM5MDQ0NiwiZXhwIjoxNTg5OTgyNDQ2fQ.KQz0NfA6i1FiNuGYSI_pZnF_xeVIMFg79qpYu8hKX4E
Body
{ "areaName": "Consulting", "description": "SmartApp Product Development", "status":"New" }
Description

Overview: Business Area is second level entity for SmartApp, Business Area can be used to define access level for users. As an example: Company: XYZ Ltd Business Area: Purchasing, Sales, R&D, Marketing etc..

API Usage: This API can be used to get list of Business Area for a company using SmartApp.

Signature: // @desc Update branch // @route PUT /api/v1/branches/:id // @access Private(Company Admin)

Headers
KeyValueDescription
Content-Typeapplication/json

JSON

AuthorizationBearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVlOWNjNjE4MmFiNmQ5OWEwN2Y1ZDEyNSIsImlhdCI6MTU4NzM5MDQ0NiwiZXhwIjoxNTg5OTgyNDQ2fQ.KQz0NfA6i1FiNuGYSI_pZnF_xeVIMFg79qpYu8hKX4E
Body
{ "branchName": "SmartPhone Biz Apps Ltd India" }
Description

Overview: Business Area is second level entity for SmartApp, Business Area can be used to define access level for users. As an example: Company: XYZ Ltd Business Area: Purchasing, Sales, R&D, Marketing etc..

API Usage: This API can be used to get list of Business Area for a company using SmartApp.

Signature: // @desc Delete branch // @route DELETE /api/v1/branches/:id // @access Private(Company Admin)

Headers
KeyValueDescription
Content-Typeapplication/json

JSON

Description

Title: Find Business Area within Radius (This may not be required!!)

Overview: Business Area is second level entity for SmartApp, Business Area can be used to define access level for users. As an example: Company: XYZ Ltd Business Area: Purchasing, Sales, R&D, Marketing etc..

API Usage: This API can be used to get list of Business Area for a company using SmartApp.

Signature: // @desc Get branches within a radius // @route GET /api/v1/branches/radius/:zipcode/:distance // @access Private(Anyone within Company)

Headers
KeyValueDescription
Content-Typeapplication/json

JSON

Description

Title: Upload documents for Business Area

Overview: Business Area is second level entity for SmartApp, Business Area can be used to define access level for users. As an example: Company: XYZ Ltd Business Area: Purchasing, Sales, R&D, Marketing etc..

API Usage: This API can be used to get list of Business Area for a company using SmartApp.

Signature: // @desc Upload photo for company // @route PUT /api/v1/companies/:id/photo // @access Private(Company Admin)

Headers
KeyValueDescription
Content-Typeapplication/json

JSON

file

OrgSetup/Company 9

Description

Overview: Company is the top level entity for SmartApp, any businesses data is consolidated max upto Company Level(Top Level).

API Usage: This API can be used to get list of companies using SmartApp.

Signature: // @desc Get all companies // @route GET /api/v1/companies // @access Public

Headers
KeyValueDescription
Content-Typeapplication/json

JSON

Description

Overview: Company is the top level entity for SmartApp, any businesses data is consolidated max upto Company Level(Top Level).

API Usage: This API can be used to get dedails of one company using SmartApp.

Signature: // @desc Get single company // @route GET /api/v1/companies/:id // @access Public

Headers
KeyValueDescription
Content-Typeapplication/json

JSON

Description

Overview: Branch is second level entity for SmartApp, Branch can be used to define access level for users. As an example: Company: XYZ Ltd Branch: XYZ London Office, XYZ Mumbai Office, XYZ Paris Office etc..

API Usage: This API can be used to update branch for a company using SmartApp.

Signature: // @desc Update branch // @route PUT /api/v1/branches/:id // @access Private(Company Admin)

Headers
KeyValueDescription
Content-Typeapplication/json

JSON

AuthorizationBearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVlOWNjNjE4MmFiNmQ5OWEwN2Y1ZDEyNSIsImlhdCI6MTU4NzM5MDQ0NiwiZXhwIjoxNTg5OTgyNDQ2fQ.KQz0NfA6i1FiNuGYSI_pZnF_xeVIMFg79qpYu8hKX4E
Body
{ "branchName": "SmartPhone Biz Apps Ltd India" }
Description

Overview: Company is the top level entity for SmartApp, any businesses data is consolidated max upto Company Level(Top Level).

API Usage: This API can be used to create one company SmartApp.

Signature: // @desc Create new company // @route POST /api/v1/companies // @access Private (Admin)

Headers
KeyValueDescription
Content-Typeapplication/json

JSON

AuthorizationBearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVlOWNjNjE4MmFiNmQ5OWEwN2Y1ZDEyNSIsImlhdCI6MTU4NzM5MDQ0NiwiZXhwIjoxNTg5OTgyNDQ2fQ.KQz0NfA6i1FiNuGYSI_pZnF_xeVIMFg79qpYu8hKX4E
Body
{ "companyName": "SmartPhone Biz Apps Ltd", "website": "https://smartphonebizapps.com/", "phone": "(+44) 7850342883", "email": "atul@smartphonebizapps.com", "address": "47,Lower Cippenham Lane, Slough, Berkshire, SL15DG, GB", "sector": "IT", "subSector":"Consulting", "status":"New" }
Description

Overview: Company is the top level entity for SmartApp, any businesses data is consolidated max upto Company Level(Top Level).

API Usage: This API can be used to update a company.

Signature: // @desc Delete company // @route DELETE /api/v1/companies/:id // @access Private (Admin)

Headers
KeyValueDescription
Content-Typeapplication/json

JSON

Description

Title: Get companies within a radius

Overview: Company is the top level entity for SmartApp, any businesses data is consolidated max upto Company Level(Top Level).

API Usage: This API can be used to find company withing specified radius.

Signature: // @desc Get companies within a radius // @route GET /api/v1/companies/radius/:zipcode/:distance // @access Private (Admin)

Description

Title: Upload photo for company

Overview: Company is the top level entity for SmartApp, any businesses data is consolidated max upto Company Level(Top Level).

API Usage: This API can be used to upload company phots and pics.

Signature: // @desc Upload photo for company // @route PUT /api/v1/companies/:id/photo // @access Private (Company Admin)

Headers
KeyValueDescription
Content-Typeapplication/json

JSON

AuthorizationBearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVlOWNjNjE4MmFiNmQ5OWEwN2Y1ZDEyNSIsImlhdCI6MTU4NzM5MDQ0NiwiZXhwIjoxNTg5OTgyNDQ2fQ.KQz0NfA6i1FiNuGYSI_pZnF_xeVIMFg79qpYu8hKX4E
file
Body
KeyValueDescription
file
Description

Title: Upload documents for the company

Overview: Company is the top level entity for SmartApp, any businesses data is consolidated max upto Company Level(Top Level).

API Usage: This API can be used to upload company documents(PDF, Word, Excel, Text).

Signature: // @desc Upload documents for the company // @route PUT /api/v1/companies/:id/document // @access Private (Company Admin)

Headers
KeyValueDescription
Content-Typeapplication/json

JSON

file
Description

Title: Upload logo for the company

Overview: Company is the top level entity for SmartApp, any businesses data is consolidated max upto Company Level(Top Level).

API Usage: This API can be used to upload company documents(PDF, Word, Excel, Text).

Signature: // @desc Upload logo for the company // @route PUT /api/v1/companies/:id/logo // @access Private (Company Admin)

Headers
KeyValueDescription
Content-Typeapplication/json

JSON

file

User (Auth)/Create Users 3

Description

This API can be used for create or register new user for SmartApp Important Information: userType: internal or external

Headers
KeyValueDescription
Content-Typeapplication/json

JSON

Body
{ "name":"SmartApp Supper Admin", "email":"admin@smartphonebizapps.com", "role":"user", "password":"London2020", "userType":"internal", "userAccess":"SuperAdmin" }
Description

This API can be used for create or register new user for SmartApp Important Information: userType: internal or external

Headers
KeyValueDescription
Content-Typeapplication/json

JSON

Body
{ "businessRoles":["User", "Employee","Technician"] }
Description

Update User Details

Body
{ "name":"Atul Gupta", "email":"atul_gup@yahoo.co.uk", "company":"5e9f1743f5cf01dabb80e85f", "branch":"5e9f3100b5164ade3249b622", "area":"5e9f3b7d9d8df8e0115cbee2" }

User (Auth)/User Data 2

Headers
KeyValueDescription
Content-Typeapplication/json

JSON

Authorization
Description

Update Branch of an User

Body
{"branch":""}

User (Auth)/User Login 6

Description

This API can be used for user login authentication for SmartApp

Headers
KeyValueDescription
Content-Typeapplication/json

JSON

Body
{ "email":"atul_gup@yahoo.co.uk", "password":"London2021" }
Description

Get Logged In user from Token

Headers
KeyValueDescription
Content-Typeapplication/json

JSON

AuthorizationBearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVlOWNjNjE4MmFiNmQ5OWEwN2Y1ZDEyNSIsImlhdCI6MTU4NzM5MDQ0NiwiZXhwIjoxNTg5OTgyNDQ2fQ.KQz0NfA6i1FiNuGYSI_pZnF_xeVIMFg79qpYu8hKX4E
Body
{ "email":"atul_gup@yahoo.co.uk" }
Description

Overview: This API can be used to send password reset emails from SmartApp (noreply@smartphonebizapps.com)

API Usage: This API can be used to send password reset emails from SmartApp App or BOTs.

Important Note: For development and testing purposes we will set smtp.mailtrap.io as the test mail server. This will make testing very easy and we can create users with dummy Emails for our testing

Steps for Testing using MailTrap server: Steps to access emails during the testing are : - Login to Gmail using gst@smartphonebizapps.com - Got to MailTrap site (https://mailtrap.io/) - Login with Google Account and then select gst@smartphonebizapps.com - Now ifyou send any email from SmartApp BOT or App using this API for any sender all emails can be viewed on mailTrap

Additional Notes: With the password reset email a token is sent which is valid only for 10 mins. user need to action in within 10 mins and reset the password. otherwise token will be expired. Example URL with Token is: {{URL}}/api/v1/auth/resetpassword/609ce738d4ae4379c7cb149f0f4a3f94afa7cf25

Signature: // @desc Forgot password // @route POST /api/v1/auth/forgotpassword // @access Public (anyone can request for password reset, if they have valid ID then they will be able to do it) // @header Content-Type = application/json // @body JSON { “email”:“atul_gup@yahoo.co.uk”

}

Headers
KeyValueDescription
Content-Typeapplication/json

JSON

Body
{"email":"atul_gup@yahoo.co.uk"}
Description

Overview: This API can be used to send password reset emails from SmartApp (noreply@smartphonebizapps.com)

API Usage: This API can be used to send password reset emails from SmartApp App or BOTs.

Important Note: For development and testing purposes we will set smtp.mailtrap.io as the test mail server. This will make testing very easy and we can create users with dummy Emails for our testing

Steps for Testing using MailTrap server: Steps to access emails during the testing are : - Login to Gmail using gst@smartphonebizapps.com - Got to MailTrap site (https://mailtrap.io/) - Login with Google Account and then select gst@smartphonebizapps.com - Now ifyou send any email from SmartApp BOT or App using this API for any sender all emails can be viewed on mailTrap

Additional Notes: With the password reset email a token is sent which is valid only for 10 mins. user need to action in within 10 mins and reset the password. otherwise token will be expired. Example URL with Token is: {{URL}}/api/v1/auth/resetpassword/609ce738d4ae4379c7cb149f0f4a3f94afa7cf25

Signature: // @desc Forgot password // @route POST /api/v1/auth/forgotpassword // @access Public (anyone can request for password reset, if they have valid ID then they will be able to do it) // @header Content-Type = application/json // @body JSON { “email”:“atul_gup@yahoo.co.uk”

}

Headers
KeyValueDescription
Content-Typeapplication/json

JSON

Body
{"email":"atul_gup@yahoo.co.uk"}
Description

Overview: This API can be used to reset password from SmartApp (noreply@smartphonebizapps.com)

API Usage: This API can be used to Reset Password from SmartApp App or BOTs.

Important Note: For development and testing purposes we will set smtp.mailtrap.io as the test mail server. This will make testing very easy and we can create users with dummy Emails for our testing

Steps for Testing using MailTrap server: Steps to access emails during the testing are : - Login to Gmail using gst@smartphonebizapps.com - Got to MailTrap site (https://mailtrap.io/) - Login with Google Account and then select gst@smartphonebizapps.com - Now ifyou send any email from SmartApp BOT or App using this API for any sender all emails can be viewed on mailTrap

Signature: // @desc Reset password // @route PUT /api/v1/auth/resetpassword/:resettoken // @access Public (all valid users can reset their password) // @header Content-Type = application/json // @body JSON { “password”:“XYZ12345” }

Headers
KeyValueDescription
Content-Typeapplication/json

JSON

Body
{ "password":"London2021" }
Description

Overview: This API can be used to reset password from SmartApp (noreply@smartphonebizapps.com)

API Usage: This API can be used to Reset Password from SmartApp App or BOTs.

Important Note: For development and testing purposes we will set smtp.mailtrap.io as the test mail server. This will make testing very easy and we can create users with dummy Emails for our testing

Steps for Testing using MailTrap server: Steps to access emails during the testing are : - Login to Gmail using gst@smartphonebizapps.com - Got to MailTrap site (https://mailtrap.io/) - Login with Google Account and then select gst@smartphonebizapps.com - Now ifyou send any email from SmartApp BOT or App using this API for any sender all emails can be viewed on mailTrap

Signature: // @desc Reset password // @route PUT /api/v1/auth/resetpassword/:resettoken // @access Public (all valid users can reset their password) // @header Content-Type = application/json // @body JSON { “password”:“XYZ12345” }

Headers
KeyValueDescription
Content-Typeapplication/json

JSON

Body
{ "password":"449850" }

Utilities 1

Description

Overview: This API can be used to send emails from SmartApp (noreply@smartphonebizapps.com)

API Usage: This API can be used to send emails from SmartApp App or BOTs.

Important Note: For development and testing purposes we will set smtp.mailtrap.io as the test mail server. This will make testing very easy and we can create users with dummy Emails for our testing

Steps for Testing using MailTrap server: Steps to access emails during the testing are : - Login to Gmail using gst@smartphonebizapps.com - Got to MailTrap site (https://mailtrap.io/) - Login with Google Account and then select gst@smartphonebizapps.com - Now ifyou send any email from SmartApp BOT or App using this API for any sender all emails can be viewed on mailTrap

Signature: // @desc send an email // @route POST /api/v1/auth/sendEmail // @access Protected (to send an email user should be associated with SmartApp) // @header Content-Type = application/json & Authorization = ‘Bearer ’ + token // @body JSON {

"emailTo":"abc@gmail.com",
"subject":"Test Email",
"message":"This is a test email from SmartApp"

}

Headers
KeyValueDescription
Content-Typeapplication/json

JSON

Body
{ "emailTo":"rash0474@gmail.com", "subject":"Test Email", "message":"This is a test email from SmartApp" }