Table of Contents

Understanding the PaidAudiencesContainer REST service

PaidAudiencesContainer is a REST service that allows callers to retrieve the list of paid media audiences for a customer in one or more paid media destinations.

The service supports the GET HTTP method.

The URL pattern for this service is:

http://<host>:<port>/prweb/PRRestService/PegaMKTContainer/V1/PaidAudiencesContainer?DestinationKey=XXXXX&customerID=xxxxx

For the GET request, the service expects a JSON Object with the following attributes:

  • CustomerID - Customer identifier
  • DestinationKey - Destination key of the paid media destination. For multiple destinations, comma separated lists of paid media destination keys are allowed.

Sample invocation request and response

Request:

 { "CustomerID":"101", "DestinationKey:"DKa93e1234" }

Response:

 { "ResponseData":{ "DKa93e1234":{ "PaidAudiences":[ {"AudienceId":"IPhone[6e43cf87]"},{"AudienceId":"SamsungGalaxy[f7fb59b1]"},{"AudienceId":"MiNote7[d9d172bb]"}], "pxSubscript":" DKa93e1234"}}, "CustomerID":"101" }

The audience data in the responses includes the audience name, followed by the audience ID in brackets. You can use the audience name to fire Facebook Ads pixels or Google Ads events for each audience. Because the audience name is the same as the name of a corresponding action in Pega Marketing, you may want to avoid exposing the name at the client side. Because of that, you can use the audience ID instead of the audience name in a browser cookie to keep track of pixels and events which have already been fired for a particular individual.


100% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.