Facebook Product Catalog Feed
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
- AYTS exposes a public JSON feed endpoint for each store:
GET /api/stores/:storeId/fb-feed
- The vendor submits this URL in Facebook Commerce Manager → Data Sources → Add Product Feed.
- Facebook crawls the URL on its own schedule (typically every 24 hours) and keeps the catalog in sync.
- 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 field | Source | Notes |
|---|---|---|
id | products.id | UUID |
title | products.name | |
description | products.description | Falls back to name if empty |
availability | products.inventory_count | "in stock" if count > 0 |
condition | hardcoded | Always "new" |
price | products.compare_price → products.price | If compare_price exists it is the list price |
sale_price | products.price | Only included when compare_price > price |
link | generated | /stores/:storeId/products/:productId on storefront |
image_link | products.images[0] | Falls back to store logo |
brand | stores.name | |
retailer_id | products.sku | Only included if SKU is set |
inventory | products.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
- Go to Facebook Commerce Manager and open your catalog.
- Click Data Sources → Add Data Source → Use Data Feeds.
- Choose Scheduled Feed → Enter Feed URL.
- Paste your feed URL:
https://ayts-api.jerquinbayudo.workers.dev/api/stores/{YOUR_STORE_ID}/fb-feed
- Set the schedule to Daily (or hourly if you update products frequently).
- 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
| Problem | Cause | Fix |
|---|---|---|
| Product missing from feed | No image set | Add a product image in Admin → Products |
| Product shows as "out of stock" | inventory_count is 0 | Update stock in Admin → Products |
| Feed URL returns 404 | Store is inactive or wrong ID | Verify store is active and check the UUID |
| Sale price not showing | compare_price not set | Set a compare price higher than the selling price |
| Images rejected by Facebook | Image URL not publicly accessible | Ensure 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.