2

I tried to get all the product using REST API,i used this url "http://localhost/magento2.1/rest/V1/products/?searchCriteria[pageSize]=100&searchCriteria[currentPage]=1"

Output of this url:

"item" : {
        "id" : 13,
        "sku" : "play game",
        "name" : "play game",
        "attribute_set_id" : 4,
        "price" : 59,
        "status" : 1,
        "visibility" : 4,
        "type_id" : "simple",
        "created_at" : "2018-05-10 11:59:37",
        "updated_at" : "2018-05-10 11:59:37",
        "weight" : 3,
        "extension_attributes" : [ ],
        "product_links" : [ ],
        "tier_prices" : [ ],
        "custom_attributes" : [
            {
                "attribute_code" : "description",
                "value" : "<p>high quality chip ,rom:4gb.</p>"
            },
            {
                "attribute_code" : "meta_title",
                "value" : "play game"
            },
            {
                "attribute_code" : "meta_keyword",
                "value" : "play game"
            },
            {
                "attribute_code" : "meta_description",
                "value" : "play game high quality chip ,rom:4gb."
            },
            {
                "attribute_code" : "news_from_date",
                "value" : "2018-05-01 00:00:00"
            },
            {
                "attribute_code" : "news_to_date",
                "value" : "2018-05-31 00:00:00"
            },
            {
                "attribute_code" : "options_container",
                "value" : "container2"
            },
            {
                "attribute_code" : "required_options",
                "value" : "0"
            },
            {
                "attribute_code" : "has_options",
                "value" : "0"
            },
            {
                "attribute_code" : "country_of_manufacture",
                "value" : "JP"
            },
            {
                "attribute_code" : "url_key",
                "value" : "play-game"
            },
            {
                "attribute_code" : "tax_class_id",
                "value" : "2"
            },
            {
                "attribute_code" : "gift_message_available",
                "value" : "2"
            }
        ]
    },

In this output it does not given detail of this field
"extension_attributes" : [ ],
"product_links" : [ ],
"tier_prices" : [ ],

How can i get the detail of this field. can u provide the url or give detail so that i can get the detail of this field in rest api .

3 Answers 3

0

To fetch complete product detail, you can use product detail API.

http://localhost/magento2.1/rest/all/V1/products/{{sku}}

3
  • Its will provide single product detail with SKU, but i need to get all the product detail in one API call.
    – user67143
    May 24, 2018 at 7:49
  • May be you need to create a new custom API for this May 25, 2018 at 9:08
  • Thanks Yash Patadia, I want all product detail with single api call but not single product with SKU.
    – user67143
    Jun 11, 2018 at 7:06
0

if you want to get all product details, you need to pass like this.but it will take time to load all the products.

http://localhost/magento2.1/rest/V1/products?searchCriteria

1
  • thanks Vishnunath, its provides all product but its is given detail of this feilds extension_attribute,product_links and tier_prices. The output is "extension_attributes:[ ],"products_links:[ ], and "tier_prices":[ ]. I want all the details that are inside extension_attributes,product_links and tier_prices.
    – user67143
    May 24, 2018 at 8:59
0

If you want to get all product details, you need to pass searchCriteria parameter in REST Api

http://yourdomain.com/V1/products/?searchCriteria[pageSize]=2&searchCriteria[currentPage]=1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.