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
hrefstring or null(Href)
Example:"https://www.example.com/condition-template"
Any of:

The URL of the condition template.

string
refstring(Ref)

A reference identifier for the condition template.

Example:"ConditionTemplate-12345"
namestring(Name)

The name of the condition template.

Example:"Time on Site"
modifiedByRefstring or null(Modifiedbyref)
Example:"User-67890"
Any of:

A reference identifier for the user who last modified the condition template.

string
modifiedAtstring or null(Modifiedat)
Example:"2025-01-15T10:30:00Z"
Any of:

The timestamp when the condition template was last modified.

string
revisioninteger or null(Revision)
Example:3
Any of:

The revision number of the condition template.

integer
archivedboolean(Archived)

Whether the condition template is archived.

Example:false
friendlyIdstring(Friendlyid)

A user-friendly identifier for the condition template.

Example:"time_on_site"
typestring(Type)

The type of the condition template.

Example:"time-based"
statusstring(Status)

The status of the condition template.

Example:"active"
iconstring or null(Icon)
Example:"https://www.example.com/icons/time-on-site.png"
Any of:

The icon representing the condition template.

string
additionalFieldsobject or null(Additionalfields)
Any of:

A key-value map of additional fields for the condition template.

templateElementsArray of objects or null(Templateelements)
Any of:

A list of template elements for the condition template.

defaultTemplateboolean or null(Defaulttemplate)
Example:false
Any of:

Whether the condition template is the default.

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

A list of tags associated with the condition template.

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

Whether the condition template is custom.

boolean
clientKeystring or null(Clientkey)
Example:"pers123jgltUp"
Any of:

The client key for the condition template, or null if not applicable.

string
descriptionstring or null(Description)
Example:"This condition is based on the time a user spends on the site."
Any of:

A description of the condition template, or null if not provided.

string
revisionCommentstring or null(Revisioncomment)
Example:"Updated time thresholds for better accuracy."
Any of:

A comment about the revision of the condition template, or null if not provided.

string
renderboolean or null(Render)
Example:true
Any of:

Whether to render the condition template, or null if not applicable.

boolean
Response
{ "href": "https://www.example.com/condition-template", "ref": "ConditionTemplate-12345", "name": "Time on Site", "modifiedByRef": "User-67890", "modifiedAt": "2025-01-15T10:30:00Z", "revision": 3, "archived": false, "friendlyId": "time_on_site", "type": "time-based", "status": "active", "icon": "https://www.example.com/icons/time-on-site.png", "additionalFields": {}, "templateElements": [ {} ], "defaultTemplate": false, "tags": [ "string" ], "customTemplate": true, "clientKey": "pers123jgltUp", "description": "This condition is based on the time a user spends on the site.", "revisionComment": "Updated time thresholds for better accuracy.", "render": true }