---
title: "PUT /indexer-api/v1/update/{indexName}"
method: PUT
path: "/indexer-api/v1/update/{indexName}"
tags: ["update"]
---

# PUT /indexer-api/v1/update/{indexName}

`PUT /indexer-api/v1/update/{indexName}`

Puts a document to the index. If document does not exist, it will be added. An existing product will be overwritten unless the parameter 'replaceExisting" is set to "false". Provided document should be a complete object, partial updates should be  done using the updateDocument method.

## Path parameters

- `indexName` string, required

## Query parameters

- `replaceExisting` boolean

## Response `201`

Document created

## Other responses

- `404` — index does not exist
- `409` — Document already exists but replaceExisting is set to false

## Changes

- **2021-02-09** `2a792e162b0e` — 1 info
  - api operation id `putProduct` removed and replaced with `putDocument`
- **2020-01-29** `0be3c29195f5` — 1 info
  - the endpoint scheme security `basic-auth` was added to the API
- **2020-01-28** `dc967a44de32` — 3 info
  - api tag `update` added
  - api tag `index` removed
  - added the non-success response with the status `404`
- **2020-01-27** `95fe9768072e` — 2 breaking, 2 warning
  - removed the request body
  - for the `query` request parameter `replaceExisting`, the type changed from `string` to `boolean`
  - deleted the `path` request parameter `indexName`
  - deleted the `query` request parameter `replaceExisting`
- **2020-01-27** `7c11b1d710d8` — 1 breaking, 2 warning, 1 info
  - added the new path request parameter `indexName`
  - deleted the `path` request parameter `indexName`
  - deleted the `query` request parameter `replaceExisting`
  - added the new optional `query` request parameter `replaceExisting`

[Full history](https://skmtc.dev/commerceexperts/apis/open-commerce-search-stack-api/changes/indexer-api/v1/update/:indexName/put.md)

---

[API](https://skmtc.dev/commerceexperts/apis/open-commerce-search-stack-api.md) · [All operations](https://skmtc.dev/commerceexperts/apis/open-commerce-search-stack-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/commerceexperts/open-commerce-search-stack-api/revisions/2a792e162b0e/schema)
