A product set is a group of related items in a product catalog.
A call to this endpoint returns Product Set data.
To get a product set, send a GET
request:
curl -i -X GET "https://graph.facebook.com/PRODUCT-SET-ID?access_token=ACCESS-TOKEN"
Field | Description |
---|---|
id numeric string | ID of the product set. |
auto_creation_url string | URL scraped to create a product set. |
filter string | The filter rule that defines the set of products in the catalog |
latest_metadata | Latest product set metadata |
live_metadata | Live product set metadata, which passed integrity review |
name string | The name given by the owner of this product set |
product_catalog | Product catalog for this product set |
product_count unsigned int32 | Count of products in this product set |
retailer_id string | Retailer's ID for the product set. |
Edge | Description |
---|---|
Automotive models in a product set | |
Destinations that belong to this product set | |
Flights that belong to this product set | |
Home listings that belong to this product set | |
Hotels that belong to this product set | |
Product items that belong to this product set | |
Vehicle offers that belong to this set | |
Vehicles that belong to this set |
Error | Description |
---|---|
100 | Invalid parameter |
Update an existing product set.
To update a product set, send a POST
request:
curl -i -X "https://graph.facebook.com/PRODUCT-SET-ID?name=Product Set Name,filter={'product_type': {'contains': 'shirt'}},access_token=ACCESS-TOKEN"
/{product_set_id}
.Parameter | Description |
---|---|
filter A JSON-encoded rule | Filter rules to define a product set (max length: 500 KiB) |
metadata JSON object | Product set metadata, which can be used for creating product collections |
name UTF-8 encoded string | Name of the product set |
publish_to_shops array<JSON object> | List of shop ids where this product set should be published as collection. |
retailer_id UTF-8 encoded string | External product set retailer id |
id
in the return type.id
: numeric string, Error | Description |
---|---|
80004 | There have been too many calls to this ad-account. Wait a bit and try again. For more info, please refer to https://developers.facebook.com/docs/graph-api/overview/rate-limiting. |
10803 | Product set with the same filters already exists |
100 | Invalid parameter |
200 | Permissions error |
/{product_set_id}
.By default a product set can not be deleted while it is being used in an active ad, shop collection, or other usages. To override this behavior, include allow_live_product_set_deletion=true
in your request.
Parameter | Description |
---|---|
allow_live_product_set_deletion boolean | Default value: false Flag to allow the deletion of live product set |
success
: bool, Error | Description |
---|---|
801 | Invalid operation |
100 | Invalid parameter |
200 | Permissions error |
Creating a product set with an empty filter
parameter indicates that all items in the product catalog should be in the set. Each rule is a JSON-encoded string. An empty filter
parameter can be specified using either an empty parameter value or an empty JSON object, {}
.
Recommendation: Query with content type application/json
.
contains
operators can only be used for string matching when creating product sets. For enum
values use the eq
operators.i_*
operators can still be used.Filter rules contain fields and operators in the following syntax:
curl -i -X POST "https://graph.facebook.com/PRODUCT-SET-ID? name=Product Set Name, filter={'field-name': {'operator-type': 'query-value'}}, access_token=ACCESS-TOKEN"
Field | Description |
---|---|
| The target age group for an item. |
| The Facebook Page ID for the real estate agent. |
Home Listings – For Dynamic Ads enum {available_soon, for_sale, for_rent, off_market, recently_sold, sale_pending}Home Listings – For Marketplace enum {for_rent}Product Items enum {available for order, in stock, preorder, out of stock}Vehicles enum {available, not_available} | The availability for an item, home listing, or vehicle. Note: Vehicles that are unavailable in an ad are not visible to the public. |
| The base price per night for a hotel. |
| The body style of a vehicle. For Marketplace and dynamic ads. |
| The brand of a product item or hotel. |
| The category of the product item. |
| The city where a hotel, destination, automobile dealership, or home listing is located. |
| The city ID where a hotel, destination, automobile dealership, or home listing is located. |
| The value to use in a deep link URL ( |
| The color of an item. |
For Product Items enum {new, refurbished, used}For Vehicles enum {Excellent, Good, Fair, Poor, Other} | The condition of a product item or vehicle. |
| The country where a hotel, home listing, automobile dealership, or destination is located. |
| The alpha currency code. |
| The value for a custom label of a product item, hotel, destination, vehicle, or home listing. |
| The value for a custom label of a product item, hotel, destination, vehicle, or home listing. |
| The value for a custom label of a product item, hotel, destination, vehicle, or home listing. |
| The value for a custom label of a product item, hotel, destination, vehicle, or home listing. |
| The value for a custom label of a product item, hotel, destination, vehicle, or home listing. |
| The date a vehicle first arrived at the dealership in YYYY-MM-DD format. For example, 2018-09-05. |
| The date and time a vehicle first arrived at the dealership. |
| The number of days a home listing has been on the open market. |
| The method which an automobile dealer will use to contact a buyer. |
| The alphanumeric ID for an automobile dealership. |
| The name for the automobile dealership. |
| The drivetrain for a vehicle. |
| The description for a flight, home listing, or destination. |
| The IATA code for the destination airport. For example, HKG, LAX, or LHR. |
| The name of the destination city. For example, London, New York, or Tokyo. |
| The unique ID for a destination within a catalog. This ID is also used for the |
| The exterior color for a vehicle. |
| The Facebook ID for the feed in which the product belongs. |
| The unique ID for a flight. |
| The type of fuel designated for a vehicle. |
| The type of furnishing available for a home listing. |
| The gender for the product item. |
| The unique ID for a home listing. |
| The unique ID for a hotel within a catalog. This ID is also used for the |
| URLs and tags to describe images that are used in ads. Multiple tags can be associated with an image. For example, "Fitness Center", "Swimming Pool", or "Parking". For vehicles, follow this naming convention: |
| The interior color for a vehicle. |
For Dymanic Ads enum {for_rent_by_agent, for_rent_by_owner, for_sale_by_agent, for_sale_by_owner, foreclosed, new_construction, new_listing}For Marketplace enum {for_rent_by_agent, for_rent_by_owner} | The type of listing for a home. |
| The brand of a vehicle. For example, Ford, Toyota, or Kia. |
| An indicator for the profitability of a hotel from |
| The market where an offer is eligible. Use for TWO FEED use case, to correspond with the market feed. For regional offers, this field is required and should match the |
| The material or fabric that a product is made of such as cotton, denim, or nylon. |
| The mileage unit of a vehicle in kilometers or miles. |
| The current mileage for a vehicle, in miles or kilometers. For new vehicles, use |
| The model for a vehicle such as "Ford Focus" where "Focus" is the model. |
| The name for a product item, hotel, home listing, or destination. |
| The neighborhood where a hotel or home listing is located. If there's more than one neighborhood, add additional columns for each one and use JSON-path syntax in each column name to indicate the number of neighborhoods. |
| The neighborhood ID for a product item. |
| The total number of bathrooms for a home listing. Must be |
| The total number of bedrooms for a home listing. Can be |
| The number of people who rated a hotel. |
| Total number ratings for a hotel made by valid guests. |
| The total number of rooms for a home listing. |
| The total number of units available in an apartment or condo building. |
| The type of offer for a home listing or vehicle. |
| One-way price for a flight. The currency must be specified, for example, |
| The IATA code for the airport where the flight originated. |
| The name of the city where the flight originated. |
| The pattern or graphic print featured on a product. For example, "solid", "striped", or "polka dots". |
| The postal or zip code for a hotel, home listing, or automobile dealership location. Optional for countries without a postal code system. |
| A list of postal codes for a specific market for vehicle offer ads. |
| The price for a flight, home listing, vehicle, or destination. The |
| The price multiplied by 100, for all currencies. For example, $4.90USD will be |
| The price change for a destination. For example, |
| The priority of a flight or hotel. Values from |
| The date and time when the product is no longer available. Ads will only fetch products that have not expired. For example, if the expiration date is today, after today this product will no longer appear in ads. |
| The Facebook ID for the product feed for a product item, flight, hotel, home listing, vehicle, vehicle offer, or destination. |
| The Facebook ID for the product group of a product item. |
| The Facebook ID for a product item. |
| The category for a product item defined by the retailer. |
For Dynamic Ads enum {apartment, condo, house, land, manufactured, townhouse, other}For Marketplace enum {apartment, builder_floor, condo, house, house_in_condominium, house_in_villa, loft, penthouse, studio, townhouse, other} | The property type for a home listing. |
| The rating system used for |
| The state, county, region, or province for a home listing or automobile dealership. |
| The region ID for the location for a product item or automobile dealership. |
| The ID for the retailer. |
| The ID for a product group defined by the retailer. |
| The sale price or special price for a vehicle. |
| The sale price for a product item (same format as |
| |
| The size for a product item such as for clothing or shoes. |
| |
| The current state of a vehicle. |
| The full name for a vehicle including year, make, model, and trim. Maximum of 500 characters. For example, |
| The transmission type for a vehicle. |
| The trim for a vehicle: |
| The link to an external site where you can view a flight. Deep links specified on the ad level take precedence. |
| The unique ID for a vehicle. This ID is also used for the |
| A metal or plastic plate attached to a motor vehicle or trailer for official identification purposes. For Marketplace, a vehicle registration plate is required in Brazil, France, and the United Kingdom. |
| The type of vehicle. |
| The ID for a vendor. |
| The vehicle identification number. The VIN must be exactly 17 characters and is required in all countries where Marketplace is available with the exception of pre-1983 vehicles. In Brazil, France, and the United Kingdom, a vehicle registration plate is required instead of a VIN. |
| Visibility for a product item. Items in |
| The model year for a vehicle, in YYYY format. |
Starting March 3, 2022, we have changed how certain filters work for product sets. These include the contains
, not_contains
, lt
, gt
, lte
, gte
, and starts_with
filters. You have 90 days to update your filters. If any sets in your catalog are using the affected filters after June 1, 2022, the items in those sets may change. This means that different items could display in your ads or shops that use those sets. See the changelog for more details.
Operator | Type of filter |
---|---|
| Returns products that match all query values inclusively. For example, |
| Returns products that match a query string. For example, |
| Returns products that match only one query value exclusively. For example, |
| Returns products that do not match a query string. For example, |
| Returns products that match any value in a list of query values. For example, |
| Returns products that do not match any value in a list of query strings. For example, |
| Returns products that exactly match a query value. For example, |
| Returns products that do not exactly match a query value. For example, |
| Returns products that are less than a numeric query value. For example, |
| Returns products that are less than or equal to a numeric query value. For example, |
| Returns products that are greater than a numeric query value. For example, |
| Returns products that are greater than or equal to a numeric query value. For example, |
| Returns products that match any string that starts with the query string. For example, |
The following example creates a product set with all products listed in the Luggage & Bags category in the product catalog.
Formatted for readability.curl -i -X POST "https://graph.facebook.com/PRODUCT-CATALOG-ID/product_sets ?name=Product Set Name &filter={'category': {'eq': 'Luggage & Bags'}} &access_token=ACCESS-TOKEN"
The following example creates a product set with all shirts listed the product catalog.
Formatted for readability.curl -i - X POST "https://graph.facebook.com/PRODUCT-CATALOG-ID/product_sets ?name=Product Set Name &filter={'product_type': {'contains': 'shirt'}} &access_token=ACCESS-TOKEN"