Retrieve a theme's source by ID
get
/ccadmin/v1/themes/{id}/source
Returns the style and variable LESS code for a particular theme by ID.
Request
Supported Media Types
- application/json
Path Parameters
-
id: string
The ID of the theme.
Response
Supported Media Types
- application/json
200 Response
Returned when the operation succeeds.
Root Schema : getThemeSource_response
Type:
Show Source
object
-
styles(optional):
string
The theme styles LESS code.
-
variables(optional):
string
The theme variables LESS code.
Example Response (application/json)
{
"variables":"\n\n/***** Colours *****/\n\n@ButtonPrimaryBackgroundColor : #000000;\r\n@ButtonPrimaryBorderRadius : 0px;\r\n@ButtonPrimaryFontFamily : @sansFontFamily;\r\n@ButtonPrimaryFontStyle : normal;\r\n@ButtonPrimaryFontWeight : bold;\r\n@ButtonPrimarySize : medium;\r\n@ButtonPrimaryTextColor : #ffa403;\r\n@ButtonPrimaryTextDecoration : none;\r\n@ButtonPrimaryUseGradient : false;\r\n@ButtonSecondaryBackgroundColor : #eeeeee;\r\n@ButtonSecondaryBorderRadius : 0px;\r\n@ButtonSecondaryFontFamily : @sansFontFamily;\r\n@ButtonSecondaryFontStyle : normal;\r\n@ButtonSecondaryFontWeight : bold;\r\n@ButtonSecondarySize : medium;\r\n@ButtonSecondaryTextColor : #000000;\r\n@ButtonSecondaryTextDecoration : none;\r\n@ButtonSecondaryUseGradient : false;\r\n@LinkColor : #000000;\r\n@LinkHoverColor : #ffa403;\r\n@LinkVisitedColor : #000000;\r\n@NavbarBackgroundColor : #ffffff;\r\n@NavbarBackgroundHoverColor : #ffffff;\r\n@NavbarLinkColor : #000000;\r\n@NavbarLinkHoverColor : #000000;\r\n@NavbarTextColor : #ffa403;\r\n@SubNavigationBackgroundColor : #000000;\r\n@SubNavigationBackgroundHoverColor : #000000;\r\n@SubNavigationLinkColor : #ffa403;\r\n@SubNavigationLinkHoverColor : #000000;\r\n@SubNavigationTextColor : #ffa403;\r\n@TextColor : #000000;\r\n@mobileNavBarButtonColor : #333333;\r\n\n\n/***** Typography *****/\n\n@H1FontFamily : inherit;\r\n@H1FontSize : 2.75rem;\r\n@H1FontStyle : inherit;\r\n@H1FontWeight : bold;\r\n@H1LineHeight : 150%;\r\n@H1TextAlign : inherit;\r\n@H1TextColor : inherit;\r\n@H1TextDecoration : inherit;\r\n@H2FontFamily : inherit;\r\n@H2FontSize : 2.25rem;\r\n@H2FontStyle : inherit;\r\n@H2FontWeight : bold;\r\n@H2LineHeight : 150%;\r\n@H2TextAlign : inherit;\r\n@H2TextColor : inherit;\r\n@H2TextDecoration : inherit;\r\n@H3FontFamily : inherit;\r\n@H3FontSize : 1.75rem;\r\n@H3FontStyle : inherit;\r\n@H3FontWeight : bold;\r\n@H3LineHeight : 150%;\r\n@H3TextAlign : inherit;\r\n@H3TextColor : inherit;\r\n@H3TextDecoration : inherit;\r\n@H4FontFamily : inherit;\r\n@H4FontSize : 1.25rem;\r\n@H4FontStyle : inherit;\r\n@H4FontWeight : bold;\r\n@H4LineHeight : 150%;\r\n@H4TextAlign : inherit;\r\n@H4TextColor : inherit;\r\n@H4TextDecoration : inherit;\r\n@H5FontFamily : inherit;\r\n@H5FontSize : 1.00rem;\r\n@H5FontStyle : inherit;\r\n@H5FontWeight : normal;\r\n@H5LineHeight : 150%;\r\n@H5TextAlign : inherit;\r\n@H5TextColor : inherit;\r\n@H5TextDecoration : inherit;\r\n@H6FontFamily : inherit;\r\n@H6FontSize : 0.85rem;\r\n@H6FontStyle : inherit;\r\n@H6FontWeight : normal;\r\n@H6LineHeight : 150%;\r\n@H6TextAlign : inherit;\r\n@H6TextColor : inherit;\r\n@H6TextDecoration : inherit;\r\n@ParagraphFontFamily : inherit;\r\n@ParagraphFontSize : 1.00rem;\r\n@ParagraphFontStyle : inherit;\r\n@ParagraphFontWeight : normal;\r\n@ParagraphLineHeight : 150%;\r\n@ParagraphTextAlign : inherit;\r\n@ParagraphTextColor : inherit;\r\n@ParagraphTextDecoration : inherit;\r\n@SiteFontFamily : @sansFontFamily;\r\n@SiteFontSize : 14px;\r\n@SiteFontStyle : normal;\r\n@SiteFontWeight : normal;\r\n@SiteLineHeight : 150%;\r\n@SiteTextAlign : left;\r\n@SiteTextColor : #000000;\r\n@SiteTextDecoration : none;\r\n\n\n/***** General *****/\n\n@FooterBackgroundColor : #ffffff;\r\n@FooterBackgroundColorBottom : #ffffff;\r\n@FooterBackgroundColorTop : #ffffff;\r\n@FooterBackgroundImageAttachment : scroll;\r\n@FooterBackgroundImagePosition : top left;\r\n@FooterBackgroundImageRepeat : repeat-x;\r\n@FooterBackgroundImageURL : none;\r\n@FooterBackgroundUseGradient : false;\r\n@FooterBorderTopColor : #ffffff;\r\n@HeaderBackgroundColor : #ffffff;\r\n@HeaderBackgroundColorBottom : #ffffff;\r\n@HeaderBackgroundColorTop : #ffffff;\r\n@HeaderBackgroundImageAttachment : scroll;\r\n@HeaderBackgroundImagePosition : top left;\r\n@HeaderBackgroundImageRepeat : repeat-x;\r\n@HeaderBackgroundImageURL : none;\r\n@HeaderBackgroundUseGradient : false;\r\n@HeaderTopBackgroundColor : #ffffff;\r\n@HeaderTopBackgroundColorBottom : #ffffff;\r\n@HeaderTopBackgroundColorTop : #ffffff;\r\n@HeaderTopBackgroundImageAttachment : scroll;\r\n@HeaderTopBackgroundImagePosition : top left;\r\n@HeaderTopBackgroundImageRepeat : repeat-x;\r\n@HeaderTopBackgroundImageURL : none;\r\n@HeaderTopBackgroundUseGradient : false;\r\n@HeaderTopBorderBottomColor : #ffffff;\r\n@HeaderTopPaddingTop : 25px;\r\n@SBackgroundImageURL : url(/file/media/odpfkokopfsd);\r\n@SiteBackgroundColor : #000000;\r\n@SiteBackgroundColorBottom : #000000;\r\n@SiteBackgroundColorTop : #000000;\r\n@SiteBackgroundImageAttachment : scroll;\r\n@SiteBackgroundImagePosition : top left;\r\n@SiteBackgroundImageRepeat : no-repeat;\r\n@SiteBackgroundImageURL : url(/file/media/);\r\n@SiteBackgroundUseGradient : false;\r\n@SitePageBackgroundColor : #ffffff;\r\n",
"styles":"/******************************************************************************\r\n MIXINS\r\n******************************************************************************/\r\n.background-styles (@BackgroundColor, @BackgroundImageURL, @BackgroundImageRepeat, @BackgroundImagePosition,\r\n @BackgroundColorTop, @BackgroundColorBottom, @BackgroundImageAttachment) {\r\n\r\n\r\n background: -moz-linear-gradient(top, @BackgroundColorTop 0%, @BackgroundColorBottom 100%);\r\n background: -webkit-gradient(left top, left bottom, color-stop(0%, @BackgroundColorTop), color-stop(100%, @BackgroundColorBottom));\r\n background: -webkit-linear-gradient(top, @BackgroundColorTop 0%, @BackgroundColorBottom 100%);\r\n background: -o-linear-gradient(top, @BackgroundColorTop 0%, @BackgroundColorBottom 100%);\r\n background: -ms-linear-gradient(top, @BackgroundColorTop 0%, @BackgroundColorBottom 100%);\r\n background: linear-gradient(to bottom, @BackgroundColorTop 0%, @BackgroundColorBottom 100%);\r\n filter:~\"progid:DXImageTransform.Microsoft.gradient(startColorstr='@{BackgroundColorTop}', endColorstr='@{BackgroundColorBottom}', GradientType=0)\";\r\n}\r\n\r\n/******************************************************************************\r\n GENERAL STYLES\r\n******************************************************************************/\r\nhtml {\r\n font-size: @SiteFontSize;\r\n}\r\n\r\nbody {\r\n\r\n background: @SiteBackgroundColor @SiteBackgroundImageURL @SiteBackgroundImagePosition @SiteBackgroundImageRepeat;\r\n\r\n .SiteBackground() when (@SiteBackgroundUseGradient) {\r\n .background-styles (@SiteBackgroundColor, @SiteBackgroundImageURL, @SiteBackgroundImageRepeat, @SiteBackgroundImagePosition,\r\n @SiteBackgroundColorTop, @SiteBackgroundColorBottom, @SiteBackgroundImageAttachment);\r\n }\r\n .SiteBackground;\r\n\r\n background-attachment: @SiteBackgroundImageAttachment;\r\n\r\n color: @TextColor;\r\n font-family: @SiteFontFamily;\r\n font-size: 1rem;\r\n font-style: @SiteFontStyle;\r\n font-weight: @SiteFontWeight;\r\n line-height: @SiteLineHeight;\r\n text-align: @SiteTextAlign;\r\n text-decoration: @SiteTextDecoration;\r\n}\r\n\r\nhtml[dir=\"rtl\"] body {\r\n text-align: right;\r\n}\r\n\r\n#page {\r\n background-color: @SitePageBackgroundColor;\r\n}\r\n\r\n/******************************************************************************\r\n LINK STYLES\r\n******************************************************************************/\r\n\r\na:link {color:@LinkColor;} /* unvisited link */\r\na:visited {color:@LinkVisitedColor;} /* visited link */\r\na:hover {color:@LinkHoverColor;} /* mouse over link */\r\n\r\n/******************************************************************************\r\n TYPOGRAPHY STYLES\r\n******************************************************************************/\r\n\r\nh1 {\r\n\r\n color: @H1TextColor;\r\n line-height: @H1LineHeight;\r\n font-family: @H1FontFamily;\r\n font-size: @H1FontSize;\r\n font-weight: @H1FontWeight;\r\n font-style: @H1FontStyle;\r\n text-align: @H1TextAlign;\r\n text-decoration: @H1TextDecoration;\r\n\r\n}\r\n\r\nh2 {\r\n\r\n color: @H2TextColor;\r\n font-family: @H2FontFamily;\r\n font-size: @H2FontSize;\r\n font-style: @H2FontStyle;\r\n font-weight: @H2FontWeight;\r\n line-height: @H2LineHeight;\r\n text-align: @H2TextAlign;\r\n text-decoration: @H2TextDecoration;\r\n\r\n}\r\n\r\nh3 {\r\n\r\n color: @H3TextColor;\r\n font-family: @H3FontFamily;\r\n font-size: @H3FontSize;\r\n font-style: @H3FontStyle;\r\n font-weight: @H3FontWeight;\r\n line-height: @H3LineHeight;\r\n text-align: @H3TextAlign;\r\n text-decoration: @H3TextDecoration;\r\n\r\n}\r\n\r\nh4 {\r\n\r\n color: @H4TextColor;\r\n font-family: @H4FontFamily;\r\n font-size: @H4FontSize;\r\n font-style: @H4FontStyle;\r\n font-weight: @H4FontWeight;\r\n line-height: @H4LineHeight;\r\n text-align: @H4TextAlign;\r\n text-decoration: @H4TextDecoration;\r\n}\r\n\r\nh5 {\r\n color: @H5TextColor;\r\n font-family: @H5FontFamily;\r\n font-size: @H5FontSize;\r\n font-style: @H5FontStyle;\r\n font-weight: @H5FontWeight;\r\n line-height: @H5LineHeight;\r\n text-align: @H5TextAlign;\r\n text-decoration: @H5TextDecoration;\r\n}\r\n\r\nh6 {\r\n color: @H6TextColor;\r\n font-family: @H6FontFamily;\r\n font-size: @H6FontSize;\r\n font-style: @H6FontStyle;\r\n font-weight: @H6FontWeight;\r\n line-height: @H6LineHeight;\r\n text-align: @H6TextAlign;\r\n text-decoration: @H6TextDecoration;\r\n}\r\n\r\np {\r\n color: @ParagraphTextColor;\r\n font-family: @ParagraphFontFamily;\r\n font-size: @ParagraphFontSize;\r\n font-style: @ParagraphFontStyle;\r\n font-weight: @ParagraphFontWeight;\r\n line-height: @ParagraphLineHeight;\r\n text-align: @ParagraphTextAlign;\r\n text-decoration: @ParagraphTextDecoration;\r\n}\r\n\r\n/******************************************************************************\r\n BUTTON STYLES\r\n******************************************************************************/\r\n.ccButton(@ButtonBackgroundColor, @ButtonBorderRadius, @ButtonTextColor, @ButtonFontFamily, @ButtonFontWeight,\r\n @ButtonFontStyle, @ButtonTextDecoration, @ButtonUseGradient, @ButtonSize) {\r\n\r\n .btn;\r\n\r\n background-color: @ButtonBackgroundColor;\r\n\r\n white-space: normal;\r\n\r\n .ButtonBackground() when (@ButtonUseGradient) {\r\n background-image: -moz-linear-gradient(top,@ButtonBackgroundColor, darken(@ButtonBackgroundColor, 10%));\r\n background-image: -webkit-gradient(linear,0 0,0 100%,from(@ButtonBackgroundColor),to(darken(@ButtonBackgroundColor, 10%)));\r\n background-image: -webkit-linear-gradient(top,@ButtonBackgroundColor,darken(@ButtonBackgroundColor, 10%));\r\n background-image: -o-linear-gradient(top,@ButtonBackgroundColor,darken(@ButtonBackgroundColor, 10%));\r\n background-image: linear-gradient(to bottom,@ButtonBackgroundColor,darken(@ButtonBackgroundColor, 10%));\r\n background-repeat: repeat-x;\r\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='@ButtonBackgroundColor', endColorstr='darken(@ButtonBackgroundColor, 10%)', GradientType=0);\r\n }\r\n .ButtonBackground;\r\n\r\n border: 1px solid darken(@ButtonBackgroundColor, 15%);\r\n\r\n color: @ButtonTextColor;\r\n\r\n font-family: @ButtonFontFamily;\r\n font-style: @ButtonFontStyle;\r\n font-weight: @ButtonFontWeight;\r\n text-decoration: @ButtonTextDecoration;\r\n\r\n &:hover, &:focus {\r\n background-color: darken(@ButtonBackgroundColor, 10%);\r\n\r\n color: @ButtonTextColor;\r\n\r\n font-family: @ButtonFontFamily;\r\n font-style: @ButtonFontStyle;\r\n font-weight: @ButtonFontWeight;\r\n text-decoration: @ButtonTextDecoration;\r\n }\r\n\r\n &:disabled:hover, &.disabled:hover, &.disabled:focus {\r\n background-color: @ButtonBackgroundColor;\r\n background-image: none;\r\n }\r\n\r\n &:link {\r\n color: @ButtonTextColor;\r\n font-style: @ButtonFontStyle;\r\n text-decoration: @ButtonTextDecoration;\r\n }\r\n &:visited {\r\n color: @ButtonTextColor;\r\n font-style: @ButtonFontStyle;\r\n text-decoration: @ButtonTextDecoration;\r\n }\r\n &:hover {\r\n background-color: darken(@ButtonBackgroundColor, 10%);\r\n color: @ButtonTextColor;\r\n font-style: @ButtonFontStyle;\r\n text-decoration: @ButtonTextDecoration;\r\n }\r\n\r\n .ButtonSize() when (@ButtonSize = extraSmall) {\r\n .btn-xs;\r\n }\r\n .ButtonSize;\r\n\r\n .ButtonSize() when (@ButtonSize = small) {\r\n .btn-sm;\r\n }\r\n .ButtonSize;\r\n\r\n .ButtonSize() when (@ButtonSize = large) {\r\n .btn-lg;\r\n }\r\n .ButtonSize;\r\n\r\n border-radius: @ButtonBorderRadius;\r\n}\r\n\r\n// Primary buttons\r\n.cc-button-primary {\r\n .ccButton(@ButtonPrimaryBackgroundColor, @ButtonPrimaryBorderRadius, @ButtonPrimaryTextColor, @ButtonPrimaryFontFamily, @ButtonPrimaryFontWeight,\r\n @ButtonPrimaryFontStyle, @ButtonPrimaryTextDecoration, @ButtonPrimaryUseGradient, @ButtonPrimarySize);\r\n}\r\n\r\n// Secondary buttons\r\n.cc-button-secondary {\r\n .ccButton(@ButtonSecondaryBackgroundColor, @ButtonSecondaryBorderRadius, @ButtonSecondaryTextColor, @ButtonSecondaryFontFamily, @ButtonSecondaryFontWeight,\r\n @ButtonSecondaryFontStyle, @ButtonSecondaryTextDecoration, @ButtonSecondaryUseGradient, @ButtonSecondarySize);\r\n}\r\n\r\n/******************************************************************************\r\n HEADER STYLES\r\n******************************************************************************/\r\n\r\n#region-header #siteHead {\r\n\r\n background: @HeaderBackgroundColor @HeaderBackgroundImageURL @HeaderBackgroundImagePosition @HeaderBackgroundImageRepeat;\r\n background-attachment: @HeaderBackgroundImageAttachment;\r\n\r\n .HeaderBackground() when (@HeaderBackgroundUseGradient) {\r\n .background-styles (@HeaderBackgroundColor, @HeaderBackgroundImageURL, @HeaderBackgroundImageRepeat, @HeaderBackgroundImagePosition,\r\n @HeaderBackgroundColorTop, @HeaderBackgroundColorBottom, @HeaderBackgroundImageAttachment);\r\n }\r\n .HeaderBackground;\r\n}\r\n\r\n.header-background {\r\n background: @HeaderTopBackgroundColor @HeaderTopBackgroundImageURL @HeaderTopBackgroundImagePosition @HeaderTopBackgroundImageRepeat;\r\n background-attachment: @HeaderTopBackgroundImageAttachment;\r\n\r\n .HeaderTopBackground() when (@HeaderTopBackgroundUseGradient) {\r\n .background-styles (@HeaderTopBackgroundColor, @HeaderTopBackgroundImageURL, @HeaderTopBackgroundImageRepeat, @HeaderTopBackgroundImagePosition,\r\n @HeaderTopBackgroundColorTop, @HeaderTopBackgroundColorBottom, @HeaderTopBackgroundImageAttachment);\r\n }\r\n .HeaderTopBackground;\r\n}\r\n\r\n\r\n/******************************************************************************\r\n FOOTER STYLES\r\n******************************************************************************/\r\n\r\nfooter.footer {\r\n background: @FooterBackgroundColor;\r\n background-position:@FooterBackgroundImagePosition;\r\n background-repeat: @FooterBackgroundImageRepeat;\r\n background-image: @FooterBackgroundImageURL;\r\n background-attachment: @FooterBackgroundImageAttachment;\r\n border-top-color: @FooterBorderTopColor;\r\n\r\n .FooterBackground() when (@FooterBackgroundUseGradient) {\r\n .background-styles (@FooterBackgroundColor, @FooterBackgroundImageURL, @FooterBackgroundImageRepeat, @FooterBackgroundImagePosition,\r\n @FooterBackgroundColorTop, @FooterBackgroundColorBottom, @FooterBackgroundImageAttachment);\r\n }\r\n .FooterBackground;\r\n}\r\n\r\n/******************************************************************************\r\n LAZILY LOADED IMAGE STYLES\r\n******************************************************************************/\r\n\r\n\r\n@-webkit-keyframes placeHolderShimmer {\r\n from {\r\n background-position: 0 0;\r\n }\r\n to {\r\n background-position: 300px 0;\r\n }\r\n}\r\n\r\n@keyframes placeHolderShimmer {\r\n from {\r\n background-position: 0 0;\r\n }\r\n to {\r\n background-position: 300px 0;\r\n }\r\n}\r\n\r\n.ccLazyLoad-animated-background {\r\n -webkit-animation-duration: 2s;\r\n animation-duration: 2s;\r\n -webkit-animation-fill-mode: forwards;\r\n animation-fill-mode: forwards;\r\n -webkit-animation-iteration-count: infinite;\r\n animation-iteration-count: infinite;\r\n -webkit-animation-name: placeHolderShimmer;\r\n animation-name: placeHolderShimmer;\r\n -webkit-animation-timing-function: linear;\r\n animation-timing-function: linear;\r\n background: #f6f7f8;\r\n background: #eeeeee;\r\n background: -webkit-gradient(linear, left top, right top, color-stop(8%, #eeeeee), color-stop(18%, #dddddd), color-stop(33%, #eeeeee));\r\n background: -webkit-linear-gradient(left, #eeeeee 8%, #dddddd 18%, #eeeeee 33%);\r\n background: linear-gradient(to right, #eeeeee 8%,#dddddd 18%,#eeeeee 33%);\r\n -webkit-background-size: 100% 100%;\r\n background-size: 100% 100%;\r\n position: relative;\r\n}\r\n\r\n.ccLazyLoad-background {\r\n background: #e9eaed;\r\n}\r\n\r\nimg.ccLazyLoad {\r\n opacity: 0.1;\r\n}\r\n\r\nimg.ccLazyLoaded {\r\n}",
"links":[
{
"rel":"self",
"href":"http://localhost:9080/ccadminui/v1/themes/darkTheme/source"
}
]
}
Default Response
The following are the internal error codes thrown by this API when the request processing fails in Oracle Commerce Cloud:
The error response:
Error Code | Description | Possible Fix |
---|---|---|
70000 | Internal server error | See returned error messages for more information. |
70004 | Theme with given ID does not exist on system. | Ensure you have specified a valid theme ID. |
70017 | Error fetching theme source. | See returned error messages for more information. |
The error response:
Root Schema : errorModel
Type:
Show Source
object
-
devMessage(optional):
string
An optional non-localized message containing technical information for developers
-
errorCode(optional):
string
The numerical code identifying the error
-
errors(optional):
array errors
An optional list of errors if multiple errors were encountered
-
message(optional):
string
The localized message describing the error
-
moreInfo(optional):
string
An optional non-localized message with more information
-
o:errorPath(optional):
string
An optional machine readable description of where the error occurred
-
status(optional):
string
The HTTP status code
-
type(optional):
string
The URI to the HTTP state code definition
Nested Schema : errors
Type:
array
An optional list of errors if multiple errors were encountered
Show Source
Nested Schema : items
Type:
Show Source
object
-
devMessage(optional):
string
An optional non-localized message containing technical information for developers
-
errorCode(optional):
string
The numerical code identifying the error
-
message(optional):
string
The localized message describing the error
-
moreInfo(optional):
string
An optional non-localized message with more information
-
o:errorPath(optional):
string
An optional machine readable description of where the error occurred
-
status(optional):
string
The HTTP status code