---
title: "`PUT /places`: replace the caller's place dataset and rebuild its search index."
method: PUT
path: "/places"
tags: ["places"]
---

# \`PUT /places\`: replace the caller's place dataset and rebuild its search index.

`PUT /places`

## Request

- Base URL: `https://api.mapmap.ai`
- URL: `https://api.mapmap.ai/places`
- Auth: one of:
  - HTTP bearer
  - API key in query parameter `api_key`

## Request body

- PutPlacesRequest: Body for `PUT /places`.
  - `places` Place[], required: The full dataset; replaces whatever was stored before.
    - `alt_names` string[]: Alternative names (abbreviations, old names); at most 8.
    - `categories` string[]: Categories used by the `category` search filter (e.g. `"supermarket"`); at most 16, matched case-insensitively.
    - `country_code` string, nullable: ISO 3166-1 alpha-2 country code, e.g. `"GB"`.
    - `id` string, required: Caller-chosen stable identifier, unique within the dataset (1–128 bytes), e.g. `"store-042"`.
    - `importance` number, float, nullable: Rank boost in [0, 1]; larger means more prominent. Defaults to 0.5.
    - `lat` number, double, required: Latitude in decimal degrees (WGS84), within [-90, 90].
    - `locality` string, nullable: Town or city, for display and search context.
    - `lon` number, double, required: Longitude in decimal degrees (WGS84), within [-180, 180].
    - `name` string, required: Primary display name (1–200 bytes), e.g. `"MyBrand Croydon"`.
    - `postcode` string, nullable: Postcode, formatted as displayed.
    - `properties` unknown
    - `region` string, nullable: County / region, for display and search context.
    - `street` string, nullable: Street, for display and search context.

## Response `200`

Dataset stored and indexed

- PutPlacesResponse: Response for `PUT /places`.
  - `count` integer, required: Number of places stored.
  - `updated_at` string, required: RFC 3339 timestamp of this upload.

## Other responses

- `400`: Malformed request body
- `401`: Missing or invalid API key
- `404`: Customer places not configured on this gateway
- `413`: More than the per-key place cap
- `422`: One or more places failed validation; the body's `problems` list names each offender

---

[API](https://skmtc.dev/mapmap/apis/sn-gateway.md) · [All operations](https://skmtc.dev/mapmap/apis/sn-gateway/llms.txt) · [OpenAPI document](https://skmtc.dev/mapmap/apis/sn-gateway/revisions/2293be8b4c38?raw)
