Disclaimer: This website requires Please enable JavaScript in your browser settings for the best experience.

Dev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideLegal TermsGitHubDev CommunityOptimizely AcademySubmit a ticketLog In
API Reference

How to format the filtering section in the payload of the ODP Exports APIs.

You can use and/or clauses to return the exact customer data that you want. The filtering section in the payload may contain one of the following:

  • clause: A standalone clause for defining a filter on ODP data elements.
  • and (all sub-clauses): A combination of clauses. If all of the contained clauses (which may include nested and/or clauses) evaluate to true, this data element may pass the overall filter. If any one (or more) of them do not, the data element will not pass the filter.
  • or (at least one sub-clause): A combination of clauses. If any one (or more) of the contained clauses (which may include nested and/or clauses) evaluates to true, this data element may pass the overall filter. If none do, the data element will not pass the filter.

️ Case sensitivity

and/or are case-sensitive in this filter and must be all lowercase.

{      
      "format": "csv",
      "delimiter": "comma",
      "select": {
        "object": "customers",
        "fields": [
                  "email",
                  "insights.ttno_days"
                  ],
        "filter": {
			            "and": [
				                  {
				                  "field": "email",
				                  "operator": "!=",
				                  "value": null
				                  },
		                      {
		                      "field": "ccpa_opted_out",
		                      "operator": "!=",
		                      "value": true}
	                       ]
    	              }
                }
    }