Menu Close
    Searching for an experienced Magento 2 Development Company ?

    Marketplace Web Services API For Magento 2

    Marketplace Web Services API For Magento 2 is a multi-vendor Marketplace add-on which exposes 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).

    Please Note – This module is an add-on to Magento 2 Marketplace Module. To use this module you must have installed Webkul’s Magento 2 Marketplace Module first.

    Features

    • Standard REST API support found.
    • This module exposes several marketplace resources to web API including create/become sellers, get sellers list, invoice, credit memo, cancel seller orders, landing page data and many more.
    • Admin and customer level authentication for resources.
    • Search criteria for seller list and seller’s order.
    • The 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.
    • Added Graphql implementation feature as per suggested by Magento 2.3.

    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 back-end i.e. admin panel.

    Note: Click here to know more about how to search using REST API’s.

    Example:

    Search Criteria

    Where:

    • field is an attribute name.
    • value specifies the value to search for.
    • condition_type can be of the type – lt(less than), ltet(less than or equal). For more details check the above link for reference.

    Admin Api Calls : needs admin authorization

    1.Description: get all sellers data

    api resource : rest/V1/mpapi/admin/sellers
    method: GET
    response

    [
    {
    "status":"int",
    "totalRecords":"int",
    "items":[
    {
    "entity_id":"string",
    "is_seller":"string",
    "seller_id":"string",
    "payment_source":"string",
    "twitter_id":"string",
    "facebook_id":"string",
    "gplus_id":"string",
    "youtube_id":"string",
    "vimeo_id":"string",
    "instagram_id":"string",
    "pinterest_id":"string",
    "moleskine_id":"string",
    "tw_active":"string",
    "fb_active":"string",
    "gplus_active":"string",
    "youtube_active":"string",
    "vimeo_active":"string",
    "instagram_active":"string",
    "pinterest_active":"string",
    "moleskine_active":"string",
    "others_info":"string",
    "banner_pic":"string",
    "shop_url":"string",
    "shop_title":"string",
    "logo_pic":"string",
    "company_locality":"string",
    "country_pic":"string",
    "company_description":"string",
    "meta_keyword":"string",
    "meta_description":"string",
    "background_width":"string",
    "store_id":"string",
    "contact_number":"string",
    "return_policy":"string",
    "shipping_policy":"string",
    "created_at":"string",
    "updated_at":"string",
    "admin_notification":"string",
    "privacy_policy":"string",
    "allowed_categories":"string"
    }
    ]
    }
    ]

    2.Description: get seller by id

    api resource : rest/V1/mpapi/admin/sellers/:id
    method: GET
    response:

    [
    {
    "status":"int",
    "items":{
    "entity_id":"string",
    "is_seller":"string",
    "seller_id":"string",
    "payment_source":"string",
    "twitter_id":"string",
    "facebook_id":"string",
    "gplus_id":"string",
    "youtube_id":"string",
    "vimeo_id":"string",
    "instagram_id":"string",
    "pinterest_id":"string",
    "moleskine_id":"string",
    "tw_active":"string",
    "fb_active":"string",
    "gplus_active":"string",
    "youtube_active":"string",
    "vimeo_active":"string",
    "instagram_active":"string",
    "pinterest_active":"string",
    "moleskine_active":"string",
    "others_info":"string",
    "banner_pic":"string",
    "shop_url":"string",
    "shop_title":"string",
    "logo_pic":"string",
    "company_locality":"string",
    "country_pic":"string",
    "company_description":"string",
    "meta_keyword":"string",
    "meta_description":"string",
    "background_width":"string",
    "store_id":"string",
    "contact_number":"string",
    "return_policy":"string",
    "shipping_policy":"string",
    "created_at":"string",
    "updated_at":"string",
    "admin_notification":"string",
    "privacy_policy":"string",
    "allowed_categories":"string"
    }
    }
    ]

    3.Description: get sellers wise products

    api resource : rest/V1/mpapi/admin/sellers/:id/product
    method: GET
    response:

    [
    {
    "items":[
    {
    "name":"string",
    "type":"string",
    "sku":"string",
    "entity_id":"string",
    "mageproduct_id":"string",
    "adminassign":"string",
    "seller_id":"string",
    "store_id":"string",
    "status":"string",
    "created_at":"string",
    "updated_at":"string",
    "seller_pending_notification":"string",
    "admin_pending_notification":"string",
    "is_approved":"string"
    }
    ],
    "totalRecords":"int",
    "status":"int"
    }
    ]

    4.Description:Get seller wise orders

    api resource : rest/V1/mpapi/admin/sellers/:id/order
    method: GET
    response:

    [
    {
    "status":"int",
    "totalRecords":"int",
    "items":[
    {
    "entity_id":"string",
    "mageproduct_id":"string",
    "order_id":"string",
    "order_item_id":"string",
    "parent_item_id":"string",
    "magerealorder_id":"string",
    "magequantity":"string",
    "seller_id":"string",
    "trans_id":"string",
    "cpprostatus":"string",
    "paid_status":"string",
    "magebuyer_id":"string",
    "magepro_name":"string",
    "magepro_price":"string",
    "total_amount":"string",
    "total_tax":"string",
    "total_commission":"string",
    "actual_seller_amount":"string",
    "created_at":"string",
    "updated_at":"string",
    "is_shipping":"string",
    "is_coupon":"string",
    "is_paid":"string",
    "commission_rate":"string",
    "currency_rate":"string",
    "applied_coupon_amount":"string",
    "is_withdrawal_requested":"string"
    }
    ]
    }
    ]

    5.Description:Get seller wise sales details

    api resource : rest/V1/mpapi/admin/sellers/:id/order/sales
    method: GET
    response:

    [
    {
    "totalRecords":"int",
    "items":[
    {
    "entity_id":"string",
    "order_id":"string",
    "product_ids":"string",
    "seller_id":"string",
    "shipment_id":"string",
    "invoice_id":"string",
    "creditmemo_id":"string",
    "is_canceled":"string",
    "shipping_charges":"string",
    "carrier_name":"string",
    "tracking_number":"string",
    "created_at":"string",
    "updated_at":"string",
    "tax_to_seller":"string",
    "total_tax":"string",
    "coupon_amount":"string",
    "refunded_coupon_amount":"string",
    "refunded_shipping_charges":"string",
    "seller_pending_notification":"string",
    "order_status":"string"
    }
    ],
    "status":"int"
    }
    ]

    6.Description: Pay seller his amount after deducting commission

    api resource : rest/V1/mpapi/admin/sellers/:id/paytoseller
    method: POST
    response:

    [
    {
    "status":"int",
    "message":"string"
    }
    ]"post data":{
    "seller_pay_reason <string> <reason to pay>;
    "entity_id <int> order entity id"
    }
    ]

    7.Description: Assign product(s) to seller

    api resource : rest/V1/mpapi/admin/sellers/:sellerId/assign
    method: POST
    post data: {
    productIds <int> product(s) ids %productIds%
    }
    response

    [
    {
    "status":"int",
    "message":[
    "string"
    ]
    }
    ]

    8.Description:unassign product(s) to seller

    api resource : rest/V1/mpapi/admin/sellers/:sellerId/unassign
    method: POST
    post data: {
    productIds <int> product(s) ids %productIds%
    }
    response:

    [
    {
    "status":"int",
    "message":[
    "string"
    ]
    }
    ]


    Seller Api Calls: needs customer authorization

    9.Description:-Get self profile details

    api resource : rest/V1/mpapi/sellers/me
    method: GET
    response:

    [
    {
    "status":"int",
    "items":{
    "entity_id":"string",
    "is_seller":"string",
    "seller_id":"string",
    "payment_source":"string",
    "twitter_id":"string",
    "facebook_id":"string",
    "gplus_id":"string",
    "youtube_id":"string",
    "vimeo_id":"string",
    "instagram_id":"string",
    "pinterest_id":"string",
    "moleskine_id":"string",
    "tw_active":"string",
    "fb_active":"string",
    "gplus_active":"string",
    "youtube_active":"string",
    "vimeo_active":"string",
    "instagram_active":"string",
    "pinterest_active":"string",
    "moleskine_active":"string",
    "others_info":"string",
    "banner_pic":"string",
    "shop_url":"string",
    "shop_title":"string",
    "logo_pic":"string",
    "company_locality":"string",
    "country_pic":"string",
    "company_description":"string",
    "meta_keyword":"string",
    "meta_description":"string",
    "background_width":"string",
    "store_id":"string",
    "contact_number":"string",
    "return_policy":"string",
    "shipping_policy":"string",
    "created_at":"string",
    "updated_at":"string",
    "admin_notification":"string",
    "privacy_policy":"string",
    "allowed_categories":"string"
    }
    }
    ]

     

    10.Description:-Get self products details

    api resource : rest/V1/mpapi/sellers/me/product
    method: GET
    response:

    [
    {
    "items":[
    {
    "name":"string",
    "type":"string",
    "sku":"string",
    "entity_id":"string",
    "mageproduct_id":"string",
    "adminassign":"string",
    "seller_id":"string",
    "store_id":"string",
    "status":"string",
    "created_at":"string",
    "updated_at":"string",
    "seller_pending_notification":"string",
    "admin_pending_notification":"string",
    "is_approved":"string"
    }
    ],
    "totalRecords":"int",
    "status":"int"
    }
    ]

    11.Description:-Get self order details

    api resource : rest/V1/mpapi/sellers/me/order
    method: GET
    response:

    [
    {
    "status":"int",
    "totalRecords":"int",
    "items":[
    {
    "entity_id":"string",
    "mageproduct_id":"string",
    "order_id":"string",
    "order_item_id":"string",
    "parent_item_id":"string",
    "magerealorder_id":"string",
    "magequantity":"string",
    "seller_id":"string",
    "trans_id":"string",
    "cpprostatus":"string",
    "paid_status":"string",
    "magebuyer_id":"string",
    "magepro_name":"string",
    "magepro_price":"string",
    "total_amount":"string",
    "total_tax":"string",
    "total_commission":"string",
    "actual_seller_amount":"string",
    "created_at":"string",
    "updated_at":"string",
    "is_shipping":"string",
    "is_coupon":"string",
    "is_paid":"string",
    "commission_rate":"string",
    "currency_rate":"string",
    "applied_coupon_amount":"string",
    "is_withdrawal_requested":"string"
    }
    ]
    }
    ]

    12.Description:-Get self order sales details

    api resource : rest/V1/mpapi/sellers/me/order/sales
    method: GET
    response:

    [
    {
    "totalRecords":"int",
    "items":[
    {
    "entity_id":"string",
    "order_id":"string",
    "product_ids":"string",
    "seller_id":"string",
    "shipment_id":"string",
    "invoice_id":"string",
    "creditmemo_id":"string",
    "is_canceled":"string",
    "shipping_charges":"string",
    "carrier_name":"string",
    "tracking_number":"string",
    "created_at":"string",
    "updated_at":"string",
    "tax_to_seller":"string",
    "total_tax":"string",
    "coupon_amount":"string",
    "refunded_coupon_amount":"string",
    "refunded_shipping_charges":"string",
    "seller_pending_notification":"string",
    "order_status":"string"
    }
    ],
    "status":"int"
    }
    ]

    13.Description:-Create invoice for seller order

    api resource : rest/V1/mpapi/sellers/me/order/:orderId/invoice
    method: POST
    response:

    [
    {
    "status":"int",
    "message":"string",
    "invoice_id":"int"
    }
    ]

    14.Description:-Get invoice data

    api resource : rest/V1/mpapi/sellers/me/order/:orderId/invoice/:invoiceId
    method: GET
    response:

    [
    {
    "mainHeading":"string",
    "sendmailAction":"string",
    "sendmailWarning":"string",
    "subHeading":"string",
    "orderData":{
    "title":"string",
    "label":"string",
    "statusLabel":"string",
    "statusValue":"string",
    "dateLabel":"string",
    "dateValue":"string"
    },
    "buyerData":{
    "title":"string",
    "nameLabel":"string",
    "nameValue":"string",
    "emailLabel":"string",
    "emailValue":"string"
    },
    "shippingAddressData":{
    "title":"string",
    "address":[
    {
    "name":"string",
    "street":"string",
    "state":"string",
    "country":"string",
    "telephone":"string"
    }
    ]
    },
    "shippingMethodData":{
    "title":"string",
    "method":"string"
    },
    "billingAddressData":{
    "title":"string",
    "address":[
    {
    "name":"string",
    "street":"string",
    "state":"string",
    "country":"string",
    "telephone":"string"
    }
    ]
    },
    "paymentMethodData":{
    "title":"string",
    "method":"string"
    },
    "items":[
    {
    "productName":"string",
    "price":"string",
    "qty":{
    "Ordered":"int",
    "Invoiced":"int",
    "Shipped":"int",
    "Canceled":"int",
    "Refunded":"int"
    },
    "subTotal":"string",
    "adminComission":"string",
    "vendorTotal":"string"
    }
    ],
    "subtotal":{
    "title":"string",
    "value":"string"
    },
    "shipping":{
    "title":"string",
    "value":"string"
    },
    "tax":{
    "title":"string",
    "value":"string"
    },
    "totalOrderedAmount":{
    "title":"string",
    "value":"string"
    },
    "totalVendorAmount":{
    "title":"string",
    "value":"string"
    },
    "totalAdminComission":{
    "title":"string",
    "value":"string"
    },
    "status":"int"
    }
    ]

    15.Description:-Get invoice data:-Cancel the order

    api resource : rest/V1/mpapi/sellers/me/order/:orderId/cancel
    method: POST
    response:

    [
    {
    "status":"int",
    "message":"string"
    }
    ]

    16.Description:-Get invoice data:-Create credit memo for seller order

    api resource : rest/V1/mpapi/sellers/me/order/:orderId/invoice/:invoiceId/creditmemo
    method: POST
    response:

    [
    {
    "id":"int",
    "status":"int",
    "message":"string"
    }
    ]"post data":{
    "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%
    )
    )"
    }
    ]

    17.Description:-Create credit memo for seller order

    api resource : rest/V1/mpapi/sellers/me/order/:orderId/creditmemo/:creditmemoId
    method: GET
    response:

    [
    {
    "mainHeading":"string",
    "sendmailAction":"string",
    "sendmailWarning":"string",
    "subHeading":"string",
    "orderData":{
    "title":"string",
    "label":"string",
    "statusLabel":"string",
    "statusValue":"string",
    "dateLabel":"string",
    "dateValue":"string"
    },
    "buyerData":{
    "title":"string",
    "nameLabel":"string",
    "nameValue":"string",
    "emailLabel":"string",
    "emailValue":"string"
    },
    "shippingAddressData":{
    "title":"string",
    "address":[
    {
    "name":"string",
    "street":"string",
    "state":"string",
    "country":"string",
    "telephone":"string"
    }
    ]
    },
    "shippingMethodData":{
    "title":"string",
    "method":"string"
    },
    "billingAddressData":{
    "title":"string",
    "address":[
    {
    "name":"string",
    "street":"string",
    "state":"string",
    "country":"string",
    "telephone":"string"
    }
    ]
    },
    "paymentMethodData":{
    "title":"string",
    "method":"string"
    },
    "items":[
    {
    "productName":"string",
    "price":"string",
    "qty":{
    "Ordered":"int",
    "Invoiced":"int",
    "Shipped":"int",
    "Canceled":"int",
    "Refunded":"int"
    },
    "subTotal":"string",
    "adminComission":"string",
    "vendorTotal":"string"
    }
    ],
    "subtotal":{
    "title":"string",
    "value":"string"
    },
    "shipping":{
    "title":"string",
    "value":"string"
    },
    "tax":{
    "title":"string",
    "value":"string"
    },
    "totalOrderedAmount":{
    "title":"string",
    "value":"string"
    },
    "totalVendorAmount":{
    "title":"string",
    "value":"string"
    },
    "totalAdminComission":{
    "title":"string",
    "value":"string"
    },
    "status":"int"
    }
    ]

    18.Description:- Ask questions to admin

    api resource : rest/V1/mpapi/sellers/me/mailtoadmin
    method: POST
    response:

    [
    {
    "status":"int",
    "message":"string"
    }
    ]"post data":{
    "query <string> message %query%",
    "subject <string> message subject %subject%"
    }

    19.Description:- Contact seller

    api resource : rest/V1/mpapi/sellers/me/mailtoseller
    method: POST
    response:

    {
    "status":"int",
    "message":"string"
    }
    ]"post data":{
    "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%"
    }

    20.Description:- Request to become partner

    api resource : rest/V1/mpapi/sellers/me/becomepartner
    method: POST
    post data: {
    shop_url <string> store identifier %shop_url%,
    is_seller <int> 1 if want to be seller else 0 %is_seller%
    }
    response:

    [
    {
    "status":"int",
    "message":"string"
    }
    ]

    21.Description:- Request to create shipment

    api resource : rest/V1/mpapi/sellers/me/order/:orderId/ship
    method: POST
    post data: {
    tracking_number <string> tracking number of the shipment %tracking_number%,
    carrier <string> name of the shipiing carrier %carrier%
    }
    response:

    [
    {
    "status":"int",
    "message":"string"
    }
    ]

    22.Description:- Get shipment details

    api resource : rest/V1/mpapi/sellers/me/order/:orderId/ship/:shipmentId
    method: GET
    response:

    [
    {
    "mainHeading":"string",
    "sendmailAction":"string",
    "sendmailWarning":"string",
    "subHeading":"string",
    "orderData":{
    "title":"string",
    "label":"string",
    "statusLabel":"string",
    "statusValue":"string",
    "dateLabel":"string",
    "dateValue":"string"
    },
    "buyerData":{
    "title":"string",
    "nameLabel":"string",
    "nameValue":"string",
    "emailLabel":"string",
    "emailValue":"string"
    },
    "shippingAddressData":{
    "title":"string",
    "address":[
    {
    "name":"string",
    "street":"string",
    "state":"string",
    "country":"string",
    "telephone":"string"
    }
    ]
    },
    "shippingMethodData":{
    "title":"string",
    "method":"string"
    },
    "billingAddressData":{
    "title":"string",
    "address":[
    {
    "name":"string",
    "street":"string",
    "state":"string",
    "country":"string",
    "telephone":"string"
    }
    ]
    },
    "paymentMethodData":{
    "title":"string",
    "method":"string"
    },
    "shippingCarriers":[
    {
    "carrier":"string",
    "title":"string",
    "number":"string"
    }
    ],
    "items":[
    {
    "productName":"string",
    "sku":"string",
    "qty":"int"
    }
    ],
    "status":"int"
    }
    ]

    23.Description:- request to create seller product

    api resource : rest/V1/mpapi/sellers/me/addproduct
    method: POST
    post data:

    {
    product <array> product fields
    example: array(
    product: array(
    entity_id: <int> product id in case of edit (optional) %entity_id%,
    sku: <string> product sku %sku%,
    name: <string> product name %name%,
    attribute_set_id: <int> product attribute set id %attribute_set_id%,
    price: <int> product price %price%,
    status: <int> product status %status%,
    visibility: <int> product visibility %visibility%,
    type_id: <string> product type %type_id%,
    category_ids: array(
    <int> category id %category_id%,

    ),
    weight: <int> product weight %weight%,
    product_has_weight: <int> whether product has weight or not %product_has_weight%,
    description: <string> product description %description%,
    quantity_and_stock_status: array(
    is_in_stock: <int> product is in stock or not %is_in_stock%,
    qty: <int> product quantity %qty%
    ),
    options: (optional) array(
    array(
    option_id: (optional) <int> option id %option_id%,
    is_require: <int> whether the option is required or not %is_require%,
    title: <string> title of the option %title%,
    type: <string> type of the option e.g. text or drop_down %type%,
    sort_order: <int> sort order of the option %sort_order%,
    sku: <string> option sku %sku%,
    values: array(
    array(
    title: <string> title of the option value %title%,
    price: <int> price of the option value %price%,
    price_type: <string> price type of the option value e.g. fixed or percent %price_type%,
    sku: <string> sku of the option value %sku%,
    sort_order: <int> sort order of the option value %sort_order%
    )
    )
    )
    ),
    product_gallery: (optional) array(
    <string> url of the product image %image_url%,

    )
    )
    )
    }
    response:

    [
    {
    "status":"int",
    "message":"string"
    }
    ]

    Guest User Accessible resources: no authorization needed

    24.Description:-Returns marketplace landing page details

    api resource : rest/V1/mpapi/marketplace
    method: GET
    response:

    [
    {
    "icons":[
    {
    "image":"string",
    "label":"string"
    }
    ],
    "labels":[
    {
    "label":"string"
    }
    ],
    "aboutImage":"string
    bannerImage":"string",
    "banner":[
    {
    "label":"string",
    "content":"string"
    }
    ],
    "sellers":[
    {
    "products":[
    {
    "id":"string",
    "name":"string",
    "type":"string",
    "thumbnail":"string"
    }
    ],
    "shopTitle":"string",
    "profileurl":"string",
    "sellerIcon":"string",
    "sellerProductCount":"int"
    }
    ]
    }
    ]

    25.Description:-Get all sellers list

    api resource : rest/V1/mpapi/sellers
    method: GET
    response:

    [
    {
    "status":"int",
    "totalRecords":"int",
    "items":[
    {
    "entity_id":"string",
    "is_seller":"string",
    "seller_id":"string",
    "payment_source":"string",
    "twitter_id":"string",
    "facebook_id":"string",
    "gplus_id":"string",
    "youtube_id":"string",
    "vimeo_id":"string",
    "instagram_id":"string",
    "pinterest_id":"string",
    "moleskine_id":"string",
    "tw_active":"string",
    "fb_active":"string",
    "gplus_active":"string",
    "youtube_active":"string",
    "vimeo_active":"string",
    "instagram_active":"string",
    "pinterest_active":"string",
    "moleskine_active":"string",
    "others_info":"string",
    "banner_pic":"string",
    "shop_url":"string",
    "shop_title":"string",
    "logo_pic":"string",
    "company_locality":"string",
    "country_pic":"string",
    "company_description":"string",
    "meta_keyword":"string",
    "meta_description":"string",
    "background_width":"string",
    "store_id":"string",
    "contact_number":"string",
    "return_policy":"string",
    "shipping_policy":"string",
    "created_at":"string",
    "updated_at":"string",
    "admin_notification":"string",
    "privacy_policy":"string",
    "allowed_categories":"string"
    }
    ]
    }
    ]

    26.Description:-Get reviews of the seller.

    api resource : rest/V1/mpapi/sellers/:id/reviews
    method: GET
    response:

    [
    {
    "status":"int",
    "totalRecords":"int",
    "items":[
    {
    "entity_id":"string",
    "seller_id":"string",
    "buyer_id":"string",
    "buyer_email":"string",
    "status":"string",
    "feed_price":"string",
    "feed_value":"string",
    "feed_quality":"string",
    "feed_nickname":"string",
    "feed_summary":"string",
    "feed_review":"string",
    "created_at":"string",
    "updated_at":"string",
    "seller_pending_notification":"string",
    "admin_notification":"string"
    }
    ]
    }
    ]

    27.Description:- Make seller review

    api resource : rest/V1/mpapi/sellers/:id/reviews
    method: POST
    post data: {
    feed_price <int> retings on price
    feed_quality <int> retings on quality
    feed_value <int> 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
    }
    Note: The value of feed_price, feed_quality and feed_value is any one from 20, 40, 60, 80 and 100
    20 – 1 star
    40 – 2 star
    60 – 3 star
    80 – 4 star
    100 – 5 star
    response:

    [
    {
    "status":"int",
    "message":"string",
    "review_id":"int"
    }
    ]

    28.Description:- Get review details by review id

    api resource : rest/V1/mpapi/sellers/:review_id/review
    method: GET
    response:

    [
    {
    "status":"int",
    "totalRecords":"int",
    "items":{
    "entity_id":"string",
    "seller_id":"string",
    "buyer_id":"string",
    "buyer_email":"string",
    "status":"string",
    "feed_price":"string",
    "feed_value":"string",
    "feed_quality":"string",
    "feed_nickname":"string",
    "feed_summary":"string",
    "feed_review":"string",
    "created_at":"string",
    "updated_at":"string",
    "seller_pending_notification":"string",
    "admin_notification":"string"
    }
    }
    ]

    Seller Create Api Calls : authorization needed

    29.Description:-request to create seller

    api resource : rest/V1/mpapi/sellers/create
    method: post
    post data:
    {
    customer: {
    email: <string> seller email,
    firstname: <string> seller firstname,
    lastname: <string> seller lastname,
    storeId: <int> store Id,
    websiteId: <int> website Id
    },
    is_seller: <int> 1 for customer aggreed to become seller,
    profileurl: <string> shop url of seller,
    password: <string> password for seller profile,
    registered: <int> 0/1 0->new registration 1->already registered now becoming seller
    }
    response:

    [
    {
    "status":"int",
    "message":"string",
    "id":"string",
    "group_id":"string",
    "default_billing":"string",
    "default_shipping":"string",
    "confirmation":"string",
    "created_at":"string",
    "updated_at":"string",
    "created_in":"string",
    "dob":"string",
    "email":"string",
    "firstname":"string",
    "lastname":"string",
    "middlename":"string",
    "prefix":"string",
    "suffix":"string",
    "gender":"string",
    "store_id":"string",
    "taxvat":"string",
    "website_id":"string",
    "disable_auto_group_change":"string",
    "is_seller":"string",
    "profileurl":"string"
    }
    ]

    Graphql Implementation

    Graphql is a traditional way to expose the data in a more declarative format, basically it is a query language for the API and it has an only single API endpoint that will serve all your data request needs, however, you have to pre-explained all the data that the server can present in a GraphQL schema.

    In additional Graphql allows the client to simplify what exactly data structure they want from the server and helps to resolve the over-fetching or under-fetching of data.

    Graphql introduced in Magento 2.3.0 having Hierarchical, Introspective nature that gives explanatory error information before executing a query.

    How to Use – Graphql

    To add Graphql implementation in Marketplace Web Services API For Magento 2 have to follow below steps

    Step 1 – A client may get your GraphQL query response by installing chrome extension ChromeiQL.

    Note – In order to get more information about GraphQl implementation in Magento2 refer this link or you may read previous blog How to use GraphQL in php.

    Step 2 – To manage all predefined or custom GraphQL queries in Marketplace Web Services API For Magento 2 you have to set endpoint.

    API Resource : magentohost*1/graphql

    Step 3 -Once you have set endpoint you will get all Preset API list under docs->> document explorer->>query section (from the right side of the ChromeiQL extension)

    Step 4 – To access the specific data you need to type queries into left side of the screen, let’s consider an example for marketplaceLangingPage:

    After entering the query you have to hit the “play” button then you will see it returns accurate query of of the marketpalce landing page, you could look given screenshot for further reference.

    Graphql API query

    Now you will get back exactly structured API data and descriptive error message which you wish to display, nothing more and nothing less in form of type and field.

    Guest User Accessible resources: no authorization needed
    api resource : graphql

    1.Description: To get marketplace landing page details
    query {
    marketplaceLangingPage {
    banner {
    label
    content
    }
    bannerImage
    aboutImage
    labels {
    label
    }
    icons {
    image
    label
    }
    sellers {
    products {
    id
    name
    type
    thumbnail
    }
    shopTitle
    profileurl
    sellerIcon
    sellerProductCount
    }
    }
    }
    response:

    "json"

    2.Description: Get all sellers list
    query {
    sellersList(
    filter:{
    <field name to filter data>: {
    <condition>: <value>
    }
    }
    ) {
    totalRecords
    items {
    entity_id
    is_seller
    seller_id
    payment_source
    twitter_id
    facebook_id
    gplus_id
    youtube_id
    vimeo_id
    instagram_id
    pinterest_id
    moleskine_id
    tw_active
    fb_active
    gplus_active
    youtube_active
    vimeo_active
    instagram_active
    pinterest_active
    moleskine_active
    others_info
    banner_pic
    shop_url
    shop_title
    logo_pic
    company_locality
    country_pic
    company_description
    meta_keyword
    meta_description
    background_width
    store_id
    contact_number
    return_policy
    shipping_policy
    created_at
    updated_at
    admin_notification
    privacy_policy
    allowed_categories
    }
    }
    }
    response

    "json"

    3. Description: Get reviews of the seller
    query {
    getSellerReview(id: <Seller Id>) {
    totalRecords
    items {
    entity_id
    seller_id
    buyer_id
    buyer_email
    status
    feed_price
    feed_value
    feed_quality
    feed_nickname
    feed_summary
    feed_review
    created_at
    updated_at
    seller_pending_notification
    admin_notification
    }
    }
    }
    response:

    "json"

    4.Description: Get review details by review id
    query {
    getSellerReviewDetails(id: <review id>) {
    totalRecords
    items {
    entity_id
    seller_id
    buyer_id
    buyer_email
    status
    feed_price
    feed_value
    feed_quality
    feed_nickname
    feed_summary
    feed_review
    created_at
    updated_at
    seller_pending_notification
    admin_notification
    }
    }
    }
    response:

    "json"

    Seller Api Calls: needs customer authorization
    api resource : graphql

    5. Description: Get self profile details
    query {
    sellerSelf {
    entity_id
    is_seller
    seller_id
    payment_source
    twitter_id
    facebook_id
    gplus_id
    youtube_id
    vimeo_id
    instagram_id
    pinterest_id
    moleskine_id
    tw_active
    fb_active
    gplus_active
    youtube_active
    vimeo_active
    instagram_active
    pinterest_active
    moleskine_active
    others_info
    banner_pic
    shop_url
    shop_title
    logo_pic
    company_locality
    country_pic
    company_description
    meta_keyword
    meta_description
    background_width
    store_id
    contact_number
    return_policy
    shipping_policy
    created_at
    updated_at
    admin_notification
    privacy_policy
    allowed_categories
    status
    }
    }
    response:

     "json"

    6.Description: Get self products details
    query {
    sellerSelfProduct {
    totalRecords
    items {
    entity_id
    mageproduct_id
    adminassign
    seller_id
    store_id
    status
    created_at
    updated_at
    seller_pending_notification
    admin_pending_notification
    is_approved
    }
    }
    }
    response:

    "json"

    7.Description: Get self order details
    query {
    sellerOrderList(filter: {
    <field to filter>: {
    <filter type>: <order id>
    }
    }) {
    totalRecords
    items {
    entity_id
    mageproduct_id
    order_id
    order_item_id
    parent_item_id
    magerealorder_id
    magequantity
    seller_id
    trans_id
    cpprostatus
    paid_status
    magebuyer_id
    magepro_name
    magepro_price
    total_amount
    total_tax
    total_commission
    actual_seller_amount
    created_at
    updated_at
    is_shipping
    is_coupon
    is_paid
    commission_rate
    currency_rate
    applied_coupon_amount
    is_withdrawal_requested
    }
    }
    }
    response:

    "json"

    8.Description: Get self order sales details
    query {
    sellerOrderSales {
    totalRecords
    items {
    entity_id
    order_id
    product_ids
    seller_id
    shipment_id
    invoice_id
    creditmemo_id
    is_canceled
    shipping_charges
    carrier_name
    tracking_number
    created_at
    updated_at
    tax_to_seller
    total_tax
    coupon_amount
    refunded_coupon_amount
    refunded_shipping_charges
    seller_pending_notification
    order_status
    }
    }
    }
    response:

    "json"

    9. Description: Create invoice for seller order
    query {
    sellerCreateInvoice(orderid: <order id>) {
    message
    }
    }
    response:

    "json"

    10. Get invoice data
    query {
    sellerGetInvoiceDetails(orderid: <order id>, invoiceid: <invoice id>) {
    mainHeading
    sendmailAction
    sendmailWarning
    subHeading
    orderData {
    title
    label
    statusLabel
    statusValue
    dateLabel
    dateValue
    }
    buyerData {
    title
    nameLabel
    nameValue
    emailLabel
    emailValue
    }
    shippingAddressData {
    title
    address {
    name
    street
    state
    country
    telephone
    }
    }
    shippingMethodData {
    title
    method
    }
    billingAddressData {
    title
    address {
    name
    street
    state
    country
    telephone
    }
    }
    paymentMethodData {
    title
    method
    }
    items {
    productName
    price
    qty {
    Ordered
    Invoiced
    Shipped
    Canceled
    Refunded
    }
    subTotal
    adminComission
    vendorTotal
    }
    subtotal {
    title
    value
    }
    shipping {
    title
    value
    }
    tax {
    title
    value
    }
    totalOrderedAmount {
    title
    value
    }
    totalVendorAmount {
    title
    value
    }
    totalAdminComission {
    title
    value
    }
    }
    }
    response:

    "json"

    11. Description: Cancel the order
    query {
    sellerCancelOrder(orderid: <order_id>) {
    message
    }
    }
    response:

    "json" 

    12. Create credit memo for seller order
    query {
    sellerCreateCreditmemo(
    orderid: <order id>,
    invoiceid: <invoice id>,
    creditmemo: {
    shipping_amount: <shipping amount>
    adjustment_positive: <adjustment positive>
    adjustment_negative: <adjustment negative>
    do_offline: <1 for true>
    items: {
    itemid: <order item id>
    qty: <item quantity>
    }
    }
    ) {
    id
    message
    }
    }
    response:

    "json"

    13. Description: Get credit memo details
    query {
    sellerGetCreditmemoDetails(
    orderid: <order id>,
    creditmemoid: <creditmemo id>
    ) {
    mainHeading
    sendmailAction
    sendmailWarning
    subHeading
    orderData {
    title
    label
    statusLabel
    statusValue
    dateLabel
    dateValue
    }
    buyerData {
    title
    nameLabel
    nameValue
    emailLabel
    emailValue
    }
    shippingAddressData {
    title
    address {
    name
    street
    state
    country
    telephone
    }
    }
    shippingMethodData {
    title
    method
    }
    billingAddressData {
    title
    address {
    name
    street
    state
    country
    telephone
    }
    }
    paymentMethodData {
    title
    method
    }
    items {
    productName
    price
    qty {
    Ordered
    Invoiced
    Shipped
    Canceled
    Refunded
    }
    subTotal
    adminComission
    vendorTotal
    }
    subtotal {
    title
    value
    }
    shipping {
    title
    value
    }
    tax {
    title
    value
    }
    totalOrderedAmount {
    title
    value
    }
    totalVendorAmount {
    title
    value
    }
    totalAdminComission {
    title
    value
    }
    }
    }
    response:

    "json"

    14. Description: Ask questions to admin
    query {
    sellerMailToAdmin(
    query: <query data>,
    subject: <subject data>
    ) {
    message
    }
    }
    response:

    "json" 

    15. Description: Contact seller
    query {
    sellerMailToSeller(
    customer_name: <customer name>,
    customer_email: <customer email>,
    productid: <product id>
    query: <customer query>,
    subject: <query subject>
    ) {
    message
    }
    }
    response:

    "json"

    16.Description: Request to become partner
    query {
    sellerBecomePartner(
    shop_url: <shop url>,
    is_seller: <if want to be seller or not – 1 or 0>
    ) {
    message
    }
    }
    response:

     "json"

    17.Description: Request to create shipment
    query {
    sellerCreateShipment(
    orderid: <order id>,
    tracking_number: <tracking number>,
    carrier: <carrier name>
    ) {
    message
    }
    }
    response:

    "json"

    18.Description: Get shipment details
    query {
    sellerGetShipmentDetails(
    orderid: <order id>,
    shipmentid: <shipment id>
    ) {
    mainHeading
    sendmailAction
    sendmailWarning
    subHeading
    orderData {
    dateLabel
    dateValue
    label
    statusLabel
    statusValue
    title
    }
    buyerData {
    emailLabel
    emailValue
    nameLabel
    nameValue
    title
    }
    shippingAddressData {
    title
    address {
    country
    name
    state
    street
    telephone
    }
    }
    shippingMethodData {
    method
    title
    }
    billingAddressData {
    title
    address {
    country
    name
    state
    street
    telephone
    }
    }
    paymentMethodData {
    method
    title
    }
    shippingCarriers {
    carrier
    number
    title
    }
    items {
    productName
    qty
    sku
    }
    }
    }
    response:

    "json"

    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 has to go to System > Integration > Add New Integration. Here admin can add a 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 can choose some particular resources which the admin wants to give access to the new admin member.

    api

    That’s all for Marketplace Web Services API For Magento 2, if you still have any issue feel free to add a ticket and let us know your views to make the module bet

    Current Product Version - 5.0.1

    Supported Framework Version - Magento 2.0.x, 2.1.x, 2.2.x,2.3.x, 2.4.x

    . . .
    Discuss on Helpdesk

    Leave a Comment

    Your email address will not be published. Required fields are marked*


    17 comments

  • vrushank
    what is this addon used for can you give some example to understand more
    • Zeba Hakim (Moderator)
      Hello There,
      This is an addon for performing mp actions through API from the other website/app. To specify the APIs can be used for- ERP, Mobile application (iOS, Windows, etc).

      Thanks and Regards.

  • Subhangi (Moderator)
    Hello Shubham,
    Can you please share the snapshot of the same. So that we can look into it.
    Further, you can email your query at [email protected] so that we can assist you better. Thanks
  • Yongqi Sun
    Is it possible to create products or change attributes by a seller?
    • Subhangi (Moderator)
      Hello,
      No, currently this is not possible with the help of this module. If you want the same then you can contact us at [email protected].
  • Ajith
    I can find duplicate seller profiles in marketplace. And this api sends all the seller profiles. So, how can I identify which are the real profiles ?
    • Rajat Singh (Moderator)
      Hi Ajith,
      In Marketplace, there is nothing like real sellers. Either they are sellers or not. So when API is called for seller information then the information of all the sellers is returned. For more information, you can email us at [email protected]. Thanks.
  • Lomesh
    Where is seller login account API..?
    • Subhangi (Moderator)
      Hello Lomesh,
      The seller login account API is not available in this module. If you want the same then we can develop it through customization.
      Kindly email your requirements at [email protected] for better assistance. Thank You
  • Peter s
    where is seller account registration API
    • Suraj Kumar (Moderator)
      Hi Peter, seller account registration API is not included in this module. Further, we can customize the same. Please email your requirements at [email protected] so that we can assist you better. Thanks
      • Aman
        Well this is weird, this entire module is dedicated API package for for multi vendor marketplace module. Still you guys haven’t provided all the endpoints for the modules present in it. At lest we need exact same data on API that the module is providing on the web.
        • Suraj Kumar (Moderator)
          Hello There,

          Please contact us at [email protected] if you are looking for the API of a feature that is currently not available.

          Thanks

          • Lucas
            Hi
            I can create a seller, but i cant edit ?
            it does not make any sense, would you have any sugestion to edit a seller info like “company_description” ?
          • Suraj Kumar (Moderator)
            Hello There,

            In the current module, the seller account registration API is not included. And you can not edit details of a seller as well. Please contact us at [email protected] to assist you better.

            Thanks

          • Aman
            Suraj, many features are available but the documentations is not as user friendly. In any API documentation. There must be 1 example with request and response data in JSON format for all the endpoints. I’ve bought it, so I know the support guy will help me. But it would save a lot of time on both end if we had that.
          • Suraj Kumar (Moderator)
            Hello There,

            Thanks for the recommendation. We will forward the same to the concerned team. The respective team will proceed further accordingly.

            Thanks

  • Back to Top