Skip to content

GPS Geofence Operations API Endpoints

This document outlines the structure and versioning approach for geofence features used in the system, including both gps-geofence geofences.

Update GPS-Geofences

Endpoint:

POST api/v9/content/draft/clients/{clientIdentifier}/sites/{siteIdentifier}/gps-geofences

Description:

It deletes all existing gps-geofences for the given site 'siteIdentifier', then inserts the new data provided in the request payload.

Validations
  • Request body must be in geojson format and conform to schema rules. (Click here to view schema rules)
  • typeCode should be type of "Gps-Geofences".
  • fid is required and must be unique.
  • sid is required.
  • siteIdentifier given from url must match sid.
  • name should be unique for site based.
  • Each enterNotification and exitNotification object must include the following fields:
  • once: true or false
  • message: (at least default language required)
  • coolDownMinutes: if once: false, this property is mandatory (duration in minutes)

Requests:

{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "properties": {
        "sid": "6baa9455-e3e7-0682-1643-046359897187",
        "fid": "6baa9455-e3e7-0682-1643-046359897187",
        "name": "M+MUSEUM_ENTER",
        "typeCode": "gps-geofence",
        "enterNotification": {
          "once": false,
          "message": "entered blah",
          "message_el": "greek enter",
          "message_tr_TR": "turkish enter",
          "coolDownMinutes": 30
        },
        "exitNotification": {
          "once": true,
          "message": "exited blah",
          "message_el": "greek exit",
          "message_tr_TR": "turkish exit",
          "coolDownMinutes": 30
        },
        "extra": {}
      },
      "geometry": {
        "coordinates": [
          [
            [
              0.03850703,
              0.06771042
            ],
            [
              0.03874183,
              0.06771099
            ],
            [
              0.0387452,
              0.06771097
            ],
            [
              0.03874524,
              0.06776459
            ],
            [
              0.03874296,
              0.06803444
            ],
            [
              0.03874296,
              0.06803849
            ],
            [
              0.03861891,
              0.06803849
            ],
            [
              0.03852766,
              0.06803799
            ],
            [
              0.03850798,
              0.06801445
            ],
            [
              0.03850703,
              0.06771042
            ]
          ]
        ],
        "type": "Polygon"
      }
    }
  ]
}

Success Response:

{
  "message": "Gps-geofences for site '{siteIdentifier}' were successfully processed."
}


* You can access the possible response codes you may encounter here.


Delete GPS-Geofences

Endpoint:

DELETE api/v9/content/draft/clients/{clientIdentifier}/sites/{siteIdentifier}/gps-geofences

Description:
Deletes all features classified as gps-geofence of the selected site.

Success Response:

{
  "message": "Gps-geofences for site '{siteIdentifier}' were successfully deleted."
}


* You can access the possible response codes you may encounter here.


Get Draft Client GPS-Geofences

Endpoint:

GET api/v9/content/draft/clients/{clientIdentifier}/gps-geofences

Description:
Returns all draft features classified as gps-geofence of the selected client.

Success Response:

{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "properties": {
        "sid": "2c1857eb-be6e-4d4f-a328-24fee76231c1",
        "fid": "2c1857eb-be6e-4d4f-a328-24fee76231c1",
        "name": "no17",
        "eid": "eid",
        "typeCode": "gps-geofence",
        "enterNotification": {
          "once": false,
          "message": "entered blah",
          "message_el": "greek enter",
          "message_tr_TR": "turkish enter",
          "coolDownMinutes": 30
        },
        "exitNotification": {
          "once": true,
          "message": "exited blah",
          "message_el": "greek exit",
          "message_tr_TR": "turkish exit",
          "coolDownMinutes": 30
        },
        "extra": {}
      },
      "geometry": {
        "coordinates": [
          [
            [
              0.03850703,
              0.06771042
            ],
            [
              0.03874183,
              0.06771099
            ],
            [
              0.0387452,
              0.06771097
            ],
            [
              0.03874524,
              0.06776459
            ],
            [
              0.03874296,
              0.06803444
            ],
            [
              0.03874296,
              0.06803849
            ],
            [
              0.03861891,
              0.06803849
            ],
            [
              0.03852766,
              0.06803799
            ],
            [
              0.03850798,
              0.06801445
            ],
            [
              0.03850703,
              0.06771042
            ]
          ]
        ],
        "type": "Polygon"
      }
    }
  ]
}


* You can access the possible response codes you may encounter here.


Get Draft Site GPS-Geofences

Endpoint:

GET api/v9/content/draft/clients/{clientIdentifier}/sites/{siteIdentifier}/gps-geofences

Description:
Returns all draft features classified as gps-geofence of the selected site.

Success Response:

{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "properties": {
        "sid": "2c1857eb-be6e-4d4f-a328-24fee76231c1",
        "fid": "2c1857eb-be6e-4d4f-a328-24fee76231c1",
        "name": "no17",
        "eid": "eid",
        "typeCode": "gps-geofence",
        "enterNotification": {
          "once": false,
          "message": "entered blah",
          "message_el": "greek enter",
          "message_tr_TR": "turkish enter",
          "coolDownMinutes": 30
        },
        "exitNotification": {
          "once": true,
          "message": "exited blah",
          "message_el": "greek exit",
          "message_tr_TR": "turkish exit",
          "coolDownMinutes": 30
        },
        "extra": {}
      },
      "geometry": {
        "coordinates": [
          [
            [
              0.03850703,
              0.06771042
            ],
            [
              0.03874183,
              0.06771099
            ],
            [
              0.0387452,
              0.06771097
            ],
            [
              0.03874524,
              0.06776459
            ],
            [
              0.03874296,
              0.06803444
            ],
            [
              0.03874296,
              0.06803849
            ],
            [
              0.03861891,
              0.06803849
            ],
            [
              0.03852766,
              0.06803799
            ],
            [
              0.03850798,
              0.06801445
            ],
            [
              0.03850703,
              0.06771042
            ]
          ]
        ],
        "type": "Polygon"
      }
    }
  ]
}


* You can access the possible response codes you may encounter here.


Get Published Client GPS-Geofences

Endpoint:

GET api/v9/content/published/clients/{clientIdentifier}/gps-geofences

Description:
Returns published features classified as gps-geofence of the selected client.

Success Response:

{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "properties": {
        "sid": "2c1857eb-be6e-4d4f-a328-24fee76231c1",
        "fid": "2c1857eb-be6e-4d4f-a328-24fee76231c1",
        "name": "no17",
        "eid": "eid",
        "typeCode": "gps-geofence",
        "enterNotification": {
          "once": false,
          "message": "entered blah",
          "message_el": "greek enter",
          "message_tr_TR": "turkish enter",
          "coolDownMinutes": 30
        },
        "exitNotification": {
          "once": true,
          "message": "exited blah",
          "message_el": "greek exit",
          "message_tr_TR": "turkish exit",
          "coolDownMinutes": 30
        },
        "extra": {}
      },
      "geometry": {
        "coordinates": [
          [
            [
              0.03850703,
              0.06771042
            ],
            [
              0.03874183,
              0.06771099
            ],
            [
              0.0387452,
              0.06771097
            ],
            [
              0.03874524,
              0.06776459
            ],
            [
              0.03874296,
              0.06803444
            ],
            [
              0.03874296,
              0.06803849
            ],
            [
              0.03861891,
              0.06803849
            ],
            [
              0.03852766,
              0.06803799
            ],
            [
              0.03850798,
              0.06801445
            ],
            [
              0.03850703,
              0.06771042
            ]
          ]
        ],
        "type": "Polygon"
      }
    }
  ]
}


* You can access the possible response codes you may encounter here.


Get Published Site GPS-Geofences

Endpoint:

GET api/v9/content/published/clients/{clientIdentifier}/sites/{siteIdentifier}/gps-geofences

Description:
Returns published features classified as gps-geofence of the selected site.

Success Response:

{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "properties": {
        "sid": "2c1857eb-be6e-4d4f-a328-24fee76231c1",
        "fid": "2c1857eb-be6e-4d4f-a328-24fee76231c1",
        "name": "no17",
        "eid": "eid",
        "typeCode": "gps-geofence",
        "enterNotification": {
          "once": false,
          "message": "entered blah",
          "message_el": "greek enter",
          "message_tr_TR": "turkish enter",
          "coolDownMinutes": 30
        },
        "exitNotification": {
          "once": true,
          "message": "exited blah",
          "message_el": "greek exit",
          "message_tr_TR": "turkish exit",
          "coolDownMinutes": 30
        },
        "extra": {}
      },
      "geometry": {
        "coordinates": [
          [
            [
              0.03850703,
              0.06771042
            ],
            [
              0.03874183,
              0.06771099
            ],
            [
              0.0387452,
              0.06771097
            ],
            [
              0.03874524,
              0.06776459
            ],
            [
              0.03874296,
              0.06803444
            ],
            [
              0.03874296,
              0.06803849
            ],
            [
              0.03861891,
              0.06803849
            ],
            [
              0.03852766,
              0.06803799
            ],
            [
              0.03850798,
              0.06801445
            ],
            [
              0.03850703,
              0.06771042
            ]
          ]
        ],
        "type": "Polygon"
      }
    }
  ]
}


* You can access the possible response codes you may encounter here.