Skip to main content

Facebook Product Catalog Feed

Looking for the vendor setup guide?

If you're a store owner and just want to connect your store to Facebook, see the User Guide: Sync Products to Facebook & Instagram — it walks you through every step without any technical detail.

AYTS automatically generates a Facebook-compatible product catalog feed for every store. Vendors can submit their feed URL once to Facebook Commerce Manager and Facebook will sync products automatically — no OAuth, no app review needed.


How it works

  1. AYTS exposes a public JSON feed endpoint for each store:
    GET /api/stores/:storeId/fb-feed
  2. The vendor submits this URL in Facebook Commerce Manager → Data Sources → Add Product Feed.
  3. Facebook crawls the URL on its own schedule (typically every 24 hours) and keeps the catalog in sync.
  4. Products appear in the vendor's Facebook Shop and Instagram Shopping tags automatically.

Feed URL

https://ayts-api.jerquinbayudo.workers.dev/api/stores/{YOUR_STORE_ID}/fb-feed

Find your store ID in the Admin panel under Stores → [your store] — it's the UUID in the URL.


Feed format

The endpoint returns a JSON object with a data array. Each entry is one product.

Example response:

{
"data": [
{
"id": "3f8a1c2d-...",
"title": "Organic Brown Rice 1kg",
"description": "Premium organic brown rice from local farms.",
"availability": "in stock",
"condition": "new",
"price": "89.00 PHP",
"sale_price": "75.00 PHP",
"link": "https://ayts.jerquinbayudo.workers.dev/stores/abc.../products/3f8...",
"image_link": "https://r2.ayts.ph/products/3f8a1c2d-rice.jpg",
"brand": "Fresh Mart Grocery",
"retailer_id": "ORG-RICE-1KG",
"inventory": 42
}
]
}

Field mapping:

Facebook fieldSourceNotes
idproducts.idUUID
titleproducts.name
descriptionproducts.descriptionFalls back to name if empty
availabilityproducts.inventory_count"in stock" if count > 0
conditionhardcodedAlways "new"
priceproducts.compare_priceproducts.priceIf compare_price exists it is the list price
sale_priceproducts.priceOnly included when compare_price > price
linkgenerated/stores/:storeId/products/:productId on storefront
image_linkproducts.images[0]Falls back to store logo
brandstores.name
retailer_idproducts.skuOnly included if SKU is set
inventoryproducts.inventory_count

Note: Products without any image are excluded from the feed. Facebook requires a valid image_link. Add product images in the Admin panel to include them in the catalog.


Setting up in Facebook Commerce Manager

  1. Go to Facebook Commerce Manager and open your catalog.
  2. Click Data Sources → Add Data Source → Use Data Feeds.
  3. Choose Scheduled FeedEnter Feed URL.
  4. Paste your feed URL:
    https://ayts-api.jerquinbayudo.workers.dev/api/stores/{YOUR_STORE_ID}/fb-feed
  5. Set the schedule to Daily (or hourly if you update products frequently).
  6. Click Upload — Facebook will fetch and validate the feed immediately.

Once approved, products appear in your Facebook/Instagram Shop within a few minutes.


Caching

The feed is cached for 1 hour at the API edge. Facebook's crawler respects the Cache-Control: public, max-age=3600 header. New or updated products may take up to 1 hour to appear in the feed, plus whatever Facebook's own crawl delay is (usually 24 hours for the default schedule).

For faster propagation, you can trigger a manual re-fetch in Commerce Manager → Data Sources → Fetch Now.


Troubleshooting

ProblemCauseFix
Product missing from feedNo image setAdd a product image in Admin → Products
Product shows as "out of stock"inventory_count is 0Update stock in Admin → Products
Feed URL returns 404Store is inactive or wrong IDVerify store is active and check the UUID
Sale price not showingcompare_price not setSet a compare price higher than the selling price
Images rejected by FacebookImage URL not publicly accessibleEnsure product images are hosted on a public R2/CDN URL

API reference

See Stores API → GET /api/stores/:id/fb-feed for the full endpoint spec.