Product Sets
These endpoints are currently available via early-access only. To apply for access, please fill out this form.
Product Sets are collections of products which represent a subset of your catalog, e.g. “Fall Sale Products”. You’ll have the option to use product sets to run Dynamic Product Ads (DPA) featuring the specific products included in that collection, rather than all products in your catalog.
GET product_catalogs/:product_catalog_id/product_sets/:product_set_id¶
Retrieve details for some or all Product Sets associated with the specified Product Catalog.
Resource URL¶
https://ads-api.x.com/12/product_catalogs/:product_catalog_id/product_sets/:product_set_id
Request Parameters¶
Name | Description |
---|---|
product_set_id optional |
Unique ID for product set Type: string Example:
|
Example Request¶
GET https://ads-api.x.com/12/product_catalogs/1547080201384865792/product_sets/1560456755976343552"
Example Response¶
{
"request": {
"params": {
"product_catalog_id": "1547080201384865792",
"id": "1560456755976343552"
}
},
"data": {
"name": "Test Product Set API",
"description": "Price and Custom Filter",
"product_ids": [
"123abc",
"myshoes2"
],
"processing_status": "DONE",
"id": "1560456755976343552",
"filters": [
{
"attribute": "price",
"operator": "LESS_THAN",
"value": "120.00 USD"
},
{
"attribute": "custom_field_5",
"operator": "MATCH",
"value": "test"
}
],
"type": "FILTERED"
}
}
POST product_catalogs/:product_catalog_id/product_sets¶
Creating a new product set
Request Parameters¶
Name | Description |
---|---|
name required |
Name of product set. Type: string Example:
|
description optional |
Description of product sets. Type: string Example:
|
type required |
Type of filters. Type: enum Possible values:
|
filters sometimes required |
If Type: array of objects Each object contains three keys:
Possible Values:
Possible Values:
Example:
|
product_keys sometimes required |
If MANUAL is selected in type, the product_keys attribute needs to be set. Please note that these are Twitter generated IDs. Type: array (Input as a comma-separated list of IDs in the query param) Example:
|
Response Parameters¶
Name | Description |
---|---|
processing_status |
Status of product set when you apply Type: enum Possible values: |
Example Request for MANUAL type¶
POST https://ads-api.x.com/12/product_catalogs/1569782857975087104/product_sets
JSON BODY
{
"name": "manual API product set",
"type": "MANUAL",
"product_keys": [
"1569784751351013380"
]
}
Example Response¶
{
"request": {
"params": {
"product_catalog_id": "1569782857975087104",
"name": "manual API product set",
"type": "MANUAL",
"product_keys": [
"1569784751351013380"
]
}
},
"data": {
"name": "manual API product set",
"description": null,
"product_ids": [
"sdkljsdijf"
],
"processing_status": DONE,
"id": "1573806483589849088",
"filters": [],
"type": "MANUAL"
}
}
Example Request for FILTERED type¶
POST https://ads-api.x.com/12/product_catalogs/1569782857975087104/product_sets
JSON BODY
{
"name": "filtered API product set",
"description": "price above 100 USD",
"type": "FILTERED",
"filters": [
{
"attribute": "price",
"operator": "GREATER_THAN",
"value": "100.00 USD"
}
]
}
Example Response¶
{
"request": {
"params": {
"product_catalog_id": "1569782857975087104",
"name": "filtered API product set",
"description": "price above 100 USD",
"type": "FILTERED",
"filters": [
{
"attribute": "price",
"operator": "GREATER_THAN",
"value": "100.00 USD"
}
]
}
},
"data": {
"name": "filtered API product set",
"description": "price above 100 USD",
"product_ids": [
"nike-sb-dunk-high-pro-medium-grey-pink",
"sdkljsdijf"
],
"processing_status": "DONE",
"id": "1573831671954096128",
"filters": [
{
"attribute": "price",
"operator": "GREATER_THAN",
"value": "100.00 USD"
}
],
"type": "FILTER"
}
}
PUT product_catalogs/:product_catalog_id/product_sets/:product_set_id¶
Updating existing product set
Request Parameters¶
Name | Description |
---|---|
product_keys optional |
Unique product object identifier generated by Twitter. Type: array Example:
|
product_set_id required |
Unique ID for product set Type: string Example:
|
name optional |
Name of product set. Type: string Example:
|
description optional |
Description of product sets. Type: string Example:
|
Note: Updating FILTERED
product sets is not available.
Below example is for MANUAL product set update.
Example Request¶
PUT https://ads-api.x.com/12/product_catalogs/1549442554172694528/product_sets/1564499160082001920
JSON BODY
{
"name":"Update name product catalogs",
"product_keys":["1576768397127606272","1547080787865939969"]
}
Example Response¶
{
"request": {
"params": {
"product_catalog_id": "1576873894266273792",
"id": "1564499160082001920",
"product_keys": [
"1576768397127606272",
"1547080787865939969"
],
"name": "Update name product catalogs"
}
},
"data": {
"name": "Update name product catalogs",
"description": "Manual product Sets description",
"product_ids": [
"test-12345",
"123abc"
],
"processing_status": "DONE",
"id": "1564499160082001920",
"filters": [],
"type": "MANUAL"
}
}
DELETE product_catalogs/:product_catalog_id/product_sets/:product_set_id¶
Deleting an existing product set. Please note that this is a permanent deletion.
Request Parameters¶
Name | Description |
---|---|
product_set_id required |
Unique ID for product set Type: string Example:
|
Example Request¶
DELETE https://ads-api.x.com/12/product_catalogs/1547080201384865792/product_sets/1559806000097787904"
Example Response¶
{
"request": {
"params": {
"product_catalog_id": "1547080201384865792",
"id": "1559806000097787904"
}
},
"data": {
"name": "Filtered Product",
"description": "Filtered product Set",
"product_ids": [],
"processing_status": "DONE",
"id": "1559806000097787904",
"filters": [
{
"attribute": "price",
"operator": "GREATER_THAN",
"value": "100.00 USD"
}
],
"type": "FILTERED"
}
}