Read More
Read More
Menu Close

    Marketplace Web Services API For Magento 2

    Marketplace Web Services API For Magento 2(Adobe Commerce) is a multi-vendor Marketplace add-on that exposes the Web Services API of Marketplace module with REST API so that marketplace functions can be used by other applications like ERP, Mobile applications (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 the world’s best Openerp Magento(Adobe Commerce) 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.

    Install Extension from Webkul Store

    #1 Download Module

    Firstly, you need to log in to Webkul Store, go to My Account>My Purchased Products section, verify and then download and extract the contents of this zip folder on the system.

    #2 Upload Folder

    Once the module zip is extracted, follow path src>app and then copy the app folder into the Adobe Commerce Cloud root directory on the server as shown below:

    Installation Of Show Price After Login for Magento2

    #3 Run Commands

    After uploading the module folder, you need to run the following commands in the Magento 2 root directory:

    Searching for an experienced
    Magento 2 Company ?
    Read More
    • php bin/magento setup:upgrade
    • php bin/magento setup:di:compile
    • php bin/magento setup:static-content:deploy
    • php bin/magento indexer:reindex
    • php bin/magento cache:flush

    Install Extension from Adobe Commerce Marketplace

    If you have purchased this extension from the Adobe Commerce Cloud Marketplace then please follow the below process or visit this link.

    #1 Get Access Keys

    You need to get access keys, navigate to My Profile in Adobe Commerce Marketplace, then choose Access Keys in the My Products section.

    excess key

    Go to Adobe Commerce and then you need to copy both the Access Keys – Public Key and Private Key. These access keys will be needed in the next steps for authentication.

    excesskey

    If access keys are not created earlier, click Create A New Access Key, enter any name and click OK.

    new access key

    #2 Update composer.json File

    To know the component name and version number, go to your Adobe Commerce Cloud Marketplace account section, My Profile>My Purchases, then find this extension to view the details.

    Please note – Below is an example image, every extension will have its unique component name and version.

    Zip file

    After that, navigate to your Adobe Commerce project directory and update your composer.json file in the following format.

    composer require <component-name>:<version>

    For example, to install version 4.0.0 of this extension you need to run the following command:

    composer require webkul/marketplace-api​:5.0.2

    #3 Enter Access Keys

    Now you will need to enter the Access Keys that you obtained as explained in the first step #1 Get Access Keys. Wait for Composer to finish updating your project dependencies and make sure there aren’t any errors.

    #4 Run Command

    You need to run the following commands:

    • php bin/magento setup:upgrade
    • php bin/magento setup:di:compile
    • php bin/magento setup:static-content:deploy
    • php bin/magento indexer:reindex
    • php bin/magento cache:flush

    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

    [ { total_count: 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:

    [ { 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 } ], total_count: int } ]

    4.Description:Get seller wise orders

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

    [ { total_count: 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:

    [ { total_count: 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, trackingId: 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 } ] } ]

    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 } ]

    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:

    [ { 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, mageproduct_id: string } ], status: int, total_count: int } ]

    11.Description:-Get self order details

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

    [ { total_count: 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:

    [ { total_count: 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, trackingId: 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 } ] } ]

    13.Description:-Create invoice for seller order

    api resource : rest/V1/mpapi/sellers/me/order/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:-Cancel the order

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

    [
    {
    status: int,
    message: string
    }
    ]

    16.Description:-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
    }
    ]

    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
    }
    ]

    19.Description:- Contact seller

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

    [
    {
    status: int,
    message: string
    }
    ]

    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"
    }
    ]

    [
    {
    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:

    [
    {
    total_count: 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:

    [
    {
    total_count: 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:

    [
    {
    total_count: 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 the 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 the 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 an endpoint.

    API Resource: magentohost*1/graphql

    Step 3 -Once you have set the endpoint you will get all Preset API lists 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 on the 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 an accurate query of the marketplace 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 Adobe Commerce DevDocs.

     

    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 to 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 (Adobe Commerce Cloud), if you still have any issues feel free to add a ticket and let us know your views at Webkul.uvdesk.com to make the module the best.

    Current Product Version - 5.0.2

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

    Blog Version - Magento 2.0.x, 2.1.x, 2.2.x,2.3.x, 2.4.x
    • Version Magento 2.0.x, 2.1.x, 2.2.x.
    • Version Magento 2.0.x, 2.1.x, 2.2.x, 2.3.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