POST https://webapi.mymarketing.co.il/api/segmentation
Create a new segmentation
Request Information
URI Parameters
Body Parameters
Name
Description
Type
Additional information
name
Segmentation name
string
Request Formats
application/json, text/json
Sample:
{ "rules_segment": { "additional_rules_sets": [ { "connecting_operator": "And", "segment_rules_set": { "base_rule": { "type_id": "Info", "field": "Email", "operator_type": "Is", "seg_operator": "Equals", "value": [ "sample string 1", "sample string 2" ] }, "additional_rules": [ { "connecting_operator": "And", "rule": { "type_id": "Info", "field": "Email", "operator_type": "Is", "seg_operator": "Equals", "value": [ "sample string 1", "sample string 2" ] } }, { "connecting_operator": "And", "rule": { "type_id": "Info", "field": "Email", "operator_type": "Is", "seg_operator": "Equals", "value": [ "sample string 1", "sample string 2" ] } } ] } }, { "connecting_operator": "And", "segment_rules_set": { "base_rule": { "type_id": "Info", "field": "Email", "operator_type": "Is", "seg_operator": "Equals", "value": [ "sample string 1", "sample string 2" ] }, "additional_rules": [ { "connecting_operator": "And", "rule": { "type_id": "Info", "field": "Email", "operator_type": "Is", "seg_operator": "Equals", "value": [ "sample string 1", "sample string 2" ] } }, { "connecting_operator": "And", "rule": { "type_id": "Info", "field": "Email", "operator_type": "Is", "seg_operator": "Equals", "value": [ "sample string 1", "sample string 2" ] } } ] } } ], "basic_rules_set": { "base_rule": { "type_id": "Info", "field": "Email", "operator_type": "Is", "seg_operator": "Equals", "value": [ "sample string 1", "sample string 2" ] }, "additional_rules": [ { "connecting_operator": "And", "rule": { "type_id": "Info", "field": "Email", "operator_type": "Is", "seg_operator": "Equals", "value": [ "sample string 1", "sample string 2" ] } }, { "connecting_operator": "And", "rule": { "type_id": "Info", "field": "Email", "operator_type": "Is", "seg_operator": "Equals", "value": [ "sample string 1", "sample string 2" ] } } ] } }, "name": "sample string 1" }
application/xml, text/xml
Sample:
<ApiSegmentationUpdateContainer xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ActiveTrail.RESTfulApi.Models"> <name>sample string 1</name> <rules_segment> <additional_rules_sets> <ApiAdditionalSegmentRulesSet> <connecting_operator>And</connecting_operator> <segment_rules_set> <additional_rules> <ApiAdditionalSegmentRule> <connecting_operator>And</connecting_operator> <rule> <field>Email</field> <operator_type>Is</operator_type> <seg_operator>Equals</seg_operator> <type_id>Info</type_id> <value xmlns:d9p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d9p1:string>sample string 1</d9p1:string> <d9p1:string>sample string 2</d9p1:string> </value> </rule> </ApiAdditionalSegmentRule> <ApiAdditionalSegmentRule> <connecting_operator>And</connecting_operator> <rule> <field>Email</field> <operator_type>Is</operator_type> <seg_operator>Equals</seg_operator> <type_id>Info</type_id> <value xmlns:d9p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d9p1:string>sample string 1</d9p1:string> <d9p1:string>sample string 2</d9p1:string> </value> </rule> </ApiAdditionalSegmentRule> </additional_rules> <base_rule> <field>Email</field> <operator_type>Is</operator_type> <seg_operator>Equals</seg_operator> <type_id>Info</type_id> <value xmlns:d7p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d7p1:string>sample string 1</d7p1:string> <d7p1:string>sample string 2</d7p1:string> </value> </base_rule> </segment_rules_set> </ApiAdditionalSegmentRulesSet> <ApiAdditionalSegmentRulesSet> <connecting_operator>And</connecting_operator> <segment_rules_set> <additional_rules> <ApiAdditionalSegmentRule> <connecting_operator>And</connecting_operator> <rule> <field>Email</field> <operator_type>Is</operator_type> <seg_operator>Equals</seg_operator> <type_id>Info</type_id> <value xmlns:d9p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d9p1:string>sample string 1</d9p1:string> <d9p1:string>sample string 2</d9p1:string> </value> </rule> </ApiAdditionalSegmentRule> <ApiAdditionalSegmentRule> <connecting_operator>And</connecting_operator> <rule> <field>Email</field> <operator_type>Is</operator_type> <seg_operator>Equals</seg_operator> <type_id>Info</type_id> <value xmlns:d9p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d9p1:string>sample string 1</d9p1:string> <d9p1:string>sample string 2</d9p1:string> </value> </rule> </ApiAdditionalSegmentRule> </additional_rules> <base_rule> <field>Email</field> <operator_type>Is</operator_type> <seg_operator>Equals</seg_operator> <type_id>Info</type_id> <value xmlns:d7p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d7p1:string>sample string 1</d7p1:string> <d7p1:string>sample string 2</d7p1:string> </value> </base_rule> </segment_rules_set> </ApiAdditionalSegmentRulesSet> </additional_rules_sets> <basic_rules_set> <additional_rules> <ApiAdditionalSegmentRule> <connecting_operator>And</connecting_operator> <rule> <field>Email</field> <operator_type>Is</operator_type> <seg_operator>Equals</seg_operator> <type_id>Info</type_id> <value xmlns:d7p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d7p1:string>sample string 1</d7p1:string> <d7p1:string>sample string 2</d7p1:string> </value> </rule> </ApiAdditionalSegmentRule> <ApiAdditionalSegmentRule> <connecting_operator>And</connecting_operator> <rule> <field>Email</field> <operator_type>Is</operator_type> <seg_operator>Equals</seg_operator> <type_id>Info</type_id> <value xmlns:d7p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d7p1:string>sample string 1</d7p1:string> <d7p1:string>sample string 2</d7p1:string> </value> </rule> </ApiAdditionalSegmentRule> </additional_rules> <base_rule> <field>Email</field> <operator_type>Is</operator_type> <seg_operator>Equals</seg_operator> <type_id>Info</type_id> <value xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d5p1:string>sample string 1</d5p1:string> <d5p1:string>sample string 2</d5p1:string> </value> </base_rule> </basic_rules_set> </rules_segment> </ApiSegmentationUpdateContainer>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
Name
Description
Type
Additional information
date_created_utc
The UTC date when the segmentation was created
date
date_updated_utc
The UTC date when the segmentation was last updated
date
id
Segmentation id
integer
is_active
If the segmentation is active
boolean
is_untitled
If the segmentation is untitled
boolean
name
Segmentation name
string
Required
Response Formats
application/json, text/json
Sample:
{ "date_created_utc": "2016-12-24T14:12:12", "date_updated_utc": "2016-12-24T14:12:12", "id": 1, "is_active": true, "is_untitled": true, "rules_segment": { "basic_rules_set": { "base_rule": { "type_id": "Info", "field": "Email", "operator_type": "Is", "seg_operator": "Equals", "value": [ "sample string 1", "sample string 2" ] }, "additional_rules": [ { "connecting_operator": "And", "rule": { "type_id": "Info", "field": "Email", "operator_type": "Is", "seg_operator": "Equals", "value": [ "sample string 1", "sample string 2" ] } }, { "connecting_operator": "And", "rule": { "type_id": "Info", "field": "Email", "operator_type": "Is", "seg_operator": "Equals", "value": [ "sample string 1", "sample string 2" ] } } ] }, "additional_rules_sets": [ { "connecting_operator": "And", "segment_rules_set": { "base_rule": { "type_id": "Info", "field": "Email", "operator_type": "Is", "seg_operator": "Equals", "value": [ "sample string 1", "sample string 2" ] }, "additional_rules": [ { "connecting_operator": "And", "rule": { "type_id": "Info", "field": "Email", "operator_type": "Is", "seg_operator": "Equals", "value": [ "sample string 1", "sample string 2" ] } }, { "connecting_operator": "And", "rule": { "type_id": "Info", "field": "Email", "operator_type": "Is", "seg_operator": "Equals", "value": [ "sample string 1", "sample string 2" ] } } ] } }, { "connecting_operator": "And", "segment_rules_set": { "base_rule": { "type_id": "Info", "field": "Email", "operator_type": "Is", "seg_operator": "Equals", "value": [ "sample string 1", "sample string 2" ] }, "additional_rules": [ { "connecting_operator": "And", "rule": { "type_id": "Info", "field": "Email", "operator_type": "Is", "seg_operator": "Equals", "value": [ "sample string 1", "sample string 2" ] } }, { "connecting_operator": "And", "rule": { "type_id": "Info", "field": "Email", "operator_type": "Is", "seg_operator": "Equals", "value": [ "sample string 1", "sample string 2" ] } } ] } } ] }, "name": "sample string 3" }
application/xml, text/xml
Sample:
<ApiSegmentationInfo xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ActiveTrail.RESTfulApi.Models"> <date_created_utc>2016-12-24T14:12:12</date_created_utc> <date_updated_utc>2016-12-24T14:12:12</date_updated_utc> <id>1</id> <is_active>true</is_active> <is_untitled>true</is_untitled> <name>sample string 3</name> <rules_segment xmlns:d2p1="http://schemas.datacontract.org/2004/07/ActiveTrail.BusinessLogic.Segment"> <d2p1:additional_rules_sets xmlns:d3p1="http://schemas.datacontract.org/2004/07/ActiveTrail.BusinessLogic.Segment.Rules"> <d3p1:AdditionalSegmentRulesSet> <d3p1:connecting_operator>And</d3p1:connecting_operator> <d3p1:segment_rules_set> <d3p1:additional_rules> <d3p1:AdditionalSegmentRule> <d3p1:connecting_operator>And</d3p1:connecting_operator> <d3p1:rule> <d3p1:field>Email</d3p1:field> <d3p1:operator_type>Is</d3p1:operator_type> <d3p1:seg_operator>Equals</d3p1:seg_operator> <d3p1:type_id>Info</d3p1:type_id> <d3p1:value xmlns:d9p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d9p1:string>sample string 1</d9p1:string> <d9p1:string>sample string 2</d9p1:string> </d3p1:value> </d3p1:rule> </d3p1:AdditionalSegmentRule> <d3p1:AdditionalSegmentRule> <d3p1:connecting_operator>And</d3p1:connecting_operator> <d3p1:rule> <d3p1:field>Email</d3p1:field> <d3p1:operator_type>Is</d3p1:operator_type> <d3p1:seg_operator>Equals</d3p1:seg_operator> <d3p1:type_id>Info</d3p1:type_id> <d3p1:value xmlns:d9p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d9p1:string>sample string 1</d9p1:string> <d9p1:string>sample string 2</d9p1:string> </d3p1:value> </d3p1:rule> </d3p1:AdditionalSegmentRule> </d3p1:additional_rules> <d3p1:base_rule> <d3p1:field>Email</d3p1:field> <d3p1:operator_type>Is</d3p1:operator_type> <d3p1:seg_operator>Equals</d3p1:seg_operator> <d3p1:type_id>Info</d3p1:type_id> <d3p1:value xmlns:d7p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d7p1:string>sample string 1</d7p1:string> <d7p1:string>sample string 2</d7p1:string> </d3p1:value> </d3p1:base_rule> </d3p1:segment_rules_set> </d3p1:AdditionalSegmentRulesSet> <d3p1:AdditionalSegmentRulesSet> <d3p1:connecting_operator>And</d3p1:connecting_operator> <d3p1:segment_rules_set> <d3p1:additional_rules> <d3p1:AdditionalSegmentRule> <d3p1:connecting_operator>And</d3p1:connecting_operator> <d3p1:rule> <d3p1:field>Email</d3p1:field> <d3p1:operator_type>Is</d3p1:operator_type> <d3p1:seg_operator>Equals</d3p1:seg_operator> <d3p1:type_id>Info</d3p1:type_id> <d3p1:value xmlns:d9p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d9p1:string>sample string 1</d9p1:string> <d9p1:string>sample string 2</d9p1:string> </d3p1:value> </d3p1:rule> </d3p1:AdditionalSegmentRule> <d3p1:AdditionalSegmentRule> <d3p1:connecting_operator>And</d3p1:connecting_operator> <d3p1:rule> <d3p1:field>Email</d3p1:field> <d3p1:operator_type>Is</d3p1:operator_type> <d3p1:seg_operator>Equals</d3p1:seg_operator> <d3p1:type_id>Info</d3p1:type_id> <d3p1:value xmlns:d9p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d9p1:string>sample string 1</d9p1:string> <d9p1:string>sample string 2</d9p1:string> </d3p1:value> </d3p1:rule> </d3p1:AdditionalSegmentRule> </d3p1:additional_rules> <d3p1:base_rule> <d3p1:field>Email</d3p1:field> <d3p1:operator_type>Is</d3p1:operator_type> <d3p1:seg_operator>Equals</d3p1:seg_operator> <d3p1:type_id>Info</d3p1:type_id> <d3p1:value xmlns:d7p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d7p1:string>sample string 1</d7p1:string> <d7p1:string>sample string 2</d7p1:string> </d3p1:value> </d3p1:base_rule> </d3p1:segment_rules_set> </d3p1:AdditionalSegmentRulesSet> </d2p1:additional_rules_sets> <d2p1:basic_rules_set xmlns:d3p1="http://schemas.datacontract.org/2004/07/ActiveTrail.BusinessLogic.Segment.Rules"> <d3p1:additional_rules> <d3p1:AdditionalSegmentRule> <d3p1:connecting_operator>And</d3p1:connecting_operator> <d3p1:rule> <d3p1:field>Email</d3p1:field> <d3p1:operator_type>Is</d3p1:operator_type> <d3p1:seg_operator>Equals</d3p1:seg_operator> <d3p1:type_id>Info</d3p1:type_id> <d3p1:value xmlns:d7p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d7p1:string>sample string 1</d7p1:string> <d7p1:string>sample string 2</d7p1:string> </d3p1:value> </d3p1:rule> </d3p1:AdditionalSegmentRule> <d3p1:AdditionalSegmentRule> <d3p1:connecting_operator>And</d3p1:connecting_operator> <d3p1:rule> <d3p1:field>Email</d3p1:field> <d3p1:operator_type>Is</d3p1:operator_type> <d3p1:seg_operator>Equals</d3p1:seg_operator> <d3p1:type_id>Info</d3p1:type_id> <d3p1:value xmlns:d7p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d7p1:string>sample string 1</d7p1:string> <d7p1:string>sample string 2</d7p1:string> </d3p1:value> </d3p1:rule> </d3p1:AdditionalSegmentRule> </d3p1:additional_rules> <d3p1:base_rule> <d3p1:field>Email</d3p1:field> <d3p1:operator_type>Is</d3p1:operator_type> <d3p1:seg_operator>Equals</d3p1:seg_operator> <d3p1:type_id>Info</d3p1:type_id> <d3p1:value xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d5p1:string>sample string 1</d5p1:string> <d5p1:string>sample string 2</d5p1:string> </d3p1:value> </d3p1:base_rule> </d2p1:basic_rules_set> </rules_segment> </ApiSegmentationInfo>