List Condition Types
Discover the condition vocabulary — every condition type, parameter, and operator the CDP API accepts.
GET /cdp/definitions/conditions — the published condition vocabulary. Returns a
descriptor for every condition type the API accepts (its parameterValues keys and the
operators it supports), the comparison-operator contract, and the tree limits — so
building conditions for POST /cdp/segments and the
/cdp/query endpoints isn't trial-and-error.
The response is generated from the validator itself: a condition type is listed here
if and only if the condition validator accepts it. Anything not listed — including Unomi
condition types that exist internally — is rejected with a 400 invalid_condition.
Request
GET /cdp/definitions/conditions
Authorization: Bearer vyg_your_api_keyNo query parameters. The scope is resolved from your API credential.
Response 200
{
"conditionTypes": [
{
"id": "profilePropertyCondition",
"description": "Compare one profile property against a typed value (or test presence/absence).",
"parameters": [
{
"id": "propertyName",
"type": "string",
"required": true,
"description": "Dot-separated profile property path (e.g. \"properties.email\"). Conditions on scope/shopDomain are rejected — the owning scope is enforced by the server."
},
{
"id": "comparisonOperator",
"type": "enum",
"required": true,
"description": "One of the allowlisted comparison operators (see the top-level \"operators\" list).",
"allowedValues": [
"equals",
"exists",
"missing",
"greaterThan",
"greaterThanOrEqualTo",
"lessThan",
"lessThanOrEqualTo",
"in",
"notIn"
]
},
{
"id": "propertyValue",
"type": "string",
"required": false,
"description": "Typed scalar comparison value — scalar operators require exactly ONE propertyValue* field."
}
],
"operators": [
"equals",
"exists",
"missing",
"greaterThan",
"greaterThanOrEqualTo",
"lessThan",
"lessThanOrEqualTo",
"in",
"notIn"
]
}
],
"operators": [
{
"id": "equals",
"valueKind": "scalar",
"valueFields": ["propertyValue", "propertyValueInteger", "propertyValueDouble", "propertyValueDate"]
},
{ "id": "exists", "valueKind": "none", "valueFields": [] },
{
"id": "in",
"valueKind": "array",
"valueFields": ["propertyValues", "propertyValuesInteger", "propertyValuesDouble", "propertyValuesDate"]
}
],
"limits": { "maxConditionDepth": 8, "maxConditionNodes": 50 },
"scope": "your-shop.myshopify.com"
}| Field | Type | Description |
|---|---|---|
conditionTypes | array | One descriptor per accepted condition type — the full public vocabulary. |
operators | array | One descriptor per accepted comparison operator, with its value-field rules. |
limits | object | Tree guardrails: maximum nesting depth and maximum total nodes per tree. |
scope | string | Your brand's connected shop domain. |
Condition-type descriptor
| Field | Type | Description |
|---|---|---|
id | string | The condition type value to send. |
description | string | What the condition matches. |
parameters | array | Every accepted parameterValues key. Unknown keys are rejected. |
operators | array | Operators usable as comparisonOperator (empty when not operator-based). |
Operator descriptor
| Field | Type | Description |
|---|---|---|
id | string | The comparisonOperator value. |
valueKind | string | none (no value field), scalar (one propertyValue*), or array (one propertyValues*). |
valueFields | array | The typed value fields the operator accepts exactly one of. |
The vocabulary
The accepted condition types are booleanCondition (AND/OR combinator),
profilePropertyCondition, eventPropertyCondition, sessionPropertyCondition (typed
property comparisons), and eventTypeCondition (match one event type — discover names via
GET /cdp/events/types). Conditions referencing
scope/shopDomain, script:: value resolvers, unknown types/keys, and trees deeper
than limits.maxConditionDepth or larger than limits.maxConditionNodes nodes are all
rejected.
Example
curl -s "https://cdp.vyg.app/cdp/definitions/conditions" \
-H "Authorization: Bearer vyg_your_api_key"Errors
| Status | error code | When |
|---|---|---|
401 | unauthorized | Missing or invalid credential. |
403 | forbidden | Authenticated, but no connected integration resolves a CDP scope for this brand. |
405 | method_not_allowed | Method other than GET / OPTIONS. |
See Errors for the full envelope.