The Offers API is in a closed, invite-only Beta program. Please work with your Meta representative to get access if you have been invited to the program.
Using this API, you can add offer information to your product catalog to enable merchandising your offers on Facebook and Instagram. For sellers with Facebook or Instagram checkout enabled, buyers will be able to redeem your offers directly within the Meta family of apps.
You can create offers via an offer feed or manually via Commerce Manager.
To create a new Offer Feed, make a POST
request to the /{product_catalog_id}/product_feeds edge and set feed_type
to OFFER
. When posting to this edge, a Product Feed of type Offer is created for the catalog specified in the product_catalog_id
field.
Once the Offer Feed is created, you can upload your offer data via a POST
request to the /{product_feed_id}/uploads
edge.
You can set most of the available fields listed below as columns in your feed file. Only the fields marked as Read-Only cannot be set during creation.
A product set is a group of related items within a product catalog.
These are the products for which an offer is valid.
These are the prerequisites that need to be met for the offer to apply. For example, you can determine that the offer is only valid when people buy at least a specific amount of products or reach at least a specific subtotal quantity or value of those products. Currently, the prerequisite products are derived from the target products. For example, an offer of 20% off all shoes means the minimum subtotal/quantity requirements must be met with shoes in the cart.
The Offer's application type specifies how an offer is applied at checkout either on your own website or within Facebook checkout. For instance, application type can be used to determine whether an offer is automatically applied at checkout or requires a coupon code to be redeemed. The application type also informs an offer's combination behavior with other offers. For more details see Combining Offers.
The below fields can be used to configure all offer types.
Field | Description |
---|---|
type: | Read-Only. A unique identifier (Facebook ID) for this item. |
type: | Required. A seller provided identifier for the offer. This field is used to uniquely identify an offer within a catalog. |
type: | Optional. A title for the offer item. Currently this title is only used to help identify offers within Commerce Manager and is not shown to buyers. |
type: | Read-Only. The auto-generated description of the offer. |
type: | Required. Determines how and when an offer is applied. Available options are:
|
type: | List of case-insensitive coupon codes that customers use at checkout to redeem the offer. Maximum of 100 coupon codes allowed. For example: Coupon codes may only be specified when the If this field is set, |
type: | Optional. A single case-insensitive coupon code that will be merchandised with the offer and will be prefilled at checkout if the buyer meets the offer prerequisites. By default offers with coupon codes are not visibly merchandised to buyers on Facebook or Instagram shopping surfaces such as a product details page. This is to prevent private or secret codes from leaking to buyers unintentionally. You can change this behavior by specifying a public coupon code to use for merchandising your offer. Offers with public codes will display the same as offers with an A public coupon code cannot exceed 20 characters in length and your catalog may only contain at most 10 active offers with public coupon codes at a time. A public coupon code may only be set when the If this field is set, |
type: | Required. Unix timestamp, in seconds, of when the offer starts. The input may either be a Unix timestamp, in seconds, or an ISO-8601 formatted date string (e.g. 2021-09-25T12:34:56Z). |
type: | Optional. Defaults to Unix timestamp, in seconds, of when the offer ends. If left empty or The input may either be a Unix timestamp, in seconds, or an ISO-8601 formatted date string (e.g. 2021-09-25T12:34:56Z). |
type: | Optional. Defaults to 0. Use this field if your offer is only valid when the customer buys a minimum number of products. This field represents the number of products the customer needs to buy for the offer to be valid. For example: “Buy 5 shirts, Get 20% discount”. Only one of either |
type: | Optional. Defaults to Use this field if your offer is only valid when the customer’s order meets a specific subtotal value. The subtotal of the prerequisite products must be equal to or greater than this value for the offer to apply. If no explicit prerequisite products are set then the target products are used as prerequisite products. This field should be formatted as the amount, followed by the 3-digit ISO currency code, with a space between amount and currency. For example: the string "30.99 USD" represents a $30.99 prerequisite subtotal for the offer to apply. Only one of either |
type: | Optional. Defaults to 0 (unlimited). The maximum number of times the offer can be used by a single user. Set this field to 1 to create a single use coupon code. This field should only be set if |
type: | Required. The type of discount provided by the offer. Available options are:
|
type: | Required, if The discount amount of the offer. Should be formatted as the amount, followed by the 3-digit ISO currency code, with a space between amount and currency. For example, the string "30.99 USD" represents a $30.99 discount. This field should only be set if |
type: | Required, if The percentage discount of the offer. Should be an integer between 0 and 100. For example, "30" represents a 30% discount. The field should only be set if |
type: | Required. The granularity at which the offer's discount is applied. Available options are:
Note that offers with |
type: | Optional. Any additional terms and conditions which dictate a buyer's use of the offer. Max 2500 characters. Facebook will auto-generate terms describing the offer based on the offer configuration. In addition to these terms you can use The content must follow our content policies. |
Both the target items for which an offer is valid and the prerequisite items a buyer much purchase to redeem the offer are defined by product sets. The Offers API supports multiple ways to specify these product sets but only one method may be used per product set type per offer.
Field | Description |
---|---|
type: | Required. This field is used to differentiate between offers which apply to an entire product catalog and offers restricted to a specific subset of items within a catalog. Available options are:
If |
type: | Optional. Filter rule to identify products that the offer can be applied to. Uses the same filter rule logic used for adding products to a product set. If the specified filter rule matches the filter of an existing product set then this offer will target that product set, otherwise a new product set will be created. This field should only be set if |
type: | Optional. List of product item retailer IDs for products that the offer can be applied to. This field should only be set if |
type: | Optional. List of product group retailer IDs for products that the offer can be applied to. All product variants included in the product group will be eligible for the offer. This field should only be set if |
type: | Optional. List of retailer IDs of product sets that contain products that the offer can be applied to. The offer will apply to the union of all products yielded by evaluating the specified product sets. |
type: | Optional. Filter rule to identify products that must be purchased for the buyer to redeem the offer. Uses the same filter rule logic used for adding products to a product set. Typically used in "Buy X get Y" style offers. If the specified filter rule matches the filter of an existing product set then this offer will use that product set to define the prerequisite products, otherwise a new product set will be created. If this field is set, |
type: | Optional. Retailer IDs for product items that the buyer must purchase to redeem the offer. Any items included in the list are eligible for the buyer to use as a prerequisite towards redeeming the offer. Typically used in "Buy X get Y" style offers. If this field is set, |
type: | Optional. Retailer IDs for product groups that the buyer must purchase to redeem the offer. All product variants included in each group are eligible for the buyer to use as a prerequisite towards redeeming the offer. Typically used in "Buy X get Y" style offers. If this field is set, |
type: | Optional. Retailer IDs for product sets containing items that the buyer must purchase to redeem the offer. Any items yielded from the union of evaluating the product sets are eligible for the buyer to use as a prerequisite towards redeeming the offer. Typically used in "Buy X get Y" style offers. If this field is set, |
type: | Optional. Whether the offer applies to products which already have a reduced price set in catalog, as specified by the Set this field to When set, this field applies to both the target products and prerequisite products of an offer. |
The Offers API supports both offers that discount the price of products in a buyer's purchase as well as offers that discount the shipping costs for those products. Just like offers for products, shipping offers may be applied with a coupon code or automatically with or without additional buyer prerequisites.
To create a shipping offer the target_type
must be set to SHIPPING
. Currently, only free shipping offers are supported and thus value_type
must always be PERCENTAGE
with percent_off
set to 100.
Field | Description |
---|---|
type: | Required. The type of object that the offer applies to:
|
type: | Required, if the A list of shipping service tiers (e.g. For example to specify a shipping offer which applies to standard and rush shipping speeds but not overnight shipping, use:
For sellers with Facebook or Instagram checkout enabled, you can use the Shipping Profiles API to manage the shipping profiles on your commerce account. |
"Buy X Get Y" style offers allow buyers to purchase a specific quantity of select "X products" to get 1 or more of "Y products" at a reduced price or free. Spend X get Y offers where the buyer must reach a minimum spend threshold for a set of X products to receive a discount are also supported. You create a buy X get Y offer by setting the target_quantity
field as well as either the min_quantity
or min_subtotal
fields.
In some cases such as the common "buy one get one free" offer, X and Y may refer to the same set of products. However you can also use the prerequisite_filter
, prerequisite_product_retailer_ids
, prerequisite_product_group_retailer_ids
, and prerequisite_product_set_retailer_ids
to specify a set of X products distinct from the target Y products. See Specify Eligible Products for how to configure these fields.
Field | Description |
---|---|
type: | Optional. Defaults to 0 (unlimited). The number of products that will be discounted for each redemption of the offer. Setting Use this field to control how many products are discounted when a buyer meets the redemption prerequisites. For instance in a "buy 2 get 1 50% off" offer the target quantity is 1 and in a "buy 5 get 2 free" offer the target quantity is 2. |
type: | Optional. Defaults to 0 (unlimited). The number of times this offer can be redeemed per order. Use this field to limit the number of times an offer can be applied to the products in a buyer's purchase. For instance in a "buy one shirt get one free" offer by default a buyer who purchases 6 shirts would receive 3 at full price and 3 for free. However in the same example if If this field is set, |
For sellers with checkout on Facebook or Instagram enabled there is limited support for combining multiple offers within a single transaction. An offer's ability to be combined with other offers is primarily determined by its application type and target type. Currently this behavior is not configurable by sellers. The below rules summarize offer stacking behavior:
application_type
= SALE
) the offer resulting in the lowest product price is applied. This is repeated for all items in a buyer's cart. The item's new discounted price is used in all future offer prerequisite calculations.BUYER_APPLIED
or 1 AUTOMATIC_AT_CHECKOUT
offer per target_type
(LINE_ITEM
or SHIPPING
). For instance, a buyer may apply a free shipping coupon and a buy one get one coupon but may not redeem 2 offers which both discount product prices.At present, offers created via the Offers API cannot be selectively merchandised to specific cohorts of users. Offers created in Commerce Manager can be configured with user eligibility restrictions. A merchandised offer created via the Offers API will be shown to all buyers and any buyer who meets an offer's prerequisites (including entering any coupon codes) in Facebook or Instagram checkout may redeem the offer.
In the future, the Offers API may support limiting offers to specific countries for multinational sellers as well as restricting offer eligibility to specific groups of users such as first time buyers or followers of a seller's Facebook Page.