Update Search Config

Update the existing search configuration

End Point

POST https://api.cartup.ai/v1/conf/search/update

Headers

NameTypeDescription

Accept*

String

application/json

Content_type*

String

application/json

X-Cartup-Access-Token*

String

$CARTUP_API_KEY

X-Cartup-orgId *

String

$CARTUP_ORD_ID

Request Body

NameTypeDescription

orgID*

String

Your org ID

docType*

String

Type of Doc

spellcheck*

String

Check the misspelling

paginationCount*

Integer

Number of Page hits

searchableFields*

String

Search Field

{
    "errMsg": null,
    "uid": "850a8b8f-a6fe-49e4-88fc-874843279d66-searchconf"
}

Request samples

curl --request POST 'https://api.cartup.ai/v1/conf/search/update' \
--header 'Accept: application/json' \  
--header 'Content-Type: application/json' \  
--header 'X-Cartup-Access-Token: $CARTUP_API_KEY'
--header 'X-Cartup-orgId : $CARTUP_ORD_ID'
--data-raw '{
    {
  "orgId": "850a8b8f-a6fe-49e4-88fc-874843279d66",
  "docType": "searchconf",
  "spellcheck": true,
  "paginationCount": 51,
  "searchableFields": [
    {
      "repoFieldName": "gender_ss",
      "displayName": "Gender",
      "order": 1
    },
    {
      "repoFieldName": "avg_rating_d",
      "displayName": "Rating",
      "order": 1
    },
    {
      "repoFieldName": "price_d",
      "displayName": "Price",
      "order": 1
    },
    {
      "repoFieldName": "sku_s",
      "displayName": "Sku",
      "order": 1
    },
    {
      "repoFieldName": "description_t",
      "displayName": "Description",
      "order": 1
    },
    {
      "repoFieldName": "namel_t",
      "displayName": "Name",
      "order": 1
    }
  ],
  "sortEntity": {
    "sortEntities": [
      {
        "key": "Price High to Low",
        "value": "price_d desc"
      },
      {
        "key": "Rating High to Low",
        "value": "avg_rating_d desc"
      },
      {
        "key": "Most Popular",
        "value": "popularity_score_d desc"
      },
      {
        "key": "Price Low to High",
        "value": "price_d asc"
      }
    ]
  },
  "includeWidgets": [
    "spotdyCategoryBasedRecommendation",
    "spotdyMoreItemsToConsider",
    "spotdyUpSell",
    "spotdyRecentView"
  ],
  "indexLang": "ab",
  "queryLang": "aa",
  "personalization": true,
  "reranking": true,
  "synonym": true,
  "stopWords": true,
  "facetList": [
    {
      "facetIndex": 0,
      "category": "default",
      "categoryReplaced": "default",
      "facets": [
        {
          "value": [],
          "facetIndex": 0,
          "type": "rating",
          "displayName": "Ratings",
          "displayType": "multiselect",
          "operator": null,
          "repoFieldName": "avg_rating_d"
        },
        {
          "value": [
            {
              "index": 4,
              "name": "Price [70 - 100]",
              "value": "[70 TO 100]"
            },
            {
              "index": 3,
              "name": "Price [30 - 70]",
              "value": "[31 TO 70]"
            },
            {
              "index": 2,
              "name": "Price [1 - 30]",
              "value": "[1 TO 30]"
            },
            {
              "index": 1,
              "name": "Price [1-40]",
              "value": "[1 TO 40]"
            }
          ],
          "facetIndex": 0,
          "type": "numeric",
          "displayName": "Price",
          "displayType": "multiselect",
          "operator": "[*TO*]",
          "repoFieldName": "price_d"
        },
        {
          "value": [
            {
              "index": 2,
              "name": "male",
              "value": "male"
            },
            {
              "index": 1,
              "name": "female",
              "value": "female"
            }
          ],
          "facetIndex": 0,
          "type": "categorical",
          "displayName": "Gender",
          "displayType": "radio",
          "operator": "=",
          "repoFieldName": "gender_ss"
        }
      ]
    },
    {
      "facetIndex": 1,
      "category": "Bags",
      "categoryReplaced": "Bags",
      "facets": [
        {
          "value": [],
          "facetIndex": 1,
          "type": "rating",
          "displayName": "Rating and Review",
          "displayType": "multiselect",
          "operator": null,
          "repoFieldName": "avg_rating_d"
        }
      ]
    },
    {
      "facetIndex": 2,
      "category": "Tops",
      "categoryReplaced": "Tops",
      "facets": [
        {
          "value": [
            {
              "index": 2,
              "name": "male",
              "value": "male"
            },
            {
              "index": 1,
              "name": "female",
              "value": "female"
            }
          ],
          "facetIndex": 2,
          "type": "categorical",
          "displayName": "categories",
          "displayType": "radio",
          "operator": "=",
          "repoFieldName": "gender_ss"
        }
      ]
    },
    {
      "facetIndex": 3,
      "category": "Jackets",
      "categoryReplaced": "Jackets",
      "facets": [
        {
          "value": [
            {
              "index": 3,
              "name": "Stock [1 - 100]]",
              "value": "[1 TO 100]"
            },
            {
              "index": 2,
              "name": "Stock [100 - 500]]",
              "value": "[100 TO 500]"
            },
            {
              "index": 1,
              "name": "Stock [500 - 100]]",
              "value": "[500 TO 1000]"
            }
          ],
          "facetIndex": 3,
          "type": "numeric",
          "displayName": "Stock",
          "displayType": "radio",
          "operator": "[*TO*]",
          "repoFieldName": "inventory_i",
          "repoFieldDisplayName": "No of stock in inventory"
        }
      ]
    }
  ]
}

Request payload

{
  "orgId": "850a8b8f-a6fe-49e4-88fc-874843279d66",
  "docType": "searchconf",
  "spellcheck": true,
  "paginationCount": 51,
  "searchableFields": [
    {
      "repoFieldName": "gender_ss",
      "displayName": "Gender",
      "order": 1
    },
    {
      "repoFieldName": "avg_rating_d",
      "displayName": "Rating",
      "order": 1
    },
    {
      "repoFieldName": "price_d",
      "displayName": "Price",
      "order": 1
    },
    {
      "repoFieldName": "sku_s",
      "displayName": "Sku",
      "order": 1
    },
    {
      "repoFieldName": "description_t",
      "displayName": "Description",
      "order": 1
    },
    {
      "repoFieldName": "namel_t",
      "displayName": "Name",
      "order": 1
    }
  ],
  "sortEntity": {
    "sortEntities": [
      {
        "key": "Price High to Low",
        "value": "price_d desc"
      },
      {
        "key": "Rating High to Low",
        "value": "avg_rating_d desc"
      },
      {
        "key": "Most Popular",
        "value": "popularity_score_d desc"
      },
      {
        "key": "Price Low to High",
        "value": "price_d asc"
      }
    ]
  },
  "includeWidgets": [
    "spotdyCategoryBasedRecommendation",
    "spotdyMoreItemsToConsider",
    "spotdyUpSell",
    "spotdyRecentView"
  ],
  "indexLang": "ab",
  "queryLang": "aa",
  "personalization": true,
  "reranking": true,
  "synonym": true,
  "stopWords": true,
  "facetList": [
    {
      "facetIndex": 0,
      "category": "default",
      "categoryReplaced": "default",
      "facets": [
        {
          "value": [],
          "facetIndex": 0,
          "type": "rating",
          "displayName": "Ratings",
          "displayType": "multiselect",
          "operator": null,
          "repoFieldName": "avg_rating_d"
        },
        {
          "value": [
            {
              "index": 4,
              "name": "Price [70 - 100]",
              "value": "[70 TO 100]"
            },
            {
              "index": 3,
              "name": "Price [30 - 70]",
              "value": "[31 TO 70]"
            },
            {
              "index": 2,
              "name": "Price [1 - 30]",
              "value": "[1 TO 30]"
            },
            {
              "index": 1,
              "name": "Price [1-40]",
              "value": "[1 TO 40]"
            }
          ],
          "facetIndex": 0,
          "type": "numeric",
          "displayName": "Price",
          "displayType": "multiselect",
          "operator": "[*TO*]",
          "repoFieldName": "price_d"
        },
        {
          "value": [
            {
              "index": 2,
              "name": "male",
              "value": "male"
            },
            {
              "index": 1,
              "name": "female",
              "value": "female"
            }
          ],
          "facetIndex": 0,
          "type": "categorical",
          "displayName": "Gender",
          "displayType": "radio",
          "operator": "=",
          "repoFieldName": "gender_ss"
        }
      ]
    },
    {
      "facetIndex": 1,
      "category": "Bags",
      "categoryReplaced": "Bags",
      "facets": [
        {
          "value": [],
          "facetIndex": 1,
          "type": "rating",
          "displayName": "Rating and Review",
          "displayType": "multiselect",
          "operator": null,
          "repoFieldName": "avg_rating_d"
        }
      ]
    },
    {
      "facetIndex": 2,
      "category": "Tops",
      "categoryReplaced": "Tops",
      "facets": [
        {
          "value": [
            {
              "index": 2,
              "name": "male",
              "value": "male"
            },
            {
              "index": 1,
              "name": "female",
              "value": "female"
            }
          ],
          "facetIndex": 2,
          "type": "categorical",
          "displayName": "categories",
          "displayType": "radio",
          "operator": "=",
          "repoFieldName": "gender_ss"
        }
      ]
    },
    {
      "facetIndex": 3,
      "category": "Jackets",
      "categoryReplaced": "Jackets",
      "facets": [
        {
          "value": [
            {
              "index": 3,
              "name": "Stock [1 - 100]]",
              "value": "[1 TO 100]"
            },
            {
              "index": 2,
              "name": "Stock [100 - 500]]",
              "value": "[100 TO 500]"
            },
            {
              "index": 1,
              "name": "Stock [500 - 100]]",
              "value": "[500 TO 1000]"
            }
          ],
          "facetIndex": 3,
          "type": "numeric",
          "displayName": "Stock",
          "displayType": "radio",
          "operator": "[*TO*]",
          "repoFieldName": "inventory_i",
          "repoFieldDisplayName": "No of stock in inventory"
        }
      ]
    }
  ]
}

Last updated