PHPackages                             angeo/module-openai-product-feed-api - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. angeo/module-openai-product-feed-api

ActiveMagento2-module[API Development](/categories/api)

angeo/module-openai-product-feed-api
====================================

Magento 2 REST API for OpenAI Agentic Commerce Protocol (ACP). Implements the full 6-endpoint ACP feed surface: feeds, products (with full pagination and configurable variants), and promotions. DB-persisted feeds, POST-based PATCH workaround for Magento compatibility.

1.0.0(1mo ago)07↑650%MITPHPPHP &gt;=8.2

Since Apr 18Pushed 1mo agoCompare

[ Source](https://github.com/angeo-dev/module-openai-product-feed-api)[ Packagist](https://packagist.org/packages/angeo/module-openai-product-feed-api)[ Docs](https://angeo.dev)[ RSS](/packages/angeo-module-openai-product-feed-api/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (9)Versions (2)Used By (0)

Angeo OpenAI Product Feed API — Magento 2
=========================================

[](#angeo-openai-product-feed-api--magento-2)

[![Packagist](https://camo.githubusercontent.com/b56fd71ceffbf77940d6b697bd2065bad34f1edf704c3fcf20efb66d4f61388f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616e67656f2f6d6f64756c652d6f70656e61692d70726f647563742d666565642d6170692e737667)](https://packagist.org/packages/angeo/module-openai-product-feed-api)[![License](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](LICENSE)[![PHP](https://camo.githubusercontent.com/d840cef9807c8f76051ad687841d67f4d830c84e0d83236968e53124ef6742d5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344382e322d3838393242462e737667)](https://php.net)

**Magento 2 REST API for the OpenAI Agentic Commerce Protocol (ACP). Full 7-endpoint feed surface with DB-persisted feeds, paginated product export, and SalesRule → Promotion mapping.**

---

What this module fixes
----------------------

[](#what-this-module-fixes)

- **DB-persisted feeds** — feed IDs survive cache flushes and server restarts (`angeo_acp_feed` table via Schema Patch)
- **Proper pagination** — `getProducts` now iterates the full catalog in batches (v1 silently capped at 100 products)
- **PATCH workaround documented** — Magento has no native PATCH support; upserts exposed via `/upsert` POST + nginx rewrite
- **Structured validation errors** — upsert responses include `errors: string[]` per field, not a silent `false`
- **Category names resolved** — products now return `{value: "Tools", taxonomy: "merchant"}` instead of `{value: "42"}`
- **ImageUrlBuilder** — product images use Magento's proper resized URL builder, not raw file paths
- **`/invalidate` endpoint** — bust product cache without a deploy
- **Coupon codes in promotion descriptions** — auto-appended when rule has a specific coupon
- **Multiple benefits per promotion** — e.g. 10% off + free shipping in one `benefits` array
- **`GET /product_feeds`** — list all feeds (new endpoint)

---

Endpoints
---------

[](#endpoints)

MethodPathDescription`POST``/rest/V1/angeo/product_feeds`Create a product feed`GET``/rest/V1/angeo/product_feeds`List all feeds`GET``/rest/V1/angeo/product_feeds/:id`Get feed metadata`GET``/rest/V1/angeo/product_feeds/:id/products`Get products (paginated)`POST``/rest/V1/angeo/product_feeds/:id/products/upsert`Upsert products (PATCH workaround)`POST``/rest/V1/angeo/product_feeds/:id/products/invalidate`Bust product cache`GET``/rest/V1/angeo/product_feeds/:id/promotions`Get promotions`POST``/rest/V1/angeo/product_feeds/:id/promotions/upsert`Upsert promotions (PATCH workaround)---

PATCH workaround — nginx setup
------------------------------

[](#patch-workaround--nginx-setup)

Magento 2's REST framework does not support HTTP `PATCH`. OpenAI's ACP crawler sends `PATCH /product_feeds/:id/products`. Bridge this with an nginx rewrite **before** the request reaches Magento:

```
# Add inside your server {} block
location ~ ^/rest/V1/angeo/product_feeds/[^/]+/products$ {
    if ($request_method = PATCH) {
        rewrite ^(.*)$ $1/upsert last;
    }
}

location ~ ^/rest/V1/angeo/product_feeds/[^/]+/promotions$ {
    if ($request_method = PATCH) {
        rewrite ^(.*)$ $1/upsert last;
    }
}
```

**Apache** (`.htaccess` in Magento root):

```
RewriteCond %{REQUEST_METHOD} ^PATCH$
RewriteRule ^rest/V1/angeo/product_feeds/([^/]+)/products$ rest/V1/angeo/product_feeds/$1/products/upsert [L]
RewriteCond %{REQUEST_METHOD} ^PATCH$
RewriteRule ^rest/V1/angeo/product_feeds/([^/]+)/promotions$ rest/V1/angeo/product_feeds/$1/promotions/upsert [L]
```

---

Installation
------------

[](#installation)

```
composer require angeo/module-openai-product-feed-api
bin/magento setup:upgrade
bin/magento cache:flush
```

---

Configuration
-------------

[](#configuration)

Navigate to **Stores → Configuration → Angeo → Product Feed API**.

SettingDescriptionDefaultEnabledEnable/disable the APIYesDefault Target CountryISO 3166-1 alpha-2USUTM MediumAppended to all product URLs for attributionfeedInclude List PriceOriginal price when special price activeYesInclude BarcodesRead EAN/UPC/GTIN attributesYesSeller NameStore/brand name in ACP responseStore nameTerms of Service URLLinked in seller.links—Privacy Policy URLLinked in seller.links—Refund Policy URLLinked in seller.links—Shipping Policy URLLinked in seller.links—FAQ URLLinked in seller.links—---

Quick start
-----------

[](#quick-start)

```
# 1. Create a feed
curl -X POST https://yourstore.com/rest/V1/angeo/product_feeds \
  -H "Content-Type: application/json" \
  -d '{"targetCountry":"US","storeId":1}'
# → {"id":"feed_a1b2c3d4e5f6","target_country":"US","store_id":1,"updated_at":"...","created_at":"..."}

# 2. Get products (page 1, 100 per page)
curl "https://yourstore.com/rest/V1/angeo/product_feeds/feed_a1b2c3/products?page=1&pageSize=100"

# 3. Upsert products (POST to /upsert; OpenAI PATCH is rewritten by nginx)
curl -X POST https://yourstore.com/rest/V1/angeo/product_feeds/feed_a1b2c3/products/upsert \
  -H "Content-Type: application/json" \
  -d '{"feedId":"feed_a1b2c3","products":[{"id":"SKU_42","variants":[{"id":"SKU_42_BLK","title":"Black"}]}]}'
# → {"id":"feed_a1b2c3","accepted":true,"upserted_count":1,"errors":[]}

# 4. Get promotions (sourced from Magento SalesRules)
curl https://yourstore.com/rest/V1/angeo/product_feeds/feed_a1b2c3/promotions

# 5. Invalidate product cache (after catalog changes)
curl -X POST https://yourstore.com/rest/V1/angeo/product_feeds/feed_a1b2c3/products/invalidate \
  -H "Authorization: Bearer "
```

---

ACP Product Schema Coverage
---------------------------

[](#acp-product-schema-coverage)

### Product level

[](#product-level)

FieldSource`id``product.entity_id` — stable, never changes`title``product.name``description.plain``short_description` stripped, or `description` stripped`description.html``description` raw HTML`url`Product URL + `utm_medium=feed&utm_source=chatgpt``media`Gallery images via `ImageUrlBuilder`### Variant level

[](#variant-level)

FieldSource`id`Child `entity_id` for configurable, product `entity_id` otherwise`title`Child or parent product name`price``final_price` in minor units (cents)`list_price``price` when `special_price` is active (per ACP best practices)`availability``StockRegistry` → `in_stock` / `out_of_stock``categories`Category **names** with `merchant` taxonomy`variant_options`Configurable attribute labels/values (color, size, …)`barcodes``ean` / `upc` / `gtin` / `barcode` / `isbn` product attributes`condition``["new"]` (override in `ProductMapper`)`seller.name`Config or store name`seller.links`ToS, privacy, refund, shipping, FAQ from config---

ACP Promotion Schema Coverage
-----------------------------

[](#acp-promotion-schema-coverage)

Sourced from active Magento SalesRules:

Magento SalesRuleACP field`rule_id``id` as `promo_rule_{id}``name``title``description` + coupon code`description.plain``is_active` + dates`status`: `active` / `scheduled` / `expired` / `disabled``from_date` / `to_date``active_period.start_time` / `end_time` (RFC 3339)`by_percent``{type:"percent_off", percent_off: N}``by_fixed` / `cart_fixed``{type:"amount_off", amount_off:{amount, currency}}``free_shipping` flag`{type:"free_shipping"}` (combinable with other benefits)---

Testing
-------

[](#testing)

```
vendor/bin/phpunit -c app/code/Angeo/OpenAiProductFeedApi/phpunit.xml
```

---

The Angeo AI Suite
------------------

[](#the-angeo-ai-suite)

ModulePurpose`angeo/module-aeo-audit`AEO audit — 8 signals scored`angeo/module-llms-txt`Generates `/llms.txt``angeo/module-openai-product-feed`CSV product feed file generator`angeo/module-openai-product-feed-api`**This module** — ACP REST API---

License
-------

[](#license)

MIT — see [LICENSE](LICENSE)

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance91

Actively maintained with recent releases

Popularity6

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

52d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/557748?v=4)[angeo](/maintainers/angeo)[@angeo](https://github.com/angeo)

---

Tags

acpchatgpt-shoppingmagentomagento2openairest-apiopenaimagento2ChatGptacpangeoagentic commerceproduct feed apipromotions api

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/angeo-module-openai-product-feed-api/health.svg)

```
[![Health](https://phpackages.com/badges/angeo-module-openai-product-feed-api/health.svg)](https://phpackages.com/packages/angeo-module-openai-product-feed-api)
```

###  Alternatives

[mollie/magento2

Mollie Payment Module for Magento 2

1131.8M12](/packages/mollie-magento2)[smile/elasticsuite

Magento 2 merchandising and search engine built on ElasticSearch

8054.6M39](/packages/smile-elasticsuite)[run-as-root/magento2-prometheus-exporter

Magento2 Prometheus Exporter

68353.9k](/packages/run-as-root-magento2-prometheus-exporter)[dotdigital/dotdigital-magento2-extension

Dotdigital for Magento 2

50390.4k20](/packages/dotdigital-dotdigital-magento2-extension)[buckaroo/magento2

Buckaroo Magento 2 extension

32414.8k7](/packages/buckaroo-magento2)[mage-os/module-inventory-reservations-grid

Add a grid with the list of inventory reservations.

1512.6k](/packages/mage-os-module-inventory-reservations-grid)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
