> ## Documentation Index
> Fetch the complete documentation index at: https://docs.alana.shopping/llms.txt
> Use this file to discover all available pages before exploring further.

# Meta Commerce

> Meta/Facebook product catalog CSV feed format and field mapping.

## Overview

The Meta feed returns a CSV file compatible with Meta's Commerce Manager catalog import. Use it to sync your Alana catalog with Facebook Shops, Instagram Shopping, and Meta Advantage+ catalogs.

## Feed URL

```
GET /api/v1/feeds/meta
```

Add this URL in **Meta Commerce Manager → Catalog → Data Sources → Scheduled Feed**.

## CSV Format

```csv theme={null}
id,title,description,availability,condition,price,link,image_link,brand,google_product_category
SKU-001,Blue Cotton T-Shirt,"100% cotton, pre-shrunk",in stock,new,29.99 BRL,https://yourstore.com/p/blue-tshirt,https://cdn.yourstore.com/blue-tshirt.jpg,YourBrand,212
SKU-002,Red Sneakers,Running shoes with cushioned sole,in stock,new,199.90 BRL,https://yourstore.com/p/red-sneakers,https://cdn.yourstore.com/red-sneakers.jpg,YourBrand,187
```

## Required Fields

| Field          | Description                                                   |
| -------------- | ------------------------------------------------------------- |
| `id`           | Unique product identifier                                     |
| `title`        | Product name                                                  |
| `description`  | Product description                                           |
| `availability` | `in stock`, `out of stock`, `preorder`, `available for order` |
| `condition`    | `new`, `used`, `refurbished`                                  |
| `price`        | Price with currency (e.g. `29.99 BRL`)                        |
| `link`         | Product page URL                                              |
| `image_link`   | Product image URL                                             |
| `brand`        | Brand name                                                    |

## Requesting the Feed

<CodeGroup>
  ```bash cURL theme={null}
  curl "https://app.alana.shopping/api/v1/feeds/meta" \
    -H "X-API-Key: sk_live_your_api_key" \
    -o meta-catalog.csv
  ```

  ```javascript JavaScript theme={null}
  const res = await fetch(
    "https://app.alana.shopping/api/v1/feeds/meta",
    { headers: { "X-API-Key": "sk_live_your_api_key" } }
  );
  const csv = await res.text();
  ```

  ```python Python theme={null}
  import requests

  res = requests.get(
      "https://app.alana.shopping/api/v1/feeds/meta",
      headers={"X-API-Key": "sk_live_your_api_key"},
  )
  with open("meta-catalog.csv", "w", encoding="utf-8") as f:
      f.write(res.text)
  ```
</CodeGroup>

## Field Mapping

Alana automatically maps your product data to Meta's required fields:

| Alana Field     | Meta Field     | Notes                                     |
| --------------- | -------------- | ----------------------------------------- |
| `sku`           | `id`           |                                           |
| `name`          | `title`        | Truncated at 150 chars                    |
| `description`   | `description`  | Truncated at 9999 chars                   |
| `stock_status`  | `availability` | Mapped to Meta values                     |
| `price`         | `price`        | Currency appended from workspace settings |
| `images[0].url` | `image_link`   | First image used                          |
| `brand.name`    | `brand`        |                                           |

## Additional Images

Meta supports up to 10 additional images via `additional_image_link` columns. Alana includes all product images beyond the first in these columns automatically.

## Variants

For products with variants (size, color), Alana generates one row per variant with `item_group_id` set to the parent product SKU, allowing Meta to group them correctly in the catalog.
