Skip to main content
POST
/
api
/
v2
/
search_engines
/
{hashid}
/
indices
Create
curl --request POST \
  --url https://{search_zone}-api.doofinder.com/api/v2/search_engines/{hashid}/indices \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "product",
  "preset": "product",
  "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}$

Body

application/json

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.

Response

Index created.

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.