---
title: "Update a gallery photo's place"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.nicer.travel/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a gallery photo's place

Path: Nicer API › User places

`PUT /user-places/{id}`

URL: `https://api.nicer.travel/user-places/{id}`

Corrects where one of the caller's own gallery photos was taken (city, state, country, country code, street address, postal code, latitude and longitude) or its description, and answers the place as stored. A changed country is looked up again for the photo's album. Only the photo's owner may call it: the place is looked up under the caller.

## Authentication

- `bearerAuth`, http bearer, header `Authorization`, format `JWT`

## Path parameters

- `id` (`userPlaces.update.path.id`; string, required)

## Request body

_Required._

- `city` (`userPlaces.update.city`; string, optional)
- `country` (`userPlaces.update.country`; string, optional)
- `countryCode` (`userPlaces.update.countryCode`; string, optional)
- `description` (`userPlaces.update.description`; string, optional)
- `fullAddress` (`userPlaces.update.fullAddress`; string, optional)
- `latitude` (`userPlaces.update.latitude`; number, optional)
- `longitude` (`userPlaces.update.longitude`; number, optional)
- `state` (`userPlaces.update.state`; string, optional)
- `zipCode` (`userPlaces.update.zipCode`; string, optional)

## Example request

```json
{
  "city": "string",
  "country": "string",
  "countryCode": "string",
  "description": "string",
  "fullAddress": "string",
  "latitude": 0,
  "longitude": 0,
  "state": "string",
  "zipCode": "string"
}
```

## Code samples

### JavaScript SDK

```javascript
import { createClient } from "@nicertravel/sdk";

const nicer = createClient({
  baseUrl: "https://api.nicer.travel",
  token: process.env.NICER_TOKEN,
});

await nicer.userPlaces.update({
  "id": "string"
});
```

### Nicer CLI

```bash
nicer user-places update --id 'string' --input - <<'JSON'
{}
JSON
```

### cURL

```bash
curl --request PUT \
  --url 'https://api.nicer.travel/user-places/<id>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "city": "string",
  "country": "string",
  "countryCode": "string",
  "description": "string",
  "fullAddress": "string",
  "latitude": 0,
  "longitude": 0,
  "state": "string",
  "zipCode": "string"
}
'
```

### TypeScript

```typescript
const url = 'https://api.nicer.travel/user-places/<id>';
const options = {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
    Authorization: 'Bearer <token>'
  },
  body: JSON.stringify({
    city: 'string',
    country: 'string',
    countryCode: 'string',
    description: 'string',
    fullAddress: 'string',
    latitude: 0,
    longitude: 0,
    state: 'string',
    zipCode: 'string'
  })
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.nicer.travel/user-places/<id>"

payload = {
    "city": "string",
    "country": "string",
    "countryCode": "string",
    "description": "string",
    "fullAddress": "string",
    "latitude": 0,
    "longitude": 0,
    "state": "string",
    "zipCode": "string"
}
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
}

response = requests.put(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 200

OK

#### Example

```json
{
  "capturedAt": "string",
  "city": "string",
  "country": "string",
  "countryCode": "string",
  "createdBy": "string",
  "description": "string",
  "errorCode": "string",
  "errorMessage": "string",
  "fileName": "string",
  "fullAddress": "string",
  "hasError": true,
  "imageUri": "string",
  "lastModifiedBy": "string",
  "latitude": 0,
  "locationCountry": {
    "address": "string",
    "amenities": [
      "string"
    ],
    "city": "string",
    "country": "string",
    "countryCode": "string",
    "description": "string",
    "fullAddress": "string",
    "latitude": 0,
    "longitude": 0,
    "name": "string",
    "photos": [
      {
        "key": "string",
        "name": "string",
        "source": "string",
        "url": "string"
      }
    ],
    "placeId": "string",
    "placeTypes": [
      "string"
    ],
    "primaryType": "lodging",
    "source": "string",
    "state": "string",
    "zipCode": "string"
  },
  "longitude": 0,
  "state": "string",
  "zipCode": "string",
  "id": "string",
  "userId": "string",
  "createdAt": "string",
  "updatedAt": "string",
  "type": "UserPlace"
}
```

- `createdBy` (`userPlaces.update.response.200.createdBy`; string, required)
- `hasError` (`userPlaces.update.response.200.hasError`; boolean, required) — Whether processing the location of the photo failed.
- `imageUri` (`userPlaces.update.response.200.imageUri`; string, required) — The photo: its storage key, which the gallery listing answers as an absolute URL.
- `lastModifiedBy` (`userPlaces.update.response.200.lastModifiedBy`; string, required)
- `id` (`userPlaces.update.response.200.id`; string, required)
- `userId` (`userPlaces.update.response.200.userId`; string, required) — The person whose gallery holds the photo.
- `createdAt` (`userPlaces.update.response.200.createdAt`; string, required)
- `updatedAt` (`userPlaces.update.response.200.updatedAt`; string, required)
- `type` (`userPlaces.update.response.200.type`; string, required)
- `capturedAt` (`userPlaces.update.response.200.capturedAt`; any of, optional) — When the photo was taken, from the upload's metadata; null when it carried none.
  - any of the following: `string`, `null`
- `city` (`userPlaces.update.response.200.city`; any of, optional)
  - any of the following: `string`, `null`
- `country` (`userPlaces.update.response.200.country`; any of, optional)
  - any of the following: `string`, `null`
- `countryCode` (`userPlaces.update.response.200.countryCode`; any of, optional)
  - any of the following: `string`, `null`
- `description` (`userPlaces.update.response.200.description`; any of, optional) — A brief description of the place or of the visit.
  - any of the following: `string`, `null`
- `errorCode` (`userPlaces.update.response.200.errorCode`; any of, optional) — Set when processing the location failed.
  - any of the following: `string`, `null`
- `errorMessage` (`userPlaces.update.response.200.errorMessage`; any of, optional)
  - any of the following: `string`, `null`
- `fileName` (`userPlaces.update.response.200.fileName`; any of, optional) — The name of the uploaded file.
  - any of the following: `string`, `null`
- `fullAddress` (`userPlaces.update.response.200.fullAddress`; any of, optional)
  - any of the following: `string`, `null`
- `latitude` (`userPlaces.update.response.200.latitude`; any of, optional)
  - any of the following: `number`, `null`
- `locationCountry` (`userPlaces.update.response.200.locationCountry`; any of, optional) — The photo's country, as the place lookup found it.
  - any of the following:
    - `object`
      - `address` (`userPlaces.update.response.200.locationCountry.1.address`; string, required) — The short address; empty when the place has none.
      - `country` (`userPlaces.update.response.200.locationCountry.1.country`; string, required) — The country's name; empty when the place has none.
      - `fullAddress` (`userPlaces.update.response.200.locationCountry.1.fullAddress`; string, required) — The full address; empty when the place has none.
      - `amenities` (`userPlaces.update.response.200.locationCountry.1.amenities`; array of string, optional)
      - `city` (`userPlaces.update.response.200.locationCountry.1.city`; string, optional)
      - `countryCode` (`userPlaces.update.response.200.locationCountry.1.countryCode`; string, optional)
      - `description` (`userPlaces.update.response.200.locationCountry.1.description`; string, optional)
      - `latitude` (`userPlaces.update.response.200.locationCountry.1.latitude`; number, optional)
      - `longitude` (`userPlaces.update.response.200.locationCountry.1.longitude`; number, optional)
      - `name` (`userPlaces.update.response.200.locationCountry.1.name`; string, optional)
      - `photos` (`userPlaces.update.response.200.locationCountry.1.photos`; array of object, optional) — Up to four photos when they were asked for; empty otherwise.
        - `name` (`userPlaces.update.response.200.locationCountry.1.photos.name`; string, required)
        - `url` (`userPlaces.update.response.200.locationCountry.1.photos.url`; string, required)
        - `key` (`userPlaces.update.response.200.locationCountry.1.photos.key`; string, optional)
        - `source` (`userPlaces.update.response.200.locationCountry.1.photos.source`; string, optional)
      - `placeId` (`userPlaces.update.response.200.locationCountry.1.placeId`; string, optional)
      - `placeTypes` (`userPlaces.update.response.200.locationCountry.1.placeTypes`; array of string, optional) — Every type the directory gives the place, as it spells them.
      - `primaryType` (`userPlaces.update.response.200.locationCountry.1.primaryType`; string, optional) — The place's most relevant type.
        - one of `"lodging"`, `"restaurant"`, `"tourist_attraction"`, `"shopping_mall"`, `"airport"`, `"hospital"`, `"school"`, `"gas_station"`, `"bank"`, `"atm"`, `"pharmacy"`, `"store"`, `"museum"`, `"park"`, `"gym"`, `"movie_theater"`, `"night_club"`, `"bar"`, `"cafe"`, `"church"`, `"mosque"`, `"synagogue"`, `"hindu_temple"`, `"library"`, `"university"`, `"subway_station"`, `"train_station"`, `"bus_station"`, `"taxi_stand"`, `"car_rental"`, `"beauty_salon"`, `"spa"`, `"doctor"`, `"dentist"`, `"veterinary_care"`, `"zoo"`, `"amusement_park"`, `"casino"`, `"bowling_alley"`, `"stadium"`, `"post_office"`, `"police"`, `"fire_station"`, `"city_hall"`, `"courthouse"`, `"embassy"`, `"locality"`, `"administrative_area_level_1"`, `"administrative_area_level_2"`, `"country"`, `"city"`, `"region"`, `"state"`, `"neighborhood"`, `"sublocality"`, `"establishment"`, `"point_of_interest"`
      - `source` (`userPlaces.update.response.200.locationCountry.1.source`; string, optional) — The directory the place comes from.
      - `state` (`userPlaces.update.response.200.locationCountry.1.state`; string, optional)
      - `zipCode` (`userPlaces.update.response.200.locationCountry.1.zipCode`; string, optional)
    - `null`
- `longitude` (`userPlaces.update.response.200.longitude`; any of, optional)
  - any of the following: `number`, `null`
- `state` (`userPlaces.update.response.200.state`; any of, optional)
  - any of the following: `string`, `null`
- `zipCode` (`userPlaces.update.response.200.zipCode`; any of, optional)
  - any of the following: `string`, `null`

### 400

Request failed. `errorCode` is stable; `errorMessage` is for humans.

#### Example

```json
{
  "errorCode": "string",
  "errorMessage": "string"
}
```

- `errorCode` (`userPlaces.update.response.400.errorCode`; string, required)
- `errorMessage` (`userPlaces.update.response.400.errorMessage`; string, required)

### 401

Request failed. `errorCode` is stable; `errorMessage` is for humans.

#### Example

```json
{
  "errorCode": "string",
  "errorMessage": "string"
}
```

- `errorCode` (`userPlaces.update.response.401.errorCode`; string, required)
- `errorMessage` (`userPlaces.update.response.401.errorMessage`; string, required)

### 403

Request failed. `errorCode` is stable; `errorMessage` is for humans.

#### Example

```json
{
  "errorCode": "string",
  "errorMessage": "string"
}
```

- `errorCode` (`userPlaces.update.response.403.errorCode`; string, required)
- `errorMessage` (`userPlaces.update.response.403.errorMessage`; string, required)


Source: https://docs.nicer.travel/api/User-places/userPlaces.update/index.md
