API Docs
Search…
Create Themes
Create a new Theme

End Point

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

Curl Example

1
curl --request POST 'https://api.cartup.ai/v1/theme'
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
-d '
7
{
8
"orgId": "8dbc90c4-ad66-48c4-9711-ce3065cfd189",
9
"orgName": "freshcouture",
10
"type": "Custom",
11
"description": null,
12
"themeId": "cartup-theme1",
13
"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>",
14
"cssTemplate": null,
15
"jsTemplate": "",
16
"displayType": "carousel"
17
}
18
' \
19
Copied!

Request Body

Please refer to field descriptions in the POST Body above.

‌Example

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