Update Catalog Options

To keep your catalog feed information current, use one of the following options:

Note: If you're using our API to create and manage your feeds, you need to send us an API request with details for the update schedule you want to create:

curl \
  -F 'name=Test Feed' \
  -F 'update_schedule={ 
    "interval": "HOURLY", 
    "url": "http:\/\/www.example.com\/sample_feed_updates.tsv",
    "hour": 22
  }' \
  -F 'access_token=<ACCESS_TOKEN>' \
  https://graph.facebook.com/<API_VERSION>/<CATALOG_ID>/product_feeds

Schedule Feed Fetches

We fetch item feeds from your system on a schedule you define. There are two types of schedules you can define:

  • update_schedule — The uploads create new items or update existing ones with the information provided in the feed file.
  • schedule — The uploads result in a complete refresh operation on your feed. We delete items not present in the file, update existing ones, and create new ones. You can use either of the schedules, or both, depending on your needs.

For example: update_schedule with frequency HOURLY and a replace schedule with frequency DAILY.

We recommend setting up an update_schedule with only changed data in the feed file for faster processing of feed. This is particularly better for holiday sales and faster price and availability updates. It's also recommended to mark items as "out of stock" rather than deleting from the feed so that we can retarget the user with similar available items.

curl \
  -F 'name=Test Feed' \
  -F 'schedule={ 
    "interval": "DAILY", 
    "url": "http:\/\/www.example.com\/sample_feed.tsv"
  }' \
  -F 'update_schedule={ 
    "interval": "HOURLY", 
    "url": "http:\/\/www.example.com\/sample_feed_updates.tsv",
    "hour": 22
  }' \
  -F 'access_token=<ACCESS_TOKEN>' \
  https://graph.facebook.com/<API_VERSION>/<CATALOG_ID>/product_feeds

Response:

{ "id" : {FEED_ID} }

See Feed Reference, Feed Schedule Reference.

Direct Upload an Item Feed

Along with scheduled feed fetches, you can manually perform one-time uploads.

Example — Feed files hosted on a public location

curl \
  -F "url=http://www.example.com/sample_feed.xml" \
  -F "access_token={ACCESS_TOKEN}" \
  https://graph.facebook.com/{API_VERSION}/{FEED_ID}/uploads

Example — Uploading feed files directly from the local machine. The path to the file needs to be changed according to your use case.

curl \
  -F "file=@catalog.csv;type=text/csv" \
  -F "access_token={ACCESS_TOKEN}" \
  https://graph.facebook.com/{API_VERSION}/{FEED_ID}/uploads

Optionally, you can set update_only to true. We create new items and update existing ones, but don't delete items from the feed. You only need to provide id to update existing items. This reduces time to fetch and process your file.

For example, to update only price and custom labels for 100 items in a feed, use direct upload. Provide a file with only id, price and custom_label_0 for those items and update_only set to true. We support all listed file formats; the most common ones are TSV and CSV. See Supported Feed Formats for more information.

Feed Format per Use Case


Feed Format Use Case Sample Feed

CSV

Update price and availability for a subset of items.

Download (Right-Click and Save Link As)

TSV

Reset sale_price and update custom_label_0 for a subset of items

Download (Right-Click and Save Link As)

See Manual Uploads, Reference.

If you get errors in your feed, see Feed Upload Errors, Reference.

Update an Individual Item

Update an individual item's data in real time. Include the updated fields in an HTTP POST:

https://graph.facebook.com/catalog:{CATALOG_ID}:{base64urlencode(retailer_id)}

Where retailer_id is the item ID from your feed. It must be base64url-encoded. See mutable fields in the Catalog Products, Reference.

Do not provide item feeds with individual item updates, creation, or deletion with the API. This can disrupt any updates or deletes of items you created with the API because we don't track these with the feed.

See also: