Magento 2 Acaldeira SimpleAPI Module
This module shows how Magento 2 API works.
- Magento >= 2.0
This library aims to support and is tested against the following PHP implementations:
- PHP 7.0
Install using composer by adding to your composer file using commands:
-
create a folder at magento's root folder called "acmodules"
-
extract the extension inside the folder "acmodules/simpleapi"
-
update Magento's composer.json file with the following
2.1 add require
"acaldeira/simpleapi": "*"
2.2 add repositories
{ "type": "path", "url": "acmodules/simpleapi" }
-
composer update
-
bin/magento setup:upgrade
GET
http://mymagentourl/rest/V1/simpleApi/product/:productId
Result:
POST
http://mymagentourl/rest/V1/simpleApi/product/calculateCost
body {"options": {"productId": 100, "country": "US", "region": "New York", "postcode": "10010"}}
Result:
Any contribution is highly appreciated. The best way to contribute code is to open a pull request on GitHub.
Respect the Magento OSL license, which is included in this codebase.
Copyright (c) 2017 Acaldeira.