Introduction
A Product Set is a subset of the product catalog that can be featured in dynamic ads. Product Sets are created with a combination of rules using conditions on product attributes available in the Catalog. These conditions are additive (similar to theAND operator). Once created, you can apply a Product Set to an Ad as a filter. After doing this, the Ads will display only the products that belong to that Product Set.
Product Set Properties
datasetIdThe ID of the Data Set to which the Product Set belongs
nameThe name of the Product Set
rulesIt’s an array that encapsulates product rules. A
Product rule is an object containing the following parameters:
operator: Operator to be used, from the table below.field: Field to be filtered.values: The values on which you want to apply the rule.
Fields and Operators
Not all Catalog fields can be used to create rules.If you need a specific field, you can map it in the Catalog to one of the Custom Label fields and later use it to create the rule.
Catalog Field Name | API Field Name | Operators Available |
|---|---|---|
Category 1, Category 2, Category 3 |
|
|
Brand |
|
|
Product ID |
|
|
Custom Label 0, Custom Label 1, Custom Label 2 , Custom Label 3, Custom Label 4 |
|
|
Sale Price |
|
|
Create a Product Set
A Product Set can be created for a specific advertiser by making aPOST call to the Product-Set endpoint.The request body should specify the Data Set Id, the name of the Product Set, if it’s a draft (optional), and the product rules. Sample request
JSON
JSON
Delete a Product Set
A Product Set can be deleted for a specific advertiser by making a DELETE call to the product-sets endpoint. You need to specify theproductSetId to delete in the request URL.
Retrieve Product Set Data
Retrieve Data for a specific Product Set
You can get the information of a specific Product Set by making a GET call to the product-sets endpoint. You need to specify theproductSetId to retrieve in the request URL.
Sample response
JSON
Retrieve Data for a Specific Data Set
If you need to get all the Product Sets for a specific Data Set, you can make a GET call to the endpoint specifying the relevantdatasetId
Sample response
JSON
Test Product Set rules
Before creating a Product Set, you can check how many products would be part of a Product Set with a particular set of rules. Use this endpoint to get the number of products belonging to the Product Set and a small sample of the products. Sample requestJSON
JSON
Associate a Product Set and an Ad
Once a Product Set is created, it can be applied to an Ad as a filter. As a result, only products that belong to that Product Set are displayed in the Ad.adIdId of the Ad to that you want to link to the specified Product Set.
An Ad can only have one Product Set assigned to it.
A Product Set can be associated with zero or more Ads.
A Product Set can be associated with zero or more Ads.
JSON
JSON
Remove a Product Set and Ad association
adIdId of the Ad you want to unlink from the Product Set. Sample response
JSON
Retrieve Associations Between Ads and Product Sets
Retrieve Filtering Association Data for a Specific Ad
Get the Product Set assigned to an AdadIdId of the ad you want to look for. Sample response
JSON
Retrieve Associations of a Specific Product Set
By doing aGET call to this endpoint, you get the association information (ad id + product set id).
productSetIdId of the Product Set Sample response
JSON
Validation errors
invalid-productset-requestThe request contains an invalid Product Set ID
invalid-productset-requestMissing authorization to get Product Set for the specified Data Set, or if the Product Set does not exist.
JSON_FORMATThere’s a constraint not satisfied by the provided JSON. For example: “productSet.rules: The operator Between isn’t compatible with the provided field”
REQUIRED_FIELDThe required field is missing.