3. Create Dynamic Product Ad Sets¶
You can create DPA Product Sets using any of the fields provided in the feed, either those that are required or optional, if the feed has a value for that field.
A maximum of 5 product filters and operators can be part of one product set. At least one product set must be created and attached to an ad group, using the productSetId
field in Adgroup.
Important
A Product Set is similar to a shared object. Advertisers can group the product they want and test bids by attaching them to different ad groups. Yahoo provides a one-to-many relationship from a product set to an adgroup. So one product set can be part of many adgroups, but one adgroup will have only one product set.
Supported Operators¶
Operators supported in Product Sets are shown in the table below:
Operators |
Description |
---|---|
|
Contains substring (case sensitive). |
|
Does not contain substring (case sensitive). |
|
Equal to (case sensitive). |
|
Not equal to (case sensitive). |
|
Less than or equal to (numeric fields only). |
|
Greater than or equal to (numeric fields only). |
In addition to the above operators, and
and or
can also be used in combination with different filters.
{"and": [{"custom_label_0": {"eq": "type1"}},{"custom_label_1": {"eq": "type2"}}]}
{"or": [{"custom_label_0": {"eq": "Bags > Backpacks"}},{"custom_label_1": {"contains": "water bottles"}}]}
Important
For the initial release, Native & Search provides support for only one set of either and
/ or
operators. JSON with multiple and
/ or
will be rejected.
Product sets support POST, PUT, GET, and DELETE calls, in addition to batch create and update, filters, counts and paginations.
Fields¶
Product Sets contain the following fields:
Name |
Description |
---|---|
|
The name of the product set, which is a required field. |
|
The Product set id issued by Yahoo. |
|
The Yahoo advertiser id. |
|
Status of the product set. When creating the product set, set status to |
|
The product set criteria. The criteria is described with the following JSON: {<feed field>: {<operator>: <value>}}. For example: {category: {eq: Luggage & Bags > Backpacks}}. |
Endpoint¶
Resource URI
https://api.gemini.yahoo.com/v3/rest/productset/
Operations¶
Create a product set
Method: To create a product set, make a POST call.
Example: POST call to create a product set.
POST https://api.gemini.yahoo.com/v3/rest/productset/
The response will be the product set:
{
"advertiserId": 1518070,
"status": "ACTIVE",
"filter": {"custom_label_0": {"eq": "type1"}},
"name":"Product Set 1"
}
Response: The product set associated.
Read specific product set data
Method: To retrieve data for a specific product set, make a GET call with the ID parameter.
Example: GET call to retrieve product set data.
https://api.gemini.yahoo.com/v3/rest/productset/{id}
The response will be the product set associated with the given ID:
{
"errors": null, // The product set id issued by Native & Search
"response": {
"id": 1234,
"advertiserId": 236,
"status": "PAUSED",
"filter": {"custom_label_0": {"eq": "Bags > Backpacks"}},
"name":"Product Set 1"
}
}
Response: The product set associated with the given ID.
Read specific product set advertiser data
Method: To retrieve advertiser data for a specific product set, make a GET call with the ID parameter.
Example: GET call to retrieve product set advertiser data.
https://api.gemini.yahoo.com/v3/rest/productset?advertiserId=xxx
The response will be the product set advertiser associated with the given ID:
{
"errors": null, // The product set id issued by Native Ad Platform
"response": {
"id": 1234,
"advertiserId": 236,
"status": "PAUSED",
"filter": {"custom_label_0": {"eq": "Bags > Backpacks"}},
"name":"Product Set 1"
}
}
Response: The product set advertiser associated with the given ID.
Read specific ad group product set data
Method: To retrieve ad group data for a specific product set, make a GET call with the ID parameter.
Example: GET call to retrieve product set ad group data.
https://api.gemini.yahoo.com/v3/rest/productset?adgroupId=xxx
The response will be the product set ad group associated with the given ID:
{
"errors": null, // The product set id issued by Native Ad Platform
"response": {
"id": 1234,
"advertiserId": 236,
"status": "PAUSED",
"filter": {"custom_label_0": {"eq": "Bags > Backpacks"}},
"name":"Product Set 1"
}
}
Response: The product set ad group associated with the given ID.
Read status data for a product set
Method: To retrieve status data for a specific product set, make a GET call with the ID parameter.
Example: GET call to retrieve product set status data.
https://api.gemini.yahoo.com/v3/rest/productset?status=xxx
The response will be the product set status associated with the given ID:
{
"errors": null, // The product set id issued by Native Ad Platform
"response": {
"id": 1234,
"advertiserId": 236,
"status": "PAUSED",
"filter": {"custom_label_0": {"eq": "Bags > Backpacks"}},
"name":"Product Set 1"
}
}
Response: The product set associated with the given ID.
Read filtered product set data
Method: To retrieve filtered data for a specific product set, make a GET call with the ID parameter.
Example: GET call to retrieve filtered product set data.
https://api.gemini.yahoo.com/v3/rest/productset?advertiserId=xxx&si=0&mr=10
The response will be the filtered product set associated with the given ID:
{
"errors": null, // The product set id issued by Native & Search
"response": {
"id": 1234,
"advertiserId": 236,
"status": "PAUSED",
"filter": {"custom_label_0": {"eq": "Bags > Backpacks"}},
"name":"Product Set 1"
}
}
Response: The filtered product set associated with the given ID.