Update a Saved Location

Update (replace) an existing Saved Location.

Request

HTTP Request

PUT https://api.predicthq.com/v1/saved-locations/

Path Parameters

ParameterDescription

location_id

An existing Saved Location ID.

Request Headers

HeaderValue

Content-Type

application/json

Request Body

This endpoint accepts the same request body fields as the Create a Saved Location endpoint. Please refer to the Create a Saved Location documentation for request body parameters.

Remember this is a PUT endpoint which means you must provide all supported fields or you may lose data - you are effectively replacing the existing record with a new record containing all the fields you provide. We recommend first getting the existing record and pre-populating the request body with the current values, then change the fields you need to change.

Response

If successful, the HTTP response code will be 204 No Content.

Examples

curl --location --request PUT 'https://api.predicthq.com/v1/saved-locations/5BcRstnNPjXl-fiB_0TQJg' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer TOKEN' \
--data '{
    "name": "S Las Vegas Blvd, Las Vegas (NV), US",
    "labels": [],
    "geojson": {
        "type": "Feature",
        "properties": {
            "radius": 1,
            "radius_unit": "mi"
        },
        "geometry": {
            "type": "Point",
            "coordinates": [
                -115.1728484,
                36.1147065
            ]
        }
    }
}'

Guides

Below are some guides relevant to this API:

Last updated

© 2024 PredictHQ Ltd