Skip to main content
PATCH
/
api
/
v2
/
search_engines
/
{hashid}
/
indices
/
{name}
Update
curl --request PATCH \
  --url https://{search_zone}-api.doofinder.com/api/v2/search_engines/{hashid}/indices/{name} \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "options": {},
  "datasources": [
    {
      "type": "file",
      "options": {
        "url": "https://yourserver/your_data_feed.xml"
      }
    }
  ]
}
'
{
  "name": "product",
  "preset": "product",
  "options": {},
  "datasources": [
    {
      "type": "file",
      "options": {
        "url": "https://yourserver/your_data_feed.xml"
      }
    }
  ]
}

Authorizations

Authorization
string
header
required

Doofinder API key. Pass it as: Authorization: Token <api_key>

Path Parameters

hashid
string
required

Unique id of a search engine.

Pattern: ^[a-f0-9]{32}$
name
string
required

Name of an index.

Pattern: ^[a-z][a-z0-9_]*$

Body

application/json

Index fields allowed for updates.

options
Product Index Options · object

General options of an index. The options schema is linked to the index preset.

datasources
Data Source · object[]

List of datasources of an index.

Response

Index was updated.

Set of options and parameters of an index. They define the way an index is built.

name
string
required

Name of the Index. It works as the index identifier.

Pattern: ^[a-z][a-z0-9_]*$
Example:

"product"

preset
enum<string>
required

Preset of the index. The preset defines a set of configuration parameters for the index like basic fields to be included, and field transformations. For instance, the product preset creates the best_price field.

Available options:
generic,
product,
page,
category
Example:

"product"

options
Index Options · object

Accepted for backwards compatibility but ignored.

datasources
Data Source · object[]

List of datasources of an index.