List of Segments
GET {{campaign_url}}/segments?marketId=1&segmentUsage=targeting&offset=0&limit=2&sortOrder=desc&sortKey=cost
Retrieve a list of segments
You can retrieve all of the segments within a specified market or advertiser by sending this GET
request.
Note: If you have access to multiple markets, you must specify a value for marketId
. Otherwise (i.e., marketId
is left unchecked), the request will return a 300 Multiple Choices response containing a list of market IDs that can be passed as marketId
values.
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
marketId | number | Limits response results to segments within the market specified. |
Cannot be defined when advertiserId is defined. |
| advertiserId
| string | | Limits response results to segments under the advertiser specified. If left unchecked/empty, segments under all advertisers are returned.
Cannot be defined when marketId is defined. |
| segmentUsage
| string | | Limits response results to segments of the type specified.
Allowed values: targeting, analytics |
| offset
| number | | The starting index in the list of segment objects. |
| limit
| number | | The number of segments to return. |
| sortOrder
| string | | Direction by which results should be sorted.
Allowed values: asc, desc |
| sortKey
| string | | Field by which results should be sorted.
Allowed values: id, name, cost |