---
title: "Upsert Set"
method: PUT
path: "/api/price-compare/sets/{set_id}"
tags: ["Price Compare"]
---

# Upsert Set

`PUT /api/price-compare/sets/{set_id}`

## Request

- Base URL: `https://data.getplace.io` (the document declares no server; this is the origin it was published from)
- URL: `https://data.getplace.io/api/price-compare/sets/{set_id}`
- Auth: OAuth 2
  - Password
  - Token URL: `/api/auth/login`

Create or replace one benchmark.

Upsert rather than POST+PUT because the client already owns the id: it
generates one when the user creates a set, and saves the whole set on every
edit. Last write wins — two devices editing one benchmark is not something
this product needs to merge.

## Path parameters

- `set_id` string, required

## Request body

- SetUpsert
  - `name` string, required
  - `payload` object, required
  - `base_updated_at` string, nullable

## Response `200`

Successful Response

- SetResponse
  - `id` string, required
  - `name` string, required
  - `payload` object, required
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required
  - `deleted_at` string, date-time, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/getplace/apis/getplace-insights-api.md) - [All operations](https://skmtc.dev/getplace/apis/getplace-insights-api/llms.txt) - [OpenAPI document](https://skmtc.dev/getplace/apis/getplace-insights-api/revisions/0f337387603f?raw)
