API Docs
Search…
Update Theme
Update theme to existing theme.

End Point

post
https://api.cartup.ai/v1/theme
/update

Curl Example

1
curl --request POST 'https://api.cartup.ai/v1/theme/update'
2
--header 'Accept: application/json' \
3
--header 'Content-Type: application/json' \
4
--header 'X-Cartup-Access-Token: $CARTUP_API_KEY'
5
--header 'X-Cartup-orgId : $CARTUP_ORD_ID'
6
{
7
"id": "852968f0-7c8c-45d7-8ab0-e7287162a67e",
8
"orgId": "850a8b8f-a6fe-49e4-88fc-874843279d66",
9
"orgName": "WorldMarts",
10
"type": "Custom",
11
"description": "test",
12
"themeId": "testtheme",
13
"htmlTemplate": "<div class=\"wrapper\">\n <div class=\"search-input\">\n <a href=\"\" target=\"_blank\" hidden></a>\n <input type=\"text\" placeholder=\"Enter a keyword..\" id=\"searchInput\">\n <div class=\"autocom-box\" style=\"display:none\"></div>\n <div class=\"icon\"><i class=\"fas fa-search\"></i></div>\n </div>\n </div>",
14
"cssTemplate": "@import url('https://fonts.googleapis.com/css2?family=Poppins:[email protected];300;400;500;600;700&display=swap');\n*{\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n font-family: 'Poppins', sans-serif;\n}\n\nbody{\n background: #ffffff;\n padding: 0 20px;\n}\n\n::selection{\n color: #fff;\n background: #664AFF;\n}\n\n.wrapper{\n max-width: 450px;\n margin: 150px auto;\n}\n\n.wrapper .search-input{\n background: #fff;\n width: 100%;\n border-radius: 5px;\n position: relative;\n box-shadow: 0px 1px 5px 2px rgba(0,0,0,0.12);\n}\n\n.search-input input{\n height: 55px;\n width: 100%;\n outline: none;\n border: none;\n border-radius: 5px;\n padding: 0 60px 0 20px;\n font-size: 18px;\n box-shadow: 0px 1px 2px rgba(0,0,0,0.1);\n}\n\n.search-input.active input{\n border-radius: 5px 5px 0 0;\n}\n\n.search-input .autocom-box{\n padding: 0;\n max-height: 580px;\n overflow-y: auto;\n}\n\n.search-input.active .autocom-box{\n padding: 10px 8px;\n opacity: 1;\n pointer-events: auto;\n}\n\n.autocom-box li{\n list-style: none;\n padding: 8px 12px;\n display: none;\n width: 100%;\n cursor: default;\n border-radius: 3px;\n z-index: 999\n}\n\n.search-input.active .autocom-box li{\n display: block;\n cursor:pointer;\n}\n.autocom-box li:hover{\n background: #efefef;\n}\n\n.search-input .icon{\n position: absolute;\n right: 0px;\n top: 0px;\n height: 55px;\n width: 55px;\n text-align: center;\n line-height: 55px;\n font-size: 20px;\n color:#5e615e;\n cursor: pointer;\n}",
15
"jsTemplate": "$(\"#searchInput\").keyup(function (e) {\n $(\".suggestions\").hide();\n var searchTxt = $(this).val();\n if (e.keyCode == 13) {\n $(\".search-keyword\").html(\"See \" + searchTxt);\n $(\".search-keyword\").show();\n }\n $('.autocom-box').show()\n renderUI(searchTxt);\n searchTxt = searchTxt.toLowerCase();\n $(\".suggestions li\").each(function () {\n str = $(this).find(\".suggestionVal\").html();\n str = str.toLowerCase();\n //var isIncluded = str.includes(searchTxt);\n if (str.indexOf(searchTxt) > -1) {\n //console.log(str);\n $(\".lgsearchbar\").attr(\"class\", \"lgsearchbar d-lgblock searchdrop\");\n $(this).show();\n $(this).find(\".searchIcon\").show();\n $(\".suggestions\").show();\n } else {\n $(this).find(\".searchIcon\").hide();\n $(this).hide();\n }\n });\n });\n\n $(\".suggestions li\").click(function () {\n $(\"#searchInput\").val($(this).find(\".suggestionVal\").html());\n $(\".search-keyword\").html(\"See \" + $(this).find(\".suggestionVal\").html());\n $(\".search-keyword\").show();\n });\n\n function renderUI(val){\n return '<ul class=\"suggestions\" id=\"spodtdy-suggestions\" style=\"padding-top: 5px; display: block;\"><li class=\"spotdySuggestionItem\" style=\"cursor:pointer;\"><span class=\"searchIcon\" style=\"position: relative; margin-right:15px;margin-left:7px;\"><i style=\"color:#bdbdbd;font-size: 18px;\" class=\"fa fa-search\"></i></span><span category=\"undefined\" name=\"frankie\" onclick=\"setProductQuery(this)\" class=\"suggestionVal\">frankie</span></li><li class=\"spotdySuggestionItem\" style=\"display:flex;cursor:pointer;\" onclick=\"window.location.href=http://mdev.ecomtics.nl/frankie-sweatshirt.html\"><div style=\"position: relative;margin-left:0;margin-right: 10px;\"><img src=\"http://mdev.ecomtics.nl//pub/media/catalog/product/m/h/mh04-green_main_1.jpg\" style=\"width:30px;\"></div><div style=\"display:flex;flex-direction:column;\"><span category=\"undefined\" name=\"frankie sweatshirt\" class=\"suggestionVal\">frankie sweatshirt</span><span> $60.00 <button class=\"btn btn-small btn-primary addToCart\" style=\"float:none;display: inline-block;height: 23px;margin-left: 0;font-size: 11px;width: 85px;padding: 0px;cursor:pointer;\"><i class=\"fa fa-shopping-cart\"></i> Add to cart</button></span></div></li></ul>';\n }",
16
"displayType": "carousel"
17
}
Copied!

Request Body

Please refer to field descriptions in the POST Body above.

‌Example

1
{
2
"id": "d9d74dce-56af-40a8-946f-bd4b2dff62e8",
3
"orgId": "8dbc90c4-ad66-48c4-9711-ce3065cfd189",
4
"orgName": "freshcouture",
5
"type": "Custom",
6
"description": null,
7
"themeId": "cartup-theme1",
8
"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>",
9
"cssTemplate": null,
10
"jsTemplate": "",
11
"displayType": "carousel"
12
}
Copied!
Last modified 1mo ago
Copy link
Contents
post