Documentation Sweet Pricing API

GET / apps / :appId / segments

This endpoint gets a list of segments associated with an app, with detail similar to that returned by GET /segments/:segmentId.

URL

https://api.sweetpricing.com/v1.0/apps/:appId/segments

Header

Field Type Description
Authorization String

Header of form api-key <API key>

Authorization: api-key <API Key>

Parameters

Field Type Description
:appId Number

App ID.

200

Field Type Description
segments Object[]
segments.id Number

Segment ID

segments.appId Number

App ID

segments.name String

User-defined segment name

segments.segmentfilters Object[]

Array of the filters that are applicable.

segments.segmentfilters.isNegated Boolean

True if the filter is negated.

segments.segmentfilters.filterfieldFiltertype Object
segments.segmentfilters.filterfieldFiltertype.id String

ID of the filterfield-fieldtype combination that is applied.

segments.segmentfilters.filterfieldFiltertype.filtertype Object
segments.segmentfilters.filterfieldFiltertype.filtertype.isStringExact Boolean

Is this string exactly matches filter?

segments.segmentfilters.filterfieldFiltertype.filtertype.isStringContains Boolean

Is this string contains filter?

segments.segmentfilters.filterfieldFiltertype.filtertype.isStringStartsWith Boolean

Is this string starts with filter?

segments.segmentfilters.filterfieldFiltertype.filtertype.isStringEndsWith Boolean

Is this string ends with filter?

segments.segmentfilters.filterfieldFiltertype.filtertype.isStringSet Boolean

Is this string contained in set filter?

segments.segmentfilters.filterfieldFiltertype.filtertype.isIntEqual Boolean

Is this integer exactly equals filter?

segments.segmentfilters.filterfieldFiltertype.filtertype.isIntGt Boolean

Is this integer greater than filter?

segments.segmentfilters.filterfieldFiltertype.filtertype.isIntLt Boolean

Is this integer less than filter?

segments.segmentfilters.filterfieldFiltertype.filterfield Object
segments.segmentfilters.filterfieldFiltertype.filterfield.fieldName String

Name of the field that is used in the filter.

segments.segmentfilters.params Object[]

Array of the parameters values to the filter. These are objects.

segments.segmentfilters.params.value Mixed

Value of the parameter.

{
	"segments": [{
		"id": 1,
		"name": "All Users",
		"segmentfilters": []
	}, {
		"id": 2,
		"name": "Engagement > 80",
		"segmentfilters": [{
			"isNegated": false,
			"filterfieldFiltertype": {
				"id": 2,
				"filtertype": {
					"isStringExact": false,
					"isStringContains": false,
					"isStringStartsWith": false,
					"isStringEndsWith": false,
					"isStringSet": false,
					"isIntEqual": false,
					"isIntGt": true,
					"isIntLt": false
				},
				"fieldfield": {
					"fieldName": "engagement14"
				}
			},
			"params": [{
				"value": 80
			}]
		}]
	}]
}

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.