{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/infobip/main/json-schema/infobip-d76a8e2b7d80b5cb0751e11a31b96eabeaf6b2ec1de2932507f7f2749e61e91c-segment-update-dto-schema.json", "title": "SegmentUpdateDto", "x-generated": "2026-10-04", "x-method": "derived", "x-generator": "derive-json-schema.py", "x-source": "openapi/infobip-customer-engagement-api-openapi.yml#/components/schemas/d76a8e2b7d80b5cb0751e11a31b96eabeaf6b2ec1de2932507f7f2749e61e91c.SegmentUpdateDto", "type": "object", "properties": { "name": { "type": "string", "description": "A unique segment name." }, "description": { "type": "string", "description": "Segment description." }, "query": { "type": "object", "additionalProperties": { "type": "object" }, "description": "\nAllows to filter persons using simple queries.\n\n##### Supported logical operators\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
OperatorDescriptionExample
#andAll records that match the conditions of all clauses.{\"#and\":[{\"firstName\":\"John\"},{\"lastName\":\"Smith\"}]}
#orAll records that match the conditions of any clause.{\"#or\":[{\"firstName\":\"John\"},{\"firstName\":\"Jane\"}]}
\n\n##### Supported comparison operators\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
AttributesDescriptionExample
#notExistMatches records that do not have given attribute.{\"#notExist\":\"firstName\"}
#existMatches records that have given attribute.{\"#exists\":\"firstName\"}
StringsDescriptionExample
#eqEquals to a specified string.{\"firstName\":\"John\"}
#neNot equal to a specified string.{\"#ne\":{\"firstName\":\"John\"}}
#startsWithStarts with a specified string.{\"#startsWith\":{\"firstName\":\"John\"}}
#endsWithEnds with a specified string.{\"#endsWith\":{\"firstName\":\"John\"}}
#containsContains a specified string.{\"#contains\":{\"firstName\":\"oh\"}}
#notContainDoes not contain a specified string.{\"#notContain\":{\"firstName\":\"oh\"}}
#inAt least one of the strings in a list.{\"#in\":{\"firstName\":[\"John\",\"Jane\"]}}
#notInNot any of the strings in a list.{\"#notIn\":{\"firstName\":[\"John\",\"Jane\"]}}
DatesDescriptionExample
#eqEquals to a specified date.{\"birthDate\":\"1987-07-10\"}
#neNot equal to a specified date.{\"#ne\":{\"birthDate\":\"1987-07-10\"}}
#eq (relative)Will be in specified interval.{\"#eq\":{\"birthDate\":{\"#relNow\":\"P1D\"}}}
#lt (relative)Will be within a specified interval.{\"#lt\":{\"birthDate\":{\"#relNow\":\"P1D\"}}}
#gt (relative)Will be in more than a specified interval.{\"#gt\":{\"birthDate\":{\"#relNow\":\"P1D\"}}}
#eq (relative) -Was a specified interval ago.{\"#eq\":{\"birthDate\":{\"#relNow\":\"P-1D\"}}}
#gt (relative) -Was within a specified interval ago.{\"#gt\":{\"birthDate\":{\"#relNow\":\"P-1D\"}}}
#gt (relative) -Was more than a specified interval ago.{\"#gt\":{\"birthDate\":{\"#relNow\":\"P-1D\"}}}
#ltIs before a specified date.{\"#lt\":{\"birthDate\":\"1987-07-10\"}}
#lteIs before or equal to a specified date.{\"#lte\":{\"birthDate\":\"1987-07-10\"}}
#gtIs after a specified date.{\"#gt\":{\"birthDate\":\"1987-07-10\"}}
#gteIs after or equal to a specified date.{\"#gte\":{\"birthDate\":\"1987-07-10\"}}
#inIs equal to one of dates in a given list.{\"#in\":{\"birthDate\":[\"1987-07-10\",\"1987-07-11\"]}}
#notInIs not equal to any of dates in a given list.{\"#notIn\":{\"birthDate\":[\"1987-07-10\",\"1987-07-11\"]}}
IntegersDescriptionExample
#eqEquals to a specified integer.{\"data\\u0001counter\":1}
#neNot equal to a specified integer.{\"#ne\":{\"data\\u0001counter\":1}}
#ltIs less than a specified integer.{\"#lt\":{\"data\\u0001counter\":1}}
#lteIs less than or equal to a specified integer.{\"#lte\":{\"data\\u0001counter\":1}}
#gtIs greater than a specified integer.{\"#gt\":{\"data\\u0001counter\":1}}
#gteIs greater than or equal to a specified integer.{\"#gte\":{\"data\\u0001counter\":1}}
#inIs equal to any of specified integers in a list.{\"#in\":{\"data\\u0001counter\":[1,2,3]}}
#notInIs not equal to any of specified integers in a list.{\"#notIn\":{\"data\\u0001counter\":[1,2,3]}}
DecimalsDescriptionExample
#eqEquals to a specified decimal.{\"data\\u0001price\":1.1}
#neIs not equal to a specified decimal.{\"#ne\":{\"data\\u0001price\":1.1}}
#ltIs less than a specified decimal.{\"#lt\":{\"data\\u0001price\":1.1}}
#lteIs less than or equal to a specified decimal.{\"#lte\":{\"data\\u0001price\":1.1}}
#gtIs greater than a specified decimal.{\"#gt\":{\"data\\u0001price\":1.1}}
#gteIs greater than or equal to a specified decimal.{\"#gte\":{\"data\\u0001price\":1.1}}
#inIs equal to any of specified decimals in a list.{\"#in\":{\"data\\u0001price\":[1.1,2.1,3.0]}}
#notInIs not equal to any of specified decimals in a list.{\"#notIn\":{\"data\\u0001price\":[1.1,2.1,3.0]}}
BooleansDescriptionExample
#eqEquals to a specified boolean.{\"data\\u0001happy\":true}
#neNot equal to a specified boolean.{\"#ne\":{\"data\\u0001happy\":true}}
TagsDescriptionExample
#containsContains a specified tag.{\"#contains\":{\"tags\":\"SOME_TAG\"}}
#notContainDoes not contain a specified tag.{\"#notContain\":{\"tags\":\"SOME_TAG\"}}
GenderDescriptionExample
#eqEquals a specified gender.{\"gender\":\"MALE\"}
#neDoes not equal a specified gender.{\"#ne\":{\"gender\":\"FEMALE\"}}
ListsDescriptionExample
#allAll items in the list match.{\"#all\":{\"data\\u0001Cart\":{\"#and\":[{\"ProductName\":\"Laptop\"},{\"ProductPrice\":2000}]}}}\n
#anyAny item in the list match.{\"#any\":{\"data\\u0001Cart\":{\"#and\":[{\"ProductName\":\"Laptop\"},{\"ProductPrice\":2000}]}}}\n
\n\n" }, "events": { "type": "array", "description": "List of events that persons should match.", "items": { "$ref": "#/$defs/d76a8e2b7d80b5cb0751e11a31b96eabeaf6b2ec1de2932507f7f2749e61e91c.EventClauseDto" } } }, "required": [ "name" ], "$defs": { "d76a8e2b7d80b5cb0751e11a31b96eabeaf6b2ec1de2932507f7f2749e61e91c.EventClauseDto": { "type": "object", "description": "List of events that persons should match.", "properties": { "definitionId": { "type": "string", "description": "Event definition ID." }, "occurrenceCondition": { "$ref": "#/$defs/d76a8e2b7d80b5cb0751e11a31b96eabeaf6b2ec1de2932507f7f2749e61e91c.OccurrenceConditionDto" }, "timelineCondition": { "$ref": "#/$defs/d76a8e2b7d80b5cb0751e11a31b96eabeaf6b2ec1de2932507f7f2749e61e91c.TimelineConditionDto" }, "payloadConditions": { "type": "array", "description": "Specify the conditions of the event payload.", "items": { "$ref": "#/$defs/d76a8e2b7d80b5cb0751e11a31b96eabeaf6b2ec1de2932507f7f2749e61e91c.PayloadConditionDto" } } }, "required": [ "definitionId", "timelineCondition" ], "title": "EventClauseDto" }, "d76a8e2b7d80b5cb0751e11a31b96eabeaf6b2ec1de2932507f7f2749e61e91c.OccurrenceConditionDto": { "type": "object", "description": "Specify how many times did the event occur.", "properties": { "operation": { "$ref": "#/$defs/d76a8e2b7d80b5cb0751e11a31b96eabeaf6b2ec1de2932507f7f2749e61e91c.OccurrenceConditionOperation" }, "times": { "type": "integer", "format": "int32", "description": "Number of times the event has occurred." } }, "required": [ "operation", "times" ], "title": "OccurrenceConditionDto" }, "d76a8e2b7d80b5cb0751e11a31b96eabeaf6b2ec1de2932507f7f2749e61e91c.OccurrenceConditionOperation": { "type": "string", "description": "Operation to compare how many times the event has occurred.", "enum": [ "IS", "LESS_THAN", "LESS_OR_EQUAL", "GREATER_OR_EQUAL", "GREATER_THAN" ], "title": "OccurrenceConditionOperation" }, "d76a8e2b7d80b5cb0751e11a31b96eabeaf6b2ec1de2932507f7f2749e61e91c.PayloadConditionDto": { "type": "object", "description": "Specify the conditions of the event payload.", "properties": { "attribute": { "type": "string", "description": "Event payload attribute." }, "operator": { "$ref": "#/$defs/d76a8e2b7d80b5cb0751e11a31b96eabeaf6b2ec1de2932507f7f2749e61e91c.PayloadOperator" }, "value": { "type": "string", "description": "Payload condition value." } }, "required": [ "attribute", "operator", "value" ], "title": "PayloadConditionDto" }, "d76a8e2b7d80b5cb0751e11a31b96eabeaf6b2ec1de2932507f7f2749e61e91c.PayloadOperator": { "type": "string", "description": "Operator for comparing condition value with payload value.", "enum": [ "EQ", "LT", "LTE", "GT", "GTE", "NE", "SW", "EW", "CON" ], "title": "PayloadOperator" }, "d76a8e2b7d80b5cb0751e11a31b96eabeaf6b2ec1de2932507f7f2749e61e91c.TimelineConditionDto": { "type": "object", "description": "Specify in which timespan did the event occur.", "properties": { "occurred": { "$ref": "#/$defs/d76a8e2b7d80b5cb0751e11a31b96eabeaf6b2ec1de2932507f7f2749e61e91c.TimelineConditionOccurred" }, "operator": { "$ref": "#/$defs/d76a8e2b7d80b5cb0751e11a31b96eabeaf6b2ec1de2932507f7f2749e61e91c.TimelineConditionOperator" }, "start": { "type": "integer", "format": "int32", "description": "Start of timespan: For relative operators, specify the number of units. For absolute operators, provide a Unix timestamp." }, "end": { "type": "integer", "format": "int32", "description": "End of timespan: For relative operators, specify the number of units. For absolute operators, provide a Unix timestamp." }, "units": { "$ref": "#/$defs/d76a8e2b7d80b5cb0751e11a31b96eabeaf6b2ec1de2932507f7f2749e61e91c.TimelineConditionUnits" } }, "required": [ "occurred", "operator" ], "title": "TimelineConditionDto" }, "d76a8e2b7d80b5cb0751e11a31b96eabeaf6b2ec1de2932507f7f2749e61e91c.TimelineConditionOccurred": { "type": "string", "description": "Specifies whether an event is occurring for the first or last time within a given period. Additionally, we can use an operator to specify if any event has occurred or never occurred within the specified timeframe.", "enum": [ "ALL", "FIRST", "LAST", "NOT" ], "title": "TimelineConditionOccurred" }, "d76a8e2b7d80b5cb0751e11a31b96eabeaf6b2ec1de2932507f7f2749e61e91c.TimelineConditionOperator": { "type": "string", "description": "The operators AFTER, BEFORE, and BETWEEN can be used to specify relative time periods, while their counterparts with the suffix _ABS (e.g., AFTER_ABS, BEFORE_ABS, BETWEEN_ABS) are used for absolute time values. These operators can be applied with start and end attributes to define the beginning and ending points of the time. Units need to be used with relative operators to specify the duration of the time periods.", "enum": [ "EMPTY", "AFTER", "BEFORE", "BETWEEN", "AFTER_ABS", "BEFORE_ABS", "BETWEEN_ABS" ], "title": "TimelineConditionOperator" }, "d76a8e2b7d80b5cb0751e11a31b96eabeaf6b2ec1de2932507f7f2749e61e91c.TimelineConditionUnits": { "type": "string", "description": "Time units for relative operators.", "enum": [ "DAYS", "HOURS", "MINUTES" ], "title": "TimelineConditionUnits" } } }