Magento 2 Rest API to get product details by SKU with selected fields

Magento 2 Rest API to  get product details by SKU with selected fields

According to our requirement sometimes we need only particular fields of products.  Below is the API

which will fetch product details by SKU. You need to replace https://store.com with your store URL.

URL: https://store.com/rest/V1/products/testsku?fields=name,sku,extension_attributes[category_links,stock_item[item_id,qty]]

ENDPOINT :  /rest/V1/products/SKU?fields=name,sku,extension_attributes[category_links,stock_item[item_id,qty]]

METHOD: GET

HEADERS : Content-Type application/json

Authorization: Bearer

PARAMETERS: None

PAYLOAD: None

AUTHENTICATION: ADMIN TOKEN      Create admin Token Magento 2

Response JSON:

{

    "sku""testsku",

    "name""Products test",

    "extension_attributes": {

        "category_links": [

            {

                "position"0,

                "category_id""2"

            },

            {

                "position"0,

                "category_id""3"

            }

        ],

        "stock_item": {

            "item_id"3207,

            "qty"1000

        }

    }

}

1   0
Eecrets Magento
profile Hole io 12th March 2025

hole io online is an extremely fun and addictive online multiplayer game where you control a black hole and compete with other players to become the biggest black hole.

Write a comment ...
Post comment
Cancel
profile Cody 24th February 2025

Interestingly you write, I will address        you'll find exciting and interesting things on similar topics. hijama courses

Write a comment ...
Post comment
Cancel
profile Cody 18th February 2025

I really appreciate this wonderful post that you have provided for us. I assure this would be beneficial for most of the people. فني كاميرات مراقبة الكويت

Write a comment ...
Post comment
Cancel
profile Cody 9th February 2025

There is so much in this article that I would never have thought of on my own. Your content gives readers things to think about in an interesting way. بنشر متنقل

Write a comment ...
Post comment
Cancel
profile Nguyen 1st January 2025

 Bạn đã biết cách tham gia và tăng cơ hội trúng thưởng chưa? Cùng Dự đoán Xổ số Khánh Hòa khám phá ngay những bí quyết thú vị! xổ số khánh hòa hôm nay

Write a comment ...
Post comment
Cancel
profile Nguyen 14th December 2024

Kết quả trúng thưởng Xổ Số An Giang được xác định bằng cách đem so sánh dãy số trong tờ vé số với kết quả mở thưởng của nhà đài. dự đoán xổ số an giang

Write a comment ...
Post comment
Cancel
profile Nguyen 18th November 2024

have games to suit every player when playing Game Online. Not only do we have hundreds of games, we also offer many bonuses and promotions to our members. 79king1

Write a comment ...
Post comment
Cancel
profile jane 16th November 2024

Magento 2 API supports specifying which Worldle fields you want to retrieve using the fields query parameter. This reduces the payload and improves performance.

Write a comment ...
Post comment
Cancel
profile Nguyen 10th October 2024

vin777 is known as one of the leading bookmakers in Asia. The vin777 website will share all the necessary information for those who need it. This is vin777's newest homepage - please click here vin777

Write a comment ...
Post comment
Cancel
profile Nguyen 10th October 2024

789win is known as one of the leading bookmakers in Asia. The 789win website will share all the necessary information for those who need it. This is 789win's newest homepage - please click here Readmore: 789win

Write a comment ...
Post comment
Cancel
profile Nguyen 3rd October 2024

J88 is a bookmaker that is making waves in the online gaming community and those who love online betting. J88ld is not simply a bookmaker, but also a miniature entertainment world. With a series of interesting and exciting betting entertainment games. Readmore: j88

Write a comment ...
Post comment
Cancel
profile andree 1st October 2024

No matter where I am, I can always rely on Cookie Clicker 2 to keep me entertained.

Write a comment ...
Post comment
Cancel
profile Nguyen 27th September 2024

33win is a bookmaker that is making waves in the online gaming community and those who love online betting. 333win is not simply a bookmaker, but also a miniature entertainment world. With a series of interesting and exciting betting entertainment games. Readmore: 33win

Write a comment ...
Post comment
Cancel
profile Nguyen 21st September 2024

Kuwin Top reputable online casino in Vietnam⭐️Guaranteed reputation for ten years⭐️Register now, receive generous rewards immediately️ - please click here Readmore: kuwin

Write a comment ...
Post comment
Cancel
profile Patricia 19th September 2024

Sounds amazing. Besides, take a look at geometry dash lite which is awesome.

Write a comment ...
Post comment
Cancel

Related Post

11th March 2021

Magento 2 Rest API to get product details by Product SKU

Magento 2 Rest API to get product details by Product SKU....

read more reply

11th March 2021

Magento 2 Rest API to get all products

In Magento 2 we can get the list of products with the rest API with an admin token. You need to replace store.com with your store URL.....

read more reply

12th September 2020

Magento2 Get Admin Token Rest API

Magento2 Get Admin Token Rest API....

read more reply

Please rotate your device

We don't support landscape mode on your device. Please rotate to portrait mode for the best view of our site