Media Filters
Media Filter
Filters are composed of one or more key-value pairs combined with boolean operators and parenthetical groupings. At this time a NOT
operator isn’t available.
Each key-value pair matches content that has at least one piece of metadata that satisfies the constraint. Values are case-insensitive so key:VaLuE
works the same as key:value
. The filter component of the request must be URI encoded.
Filter Keys | Description | Example |
---|---|---|
productId | Matches on any product identifier from the feed: feed_id, item_grouping_id, sku, mpn, or gtin. | productId:leather-jacket |
productUrl | Matches on product URL from the feed. The API attempts to canonicalize the URL before searching for matches to avoid mismatches due to URL variance and extra query parameters. | productUrl: https://habilimentclothing.myshopify.com/products/the-deep-v-t-shirt |
label | Matches on labels added in the Social Commerce platform. | label:homepage label:may_2016 |
username | Matches on the social network username of the author of the original content. | username:brandusername |
category | Matches on any full category string, partial category string, or a single component of a multi-level category string (e.g., Women's >Footwear >Boots). | category:"Women ’s >Footwear >Boots " category:"Women ’s >Footwear" category:Footwear |
tag | Matches on ingestion source hashtags, without the # symbol. | tag:myhashtag |
Other standard product feed fields including: brand, manufacturer, age, gender | Matches each product metadata field from the product feed. | brand:habiliment manufacturer:acmeltd age:adult gender:female |
Custom product feed fields | Some product feeds have custom brand-specific fields. To make these accessible from the API, submit a support request. | gem_stone:diamond |
Example Filters
Example | Filter Logic | Encoded Filter Component |
---|---|---|
Product Details Page (PDP) – show content matching a specific product | productId:leather-jacket | filter=productId%3Aleather-jacket |
Category Page – show content matching any products in the specified categories | category:womens and (category:shoes or category:boots) | filter=category%3Awomens%20and%20(category%3Ashoes%20or%20category%3Aboots) |
Home Page – feature specific content on the homepage for a campaign specific to a month and gender | label:homepage and label:may_2016 and category:womens | filter=label%3Ahomepage%20and%20label%3Amay_2016%20and%20category%3Awomens |
Updated about 1 year ago