Consume Magento 2 REST API
Currently a work in progress.
Wrapper for connecting to Magento 2 REST API.
Example Usage
This uses restler as a HTTP Client library, please see their documentation for more examples/sample usage.
var Magento2Api = ; magento = url: 'http://example.com' // without trailing slash username: 'username' password: 'password'; magento;
Options
Option | Type | Required | Description |
---|---|---|---|
url |
String |
yes | Your Store URL, example: http://example.com (without trailing slash) |
username |
String |
yes | Your API username |
password |
String |
yes | Your API password |
version |
Interger |
no | API version, default is 1 |
encoding |
String |
no | Encoding, default is 'utf-8' |
End points
For a complete list of endpoints see:
Those implemented in this module: