v1

latestOpenAPI 3.1.02026-07-241765501.1 MB
Metadata overrides

Create a new metadata override rule for the specified field name.

🔐 This endpoint requires HTTP authentication (either Basic or Bearer). For authenticating with Bearer token, required scopes are: metadata_overrides(w).

post/v1/metadata_overrides

Query parameters

keystring required

The key of the index to use.

Example:key_K2pX7vBnU0bgA5xp
sectionstring

The section of the index to use. Defaults to Products.

Example:Products
cstring

The ID of the client and version that the request is coming from, such as cio-js-2.90.

Example:cio-js-2.90

Request body

field_namestring required

Field name associated with the metadata override configuration.

field_path_in_metadatastring required

Path to the field in metadata where the metadata override configuration is applied.

Example request

{
  "field_name": "price",
  "field_path_in_metadata": "data.price",
  "rules": [
    {
      "start_time": "2024-03-06T16:05:19",
      "end_time": "2024-03-07T16:05:19",
      "replaced_field_name": "price",
      "replaced_field_path_in_metadata": "data.sale_price"
    }
  ]
}

Response

OK

field_namestring required

Field name associated with the metadata override configuration.

field_path_in_metadatastring

Path to the field in metadata where the metadata override configuration is applied.

Example response

{
  "rules": [
    {
      "start_time": "2024-03-06T16:05:19",
      "end_time": "2024-03-07T16:05:19",
      "replaced_field_name": "price",
      "replaced_field_path_in_metadata": "data.sale_price"
    }
  ]
}