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?

  1. Recommendation Configuration

Create Themes

Create a new Theme

End Point

POST https://api.cartup.ai/v1/theme

Headers

Name
Type
Description

Accept*

String

application/json

Content_type*

String

application/json

X-Cartup-Access-Token*

String

$CARTUP_API_KEY

X-Cartup-orgId*

Sring

$CARTUP_ORD_ID

Request Body

Name
Type
Description

themeID*

String

theme ID (Should be unique)

orgID*

String

Your org ID

orgName*

String

You org name

type*

Constant

"Custom"

htmlTemplate*

String

Html template

cssTemplate

String

CSS template

jsTemplate

String

Java Script

displayType*

String

carousel

{
"errMsg":null,
"uid":"852968f0-7c8c-45d7-8ab0-e7287162a67e"
}
{
"errMsg":"html template is empty","uid":null
}

Curl Example

curl --request POST 'https://api.cartup.ai/v1/theme'
--header 'Accept: application/json' \  
--header 'Content-Type: application/json' \  
--header 'X-Cartup-Access-Token: $CARTUP_API_KEY'
--header 'X-Cartup-orgId : $CARTUP_ORD_ID'
-d '
{
  "orgId": "8dbc90c4-ad66-48c4-9711-ce3065cfd189",
  "orgName": "freshcouture",
  "type": "Custom",
  "description": null,
  "themeId": "cartup-theme1",
  "htmlTemplate": "<div style=\"display:block;position: relative;\">\n\t<div class=\"widgetDisplayName\"><h2 class=\"recent__title theme\">{{widget_displayName}}</h2></div>\n\t\t<div class=\"product-grid\" id=\"test-widget-wrapper\">\n\t\t\t<div class=\"product-item one-quarter small--one-half\">\n\t\t\t\t<a class=\"product-link\" href=\"{{product_currentPageUrl}}\">\n\t\t\t\t\t<div class=\"product-item__image\">\n\t\t\t\t\t\t<div class=\"product-item__bg\" style=\"background-image:url({{product_imageUrl}});\"></div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"product-information\">\n\t\t\t\t\t\t<span class=\"title\"><h5>{{product_name}}</h5></span>\n\t\t\t\t\t</div>\n\t\t\t\t</a>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>",
  "cssTemplate": null,
  "jsTemplate": "",
  "displayType": "carousel"
}
' \

​

Request Body

Please refer to field descriptions in the POST Body above.

‌Example

{
  "orgId": "8dbc90c4-ad66-48c4-9711-ce3065cfd189",
  "orgName": "freshcouture",
  "type": "Custom",
  "description": null,
  "themeId": "cartup-theme1",
  "htmlTemplate": "<div style=\"display:block;position: relative;\">\n\t<div class=\"widgetDisplayName\"><h2 class=\"recent__title theme\">{{widget_displayName}}</h2></div>\n\t\t<div class=\"product-grid\" id=\"test-widget-wrapper\">\n\t\t\t<div class=\"product-item one-quarter small--one-half\">\n\t\t\t\t<a class=\"product-link\" href=\"{{product_currentPageUrl}}\">\n\t\t\t\t\t<div class=\"product-item__image\">\n\t\t\t\t\t\t<div class=\"product-item__bg\" style=\"background-image:url({{product_imageUrl}});\"></div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"product-information\">\n\t\t\t\t\t\t<span class=\"title\"><h5>{{product_name}}</h5></span>\n\t\t\t\t\t</div>\n\t\t\t\t</a>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>",
  "cssTemplate": null,
  "jsTemplate": "",
  "displayType": "carousel"
}

‌

‌

‌

PreviousDelete RecommendationNextGet Theme List

Last updated 3 years ago

Was this helpful?