API - associate Geofence with the device

Eduardo Maciel5 years ago

Dear, does anyone know how to associate geofence to the device and user, using the Traccar API?
I did what the API documentation says, but it presents this error:

Table 'traccar.tc_attribute_calendar' doesn't exist - SQLSyntaxErrorException (... < QueryBuilder:480 < DataManager:441 < PermissionsResource:63 < ...)
Anton Tananaev5 years ago

Check what API requests the official web app sends.

Eduardo Maciel5 years ago

Anton,

I was able to link the device to the geofence using the API, but I can't disconnect. It doubles the link.

$url = 'http://209.126.5.95:8082/api/permissions';

$object = array('deviceId' => $deviceid, 'geofenceId' => $geofenceid);
Anton Tananaev5 years ago

Answer would be the same. Most likely you are using POST instead of DELETE.