LiveRecoverVYG Developer Docs
CDP REST APIAPI Reference

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_key

No 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"
}
FieldTypeDescription
conditionTypesarrayOne descriptor per accepted condition type — the full public vocabulary.
operatorsarrayOne descriptor per accepted comparison operator, with its value-field rules.
limitsobjectTree guardrails: maximum nesting depth and maximum total nodes per tree.
scopestringYour brand's connected shop domain.

Condition-type descriptor

FieldTypeDescription
idstringThe condition type value to send.
descriptionstringWhat the condition matches.
parametersarrayEvery accepted parameterValues key. Unknown keys are rejected.
operatorsarrayOperators usable as comparisonOperator (empty when not operator-based).

Operator descriptor

FieldTypeDescription
idstringThe comparisonOperator value.
valueKindstringnone (no value field), scalar (one propertyValue*), or array (one propertyValues*).
valueFieldsarrayThe 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

Statuserror codeWhen
401unauthorizedMissing or invalid credential.
403forbiddenAuthenticated, but no connected integration resolves a CDP scope for this brand.
405method_not_allowedMethod other than GET / OPTIONS.

See Errors for the full envelope.

On this page