Menu Close
    Hire us Request quote Reading list Switch to dark mode

    Opencart Marketplace Web Services API

    Opencart Marketplace Web Services API Module will provide REST API by which you can use functions of Opencart Marketplace in other applications like mobile applications and ERP. It will allow the developer to implement many functionalities of Opencart Marketplace like seller dashboard, seller orders etc to another platform like Android and iOS. After implementing the API of Opencart Marketplace, the store owner can manage their store from other applications.

    Since it’s an add-on for the Marketplace Module, so marketplace module must be installed before installing the Opencart Marketplace Web Services API.

    Features

    • Easy to customize the module.
    • This module uses standard Opencart API key.
    • Opencart marketplace functions included seller-profile, seller-order, seller dashboard, write review, add history, sell page and contact seller.
    • To get the seller’s product list.
    • To delete the seller’s products.
    • To get the seller’s list.

    Installation

    The admin can find the catalog folder in the zip file. The admin needs to move catalog folder into the root directory of your opencart website.

    How To Generate API Key

    The admin can add a new API by navigating through System=>API. 

    After clicking on add new API button, the admin can set the name of API and can generate API key.  The admin can also set the IP addresses and can see the session from here.

    After generating the API key, the admin can use this key for their application or software.

    How To Use – REST API

    After the configuration of the Opencart Marketplace web services API, the admin needs to follow the given instructions.

    Admin Level Operations:

    S.no API URL and parameters Return type
    1 API URL: siteurl/index.php?route=api/wkrestapi/marketplace/apiLogin

    Parameter: apiKey, customer_id

    Request Type: POST

    Description: To authenticate the user. If the login is successfully done then you will get the wk_token in response that will be used to call the rest of the APIs.

    JSON
    2 API URL: siteurl/index.php?route=api/wkrestapi/marketplace/getSellerProfile

    Parameters: wk_token, id(seller_id), width(optional), sort(optional), order(optional), page(optional), limit(optional)

    Request Type: POST

    Params : array()

    Description: To get the seller profile details.

    JSON
    3 API URL: siteurl/index.php?route=api/wkrestapi/marketplace/getSellerOrders

    Parameters: wk_token, id(order_id)

    Request Type: POST

    Description: To get the seller orders.

    JSON
    4 API URL: siteurl/index.php?route=api/wkrestapi/marketplace/getDashbordData

    Parameters: wk_token

    Request Type: POST

    Description: To get the seller dashboard data.

    JSON
    5 API URL: siteurl/index.php?route=api/wkrestapi/marketplace/addHistory

    Parameters: wk_token, order_id, order_status_id, notifyadmin, comment

    Request Type: POST

    Description: To add the order history.

    JSON
    6 API URL: siteUrl/index.php?route=api/wkrestapi/marketplace2/productList

    Parameters:wk_token, filter_name, filter_model, filter_price, filter_quantity, filter_status, sort, order, page, limit, width

    Request Type: POST

    Description: To get the seller’s product list.

    JSON
    7 API URL: siteUrl/index.php?route=api/wkrestapi/marketplace2/deleteProduct

    Parameters: wk_token, product_id

    Request Type: POST

    Description: To delete seller’s products.

    JSON
    8 API URL: siteUrl/index.php?route=api/wkrestapi/marketplace2/getSellers

    Parameters:wk_token, page, limit, width

    Request Type: POST

    Description: To get all the sellers on Sell Page.

    Customer Level Operations:

    S.no

    Methods and parameters

    Return type

    1

    API URL: siteurl/index.php?route=api/wkrestapi/marketplace/writeReview

    Parameters: wk_token, seller_id, name, text, quality_rating, price_rating, value_rating

    Request Type: POST

    Description: To write the review for the seller

    JSON

    2

    API URL: siteurl/index.php?route=api/wkrestapi/marketplace/contactSeller

    Parameters: wk_token, seller_id, subject, message

    Request Type: POST

    Description: To contact the seller. Mail will be sent to seller and admin according to the marketplace settings.

    JSON

    3

    API URL: siteurl/index.php?route=api/wkrestapi/marketplace/getSellData

    Parameters: wk_token, width(optional)

    Request Type: POST

    Description: To get the marketplace sell page data.

    JSON

    To Get Seller Profile Details

    The Opencart seller profile looks like as shown in the image below. The profile of the same seller may be viewed through mobile app with the help of API Key usage.

    You can access the API URL: siteurl/index.php?route=api/wkrestapi/marketplace/getSellerProfile to view the seller profile.

    Under seller John Doe’s profile information, the user can see different tabs which include- “Profile tab”, “About Store tab”, “Collection tab”, “Reviews tab”, “Product Reviews tab”,  which display various information details that the user might want to know about the seller.

    The ratings and the contact details of the seller may be visible under the seller profile. The same information shall be displayed when the same seller’s profile in the OpenCart mobile app. 

    The image below displays the profile of seller John Doe. This profile has been displayed through the mobile app using the API key-siteurl/index.php?route=api/wkrestapi/marketplace/getSellerProfile 

    The parameters- wk_token, id(seller_id), width(optional), sort(optional), order(optional), page(optional), limit(optional) are used to trigger the API key to display Seller Profile on the opencart mobile app.

    The user can see that the mobile screen displays the seller, John Doe. The seller’s profile detail is visible to the user.

    Under the profile details, the user can see “Average Ratings” for John Doe. These ratings help the seller to gain goodwill amongst the sellers.

    Under “Make a Review”, four tabs are visible which are -“About tab”, “What’s New”, “Review”, “Policies”.The “What’s New” tab is similar to the “Collection tab” of the Opencart Marketplace Seller Panel. The user can simply access the seller panel through the mobile app.

    To Get The Seller Dashboard Data 

    The image below displays the dashboard of a seller. The customer can easily view the details of a seller under his dashboard. The same seller profile can be displayed using the API key.

    A specific API key URL-  siteurl/index.php?route=api/wkrestapi/marketplace/getDashbordDataRequest. The Parameters: wk_token is triggered to view the seller dashboard data on an opencart mobile app.

    The seller dashboard displays the “Total Orders”, “Total Sales”, “Total Buyers” under the seller profile. The Navigation menu displays the “My Profile”, “Dashboard”, “Order History”, “Transactions”, “Reward Points”, “Recurring Payments”, etc.

    The “Order Completed”, “Order Processing” and “Order Canceled” are displayed using meter graphics.

    The images show the dashboard of a seller which is displayed through the opencart mobile app. The API key which is used to display the seller dashboard data on the mobile app is  siteurl/index.php?route=api/wkrestapi/marketplace/getDashbordDataRequest using the Parameters: wk_token.

    The dashboard displays the “Total Orders”, “Total Sales”, “Total Buyers”. The Sales Statistics tab showing the orders and customers analysis are also visible to the user. The “Your Income Tab”, “World Map”, “Latest Order” tabs are visible at the mobile app page.

    As it is very difficult to carry the desktop or laptop everywhere, the opencart mobile app is very useful for the users as they can access the app anytime and anywhere.

    To Write Review For The Seller

    The image below displays the Seller John Doe’s Reviews Page. To display the review page for the seller on the opencart mobile app, the API URL- siteurl/index.php?route=api/wkrestapi/marketplace/writeReview.

    The parameters used for triggering the API to write the review for the seller are -: wk_token, seller_id, name, text, quality_rating, price_rating, value_rating.

    The seller can enable or disable the reviews. If the seller does not find any review useful for the product, he can disable the review for the product.

    Using the API URL- siteurl/index.php?route=api/wkrestapi/marketplace/writeReview, the review page for any product of the seller can be viewed using the opencart mobile app. The image below displays the opencart mobile app displaying the reviews for the seller.

    Before the user purchases the product, he may tend to view the reviews as they play an important role in helping the user decide if he should purchase the product or not.

    The parameters that must be triggered to use the API URL key are- wk_token, seller_id, name, text, quality_rating, price_rating, value_rating.

    To Get The Seller Product List

    The seller will be able to view all the list of products added through the following API (url: siteUrl/index.php?route=api/wkrestapi/marketplace2/productList). The following parameters: wk_token, filter_name, filter_model, filter_price, filter_quantity, filter_status, sort, order, page, limit, width will be triggered to view the complete details of the product in the seller’s product list on the mobile application.

    On the Opencart website the following information like the product name, model, price,quantity,status, sold quantity, earned and Action is displayed as shown in the image below.

    When the API is implemented in the mobile application, you will be able to view the product name, model, price,quantity, sold, earned and edit option as shown in the image below.

    To Delete Seller’s Product

    On implementing the following API (url: siteUrl/index.php?route=api/wkrestapi/marketplace2/deleteProduct) the seller can delete the products from the mobile application. The prameters used for triggering the API to delete the seller’s products are : wk_token and product_id.

    With the parameter, wk_token used for accessing the API and Product_id containing the product’s id.

    On the Opencart marketplace website, the seller can select the products that are needed to be deleted and select the delete option as shown in the image below.

    When the API(url: siteUrl/index.php?route=api/wkrestapi/marketplace2/deleteProduct) is implemented in the mobile application, the seller will be able to delete the products from the product list as shown in the image below.

    To Get the Sellers List

    The admin will be able to get complete seller list by implemention the API(url: siteUrl/index.php?route=api/wkrestapi/marketplace2/getSellers) and trigger the following parameters: wk_token, page, limit, width that will be needed to display the sellers list on the mobile application.

    On the marketplace website, the seller will be able to get the seller list on the Sell page as shown in the image below.

    After implementing the API, the complete seller list will be displayed on the mobile application as mentioned in the image below.

    That’s all for the Opencart Marketplace web services API. If you still face any issue feel free to add a ticket and let us know your views to make the module better https://webkul.uvdesk.com/en/

    Current Product Version - 2.0.0.0

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

    . . .

    Comments (2)

    Add Your Comment

  • Alexandre Wandekoken
    Hi
    With this module is it possible to synchronize the stock of products in the marketplace with an ERP?
    • Webkul Support
      Hi There, Please provide the complete details at support@webkul.com and we will check and reply you back, thanks
  • Back to Top
    css.php
    Hire Us!
    Brief us about your requirements and we'll get back to you.
    Woo! Hooy!
    We have just received your message and our expert will get back to you shortly.
    Send Again
    Close

    Table of Content

    Hide Index