Documentation Sweet Pricing API

GET / filterfields

This endpoint gets a list of user attributes that you can use to filter analytics or define segments, along with the types of constraint available.

For most attributes, the types of constraint available are:

  • for string types, exact match, contains, starts with, ends with, contained in set and the negatives of these constraints; and
  • for integer types, equals, greater than, less than and the negatives of these constraints.

To use the constraint 'less than or equal to', for example, you need to use 'not greater than'.

URL

https://api.sweetpricing.com/v1.0/filterfields

200

Field Type Description
filterfields Object[]

Array of available fields.

filterfields.fieldName String

Name of the field.

filterfields.isConfigurationDefault Boolean

True if this field is enabled by default for dynamic pricing.

filterfields.niceName String

Name to display in UI.

filterfields.values Mixed[]

Array of parameters that can be used. Can contain strings or numbers.

filterfields.filterfieldFiltertypes Object[]

The filterfield-filtertype combinations that can be applied.

filterfields.filterfieldFiltertypes.id Number

ID of the filterfield-filtertype combination.

filterfields.filterfieldFiltertypes.filtertype Object
filterfields.filterfieldFiltertypes.filtertype.name String

Name of the filter.

filterfields.filterfieldFiltertypes.filtertype.isStringExact Boolean

Is this string exactly matches filter?

filterfields.filterfieldFiltertypes.filtertype.isStringContains Boolean

Is this string contains filter?

filterfields.filterfieldFiltertypes.filtertype.isStringStartsWith Boolean

Is this string starts with filter?

filterfields.filterfieldFiltertypes.filtertype.isStringEndsWith Boolean

Is this string ends with filter?

filterfields.filterfieldFiltertypes.filtertype.isStringSet Boolean

Is this string contained in set filter?

filterfields.filterfieldFiltertypes.filtertype.isIntEqual Boolean

Is this integer exactly equals filter?

filterfields.filterfieldFiltertypes.filtertype.isIntGt Boolean

Is this integer greater than filter?

filterfields.filterfieldFiltertypes.filtertype.isIntLt Boolean

Is this integer less than filter?

{
	"filterfields": [{
		"fieldName": "app_version",
		"niceName": "App Version",
		"filterfieldFiltertypes": [{
			"id": 1,
			"filtertype": {
				"name": "Exact match",
				"minParams": 1,
				"maxParams": 1,
				"isStringExact": false,
				"isStringContains": false,
				"isStringStartsWith": false,
				"isStringEndsWith": false,
				"isStringSet": false,
				"isIntEqual": false,
				"isIntGt": true,
				"isIntLt": false
			}
		}]
	}]
}

401

Name Description
401

You are not authenticated to perform the request.

403

Name Description
403

You are not allowed to view/modify this resource.

404

Name Description
404

Resource not found.