This API allows you to create a radius POI (Point of Interest) on the Motia Telematics Portal.
Service URL
https://ws.mycubo.online/IntegrationService.svc
Service method and input parameters
CreatePOI(string token,string poiName, double latitude, double longitude,int radius)
- poiName – Name Of POI
- latitude – latitude (example = 54.7343602)
- longitude - longitude (example = -6.2374829)
- radius - radius (Measured 1000th of a mile, so example for 1 mile = 1000, 1/2 mile = 500)
- Token- By Using below api to get the token (Instructions Here)
Service Response
- ErrorMessage - empty for successful call
Sample Response – Expired or Invalid Token
Request
https://ws.mycubo.online/IntegrationService.svc/CreatePOI?token=$2a$10$PETZSdgJmRv243soXNqfeeU1I6t/RNu1XoPTmay/JpzMb2E635hhS&poiName=test&latitude=0&longitude=0&radius=1
Response
{
"ErrorMessage": "Token was expired."
}
Sample Response – Invalid Credentials
Request
https://ws.mycubo.online/IntegrationService.svc/CreatePOI?token=$2a$10$PETZSdgJmRv243soXNqfeeU1I6t/RNu1XoPTmay/JpzMb2E635hhS&poiName=test&latitude=0&longitude=0&radius=1
Response
{
"ErrorMessage": "Login failed. Please enter valid username and password."
}
Sample Request – Too Many Requests Per Minute
Request
https://ws.mycubo.online/IntegrationService.svc/CreatePOI?token=$2a$10$PETZSdgJmRv243soXNqfeeU1I6t/RNu1XoPTmay/JpzMb2E635hhS&poiName=test&latitude=0&longitude=0&radious=1
Response
{
"ErrorMessage": "Last request was 3 seconds ago. Request is allowed once per
60 second period."
}
Sample Request – Exists POI
Request
https://ws.mycubo.online/IntegrationService.svc/CreatePOI?token=$2a$10$PETZSdgJmRv243soXNqfeeU1I6t/RNu1XoPTmay/JpzMb2E635hhS&poiName=test&latitude=0&longitude=0&radious=1
Response
{
"ErrorMessage": "POI name already exists!",
"Processed": true,
"poiName": "testbrano"
}
Sample Request – To Close To Another POI
Request
https://ws.mycubo.online/IntegrationService.svc/CreatePOI?token=$2a$10$PETZSdgJmRv243soXNqfeeU1I6t/RNu1XoPTmay/JpzMb2E635hhS&poiName=test&latitude=0&longitude=0&radious=1
Response
{
"ErrorMessage": "POI is too close to another POI!",
"Processed": true,
"poiName": "testbrano"
}
Sample Request – Correct Request
Request
https://ws.mycubo.online/IntegrationService.svc/CreatePOI?token=$2a$10$PETZSdgJmRv243soXNqfeeU1I6t/RNu1XoPTmay/JpzMb2E635hhS&poiName=test&latitude=0&longitude=0&radious=1
Response
{
"ErrorMessage": "Successfullly created poi",
"Processed": true,
"poiName": "testbrano"
}
Comments
0 comments
Article is closed for comments.