PRODUCT
Follow

Overview

You can use the target audience endpoint to retrieve a specific target audience, create a new target audience, update an existing target audience, or delete an audience.

Resource URL

Depending on the API user that was created for you, use one of the following URLs:

  • https://api.sizmek.com/rest/strategies/targetAudiences/

  • https://adapi.sizmek.com/sas/strategies/targetAudiences/

Note

Note: Confirm with your Sizmek customer success manager regarding the correct URL to use.

Objects Used by this Resource

HTTP Method and URI List

HTTP METHOD

URI

DESCRIPTION

GET

/strategies/targetAudiences/

Retrieves multiple target audiences.

GET

/strategies/targetAudiences/{ID}

Retrieves a specific target audience.

POST

/strategies/targetAudiences/

Creates a new target audience.

PUT

/strategies/targetAudiences/{ID}

Updates an existing target audience.

PUT

/strategies/targetAudiences/delete

Deletes an existing target audience.

Method Examples and Request Parameters

Important

Important:

  • For PUT calls, do the following:

    • We recommend that for any PUT method that updates an object, you include the entire "result": object from the GET response in the request body. If there is missing information, even if it is read-only, the request might fail.

    • You must also change the "result": to "entities": and make the entities contents into an array. For example, here is the output from the GET request:

       { "result": { "type": "Advertiser", ... } }      

      You should make the following modifications, including your specific modifications, to the json object that you submit for the request.

       { "entities": [{ "type": "Advertiser", ... }] }   
      
  • For POST calls, do the following:

    • Include the fields marked as Required, as indicated in the corresponding Object article.

    • Format the JSON object as follows:

       { "entities": [{ "type": "Advertiser", ... }] }   

Get Multiple Target Audiences (GET)

Retrieves multiple target audiences.

Request Query Parameters

NAME

DESCRIPTION

TYPE

REQUIRED

NOTES

from

Starting index by which to fetch new audiences for paging purposes.

Long

Required

Getting multiple entities requires using from and max query parameters.

max

Maximum number of audiences to fetch for each page.

Long

Required

order

Sort order ASC or DESC, required if sort field name is specified (see here).

String

Optional

Note

Note: Required if a sort field name is specified.

By default, the API response is ascending.

sort

Sort by field name (see here).

String

Optional

q

Filtering options for the request (see here).

String

Optional

Example of query string: q={"1":{"CREATEDBYNAME":["MonicaSmith"]},"2":{"ADVERTISERNAME":["autoads"]}}

Note

Note: The date is according to the Unix epoch timestamp.

ID

ID of audiences to retrieve.

Long

Required

Request Format

Depending on the API user that was created for you, use one of the following request formats:

  • GET https://api.sizmek.com/rest/strategies/targetAudiencesV2?from=0&max=250&order=desc&sort=id

  • GET https://adapi.sizmek.com/sas/strategies/targetAudiencesV2?from=0&max=250&order=desc&sort=id

Response Format

A successful request returns the HTTP 200 OK status code and a JSON response body that shows the target audiences' details .

Get a Specific Target Audience (GET)

Retrieve a specific target audience.

Request Parameters

NAME

DESCRIPTION

TYPE

REQUIRED

NOTES

ID

ID of audience to retrieve.

Long

Required

Request Format

Depending on the API user that was created for you, use one of the following request formats:

  • GET https://api.sizmek.com/rest/strategies/targetAudiences/1073766199

  • GET https://adapi.sizmek.com/sas/strategies/targetAudiences/1073766199

Response Format

A successful request returns the HTTP 200 OK status code and a JSON response body that shows the audience details.

Create an Audience (POST)

Creates a new target audience.

Request Parameters

NAME

DESCRIPTION

TYPE

REQUIRED

NOTES

Body

Request containing target audience body.

JSON

Required

Request Format

Depending on the API user that was created for you, use one of the following request formats:

  • POST https://api.sizmek.com/rest/strategies/targetAudiences/

  • POST https://adapi.sizmek.com/sas/strategies/targetAudiences /

Update an Existing Target Audience (PUT)

Updates an existing target audience.

Request Parameters

NAME

DESCRIPTION

TYPE

REQUIRED

NOTES

ID

ID of audience to retrieve.

Long

Required

Body

Request containing target audience to update.

JSON

Required

Request Format

Depending on the API user that was created for you, use one of the following request formats:

  • PUT https://api.sizmek.com/rest/strategies/targetAudiences/1073766199

  • PUT https://adapi.sizmek.com/sas/strategies/targetAudiences/1073766199

Response Format

A successful request returns the HTTP 200 OK status code with the updated target audience in the response body.

Delete a Target Audience (PUT)

Delete an existing target audience.

Request Parameters

NAME

DESCRIPTION

TYPE

REQUIRED

NOTES

ID

ID of audience to retrieve.

Long

Required

Request Format

Depending on the API user that was created for you, use one of the following request formats:

  • PUT https://api.sizmek.com/rest/strategies/targetAudiences/delete

  • PUT https://adapi.sizmek.com/sas/strategies/targetAudiences/delete

Response Format

A successful request returns the HTTP 200 OK status code with the deleted target audience in the response body.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk