---
title: "Update a rectangular geofence."
url: "https://developers.vzconnect.com/apis/geofence-api-1/versions/97ac0c29-6cea-4076-8841-35f03eedbd6c/operations/updateRectangleGeofence"
---

> Full API specification: https://developers.vzconnect.com/apis/geofence-api-1/versions/97ac0c29-6cea-4076-8841-35f03eedbd6c.md

# Update a rectangular geofence.

`PUT` `/geo/v1/geofences/rectangles/{placeid}`

Operation ID: `updateRectangleGeofence`

Edit an existing rectangular Geofence within REVEAL. If only an Address is provided, the address is referenced. If only coordinates are provided, the latitude and longitude are referenced (an error is returned if either is missing). If both are provided, the coordinate values are used. A Category Name may be supplied but must already exist within REVEAL and match exactly, otherwise an error is returned. PUT methods do not return an object review; the response is limited to standard HTTP codes. The PlaceID in the path identifies the Geofence.

## Path parameters

- `placeid` (string, required) - The PlaceID that uniquely identifies the Geofence within the REVEAL account.

## Request body (required)

Content types: `application/json`

## Responses

- `200` - Rectangular geofence successfully updated.
- `400` - Bad request. The request body is invalid.
- `401` - Unauthorized. Authentication credentials are missing or invalid.
- `404` - Geofence not found with the specified PlaceID.
- `500` - The service was unavailable at the time the call was made.

## OpenAPI definition

```yaml
openapi: 3.0.0
info:
  title: Geofence API
  version: "1.0"
servers:
  - url: https://api.us.vzconnect.com
paths:
  /geo/v1/geofences/rectangles/{placeid}:
    put:
      summary: Update a rectangular geofence.
      description: Edit an existing rectangular Geofence within REVEAL. If only an
        Address is provided, the address is referenced. If only coordinates are
        provided, the latitude and longitude are referenced (an error is
        returned if either is missing). If both are provided, the coordinate
        values are used. A Category Name may be supplied but must already exist
        within REVEAL and match exactly, otherwise an error is returned. PUT
        methods do not return an object review; the response is limited to
        standard HTTP codes. The PlaceID in the path identifies the Geofence.
      operationId: updateRectangleGeofence
      tags:
        - Geofence API
      x-kong-route-defaults:
        strip_path: false
        paths:
          - ~/geo/v1/geofences/rectangles/[^/]+/?$
      parameters:
        - name: placeid
          in: path
          required: true
          description: The PlaceID that uniquely identifies the Geofence within the REVEAL
            account.
          schema:
            type: string
            example: "996788"
      requestBody:
        description: Updated rectangle geofence details.
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/RectangleGeofenceRequest"
            example:
              LengthInKm: 1
              WidthInKm: 1
              PlaceId: "996788"
              GeoFenceName: Revtangle
              CategoryName: UnCategorized
              Address:
                AddressLine1: 4556 South Drive
                Locality: Seven Hills
                AdministrativeArea: Oh
                PostalCode: "44131"
                Country: USA
              IsShownOnMap: true
              IsShownOnReport: true
        required: true
      responses:
        "200":
          description: Rectangular geofence successfully updated.
        "400":
          description: Bad request. The request body is invalid.
        "401":
          description: Unauthorized. Authentication credentials are missing or invalid.
        "404":
          description: Geofence not found with the specified PlaceID.
        "500":
          description: The service was unavailable at the time the call was made.
components:
  schemas:
    RectangleGeofenceRequest:
      type: object
      description: Content data provided when creating or editing a rectangular Geofence.
      properties:
        LengthInKm:
          type: number
          format: double
          description: The length of the rectangular Geofence in kilometers.
          example: 1
        WidthInKm:
          type: number
          format: double
          description: The width of the rectangular Geofence in kilometers.
          example: 1
        PlaceId:
          type: string
          description: A unique value within a REVEAL account used to identify a Geofence.
            The Place ID is a mandatory field to use the Geospatial API.
          example: "996788"
        GeoFenceName:
          type: string
          description: The name of the Geofence.
          example: Revtangle
        CategoryName:
          type: string
          description: The name of the Category. Must already exist within REVEAL and
            match exactly, otherwise an error is returned.
          example: UnCategorized
        Address:
          $ref: "#/components/schemas/Address"
        Latitude:
          type: number
          format: double
          description: The latitude of the center point of the Geofence. Provide it
            together with Longitude. If both coordinates and an Address are
            provided, the coordinates are used.
          example: 41.391756
        Longitude:
          type: number
          format: double
          description: The longitude of the center point of the Geofence. Provide it
            together with Latitude. If both coordinates and an Address are
            provided, the coordinates are used.
          example: -81.670929
        EmailAddress:
          type: string
          description: An email address that can be associated with the saved Geofence.
          example: depot@example.com
        Note:
          type: string
          description: A free form text space for users to provide additional details
            about the Geofence location.
          example: Main depot
        PhoneNumber:
          type: string
          description: A Phone Number that can be associated with the saved Geofence.
          example: 216-522-2855
        IsShownOnMap:
          type: boolean
          description: Denotes if the Geofence can be displayed on the Map.
          default: true
          example: true
        IsShownOnReport:
          type: boolean
          description: Denotes if the Geofence can be displayed on Reports.
          default: true
          example: true
    Address:
      type: object
      description: Address contains the global standards for address components.
      properties:
        AddressLine1:
          type: string
          description: Location specific identification such as a house number.
          example: 2510 E Ridgewood Dr
        AddressLine2:
          type: string
          description: Additional information to identify location such as an apartment
            number.
          example: ""
        Locality:
          type: string
          description: City, town, etc.
          example: Seven Hills
        AdministrativeArea:
          type: string
          description: State, province, etc.
          example: OH
        PostalCode:
          type: string
          description: Postal code.
          example: "44131"
        Country:
          type: string
          description: Country.
          example: USA
```
