Edit Locations

There are two ways of editing an existing location

📘

Go to Create Locations for reference on properties

Refer to the Create Locations page to see the required and allowed properties to perform these operations.

1. Edit the location by providing only the properties that need to be updated

PATCH: /api/v3/locations//

$ curl -X PATCH \
  https://www.zenput.com/api/v3/locations/<location-id>/ \
    -H 'content-type: application/json' \
  -H 'X-API-TOKEN: your-api-token-goes-here' \
  -d '{
  "phone": "703-233-1234",
}'

2. Replace the entire location

PUT: /api/v3/locations//

$ curl -X PUT \
  https://www.zenput.com/api/v3/location/<location-id>/ \
    -H 'content-type: application/json' \
  -H 'X-API-TOKEN: your-api-token-goes-here' \
  -d '{
  "name": "Location name",
  "address": "5394 Banding Parkway",
  "city": "Richmond",
  "state": "VA",
  "zipcode": "23289",
  "country": "US",
  "email": "[email protected]",
  "phone": "703-233-1234",
  "external_key": "1234",
  "owners": [
    {
      "username": "[email protected]"
    }
  ],
  "teams": [
    {
      "name": "Team name"
    }
  ]
}'

❗️

Don't forget the trailing slash!

Both PUT and PATCH requests need to have a trailing slash on the URL.