mediaman / module-wishlist-api
Magento 2 module that provides an API to interact with the Wishlist module.
Installs: 55
Dependents: 0
Suggesters: 0
Security: 0
Stars: 14
Watchers: 7
Forks: 8
Open Issues: 5
Type:magento2-module
Requires
- php: >=7.0
- magento/framework: 100.*
- magento/module-integration: 100.*
Requires (Dev)
- phpstan/phpstan: ^0.7.0
- phpunit/phpunit: 4.1.0
- squizlabs/php_codesniffer: ^3.0
This package is not auto-updated.
Last update: 2020-01-23 10:09:34 UTC
README
Adds an API to interact with the Magento2 wishlist.
Getting Started
Install the module via composer
$ composer require "mediaman/module-wishlist-api: 1.*"
Enable the module
$ ./bin/magento module:enable Mediaman_WishlistApi
Upgrade your Magento database schemas
$ ./bin/magento setup:upgrade
Usage
The module adds three new API endpoints that allow you to interact with the Magento 2 wishlist.
If there's no customer session available, the current customer is received through the customer token.
GET /rest/V1/wishlist
Get the wishlist for the user.
Example:
$ curl -X GET http://magento.example.com/rest/V1/wishlist --header "Authorization: Bearer pbhercbtk6dd3eatf1pyx8jj45avjluu"
PUT /rest/V1/wishlist/:sku
Add the product to the users wishlist.
Example:
$ curl -X PUT http://magento.example.com/rest/V1/wishlist/24-MB01 --header "Authorization: Bearer pbhercbtk6dd3eatf1pyx8jj45avjluu"
DELETE /rest/V1/wishlist/:itemId
Remove an item from the users wishlist.
Example:
$ curl -X DELETE http://magento.example.com/rest/V1/wishlist/1 --header "Authorization: Bearer pbhercbtk6dd3eatf1pyx8jj45avjluu"
License
MIT © mediaman GmbH