Create a body start page tag.
post
/ccadmin/v1/sites/{siteId}/bodyStartTags
Create a page tag at the start of the body section of the specified site.
Request
Supported Media Types
- application/json
Path Parameters
-
siteId: string
The ID of the site where the page tag should be embedded
Root Schema : createPageTag_request
Type:
Show Source
object
-
content:
string
The page tag HTML
-
enabled(optional):
boolean
Whether the page tag should appear in the site's HTML. Default is false.
-
name:
integer
The name of the page tag
-
order(optional):
integer
1-based position of the page tag in the page tag list. If not specified, the new tag will go at the end of the list.
Example:
{
"name":"taya tag",
"enabled":true,
"content":"<script type='text/javascript' src='https//some.other.service.com/taya.js'></script>",
"order":2
}
Response
Supported Media Types
- application/json
200 Response
The following model is returned when operation succeeds.
Root Schema : pageTag_response
Type:
Show Source
object
-
content(optional):
string
The page tag HTML
-
enabled(optional):
boolean
Whether the page tag should appear in the site's HTML
-
id(optional):
string
The page tag id generated on the server
-
name(optional):
integer
The name of the page tag
-
order(optional):
integer
1-based position of the page tag in the page tag list
Example Response (application/json)
{
"name":"taya tag",
"id":"8571b3a7-0a74-4516-978c-5090f31d8faf",
"enabled":true,
"content":"",
"order":2
}
Default Response
The error response.
The following are the internal error codes thrown by this API when the request processing fails in Oracle Commerce Cloud:
|Error Code|Description|
|------------------|------------------|
|52900|The page tag repository was not initialized.|
|529010|The site ID in the path is invalid.|
|52902|Missing input.|
|52913|Tag ID not allowed.|
|52909|Invalid section.|
|52908|Invalid name.|
|52911|Invalid content.|
|52903|An internal error occurred while creating this page tag.
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