Manual

SimplyRFiD Pogi API Manual

Chapter 1: Introduction
Chapter 2: Login Authentication API Calls
Chapter 3: Public API Calls
Chapter 4: Web API Calls
Chapter 5: Mobile API Calls
Chapter 6: ID API Calls
Chapter 7: Marker Management API Calls
Chapter 8: Zone Management API Calls
Chapter 9: Introduction
Chapter 1: Introduction

The Pogi server can be accessed through REST API. Listed on this manual are all the available API and their details.

The API calls can be used for integration with other applications. Details and examples on how to utilize the API calls are available for Javascript and Python 3.

The Pogi APIs can also be tested directly using the Insomnia Workspace application. The Insomnia JSON file can be downloaded from the Pogi API - Insomnia workspace repository or directly imported through the URL https://raw.githubusercontent.com/simplyrfid-dev/pogi-api-insomnia-workspace/main/pogi-api-insomnia-workspace.json

Chapter 2: Login Authentication API Calls
A. /auth/Login

Description: Navigate to login page
Method: POST
Type: multiform or x-www-form-urlencoded
URL Params: N/A
Data Params: N/A
Success Response: N/A
Error Response: Possible 404 or No Connection

B. /dashboard/Dashboard

Description: Navigate to landing page after successful login
Method: POST
Type: multiform or x-www-form-urlencoded
URL Params: N/A
Data Params: N/A
Success Response: N/A
Error Response: Possible 404 or No Connection

C. /token-get

Description: Request a token for mobile access, by sending the mobile's userId and password, which is registered in the database
Method: POST
Type: multiform or x-www-form-urlencoded
URL Params: N/A
Data Params: {"userId": String, "password": String}
Success Response: {"response": "OK", "org": String, "token": String}
Error Response: {"response": "error", "message": "Invalid Login"}

D. /token-invalidate

Description: Request to invalidate a token
Method: POST
Type: multiform or x-www-form-urlencoded
URL Params: N/A
Data Params: {"deviceId": String}
Success Response: {"response": "OK"}
Error Response {"response": "error", "message": ""}

Chapter 3: Public API Calls
A. /get-version

Description: Get the current version of Pogi Server
Method: POST
Type: multiform or x-www-form-urlencoded
URL Params: N/A
Data Params: N/A
Success Response:
{"message": String,
"version": String,
"versionWave": String,
"response": "OK"}
Error Response: 500 Internal Server Error
Note: Http Status is still 200 for error responses. Please don't rely on the status

Chapter 4: Web API Calls
A. /history

Description: Fetch the history data based on the filters provided
Method: POST
Type: multiform or x-www-form-urlencoded
URL Params: N/A
Data Params:
{"fromDate": YYYY-MM-DD,
"fromTime": HH:MM:SS,
"toDate": YYYY-MM-DD,
"toTime": HH:MM:SS,
"event": String,
"zone": String,
"currentLocation": String[on]|null,
"limit": Int,
"offSet": Int,
"namedOnly": String,
"tagAssetSearchType": String,
"tagAndAssetSearchType": String,
"tagAndAsset":"",
"orderColumn": String,
"orderDirection": String[ASC,DESC]}
Success Response: An Array of the History table that resulted from the Query:
{"count":{"total": Int},
"data":[{"uid": String,
"external_id": String,
"tag_id": String,
"image": String,
"image_list": String,
"image_info": String,
"entity": String,
"marker": String,
"deleted": 0,
"json_data": String,
"update_date": "YYYY-MM-DD HH:MM:SS",
"zone": String,
"altitude": Float,
"lon": Float,
"lat": Float,
"state": "present",
"serial_number": String,
"description": String,
"owner": String,
"calibration_due_date": "", "model_number": String,
"manufacturer": String,
"name": String,
"part_number": String,
}], ... }
Error Response:
{"response": "Warning", "message": "No Result Found" }
{"response": "Error", "message": "SQL Error" }
Note: Http Status is still 200 for error responses. Please don't rely on the status.

B. /history-last-date

Description: Get latest date received from history
Method: GET
Type: multiform or x-www-form-urlencoded
URL Params: N/A
Data Params: N/A
Success Response: {"date": Datetime}
Error Response: Possible 404 or No Connection

C. /track

Description: Get item data on location and status change
Method: POST
Type: multiform or x-www-form-urlencoded
URL Params: N/A
Data Params: tagId
Success Response:
{"count": {"total": Int},
"data": [{"state": "present|absent",
"tag": tagId,
"eventDate": "YYYY-MM-DD HH:MM:SS",
"zone": String}]}
Error Response: Possible 404 or No Connection

D. /ui-edit-fields

Description: Get list of fields enabled for editing and creating tags
Method: POST
Type: multiform or x-www-form-urlencoded
URL Params: N/A
Data Params: N/A
Success Response: {"response": "OK", "fields": [[Field data], ... ]}
Error Response: {"response": "Error", "message": "Error (Error Code)"}

E. /ui-current-fields

Description: Get Field Headers configured for the inventory table for all data
Method: POST
Type: multiform or x-www-form-urlencoded
URL Params: N/A
Data Params: N/A
Success Response: {"response": "OK", "fields": [[Field data], ... ]}
Error Response: {"response": "Error", "message": "Error (Error Code)"}

F. /ui-history-fields

Description: Get Field Headers configured for the inventory table for current data
Method: POST
Type: multiform or x-www-form-urlencoded
URL Params: N/A
Data Params: N/A
Success Response: {"response": "OK", "fields": [[Field data], ... ]}
Error Response: {"response": "Error", "message": "Error (Error Code)"}

Chapter 5: Mobile API Calls
A. /config-get

Description: Get the current version of Pogi Server
Method: POST
Type: multiform or x-www-form-urlencoded
URL Params: N/A
Data Params: N/A
Success Response: { "config": {"serverName": String,
"serverProtocol": String,
"versionWave": String,
"rfidPrefix": String,
"version": String,
"instanceType": String},
"response": "OK"}
Error Response: 500 Internal Server Error
Note: Http Status is still 200 for error responses. Please don't rely on the status

B. /upload-inventory

Description: Upload the Inventory gathered by the handheld reader
Method: POST
Type: application/json
URL Params: N/A
Data Params: Array of captured tag ids
{ data: {
Location : [{
"antenna": Int,
"eventDate": Datetime,
"lat": float,
"lon": float,
"marker": String,
"reader": String,
"retVal": Int,
"rssi": float,
"sessionId": String,
"state": String[present|absent],
"tag": String,
"weight": float,
"xmitDate": Datetime,
"zone": String
},…]}
(Array of Tags), …, (Location props)
}
Success Response: {"response": "OK"}
Error Response:
{"response": "Error", "message": "SQL Error" }
{"response": "Error", "message": "No data received"}

Chapter 6: ID API Calls
A. /id-add

Description: Add/Push TagID with Asset ID. If the AssetID or RFID is existing, responds with an error
Method: POST
Type: multiform or x-www-form-urlencoded
URL Params: N/A
Data Params: {"tagId": String}
Optional Params:
{"name": String,
"assetId": String,
"zone": String,
"owner": String,
"model_number": String,
"serial_number": String,
"part_number": String,
"calibration_due_date": YYYY-MM-DD HH:MM:SS,
"last_calibration_date": YYYY-MM-DD HH:MM:SS,
"description": String,
"browserTimezone": String,
"lat": Float,
"lon": Float,
"altitude": Float,
"image": String,
"image_list": String,
"image_info": String
}
Note: Browser Timezone is required if date fields are included
Success Response: {"response": "OK"}
Error Response:
{"response": "Warning", "message": "Tag ID is already Existing" }
{"response": "Error", "message": "SQL Error"}
{"response": "Error", "message": "No assetId or tagId found" }
Note: Http Status is still 200 for error responses. Please don't rely on the status

B. /id-update

Description: Update data fields of existing RFID TagId
Method: POST
Type: multiform or x-www-form-urlencoded
URL Params: N/A
Data Params: {tagId: 'String'}
Optional Params:
{"name": String,
"assetId": String,
"zone": String,
"owner": String,
"model_number": String,
"serial_number": String,
"part_number": String,
"calibration_due_date": YYYY-MM-DD HH:MM:SS,
"last_calibration_date": YYYY-MM-DD HH:MM:SS,
"description": String,
"browserTimezone": String,
"lat": Float,
"lon": Float,
"altitude": Float,
"image": String,
"image_list": String,
"image_info": String
}
Success Response: {"response": "OK"}
Error Response:
{"response": "Error","message": "SQL Error"}
{"response": "Error","message": "No assetId or tagId found"}
Note: Http Status is still 200 for error responses. Please don't rely on the status.

C. /id-get

Description: Get tag ID information
Method: POST
Type: multiform or x-www-form-urlencoded
URL Params: tagID
Data Params: {"tagId": String}
Success Response: {"name": String,
"assetId": String,
"zone": String,
"owner": String,
"model_number": String,
"serial_number": String,
"part_number": String,
"calibration_due_date": YYYY-MM-DD HH:MM:SS,
"last_calibration_date": YYYY-MM-DD HH:MM:SS,
"description": String,
"browserTimezone": String,
"lat": Float,
"lon": Float,
"altitude": Float,
"image": String,
"image_list": String,
"image_info": String
}
Error Response: {"response": "Warning", "message": "No data received."}

D. /id-exists

Description: Check if tag ID exists
Method: POST
Type: multiform or x-www-form-urlencoded
URL Params: tagID
Data Params: {"tagId": String} or {"id": String} or {"ids": [String]}
Success Response: {"response": "OK", "info": String}
Error Response: {"response": "Warning", "message": "No data received."}

E. /id-delete

Description: Delete tag
Method: POST
Type: multiform or x-www-form-urlencoded
URL Params: tagID
Data Params: {"tagId": String}
Success Response: {"response": "OK"}
Error Response:
{"response": "Error", "message": "no tagId specified" }
{"response": "Error", "message": [ERROR CODE] }

F. /id-deleted-list

Description: Get list of deleted tags
Method: GET
Type: multiform or x-www-form-urlencoded
URL Params: N/A
Data Params: N/A
Success Response:
{"response":"OK", "data": [
{"delete_date": Datetime,
"uid": String,
"tag_id": String }, … ]}
Error Response: {"response": "Error", "message": "Data Error"}

G. /id-deleted-count

Description: Get count of deleted tags
Method: GET
Type: multiform or x-www-form-urlencoded
URL Params: N/A
Data Params: N/A
Success Response: {"response":"OK", "count": Int}
Error Response: {"response": "Error", "message": "Data Error"}

H. /id-deleted

Description: Check if tag has deleted state
Method: POST
Type: multiform or x-www-form-urlencoded
URL Params: N/A
Data Params: {"tagId": String}
Success Response: {"response": "OK"}
Error Response:
{"response": "Error", "message": "no tagId specified" }
{"response": "Error", "message": [ERROR CODE] }

I. /id-undelete

Description: Remove tag from deleted state
Method: POST
Type: multiform or x-www-form-urlencoded
URL Params: N/A
Data Params: {"tagId": String}
Success Response: {"response": "OK"}
Error Response:
{"response": "Error", "message": "no tagId specified" }
{"response": "Error", "message": [ERROR CODE] }

J. /update-zone

Description: Insert history event for the specified tagId
Method: POST
Type: multiform or x-www-form-urlencoded
URL Params: N/A
Data Params: {"tagId": String, "zone": String}
Success Response: {"response": "OK"}
Error Response:
{"response": "Error", "message": "no tagId specified" }
{"response": "Error", "message": [ERROR CODE] }

K. /image-upload

Description: Upload image to server
Method: GET
Type: multiform or x-www-form-urlencoded
URL Params: N/A
Data Params:
{"name" : String,
"image" : }
Success Response: {"response":"OK"}
Error Response: {"response": "Error", "message": "Data Error"}

L. /id-set-image

Description: Set image id
Method: POST
Type: multiform or x-www-form-urlencoded
URL Params: N/A
Data Params:
{"tagID" : String,
"source" : String}
Success Response: {"response":"OK"}
Error Response: {"response": "Error", "message": "Data Error"}

M. /id-set-image-list

Description: Set list image id
Method: POST
Type: multiform or x-www-form-urlencoded
URL Params: N/A
Data Params:
{"tagID" : String,
"source" : String}
Success Response: {"response":"OK"}
Error Response: {"message": String[Error message], "tagId": "", "response": "Error"}

N. /id-set-image-info

Description: Set info image id
Method: POST
Type: multiform or x-www-form-urlencoded
URL Params: N/A
Data Params:
{"tagID" : String,
"source" : String}
Success Response: {"response":"OK"}
Error Response: {"message": String[Error message], "tagId": "", "response": "Error"}

O. /image-resize

Description: Resize image
Method: POST
Type: multiform or x-www-form-urlencoded
URL Params: N/A
Data Params:
{"sizeX": Int,
"sizeY": Int,
"inFile": String,
"outFile": String}
Success Response: null
Error Response: null

Chapter 7: Marker Management API Calls
A. /marker-list

Description: Get all markers data
Method: POST
Type: multiform or x-www-form-urlencoded
URL Params: Zone
Data Params: N/A
Success Response: {"response": "OK", "data": [{tag_id, name}]}
Error Response: {"response": "Error", "message": "Data Error"}

B. /marker-add

Description: Get all markers data
Method: POST
Type: multiform or x-www-form-urlencoded
URL Params: N/A
Data Params: {"tagId": String,
"name": String,
"zone": String}
Success Response: {"response": "OK"}
Error Response:
{"response": "Error", "message": "Data Error"}
{"response": "Error", "message": "No Data Received."}

C. /marker-delete

Description: Delete marker
Method: POST
Type: multiform or x-www-form-urlencoded
URL Params: tagID
Data Params: N/A
Success Response: {"response": "OK"}
Error Response:
{"response": "Error", "message": [SQL Error Messages] }
"response": "Error", "message": "no tagId specified"

Chapter 8: Zone Management API Calls
A. /zone-list

Description: Get the Zones/Location List
Method: GET
Type: multiform or x-www-form-urlencoded
URL Params: N/A
Data Params: N/A
Success Response: Array of zone/location names {"data":[ "Zone1",… ]}
Error Response: Possible 404 or No Connection

B. /zone-add

Description: Add a new Zone/Location
Method: POST
Type: multiform or x-www-form-urlencoded
URL Params: N/A
Data Params: {"zoneName": 'String', "reader": 'String'}
Success Response: {"response": "OK"}
Error Response:
{"response": "Warning", message: "Zone/Location Already Exists", existing: "{Existing Data}"}
{"response": "Error", "message": "Cannot create zone named Commissioned" }
{"response": "Error", "message": "No Data Received"}
{"response": "Error", "message": "SQL Error" }

C. /zone-delete

Description: Delete a Zone/Location
Method: POST
Type: multiform or x-www-form-urlencoded
URL Params: zone
Data Params: N/A
Success Response: {"response": "OK"}
Error Response: {"response": "Error", "message": "no zone specified" }

Chapter 9: User Management API Calls
A. /user-get

Description: Login or get active user
Method: POST
Type: multiform or x-www-form-urlencoded
URL Params: N/A
Data Params:
{"userId": String,
"password": String}
Success Response: N/A
Error Response: Possible 404 or No Connection

B. /user-list

Description: Get list of users
Method: GET
Type: multiform or x-www-form-urlencoded
URL Params: N/A
Data Params: N/A
Success Response: Array of json obj with user information
{"name": String,
"admin": 1 | 0 [True|False],
"id": String,
"token": String,
"active": 1 | 0 [Existing|New],
"org": String,
"password" : Encrypted String,
"email": String}
Error Response: Possible 404 or No Connection

C. /user-add

Description: Add new user
Method: POST
Type: multiform or x-www-form-urlencoded
URL Params: N/A
Data Params:
{"id": String,
"password" : Encrypted String,
"name": String,
"admin": 1 | 0 [True|False],
"email": String}
Success Response: {"response": "ok"}
Error Response:
{"response": "error", "error": "Did not receive data."}
{"response": "error", "error": "(1062 "Duplicate Entry '' for key 'PRIMARY'")"}

D. /user-update

Description: Update user information
Method: POST
Type: multiform or x-www-form-urlencoded
URL Params: N/A
Data Params:
{"id": String,
"password" : Encrypted String,
"name": String,
"admin": 1 | 0 [True|False],
"active": 1 | 0 [Existing|New],
"email": String}
Success Response: {"response": "ok"}
Error Response:
{"response": "error", "error": "Did not receive data."}

E. /delete-user

Description: Delete user
Method: POST
Type: multiform or x-www-form-urlencoded
URL Params: N/A
Data Params: userID
Success Response: {"response": "ok"}
Error Response: {"response": "error", "error": "Did no receive data."}

Go RFID for just $99/mo

Includes Wave app, CS108 RFID handheld, Pogi data server access, our starter kit of RFID tags, and an iPod Touch.

Pay just $99/month plus a one-time charge for the iPod of $250. You may provide your own iOS 13 (or later) device in place of the iPod. The CS108 RFID handheld remains the property of SimplyRFiD if you cancel service. You may pre-pay the year for $990 (2 free months).

Get Started