Retrieve a personalization condition template

Request

Retrieves a condition template by ID including its parameters for creating a personalization variant on a page.

Security
HTTPBearer
Path
template_idstring(Template Id)required

The unique identifier of the condition template. To get this ID, you can use the List personalization condition templates endpoint to retrieve the list of available condition templates.

Example:returning_visitor
Headers
x-sc-job-idany(X-Sc-Job-Id)

A unique identifier for the job, used to trace, audit, and revert actions performed by an AI agent through the Agent API.

Example:job-1234
curl -i -X GET \
  https://edge-platform.sitecorecloud.io/stream/ai-agent-api/api/v1/personalization/condition-templates/returning_visitor \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'x-sc-job-id: job-1234'

Responses

Successful response

Bodyapplication/json
definitionstring or AudienceDefinition (object) or null(Definition)
Any of:

The template definition content. For AUDIENCE type templates, this is a structured AudienceDefinition object serialised as JSON; for all other types it is a plain string, such as JavaScript source.

string
clientKeystring or null(Clientkey)
Any of:

The client key associated with the template.

= 32 characters
string
hrefstring or null(Href)
Any of:

The hyperlink reference associated with the template.

string
refUUIDModel (string) or null
Any of:

The unique identifier of the entity in UUID format.

string (uuid)(UUIDModel)
namestring, [ 1 .. 255 ] characters(Name)

The name of the template.

descriptionstring or null(Description)
Any of:

The description of the template.

[ 1 .. 3000 ] characters
string
modifiedByRefstring or null(Modifiedbyref)
Any of:

The reference ID of the user who last modified the template.

<= 100 characters
string
modifiedByEmailstring or null(Modifiedbyemail)
Any of:

The email of the user who last modified the template.

string
modifiedAtOffsetDateTime (string) or null
Any of:

The date and time with an offset from UTC.

string (date-time)(OffsetDateTime)
revisioninteger or null(Revision)
Any of:

The revision number of the template.

integer
revisionCommentstring or null(Revisioncomment)
Any of:

The comment associated with the current revision of the template.

[ 1 .. 2048 ] characters
string
archivedboolean or null(Archived)
Any of:

Whether the template is archived.

boolean
createdAtOffsetDateTime (string) or null
Any of:

The date and time with an offset from UTC.

string (date-time)(OffsetDateTime)
createdByRefstring or null(Createdbyref)
Any of:

The reference ID of the user who created the template.

<= 100 characters
string
createdByEmailstring or null(Createdbyemail)
Any of:

The email of the user who created the template.

string
friendlyIdstring or null(Friendlyid)
Any of:

The unique human-readable identifier for this template. Lowercase letters, digits, and underscores only.

string
typestring(TypeEnum)

The type of the template, which determines how the template definition is processed.

Enum:"WEB""EMAIL""DECISION""AUDIENCE""CONDITION""SEGMENT""JS_MODULE""VALUE_EXTRACTOR"
statusstring(StatusEnum)

The current lifecycle status of this template.

Enum:"DRAFT""PUBLISHED"
iconstring or null(Icon)
Any of:

The icon identifier for display in the editor.

string
revisionsLink (object) or null
Any of:

The HAL link to the revision history of this template.

additionalFieldsobject or null(Additionalfields)
Any of:

The additional key-value metadata fields associated with this template.

templateElementsArray of objects or null(Templateelements)
Any of:

The configurable element slots within this template.

transpiledDefinitionstring or null(Transpileddefinition)
Any of:

The compiled or transpiled form of the definition, populated after processing.

string
renderboolean or null(Render)
Any of:

Whether the template should be rendered.

boolean
defaultTemplateboolean or null(Defaulttemplate)
Any of:

Whether this template is the default template.

boolean
tagsArray of strings or null(Tags)
Any of:

Tags associated with this template.

Array of strings
customTemplateboolean or null(Customtemplate)
Any of:

Whether this template is a custom template.

boolean
valueTypeFieldValueType (string) or null
Any of:

The type of the field value, indicating whether it is a string, number, boolean, date, or array.

string(FieldValueType)
Enum:"STRING""NUMBER""BOOLEAN""DATE""ARRAY"
Response
{ "definition": "{\"operator\":\"AND\",\"groups\":[{\"operator\":\"AND\",\"conditions\":[{\"source\":\"CDP\",\"field\":\"email\",\"operator\":\"NOT_NULL\",\"value\":null}]}]}", "clientKey": "stringstringstringstringstringst", "href": "string", "ref": "d0fad5d6-e996-4437-8fb9-5f40bbcfd7cc", "name": "string", "description": "string", "modifiedByRef": "string", "modifiedByEmail": "string", "modifiedAt": "2022-03-10T12:15:50-04:00", "revision": 0, "revisionComment": "string", "archived": true, "createdAt": "2022-03-10T12:15:50-04:00", "createdByRef": "string", "createdByEmail": "string", "friendlyId": "my_condition_template", "type": "WEB", "status": "DRAFT", "icon": "audience", "revisions": { "href": "/v3/flowDefinitions/my_experience/revisions" }, "additionalFields": { "property1": "string", "property2": "string" }, "templateElements": [ { … } ], "transpiledDefinition": "string", "render": true, "defaultTemplate": true, "tags": [ "string" ], "customTemplate": true, "valueType": "STRING" }