Populate Shared Sets

Shared sets are objects created on the advertiser account level, using the shared set endpoint. The SharedNegativeKeywordService provides methods for creating, updating and retrieving shared sets of negative keywords.

For example, you can create a list of negative keywords that you may wish to exclude.

You can also associate the shared set of negative keywords to a campaign, using the campaignsharedset API. Refer to Associate Shared Sets to a Campaign for details on how to accomplish this task.

Fields

The Shared Negative Keyword service contains the following fields:

Name

Description

Type

Add

Update

id

The ID of the shared negative keyword.

long

required

optional

advertiserId

The ID of the advertiser.

long

required

optional

sharedSetId

The ID of the parent shared set.

long

required

optional

status

The status of the shared negative keyword. Valid values: ACTIVE, DELETED.

enum

required

optional

value

The negative keyword value.

string

required

optional

matchType

The match type of the negative keyword. Valid values are PHRASE or EXACT.

enum

required

optional

Endpoint

Resource URI

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

Example Representations

Shared Negative Keyword

{
  "value": "shoes",
  "matchType": "EXACT",
  "sharedSetId": 100,
  "status": "ACTIVE",
  "id": 103002,
  "advertiserId": 925746
}

Shared Negative Keyword Array

[
 {
  "value": "shoes",
  "matchType": "EXACT",
  "sharedSetId": 100,
  "status": "ACTIVE",
  "id": 103002,
  "advertiserId": 925746
 },
 {
  "value": "shirts",
  "matchType": "EXACT",
  "sharedSetId": 100,
  "status": "ACTIVE",
  "id": 103003,
  "advertiserId": 925746
 }
]

Shared Negative Keyword Response

{
"errors": null,
"response": [
    {
      "value": "shoes",
      "matchType": "EXACT",
      "sharedSetId": 100,
      "status": "ACTIVE",
      "id": 103002,
      "advertiserId": 925746
    }
  ]
}

Operations

Read

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

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

    The response will be the shared negative keyword associated with the id:

{
      "errors": null,
      "response": [
         {
           "value": "shoes",
            "matchType": "EXACT",
            "sharedSetId": 100,
            "status": "ACTIVE",
            "id": 103002,
            "advertiserId": 925746
         }
      ]
    }

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

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

The response will be the shared negative keyword associated with multiple ids:

{
  "errors": null,
  "response": [
     {
       "value": "shoes",
        "matchType": "EXACT",
        "sharedSetId": 100,
        "status": "ACTIVE",
        "id": 103002,
        "advertiserId": 925746
     },
     {
       "value": "shirts",
        "matchType": "EXACT",
        "sharedSetId": 100,
        "status": "ACTIVE",
        "id": 103003,
        "advertiserId": 925746
     }
  ]
}

Read data for filtered list of a shared negative keyword

Method: To retrieve data for a filtered list of a shared negative keyword, 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

The ID of the advertiser to filter the shared negative keywords by.

long

status

The shared negative keyword status to filter by.

enum

matchType

The shared negative keyword match type to filter by.

enum

sharedSetId

The ID of the shared set to filter the shared negative keywords by.

long


Important

Only one advertiserId or sharedSetId parameter is allowed to be passed in as a query parameter for all filtered lists shared negative keyword calls.

Endpoint

Resource URI

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

Create a new shared negative keyword

Method: To create a new shared negative keyword, make a POST call. The response will be the newly created shared negative keyword.

For example:

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

Update an existing shared negative keyword

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

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

Delete a shared negative keyword

Method: To delete a shared negative keyword, 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/sharednegativekeyword/1234
DELETE  https://api.gemini.yahoo.com/v3/rest/sharednegativekeyword?id=1234&id=5678

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

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