Marketing API Version

Product Feed

You must meet the following requirements to use Product Feed.

  • Your business must be listed in Business Manager
  • You must be an employee of your business, or be an employee of an Agency which is assigned to this business

Reading

A feed is a set of items uploaded or fetched from a source at once. You can have a single feed to represent all of the items in your catalog, or you can have multiple feeds with each feed representing a single country or single division's products.

Permissions

Developers usually request these permissions for this endpoint:

Marketing Apps
  • ads_management
Page management Apps
No data
Other Apps
No data

Feed Format

The Product Feed consists of a series of items in either a Tab Separated file or XML. In XML, these should exist as an array of <item>'s. In a tab separated file, the header column is required.

If you want to learn how to use the Graph API, read our Using Graph API guide.

Parameters

This endpoint doesn't have any parameters.

Fields

FieldDescription

id

numeric string

ID number of the feed.

country

string

An ISO 3166-1 Alpha 2 country code.

created_time

datetime

The creation time of the feed.

default_currency

string

Your default currency for items in a feed. If no currency is specified for items in the feed file, this value will be used.

deletion_enabled

bool

This allows items to be deleted if a feed is updated and the items are not included in the new feed file.

delimiter

enum {AUTODETECT, BAR, COMMA, TAB, TILDE, SEMICOLON}

The delimiter used in feed file.

encoding

enum

The character encoding used by the provided feed.

file_name

string

The file name of a feed. This will be overridden by name if name is present.

latest_upload

The latest upload session of a feed.

name

string

The name of a feed.

product_count

int32

The total products in a product feed.

quoted_fields_mode

enum {AUTODETECT, ON, OFF}

This allows tabs and new lines within fields.

schedule

The configuration for fetching the full feed in a recurrent manner. The uploads as a result of this schedule would replace the entire feed. Items missing in consequent upload feed file would be deleted

update_schedule

The configuration for fetching updates to a feed in a recurrent manner. The uploads as a result of this schedule would only update the items in the feed or create new ones with the information in the file. No items would be deleted. This is useful for sending price and availability updates for selected items in the feed.

Edges

EdgeDescription

destinations

Destinations in a feed.

flights

Flights in a feed.

home_listings

Home listings in a feed.

hotels

Hotels in a feed.

products

Products in a feed.

uploads

Concrete upload attempts.

Validation Rules

ErrorDescription
100Invalid parameter
294Managing advertisements requires an access token with the extended permission for ads_management
275Cannot determine the target object for this request. Currently supported objects include ad account, business account and associated objects.

Creating

Example

You can make a POST request to product_feeds edge from the following paths:
When posting to this edge, a ProductFeed will be created.

Permissions

Developers usually request these permissions for this endpoint:

Marketing Apps
  • ads_management
Page management Apps
No data
Other Apps
No data

Parameters

NameDescription
country
ISO 3166 Alpha Country Code
Default value: US

Two letter country code where the products can be sold

default_currency
ISO 4217 Currency Code
Default value: USD

The default currency used by provided feed if the currency is not specified in the feed file.

deletion_enabled
boolean
Default value: true

Default value: false (to be changed to true .from API v2.5)
When true, this will remove products from a catalog that are no longer present in a feed. When false, uploading a product feed is additive and products will remain in the catalog even if they are removed from a feed. Once enabled, we do not allow this field to be disabled.

delimiter
enum {AUTODETECT, BAR, COMMA, TAB, TILDE, SEMICOLON}
Default value: AUTODETECT

Product feed delimiter

encoding
enum {AUTODETECT, LATIN1, UTF8, UTF16LE, UTF16BE, UTF32LE, UTF32BE}
Default value: AUTODETECT

The character encoding used by provided feed

file_name
UTF-8 encoded string

The name of the product feed. .tsv, .xml or compressed files (zip, gzip and bz2) are supported.

name
UTF-8 encoded string

User specified name for the feed

quoted_fields_mode
enum{autodetect, on, off}
Default value: autodetect

Whether or not there will be quotes around each field, only for TSV feeds. If this field is provided, we use it instead of the parameter quoted_fields.

schedule
JSON-encoded string

A JSON-encoded string representing a recurrent schedule for fetching the feed. Default timezone is America/Los_Angeles. Learn more about feed schedules

update_schedule
JSON-encoded string

The configuration for fetching updates to a feed in a recurrent manner. The uploads would only update the items in the feed or create new ones. No items would be deleted. This is useful for sending price and availability updates for selected items in the feed. Learn more about fields in a feed schedule

Return Type

This endpoint supports read-after-write and will read the node represented by id in the return type.
Struct {
id: numeric string,
}
You may perform a POST request to the following edge from this node:

Validation Rules

ErrorDescription
100Invalid parameter
200Permissions error

Updating

Example

You can update a ProductFeed by making a POST request to /{product_feed_id}.

Parameters

NameDescription
default_currency
ISO 4217 Currency Code

The default currency used by provided feed if the currency is not specified in the feed file.

deletion_enabled
boolean

Default value: false (to be changed to true .from API v2.5)
When true, this will remove products from a catalog that are no longer present in a feed. When false, uploading a product feed is additive and products will remain in the catalog even if they are removed from a feed. Once enabled, we do not allow this field to be disabled.

delimiter
enum {AUTODETECT, BAR, COMMA, TAB, TILDE, SEMICOLON}

Product feed delimiter

encoding
enum {AUTODETECT, LATIN1, UTF8, UTF16LE, UTF16BE, UTF32LE, UTF32BE}

The character encoding used by provided feed

name
UTF-8 encoded string

User specified name for the feed

quoted_fields_mode
enum{autodetect, on, off}

Whether or not there will be quotes around each field, only for TSV feeds. If this field is provided, we use it instead of the parameter quoted_fields.

schedule
JSON-encoded string

A JSON-encoded string representing a recurrent schedule for fetching the feed. Default timezone is America/Los_Angeles. Learn more about feed schedules

update_schedule
JSON-encoded string

The configuration for fetching updates to a feed in a recurrent manner. The uploads would only update the items in the feed or create new ones. No items would be deleted. This is useful for sending price and availability updates for selected items in the feed. Learn more about fields in a feed schedule

Return Type

This endpoint supports read-after-write and will read the node to which you POSTed.
Struct {
success: bool,
}

Validation Rules

ErrorDescription
100Invalid parameter
200Permissions error

Deleting

Deleting a product feed effectively disables all ads using products that come from this feed.

You can create a new feed with the same product IDs to re-enable those ads.

Examples

curl -X DELETE \
-d "access_token=<ACCESS_TOKEN>" \
https://graph.facebook.com/<API_VERSION>/<PRODUCT_FEED_ID>

Example

You can delete a ProductFeed by making a DELETE request to /{product_feed_id}.

Permissions

Developers usually request these permissions for this endpoint:

Marketing Apps
  • ads_management
  • manage_pages
  • pages_show_list
Page management Apps
No data
Other Apps
No data

Parameters

This endpoint doesn't have any parameters.

Return Type

Struct {
success: bool,
}

Validation Rules

ErrorDescription
100Invalid parameter
3964You must be assigned as an admin of this product feed before you can delete it.
294Managing advertisements requires an access token with the extended permission for ads_management