Update user geofence by id​
PUT
/users/{id}/geofences/{fk}
Authorizations​
ApiKeyAuth
API Key for authentication. Retrieval from either API version login routes, or other authentication token type. See Authentication for more details.
Type
API Key (header: Authorization)
Example
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."Parameters​
Path Parameters
id*
user id
Type
Requiredstring
Format
"JSON"fk*
Foreign key for geofences
Type
Requirednumber
Format
"integer"Request Body​
JSON"outline": [{}],"center": {"lat": 0,"lng": 0},"radius": 0,"type": "string","name": "string","wasInside": false,"lastChecked": "string","modified": false,"meta": {},"foreignId": "string","id": 0,"deviceId": 0,"configId": 0,"userId": 0
{
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
}
PUT
/users/{id}/geofences/{fk}
Request example
Responses​
Body (JSON)
application/json
JSON"outline": [{}],"center": {"lat": 0,"lng": 0},"radius": 0,"type": "string","name": "string","wasInside": false,"lastChecked": "string","modified": false,"meta": {},"foreignId": "string","id": 0,"deviceId": 0,"configId": 0,"userId": 0
{
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
}
Try this endpoint
Playground​
Authorization
Variables
Key
Value
Body
OpenAPI definition ​
References are expanded below, except recursive definitions and references with sibling fields. Documentation overrides are included. Full original OpenAPI spec (JSON).
View endpoint OpenAPI definition
yaml
openapi: 3.1.0
info:
version: 1.1.0
title: TrackingAPI
description: V1 API for retrieving tracking data and changing settings on Lightbug devices
servers:
- url: https://api.lightbug.cloud/api
externalDocs: {}
security:
- ApiKeyAuth: []
tags: []
paths:
/users/{id}/geofences/{fk}:
put:
tags:
- geofences
summary: Update user geofence by id
parameters:
- name: id
in: path
description: user id
required: true
schema:
type: string
format: JSON
- name: fk
in: path
description: Foreign key for geofences
required: true
schema:
type: number
format: integerrequestBody:
yaml
content:
application/json:
schema:
properties:
outline:
description: Array of {lat:x,lng:y} objects representing the vertices of the polygon. Do not use with center and radius.
type: array
items:
type: object
center:
properties:
lat:
type: number
lng:
type: number
type: object
radius:
description: For circular geofences, the radius of the circle in meters. Property is ignored if outline != null.
type: number
format: ''
type:
description: Grouping value
type: string
name:
type: string
wasInside:
default: false
description: If the last point received was inside the geofence. Only updated for notifications (not the safe-zone as that is evaluated on the device)
type: boolean
lastChecked:
description: When the geofence was last evaluated. Only updated for notifications (not the safe-zone as that is evaluated on the device)
type: string
format: date-time
modified:
default: false
type: boolean
meta:
type: object
foreignId:
type: string
id:
type: number
format: ''
deviceId:
type: number
format: ''
configId:
type: number
format: ''
userId:
type: number
format: ''
type: object
application/x-www-form-urlencoded:
schema:
properties:
outline:
description: Array of {lat:x,lng:y} objects representing the vertices of the polygon. Do not use with center and radius.
type: array
items:
type: object
center:
properties:
lat:
type: number
lng:
type: number
type: object
radius:
description: For circular geofences, the radius of the circle in meters. Property is ignored if outline != null.
type: number
format: ''
type:
description: Grouping value
type: string
name:
type: string
wasInside:
default: false
description: If the last point received was inside the geofence. Only updated for notifications (not the safe-zone as that is evaluated on the device)
type: boolean
lastChecked:
description: When the geofence was last evaluated. Only updated for notifications (not the safe-zone as that is evaluated on the device)
type: string
format: date-time
modified:
default: false
type: boolean
meta:
type: object
foreignId:
type: string
id:
type: number
format: ''
deviceId:
type: number
format: ''
configId:
type: number
format: ''
userId:
type: number
format: ''
type: object
application/xml:
schema:
properties:
outline:
description: Array of {lat:x,lng:y} objects representing the vertices of the polygon. Do not use with center and radius.
type: array
items:
type: object
center:
properties:
lat:
type: number
lng:
type: number
type: object
radius:
description: For circular geofences, the radius of the circle in meters. Property is ignored if outline != null.
type: number
format: ''
type:
description: Grouping value
type: string
name:
type: string
wasInside:
default: false
description: If the last point received was inside the geofence. Only updated for notifications (not the safe-zone as that is evaluated on the device)
type: boolean
lastChecked:
description: When the geofence was last evaluated. Only updated for notifications (not the safe-zone as that is evaluated on the device)
type: string
format: date-time
modified:
default: false
type: boolean
meta:
type: object
foreignId:
type: string
id:
type: number
format: ''
deviceId:
type: number
format: ''
configId:
type: number
format: ''
userId:
type: number
format: ''
type: object
text/xml:
schema:
properties:
outline:
description: Array of {lat:x,lng:y} objects representing the vertices of the polygon. Do not use with center and radius.
type: array
items:
type: object
center:
properties:
lat:
type: number
lng:
type: number
type: object
radius:
description: For circular geofences, the radius of the circle in meters. Property is ignored if outline != null.
type: number
format: ''
type:
description: Grouping value
type: string
name:
type: string
wasInside:
default: false
description: If the last point received was inside the geofence. Only updated for notifications (not the safe-zone as that is evaluated on the device)
type: boolean
lastChecked:
description: When the geofence was last evaluated. Only updated for notifications (not the safe-zone as that is evaluated on the device)
type: string
format: date-time
modified:
default: false
type: boolean
meta:
type: object
foreignId:
type: string
id:
type: number
format: ''
deviceId:
type: number
format: ''
configId:
type: number
format: ''
userId:
type: number
format: ''
type: object
description: Body (JSON)yaml
responses:'200':
yaml
description: Body (JSON)
content:
application/json:
schema:
properties:
outline:
description: Array of {lat:x,lng:y} objects representing the vertices of the polygon. Do not use with center and radius.
type: array
items:
type: object
center:
properties:
lat:
type: number
lng:
type: number
type: object
radius:
description: For circular geofences, the radius of the circle in meters. Property is ignored if outline != null.
type: number
format: ''
type:
description: Grouping value
type: string
name:
type: string
wasInside:
default: false
description: If the last point received was inside the geofence. Only updated for notifications (not the safe-zone as that is evaluated on the device)
type: boolean
lastChecked:
description: When the geofence was last evaluated. Only updated for notifications (not the safe-zone as that is evaluated on the device)
type: string
format: date-time
modified:
default: false
type: boolean
meta:
type: object
foreignId:
type: string
id:
type: number
format: ''
deviceId:
type: number
format: ''
configId:
type: number
format: ''
userId:
type: number
format: ''
type: objectyaml
deprecated: false
security:
- ApiKeyAuth: []
operationId: put-users-id-geofences-fk
components:
securitySchemes:
ApiKeyAuth:
in: header
name: Authorization
type: apiKey
description: API Key for authentication. Retrieval from either API version login routes, or other authentication token type. See <a href='/apis/authentication'>Authentication</a> for more details.
example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...