← Documentation
Magento / Adobe Commerce
REST API module for Adobe Commerce and Magento 2. Exposes OCP endpoints through Magento's standard module system — no core modifications required.
Requirements
✓Magento 2.4+ or Adobe Commerce 2.4+
✓PHP 8.1+
✓Composer 2.x
Installation
1
Install via Composer
composer require ocp/module-magento2 bin/magento module:enable OCP_Commerce bin/magento setup:upgrade bin/magento cache:flush
2
Configure the module
Navigate to Stores → Configuration → OCP → General and set:
Store name
Defaults to Magento store name
Currency
Defaults to your base currency
Feed rebuild schedule
Cron expression for feed regeneration (default: hourly)
Excluded attribute sets
Product attribute sets to omit from the feed
3
Verify endpoints
curl https://yourstore.com/.well-known/ocp.json curl https://yourstore.com/ocp/products.jsonl | head -5
4
Validate
npx @opencommerceprotocol/cli validate https://yourstore.com ✓ /.well-known/ocp.json — valid ✓ /ocp.md — found ✓ /ocp/products.jsonl — 4,821 products, all valid Score: 92/100
Generated endpoints
/.well-known/ocp.jsonManifest served via Magento router/ocp.mdStore description from CMS content + settings/ocp/products.jsonlFull catalog export, rebuilt by cron/ocp/products.jsonl?page=N&page_size=500Paginated feed for catalogs >10k productsPerformance notes
- For catalogs over 50k products, enable the flat catalog indexer to speed up feed generation.
- The JSONL feed is written to
pub/media/ocp/and served as a static file — no PHP overhead on reads. - Schedule feed rebuild off-peak using the cron config. The old feed stays live until the new one is ready.