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.POST request to the /{product_feed_id}/uploads edge.| Field | Description |
|---|---|
offer_idtype: string | Required. A seller provided identifier for the offer.
This field is used to uniquely identify an offer within a catalog. |
idtype: numeric string | Read-Only. A unique identifier (Facebook ID) for this item. |
titletype: string | 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. |
descriptiontype: string | Read-Only. The auto-generated description of the offer. |
application_typetype: enum{SALE, AUTOMATIC_AT_CHECKOUT, BUYER_APPLIED} | Required. Determines how and when an offer is applied. Available options are:
|
coupon_codestype: Array<string> | List of case-insensitive coupon codes that customers use at checkout to redeem the offer. Maximum of 100 coupon codes allowed. For example: ["10OFF", "HOLIDAY_SALE"]Coupon codes may only be specified when the application_type is BUYER_APPLIED.If this field is set, public_coupon_code must be null. |
public_coupon_codetype: string | 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 application_type of AUTOMATIC_AT_CHECKOUT but will also feature the code text.
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 application_type is BUYER_APPLIED.
If this field is set, coupon_codes must be null. |
start_date_timetype: timestamp | 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). |
end_date_timetype: timestamp | Optional. Defaults to null.Unix timestamp, in seconds, of when the offer ends. If left empty or null, the offer has no end date.
The input may either be a Unix timestamp, in seconds, or an ISO-8601 formatted date string (e.g. 2021-09-25T12:34:56Z). |
min_quantitytype: int64 | 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 min_quantity or min_subtotal can be set. |
min_subtotaltype: string | Optional. Defaults to null.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 min_quantity or min_subtotal can be set. |
redeem_limit_per_usertype: int64 | 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 application_type is BUYER_APPLIED. |
value_typetype: enum {FIXED_AMOUNT, PERCENTAGE} | Required. The type of discount provided by the offer.
Available options are:
|
fixed_amount_offtype: string | Required, if value_type is set to FIXED_AMOUNT.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 value_type is FIXED_AMOUNT. |
percent_offtype: int64 | Required, if value_type is set to PERCENTAGE.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 value_type is PERCENTAGE. |
target_granularitytype: enum {ITEM_LEVEL, ORDER_LEVEL} | Required. The granularity at which the offer’s discount is applied.
Available options are:
Note that offers with ORDER_LEVEL granularity may result in discount allocations at purchase that do not divide evenly across items in an order. Handling these uneven discount allocations may result in added complexity at fulfillment time or in case of refunds. |
offer_termstype: string | 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 offer_terms to add language describing your own terms for the offer. These terms will appear below Facebook’s offer terms.
The content must follow our content policies. |
offer_tierstype: JSON array of objects | Optional. Use this field to define tiered discount levels for the offer, where different discounts apply based on quantity or subtotal thresholds. For example, “10% off when you buy 3+, 20% off when you buy 5+.” A maximum of 3 tiers may be specified per offer. Each object in the array supports the following fields:
Example of a “Buy More Save More” offer: [{“rank": 1, "percent_off": 10.0, "min_quantity": 3}, {"rank": 2, "percent_off": 20.0, "min_quantity": 5}] |
application_prioritytype: integer | Optional. A non-negative integer that controls the ranking order in which discounts are evaluated and applied when multiple offers exist. Lower values indicate higher priority — for example, an offer with application_priority set to 0 is ranked above one set to 5.Offers that have an application_priority set are ranked before offers without one. |
| Field | Description |
|---|---|
target_selectiontype: enum{ALL_CATALOG_PRODUCTS, SPECIFIC_PRODUCTS} | 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:
|
target_filtertype: JSON-encoded string | 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 target_selection is set to SPECIFIC_PRODUCTS. |
target_product_retailer_idstype: Array<product_retailer_id> | Optional. List of product item retailer IDs for products that the offer can be applied to. This field should only be set if target_selection is set to SPECIFIC_PRODUCTS. |
target_product_group_retailer_idstype: Array<product_group_retailer_id> | 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 target_selection is set to SPECIFIC_PRODUCTS. |
target_product_set_retailer_idstype: Array<product_set_retailer_id> | 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. |
prerequisite_filtertype: JSON-encoded string | 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, prerequisite_product_retailer_ids, prerequisite_product_group_retailer_ids, and prerequisite_product_set_retailer_ids must be null. |
prerequisite_product_retailer_idstype: Array<product_retailer_id> | 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, prerequisite_filter, prerequisite_product_group_retailer_ids, and prerequisite_product_set_retailer_ids must be null. |
prerequisite_product_group_retailer_idstype: Array<product_group_retailer_id> | 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, prerequisite_filter, prerequisite_product_retailer_ids, and prerequisite_product_set_retailer_ids must be null. |
prerequisite_product_set_retailer_idstype: Array<product_set_retailer_id> | 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, prerequisite_filter, prerequisite_product_retailer_ids, and prerequisite_product_group_retailer_ids must be null. |
exclude_sale_priced_productstype: bool enum {YES, NO} | Optional. Whether the offer applies to products which already have a reduced price set in catalog, as specified by the sale_price field of product item.
Set this field to YES to avoid potentially double discounting products. Omit this field or set it to NO to include products with a lower sale_price set in your catalog.
When set, this field applies to both the target products and prerequisite products of an offer. |
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 |
|---|---|
target_typetype: enum{LINE_ITEM, SHIPPING} | Required. The type of object that the offer applies to:
|
target_shipping_option_typestype: Array<shipping_service_tier> | Required, if the target_type is SHIPPING.A list of shipping service tiers (e.g. STANDARD, RUSH, EXPEDITED) which the offer is valid for.
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. |
target_quantity field as well as either the min_quantity or min_subtotal fields.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 |
|---|---|
target_quantitytype: int64 | Optional. Defaults to 0 (unlimited). The number of products that will be discounted for each redemption of the offer. Setting target_quantity > 0 constitutes a Buy X get Y style offer.
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. |
redemption_limit_per_ordertype: int64 | 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 redemption_limit_per_order is set to 2 then the buyer would receive 2 shirts for free and 4 at full price.
If this field is set, target_quantity must be greater than 0. |
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.