GeofenceModifiableFields
These are fields in the Geofence object that can be modified or provided as input when creating a new Geofence.
Required Fields
Only pname, latitude, longitude, and radius are required when creating a new Geofence.
Geofence Types
Currently, only circular geofences are supported. The type field must be set to "circle" (the default).
Future versions may support other geofence shapes like polygons.
Coordinate Validation
Both latitude and longitude cannot be exactly 0.0 simultaneously, as this represents a location
in the Atlantic Ocean off the coast of Africa and is likely an error.
The display name of the geofence. Must be unique across all geofences.
Possible values: non-empty and <= 100 characters
Downtown OfficeOptional description providing additional context about this geofence.
Possible values: <= 500 characters
Main office building and parking garageThe shape type of the geofence. Currently, only "circle" is supported.
Database Representation: The API accepts and returns string values, but the database stores this as an integer (1 = circle).
Possible values: [circle]
circlecircleThe latitude of the geofence center point in decimal degrees.
Must be between -90 (South Pole) and 90 (North Pole). Cannot be 0.0 if longitude is also 0.0.
Field Aliases: The API also accepts center_lat as an alternative field name.
Possible values: >= -90 and <= 90
30.2672The longitude of the geofence center point in decimal degrees.
Must be between -180 and 180. Cannot be 0.0 if latitude is also 0.0.
Field Aliases: The API also accepts center_lon as an alternative field name.
Possible values: >= -180 and <= 180
-97.7431The radius of the geofence in meters.
Must be greater than 0 and less than or equal to 100,000 meters (100 km / 62 miles).
Field Aliases: The API also accepts radius_meters as an alternative field name.
Possible values: >= 0.001 and <= 100000
100The minimum required GPS accuracy in meters for location validation.
When a user submits an entry with location data, if the GPS accuracy is worse (larger value) than this threshold, the validation will fail. Set to 0 to accept any accuracy level.
Field Aliases: The API also accepts min_accuracy_meters as an alternative field name.
Possible values: >= 0
1010Whether this geofence is currently active.
Inactive geofences are not enforced but remain in the system for historical or future use.
Database Representation: The API accepts and returns boolean values, but the database stores this as an integer (0 = false, 1 = true).
truetrueWhether this is a priority geofence.
When a user/project combination has multiple applicable geofences, if ANY of them are marked as priority, ONLY the priority geofences are checked. This allows you to create more restrictive boundaries that override general geofences.
For example, a general office geofence might cover a large area, but a priority geofence could restrict certain projects to a specific floor or section.
Database Representation: The API accepts and returns boolean values, but the database stores this as an integer (0 = false, 1 = true).
Field Aliases: The API also accepts priority as an alternative field name.
falsefalseOptional hex color code for displaying this geofence on a map.
Must be in the format #RRGGBB (e.g., #FF0000 for red, #3366CC for blue).
Possible values: Value must match regular expression ^#[0-9A-Fa-f]{6}$
#3366CCassignments object[]
List of entity assignments for this geofence.
When creating or updating a geofence, you can include an assignments array to specify
which users, groups, projects, or entry screens this geofence applies to.
Assignment Logic:
- A geofence can be assigned to multiple entities simultaneously
- Assignments use OR logic: a user only needs to match ONE assignment to have the geofence apply
- Group assignments apply to all users in that group
- Project assignments apply when any user logs time to that project
- Entry screen assignments apply when using that specific entry screen
Updating Assignments:
- Including an
assignmentsarray in a PUT request replaces ALL existing assignments - To add/remove individual assignments, you must send the complete desired list
- To clear all assignments, send an empty array:
"assignments": []
The database table name of the entity type being assigned.
Valid target tables:
users- Individual user assignmentsgroups- User group assignments (applies to all group members)projects- Project assignments (including PX tasks, which are projects)time_guis- Time entry screen assignmentsexpense_guis- Expense entry screen assignmentstravel_entry_guis- Custom entry screen assignments (formerly "Mileage Entry")
Possible values: [users, groups, projects, time_guis, expense_guis, travel_entry_guis]
usersThe ID of the entity being assigned. This must be a valid ID from the specified target_table.
When creating or updating assignments, the API validates that all referenced entities exist. If any target entity does not exist, the request will fail with a 400 Bad Request error.
5CD906A3941C463B9CC98F49DBCC25AA{
"pname": "Downtown Office",
"description": "Main office building and parking garage",
"type": "circle",
"latitude": 30.2672,
"longitude": -97.7431,
"radius": 100,
"min_accuracy": 10,
"active": true,
"is_priority": false,
"color": "#3366CC",
"assignments": [
{
"target_table": "users",
"target_id": "5CD906A3941C463B9CC98F49DBCC25AA"
}
]
}