Company Geofence Detail
This API is used for vehicle alert if entered in a particular set of geofence
GEThttps://yourdomain.com/webservice?token=getCompanyGeofenceDetail&username=XXX&password=XXX&company_name=XXX&vehicle_allocation=XXX
            Request Parameters
| Parameter | Type | Value | Description | 
|---|---|---|---|
| username | String | It is user name and is mandatory | |
| password | String | It is mandatory | |
| company_name | String | It is company name and is mandatory. | |
| vehicle_allocation | Boolean | It can have true or false as value and is not mandatory.If vehicle_allocation is true than it will also return alerts array in response and doesn't return alerts array if value is false. | 
Description
Method Name
getCompanyGeofenceDetail
Acceptance criteria
- License must not be expired.
- This API is valid for only Admin , Reseller and Company.
Response
| Key | Format | Mandatory | Description | 
| data | json | yes | Vehicle details | 
| data.geofence_details | array | yes | Vehicle geofence details | 
| data.geofence_details.name | string | yes | Geofence name | 
| data.geofence_details.points | array | yes | Contains Latitude , Longitude | 
| data.geofence_details.points.latitude | string | yes | latitude of point | 
| data.geofence_details.points..longitude | string | yes | longitude of point | 
| data.geofence_details.branch | string | yes | Branch name | 
| data.geofence_details.type | string | yes | Geofence shape type | 
| data.geofence_details.tolerance | integer | yes | Geofence tolerence | 
| data.geofence_details.radius | double | yes | radius of geofence | 
| geofence_details.alerts | array | no | vehicle wise alerts | 
| geofence_details.alerts.vehicles | array | no | vehicle number array | 
| geofence_details.alerts.alert_type | string | no | Type of alert | 
| geofence_details.alerts.all_vehicles | boolean | no | true if alerts is for all vehicles of the company else false | 
| Error Code | Status | 
| 0 | FAIL | 
| 1 | SUCCESS | 
Sample Response
SUCCESS{
  "result": 1,
  "data": {
    "geofence_details": [
      {
        "alerts": [
          {
            "vehicles": [
              {
                "vehicle_no": "XXX"
              },
              {
                "vehicle_no": "XXX"
              }
            ],
            "alert_type": "YYYY",
            "all_vehicles": false
          },
          {
            "vehicles": [],
            "alert_type": "XXXX",
            "all_vehicles": true
          }
        ],
        "name": "Geo",
        "radius": 252.25737799174635,
        "type": "circle",
        "branch": "--",
        "tolerance": 20,
        "points": [
          {
            "latitude": "23.885837699862005",
            "longitude": "72.33398437500001"
          }
        ]
      },
      {
        "alerts": [],
        "name": "polygon",
        "radius": 0,
        "type": "polygon",
        "branch": "--",
        "tolerance": 20,
        "points": [
          {
            "latitude": "25.74053",
            "longitude": "77.03613"
          },
          {
            "latitude": "25.02588",
            "longitude": "79.49707"
          }
        ]
      }
    ]
  },
  "message": ""
}{
    "result": 0,
    "message": "Incorrect username or password"
}{
   "result": 0,
   "message": "Invalid parameter"
}
{
   "result": 0,
   "message": "You do not have permission to perform this operation"
}
{
   "result": 0,
   "message": "License is expired for user"
}
{
   "result": 0,
   "message": "Company not found"
}
{
   "result": 0,
   "message": "You do not have rights for this company"
}
{
   "result": 0,
   "message": "Something went wrong on server"
}
Response codes
| Code | Description | 
|---|
Error codes
| Code | Name | Description | 
|---|