Skip to main content

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.

pnamestringrequired

The display name of the geofence. Must be unique across all geofences.

Possible values: non-empty and <= 100 characters

Example: Downtown Office
descriptionstring

Optional description providing additional context about this geofence.

Possible values: <= 500 characters

Default value:
Example: Main office building and parking garage
typestring

The 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]

Default value: circle
Example: circle
latitudenumber<float>required

The 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

Example: 30.2672
longitudenumber<float>required

The 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

Example: -97.7431
radiusnumber<float>required

The 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

Example: 100
min_accuracynumber<float>

The 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

Default value: 10
Example: 10
activeboolean

Whether 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).

Default value: true
Example: true
is_priorityboolean

Whether 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.

Default value: false
Example: false
colorstringnullable

Optional 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}$

Example: #3366CC
assignments 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 assignments array 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": []
  • Array [
  • target_tablestringrequired

    The database table name of the entity type being assigned.

    Valid target tables:

    • users - Individual user assignments
    • groups - User group assignments (applies to all group members)
    • projects - Project assignments (including PX tasks, which are projects)
    • time_guis - Time entry screen assignments
    • expense_guis - Expense entry screen assignments
    • travel_entry_guis - Custom entry screen assignments (formerly "Mileage Entry")

    Possible values: [users, groups, projects, time_guis, expense_guis, travel_entry_guis]

    Example: users
    target_idstringrequired

    The 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.

    Example: 5CD906A3941C463B9CC98F49DBCC25AA
  • ]
  • GeofenceModifiableFields
    {
    "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"
    }
    ]
    }