Cartup docs
  • Introduction
  • Browse Topics
  • Getting Started
  • Recommendation Configuration
    • Get Recommendation Types
    • Create Recommendation
      • Rules
    • Get Recommendation
    • Update Recommendation
    • Delete Recommendation
    • Create Themes
    • Get Theme List
    • Get Theme
    • Update Theme
    • Delete Theme
  • Recommendations
  • About Recommendations
  • Crosssell Products
  • Content Based Recommendation
  • Trending Product
  • Trending in category
  • Viewed also viewed
  • Recentviews
  • Category Based Recommendations
  • Bought Category Items
  • Bought also bought
  • Viewed Category Items
  • Inspired By Browser History
  • Based on Wishlist
  • Search
  • Search Configurations
  • Create Search Config
  • Get Search Config
  • Update Search Config
  • Delete Search Config
  • Upload Synonym
  • Upload Stop Word
  • Upload OneWay Synonym
  • Get synonym csv file
  • Get OneWay Synonym csv file
  • Get Stopwords csv file
  • Delete Synonym CSV file
  • Delete OneWaySynonym CSV file
  • Delete Stopwords CSV file
  • Search Suggestions
    • Get Search suggestions
  • Search Result
    • Get Search result
  • Shopify app configuration
  • Events Configuration
  • Shopify Widget Configuration
    • Create Widget
    • Verify the Widget
    • To create widget theme
  • Shopify badging configuration
    • To verify default badges
    • To create new badges
      • Create badge
      • Verify the badge
  • Shopify search configuration
    • To verify default search
    • To reconfigure your search
      • AI personalization & Ranking
      • Synomyns & Rules
      • Auto Facets
      • Advanced
    • To create search bar theme
    • To create search results theme
  • Shopify plp configuration
    • To configure plp
    • Verify plp
    • To create plp result theme
  • Events
  • Mobile Integration
  • iOS Integration
  • Android Integration
Powered by GitBook
On this page

Was this helpful?

Create Search Config

Create a search algorithm.

End Point

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

Headers

Name
Type
Description

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

Name
Type
Description

orgID*

String

Your org ID

domain

String

Your Domain

displayTitle

String

Title you want to display on your site

pageId*

String

Page type you want to display

docType*

String

Type of doc

paginationCount*

integer

spellcheck*

String

Check the misspelling

queryLang

String

Language of Query

{
    "errMsg": null,
    "uid": "fa673540-57ba-4e02-8c16-28ee0513ae38-searchconf"
}
{
    "errMsg": "request json is not present in request params",
    "customWidgets": null
}

‌

‌

Curl example

curl --request POST https://api.cartup.ai/v1/conf/search?request={"orgId":"850a8b8f-a6fe-49e4-88fc-874843279d66"}
--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 '{
    {
  "errMsg": null,
  "orgId": "850a8b8f-a6fe-49e4-88fc-874843279d66",
  "docType": "searchconf",
  "spellcheck": true,
  "includeWidgets": [
    "spotdyCategoryBasedRecommendation",
    "spotdyMoreItemsToConsider",
    "spotdyUpSell",
    "spotdyRecentView"
  ],
  "facetList": [
    {
      "facets": [
        {
          "displayType": "multiselect",
          "type": "rating",
          "repoFieldName": "avg_rating_d",
          "displayName": "Ratings",
          "value": [],
          "operator": null
        },
        {
          "displayType": "multiselect",
          "type": "numeric",
          "repoFieldName": "price_d",
          "displayName": "Price",
          "value": [
            {
              "index": 4,
              "alias": null,
              "name": "Price [70 - 100]",
              "value": "[70 TO 100]"
            },
            {
              "index": 3,
              "alias": null,
              "name": "Price [30 - 70]",
              "value": "[31 TO 70]"
            },
            {
              "index": 2,
              "alias": null,
              "name": "Price [1 - 30]",
              "value": "[1 TO 30]"
            },
            {
              "index": 1,
              "alias": null,
              "name": "Price [1-40]",
              "value": "[1 TO 40]"
            }
          ],
          "operator": "[*TO*]"
        },
        {
          "displayType": "radio",
          "type": "categorical",
          "repoFieldName": "gender_ss",
          "displayName": "Gender",
          "value": [
            {
              "index": 2,
              "alias": null,
              "name": "male",
              "value": "male"
            },
            {
              "index": 1,
              "alias": null,
              "name": "female",
              "value": "female"
            }
          ],
          "operator": "="
        }
      ],
      "category": "default"
    },
    {
      "facets": [
        {
          "displayType": "multiselect",
          "type": "rating",
          "repoFieldName": "avg_rating_d",
          "displayName": "Rating and Review",
          "value": [],
          "operator": null
        }
      ],
      "category": "Bags"
    },
    {
      "facets": [
        {
          "displayType": "radio",
          "type": "categorical",
          "repoFieldName": "gender_ss",
          "displayName": "categories",
          "value": [
            {
              "index": 2,
              "alias": null,
              "name": "male",
              "value": "male"
            },
            {
              "index": 1,
              "alias": null,
              "name": "female",
              "value": "female"
            }
          ],
          "operator": "="
        }
      ],
      "category": "Tops"
    },
    {
      "facets": [
        {
          "displayType": "radio",
          "type": "numeric",
          "repoFieldName": "inventory_i",
          "displayName": "Stock",
          "value": [
            {
              "index": 3,
              "alias": null,
              "name": "Stock [1 - 100]]",
              "value": "[1 TO 100]"
            },
            {
              "index": 2,
              "alias": null,
              "name": "Stock [100 - 500]]",
              "value": "[100 TO 500]"
            },
            {
              "index": 1,
              "alias": null,
              "name": "Stock [500 - 100]]",
              "value": "[500 TO 1000]"
            }
          ],
          "operator": "[*TO*]"
        }
      ],
      "category": "Jackets"
    }
  ],
  "paginationCount": 51,
  "searchableFields": [
    {
      "repoFieldName": "gender_ss",
      "displayName": "Gender",
      "order": 1,
      "orderBy": null
    },
    {
      "repoFieldName": "avg_rating_d",
      "displayName": "Rating",
      "order": 1,
      "orderBy": null
    },
    {
      "repoFieldName": "price_d",
      "displayName": "Price",
      "order": 1,
      "orderBy": null
    },
    {
      "repoFieldName": "sku_s",
      "displayName": "Sku",
      "order": 1,
      "orderBy": null
    },
    {
      "repoFieldName": "description_t",
      "displayName": "Description",
      "order": 1,
      "orderBy": null
    },
    {
      "repoFieldName": "namel_t",
      "displayName": "Name",
      "order": 1,
      "orderBy": null
    }
  ],
  "searchSynonym": null,
  "sortEntity": {
    "sortEntities": [
      {
        "key": "Price High to Low",
        "value": "price_d desc",
        "type": null
      },
      {
        "key": "Rating High to Low",
        "value": "avg_rating_d desc",
        "type": null
      },
      {
        "key": "Most Popular",
        "value": "popularity_score_d desc",
        "type": null
      },
      {
        "key": "Price Low to High",
        "value": "price_d asc",
        "type": null
      }
    ]
  },
  "indexLang": "ab",
  "queryLang": "aa",
  "personalization": true,
  "reranking": true,
  "synonym": true,
  "stopWords": false
}

Request Body

Please refer to field descriptions in the POST Body above.

Example

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

‌

PreviousBased on WishlistNextGet Search Config

Last updated 3 years ago

Was this helpful?