- Open Source
- APIs
- Advertising
- Blog
- Events
- Podcasts
- Apps
- Native
- Documentation
- Yahoo Native to Yahoo DSP API Migration Guide
- Sign In
- Language:
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 |
---|---|---|---|---|
|
The ID of the shared negative keyword. |
long |
required |
optional |
|
The ID of the advertiser. |
long |
required |
optional |
|
The ID of the parent shared set. |
long |
required |
optional |
|
The status of the shared negative keyword. Valid values: ACTIVE, DELETED. |
enum |
required |
optional |
|
The negative keyword value. |
string |
required |
optional |
|
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 |
---|---|---|
|
The maximum number of rows to retrieve. |
int |
|
The start index or the first element to retrieve. |
int |
|
The ID of the advertiser to filter the shared negative keywords by. |
long |
|
The shared negative keyword status to filter by. |
enum |
|
The shared negative keyword match type to filter by. |
enum |
|
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
}