---
title: "PUT /update/{indexName}"
method: PUT
path: "/update/{indexName}"
tags: ["index"]
---

# PUT /update/{indexName}

`PUT /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
- `indexName` string, required

## Query parameters

- `replaceExisting` string
- `replaceExisting` boolean

## Request body

- … — unresolved $ref; see the full OpenAPI document linked below

## Response `201`

Document created

## Other responses

- `409` — Document already exists but replaceExisting is set to false

## Changes

- **2020-01-23** `290add1113ff` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/commerceexperts/apis/open-commerce-search-stack-api/changes/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/290add1113ff/schema)
