Associate Shared Sets to a Campaign

Shared sets associated to a campaign are objects created on the advertiser account level, using the campaign shared set endpoint. The CampaignSharedSetService provides methods for creating, updating and retrieving shared sets associated with campaigns.

For example, you can create a shared set of negative keywords and populate the set with a list of keywords you may wish to exclude, using the sharednegativekeyword API. Refer to Populate Shared Sets for details on how to accomplish this task.

Fields

The Campaign Shared Set Association contains the following fields:

Name

Description

Type

Add

Update

id

The ID of the campaign shared set association.

long

required

required

advertiserId

The ID of the advertiser.

long

required

optional

sharedSetId

The ID of the parent shared set.

long

required

optional

campaignId

The ID of the parent campaign.

long

required

optional

status

The status of the campaign shared set association. Valid values: ACTIVE, PAUSED, DELETED.

long

required

optional

Endpoint

Resource URI

https://api.gemini.yahoo.com/v3/rest/campaignsharedset/

Example Representations

Campaign Shared Set Association

{
  "campaignId": 100,
  "sharedSetId": 100,
  "status": "ACTIVE",
  "id": 103002,
  "advertiserId": 925746
}

Campaign Shared Set Association Array

[
 {
  "campaignId": 100,
  "sharedSetId": 100,
  "status": "ACTIVE",
  "id": 103002,
  "advertiserId": 925746
 },
 {
  "campaignId": 100,
  "sharedSetId": 100,
  "status": "ACTIVE",
  "id": 103003,
  "advertiserId": 925746
 }
]

Campaign Shared Set Association Response

{
 "errors": null,
 "response": [
   {
      "campaignId": 100,
     "sharedSetId": 100,
     "status": "ACTIVE",
     "id": 103002,
     "advertiserId": 925746
   }
  ]
}

Operations

Read

Method: To retrieve data for a specific campaign shared set, make a GET call with the ID parameter:

GET https://api.gemini.yahoo.com/v3/rest/campaignsharedset/1234

The response will be the campaign shared set associated with the id:

{
  "errors": null,
  "response": [
     {
       "campaignId": 100,
        "sharedSetId": 100,
        "status": "ACTIVE",
        "id": 103002,
        "advertiserId": 925746
     }
  ]
}

Method: To retrieve data for a campaign shared set with multiple IDs, make a GET call with the ID parameter:

https://api.gemini.yahoo.com/v3/rest/campaignsharedset?id=1234&id=5678

    The response will be the campaign shared set associated with multiple ids:


    {
      "errors": null,
      "response": [
         {
           "campaignId": 100,
            "sharedSetId": 100,
            "status": "ACTIVE",
            "id": 103002,
            "advertiserId": 925746
         },
         {
           "campaignId": 100,
            "sharedSetId": 100,
            "status": "ACTIVE",
            "id": 103003,
            "advertiserId": 925746
         }
      ]
    }

Read data for filtered list of a campaign shared set

Method: To retrieve data for a filtered list of a campaign shared set, make a GET call with the following parameters:

Name

Description

Type

mr

The maximum number of rows to retrieve.

int

si

The start index or the first element to retrieve.

int

advertiserId

ID of the advertiser to filter by.

long

status

The campaign shared set association status to filter by.

enum

campaignId

The ID of the campaign to filter by.

enum

sharedSetId

The ID of the shared set to filter by.

long


Important

Only one campaignId,``advertiserId`` or sharedSetId parameter is allowed to be passed in as a query parameter for all filtered lists of campaign shared set calls.

Endpoint

Resource URI

https://api.gemini.yahoo.com/v3/rest/campaignsharedset?advertiserId=1111&sharedSetId=32222

Create a new campaign shared set association

Method: To create a new campaign shared set association, make a POST call. The response will be the newly created campaign shared set association.

For example:

POST https://api.gemini.yahoo.com/v3/rest/campaignsharedset/

Update an existing campaign shared set association

Method: To update an existing campaign shared set association, make a PUT call. The result will be the list of the updated campaign shared set association.

PUT  https://api.gemini.yahoo.com/v3/rest/campaignsharedset/

Delete a campaign shared set association

Method: To delete a campaign shared set association, make a PUT call.

Note

In v2, the DELETE operation is supported for both single and multiple ids.

For example:

DELETE  https://api.gemini.yahoo.com/v3/rest/campaignsharedset/1234
DELETE  https://api.gemini.yahoo.com/v3/rest/campaignsharedset?id=1234&id=5678

PUT https://api.gemini.yahoo.com/v3/rest/sharedsitelinksetting/

{
  "status": "DELETED",
  "id": 103002
}