---
title: "Update place"
method: PUT
path: "/places/{id}"
tags: ["Places"]
---

# Update place

`PUT /places/{id}`

## Request

- Base URL: `https://api.faireplace.com/api`
- URL: `https://api.faireplace.com/api/places/{id}`
- Auth: HTTP bearer

## Path parameters

- `id` string, uuid, required

## Request body

- UpdatePlace: Data for updating an existing place. **Update behavior for optional fields**: - **Field absent**: the existing value is preserved (no modification) - **Field present with `null`**: the value is removed (set to NULL in the database) - **Field present with a value**: the value is updated **Fields affected by this behavior**: - `address_complement`: can be set to `null` to remove the value - `street_number`: can be set to `null` to remove the value - `locality`: can be set to `null` to remove the value - `postal_box`: can be set to `null` to remove the value - `latitude`: can be set to `null` to remove the value - `longitude`: can be set to `null` to remove the value **Fields assigned directly (can already be set to null)**: - `description`, `digicode`, `number_of_floor`, `renovation_date`
  - `name` string, nullable
  - `country` string, nullable
  - `address_complement` string, nullable: Address complement. **Update behavior**: - Field absent: the existing value is preserved - `null`: the value is removed (set to NULL in the database) - String: the value is updated
  - `street_number` string, nullable: Street number. **Update behavior**: - Field absent: the existing value is preserved - `null`: the value is removed (set to NULL in the database) - String: the value is updated
  - `street_name` string, nullable
  - `locality` string, nullable: Locality. **Update behavior**: - Field absent: the existing value is preserved - `null`: the value is removed (set to NULL in the database) - String: the value is updated
  - `postal_code` string, nullable
  - `city` string, nullable
  - `postal_box` string, nullable: Postal box. **Update behavior**: - Field absent: the existing value is preserved - `null`: the value is removed (set to NULL in the database) - String: the value is updated
  - `latitude` number, nullable: GPS latitude. **Update behavior**: - Field absent: the existing value is preserved - `null`: the value is removed (set to NULL in the database) - Number: the value is updated
  - `longitude` number, nullable: GPS longitude. **Update behavior**: - Field absent: the existing value is preserved - `null`: the value is removed (set to NULL in the database) - Number: the value is updated
  - `description` string, nullable
  - `type_id` string, uuid, nullable
  - `country_id` string, uuid, nullable
  - `digicode` string, nullable
  - `number_of_floor` integer, nullable
  - `place_category` 'Individual' | 'Collective': Place category (individual or collective)
  - `legal_regime` 'MonoPropriete' | 'Copropriete': Legal regime of the place
  - `renovation_date` string, date-time, nullable

## Response `200`

OK

- Place
  - `id` string, uuid, nullable
  - `name` string, nullable
  - `country` string, nullable
  - `address_complement` string, nullable
  - `street_number` string, nullable
  - `street_name` string, nullable
  - `locality` string, nullable
  - `postal_code` string, nullable
  - `city` string, nullable
  - `postal_box` string, nullable
  - `latitude` number, nullable
  - `longitude` number, nullable
  - `description` string, nullable
  - `type_id` string, uuid, nullable
  - `country_id` string, uuid, nullable
  - `digicode` string, nullable
  - `number_of_floor` integer, nullable
  - `owner_id` string, uuid, nullable
  - `previous_owner_id` string, uuid, nullable
  - `construction_date` string, date-time, nullable
  - `renovation_date` string, date-time, nullable
  - `place_category` 'Individual' | 'Collective': Place category (individual or collective)
  - `legal_regime` 'MonoPropriete' | 'Copropriete': Legal regime of the place
  - `created_at` string, date-time, nullable
  - `updated_at` string, date-time, nullable

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not found
- `422`: Unprocessable Entity
- `500`: Internal Server Error

---

[API](https://skmtc.dev/faireplace/apis/faireplace-property-management-api.md) · [All operations](https://skmtc.dev/faireplace/apis/faireplace-property-management-api/llms.txt) · [OpenAPI document](https://skmtc.dev/faireplace/apis/faireplace-property-management-api/revisions/69de39762919?raw)
