Quantcast
Channel: Webkul Blog
Viewing all articles
Browse latest Browse all 5489

Marketplace Web Services API For Magento2

$
0
0

Marketplace Web Services API For Magento2 is a multi-vendor Marketplace add-on which expose the Web Services API of Marketplace module with REST api so that marketplace functions can be used by other application like ERP, Mobile application ( iOS , Windows, etc).

Features – Marketplace Web Services API For Magento2

  • Standard REST api support found.
  • This module exposes several marketplace resources to web api including become sellers, get sellers list, invoice, credit memo, cancel seller orders, landing page data and many more.
  • Admin and customer level authentication for resources.
  • Consumer can authenticate by any of these methods token, oAuth or session.
  • JSON format return can be used in mobile and ERP devices including OPENERP. we have built world best Openerp Magento Connector.
  • Using this add-on marketplace can be managed very easily from other applications as well.

Installation

Customers will get a zip folder and they have to extract the contents of this zip folder on their system. The extracted folder has an src folder, inside the src folder you have the app folder. You need to transfer this app folder into the Magento2 root directory on the server as shown below.

Installation Of Magento2 Marketplace PreOrder

After the successful installation, you have to run the command on Magento2 root directory-“php bin/magento setup:upgrade”

Installation Of Magento2 Marketplace PreOrder

Now run this command into the Magento2 root – “php bin/magento setup:di:compile

Installation Of Magento2 Marketplace PreOrder

Also, run this command into the Magento2 Root- “php bin/magento setup:static-content:deploy” You can refer the below screenshot.

Installation Of Magento2 Marketplace PreOrder

After running the commands, you have to flush the cache from Magento2 admin panel by navigating through->System->Cache management as shown below.

Installation Of Marketplace PreOrder For Magento2

How To Use – Rest API

Admin Api Calls : needs admin Authorization

Admin has to Integrate admin level access from the backend i.e. admin panel.

S.No.

Methods & Parameters

Description

Return Type
1

magentohost*1/rest/V1/mpapi/admin/sellers

Request Type : GET

This is used to get all sellers data.

JSON

2

magentohost*1/rest/V1/mpapi/admin/sellers/:id

Request Type : GET

This is used to get sellers by their id.

JSON

3

magentohost*1/rest/V1/mpapi/admin/sellers/:id/product

Request Type : GET

This is used to get sellers wise products.

JSON

4

magentohost*1/rest/V1/mpapi/admin/sellers/:id/order

Request Type : GET

This is used to get sellers wise orders.

JSON

5

magentohost*1/rest/V1/mpapi/admin/sellers/:id/order/sales

Request Type : GET

This is used to get sellers wise sales details.

JSON

6

magentohost*1/rest/V1/mpapi/admin/sellers/:id/paytoseller

Request Type : POST

Params: {

seller_pay_reason <string> <reason to pay>,

entity_id <int> order entity id

}

This is used to pay seller his amount after deducting the commission.

JSON

 

Seller Api Calls: needs customer Authorization

S.No.

Methods & Parameters

Description

Return Type
1

magentohost*1/rest/V1/mpapi/sellers/me

Request Type : GET

This is used to get self profile details

JSON

2

magentohost*1/rest/V1/mpapi/sellers/me/product

Request Type : GET

This is used to get self product details.

JSON

3

magentohost*1/rest/V1/mpapi/sellers/me/order

Request Type : GET

This is used to get self order details.

JSON

4

magentohost*1/rest/V1/mpapi/sellers/me/order/sales

Request Type : GET

This is used to get self order sales details.

JSON

5

magentohost*1/rest/V1/mpapi/sellers/me/order/:orderId/invoice

Request Type : POST

This is used to create invoice for seller order

JSON

6

magentohost*1/rest/V1/mpapi/sellers/me/order/:orderId/invoice

Request Type : POST

This is used to create invoice for seller order

JSON

7

magentohost*1/rest/V1/mpapi/sellers/me/order/:orderId/invoice

Request Type : POST

This is used to create invoice for seller order

JSON

8

magentohost*1/rest/V1/mpapi/sellers/me/order/:orderId/invoice

Request Type : GET

This is used to get invoice data.

JSON

9

magentohost*1/rest/V1/mpapi/sellers/me/order/:orderId/cancel

Request Type : POST

This is used to cancel the order.

JSON

10

magentohost*1/rest/V1/mpapi/sellers/me/order/:orderId/invoice/:invoiceId/creditmemo

Request Type : POST

Params: {

creditmemo <array> credit memo fields

example: array(

creditmemo => array(

items => array(

%itemIds1%=> array(qty => %itemQty1%),

%itemIds2%=>array(qty=>%itemQty2%…)

…),

shipping_amount => %shipping_amount%,

adjustment_positive => %adjustment_positive%,

adjustment_negative => %adjustment_negative%,

do_offline => %do_offline%

)

)

}

This is used to create credit memo for seller order.

JSON

11

magentohost*1/rest/V1/mpapi/sellers/me/order/:orderId/creditmemo/:creditmemoId

Request Type : GET

This is used to get credit memo details.

JSON

12

magentohost*1/rest/V1/mpapi/sellers/me/mailtoadmin

Request Type : POST

Params: query <string> message %query%,

subject <string> message subject %subject%

)

}

This is used to ask questions to admin.

JSON

13

magentohost*1/rest/V1/mpapi/sellers/me/mailtoseller

Request Type : POST

Params: {

customer_email <string> valid email %customer_email%,

customer_name <string> customer name %customer_name%,

product_id <int> product (optional) %product_id%,

query <string> message %query%,

subject <string> message subject %subject%

)

}

This is used to contact seller.

JSON

14

magentohost*1/rest/V1/mpapi/sellers/me/becomepartner

Request Type : POST

Params: {

shop_url <string> store identifier %shop_url%,

is_seller <int> 1 if want to be seller else 0 %is_seller%

)

}

This is used to request to become partner.

JSON

 

Guest User Accessible resources: no Authorization needed

S.No.

Methods & Parameters

Description

Return Type
1

magentohost*1/rest/V1/mpapi/marketplace

Request Type : GET

This returns Marketplace Landing Page details.

JSON
2

magentohost*1/rest/V1/mpapi/sellers

Request Type : POST

This is used to get all sellers list.

JSON
3

magentohost*1/rest/V1/mpapi/sellers/:id/reviews

Request Type : GET

This is used to get reviews of the seller.

JSON
4

magentohost*1/rest/V1/mpapi/sellers/:id/reviews

Request Type : POST

Params: {

feed_price <float> retings on price

feed_quality <float> retings on quality

feed_value <float> retings on value

feed_nickname <string> reviewer nick name

feed_summary <string> review summary

feed_review <string> review

buyer_emai <string> valid buyer email

buyer_id <int> buyer id

}

This is used to make seller review.

JSON
5

magentohost*1/rest/V1/mpapi/sellers/:review_id/review

Request Type : GET

This is used to get review details by review id.

JSON

note: *1 = magento host base url

For more information about Magento Web APIs you can check http://devdocs.magento.com/guides/v2.0/get-started/bk-get-started-api.html.

Admin Management – Access To Admin Level Resources

Admin has to go to System > Integration > Add New Integration. Here admin can add new integration.

integration

Here admin has to fill up all the information such as name, email, Callback URL and Identity link URL.

new-integration

Then admin has to select the resources which he wants to give access to the new admin member. Admin can select all the resources or he can choose some particular resources which he wants to give the access to the new admin member.

api

 

That’s all for Marketplace Web Services API For Magento2, if you still have any issue feel free to add a ticket and let us know your views to make the module better https://webkul.uvdesk.com/en/


Viewing all articles
Browse latest Browse all 5489

Trending Articles