ZRPL
  • Welcome!
  • Quick Start
  • Reference
    • API Reference
      • Categories List
      • Category Details by ID
      • Create Simple Product
      • Config Product Creation
      • Product List
      • Update Existing Product
      • Product Details by SKU
      • Product Details by ID
      • Products in Category
      • Create Order
      • Order Details
      • Order History
      • Create Customer
      • Customer Token
      • Create Customer Cart
      • Add Item to Cart
      • View Cart
      • Update Cart
      • Delete Cart
      • Country Code
      • Set Shipping and Billing
      • Place Order
      • Customer Details
Powered by GitBook
On this page
  1. Reference
  2. API Reference

Product Details by ID

The endpoint retrieves product details from the catalog based on the product's ID and any specified search criteria

GET {{Base_url}}/rest/V1/products?searchCriteria[filterGroups][0][filters][0][field]=entity_id&searchCriteria[filterGroups][0][filters][0][condition_type]=in&searchCriteria[filterGroups][0][filters][0][value]=9

The API endpoint is designed to fetch product data from the catalog. Users can apply search filters and conditions to refine the results, making it suitable for scenarios like:

  • Searching for specific products based on unique identifiers (e.g., entity_id, sku).

  • Filtering products by attributes (e.g., category, price range, visibility).

  • Fetching all product details for catalog display or synchronization.

The response includes detailed product information such as names, prices, SKUs, attributes, media gallery, and custom fields. It also supports retrieving additional data like categories and website associations through extension_attributes. This endpoint is highly customizable, enabling integration into various e-commerce workflows like inventory management, product display, or marketplace aggregation.

curl --location --globoff '{{Base_url}}/rest/V1/products?searchCriteria[filterGroups][0][filters][0][field]=entity_id&searchCriteria[filterGroups][0][filters][0][condition_type]=in&searchCriteria[filterGroups][0][filters][0][value]=9' \
--header 'Authorization: Bearer eyJraWQiOiIxIiwiYWxnIjoiSFMyNTYifQ.eyJ1aWQiOjU1LCJ1dHlwaWQiOjIsImlhdCI6MTcyNjIxNTUzNCwiZXhwIjoxNzI2MjE5MTM0fQ.z3fqgEuZzdly5CnO8rIPgRduWYcT4fuOKyg2sNfx_DQ' \
--header 'Cookie: PHPSESSID=6t4unirh1unu87ef0stp2sv3kv; private_content_version=5ab80b7def0c212f723edead3c971a19'
{
    "items": [
        {
            "id": 9,
            "sku": "T42974IN",
            "name": "Lasko 42\" Wind Curve Fresh Air Ionizer with Tower Fan and Multi-Function Remote Control",
            "attribute_set_id": 10,
            "price": 9999,
            "status": 2,
            "visibility": 4,
            "type_id": "simple",
            "created_at": "2021-01-20 06:56:13",
            "updated_at": "2024-09-01 10:57:36",
            "weight": 6.66,
            "extension_attributes": {
                "website_ids": [
                    1
                ],
                "category_links": [
                    {
                        "position": 0,
                        "category_id": "2"
                    },
                    {
                        "position": 0,
                        "category_id": "42"
                    },
                    {
                        "position": 0,
                        "category_id": "57"
                    }
                ],
                "discount_percentage": 0
            },
            "product_links": [],
            "options": [],
            "media_gallery_entries": [
                {
                    "id": 276,
                    "media_type": "image",
                    "label": null,
                    "position": 8,
                    "disabled": false,
                    "types": [
                        "image",
                        "small_image",
                        "thumbnail",
                        "swatch_image"
                    ],
                    "file": "/t/4/t42964_main_3-5-19_lasko.jpg.png"
                },
                {
                    "id": 277,
                    "media_type": "image",
                    "label": null,
                    "position": 9,
                    "disabled": false,
                    "types": [],
                    "file": "/l/a/lasko_windcurve_2_1.png"
                },
                {
                    "id": 278,
                    "media_type": "image",
                    "label": null,
                    "position": 10,
                    "disabled": false,
                    "types": [],
                    "file": "/l/a/lasko_windcurve__1.png"
                },
                {
                    "id": 279,
                    "media_type": "image",
                    "label": null,
                    "position": 11,
                    "disabled": false,
                    "types": [],
                    "file": "/t/4/t42964_handle_3-5-19_lasko.jpg"
                },
                {
                    "id": 280,
                    "media_type": "image",
                    "label": null,
                    "position": 12,
                    "disabled": false,
                    "types": [],
                    "file": "/l/a/lasko_windcurve_4_1.png"
                },
                {
                    "id": 281,
                    "media_type": "image",
                    "label": null,
                    "position": 13,
                    "disabled": false,
                    "types": [],
                    "file": "/t/4/t42974in_man_sofa_6__0rthl.jpg"
                },
                {
                    "id": 282,
                    "media_type": "image",
                    "label": null,
                    "position": 14,
                    "disabled": false,
                    "types": [],
                    "file": "/t/4/t42964_env2_3_5_19_l_rx7rv.jpg"
                }
            ],
            "tier_prices": [],
            "custom_attributes": [
                {
                    "attribute_code": "split_by_brand",
                    "value": "Lasko"
                },
                {
                    "attribute_code": "image",
                    "value": "/t/4/t42964_main_3-5-19_lasko.jpg.png"
                },
                {
                    "attribute_code": "url_key",
                    "value": "xtra-air-ionizer-with-tower-fan"
                },
                {
                    "attribute_code": "gift_message_available",
                    "value": "0"
                },
                {
                    "attribute_code": "hsncode",
                    "value": "8414"
                },
                {
                    "attribute_code": "small_image",
                    "value": "/t/4/t42964_main_3-5-19_lasko.jpg.png"
                },
                {
                    "attribute_code": "options_container",
                    "value": "container2"
                },
                {
                    "attribute_code": "thumbnail",
                    "value": "/t/4/t42964_main_3-5-19_lasko.jpg.png"
                },
                {
                    "attribute_code": "swatch_image",
                    "value": "/t/4/t42964_main_3-5-19_lasko.jpg.png"
                },
                {
                    "attribute_code": "msrp_display_actual_price_type",
                    "value": "0"
                },
                {
                    "attribute_code": "popular_product",
                    "value": "0"
                },
                {
                    "attribute_code": "tax_class_id",
                    "value": "2"
                },
                {
                    "attribute_code": "required_options",
                    "value": "0"
                },
                {
                    "attribute_code": "has_options",
                    "value": "0"
                },
                {
                    "attribute_code": "warranty",
                    "value": "3 Year Onsite Motor"
                },
                {
                    "attribute_code": "category_ids",
                    "value": [
                        "2",
                        "42",
                        "57"
                    ]
                },
                {
                    "attribute_code": "sw_featured",
                    "value": "0"
                },
                {
                    "attribute_code": "product_image_size",
                    "value": "0"
                },
                {
                    "attribute_code": "remote_control",
                    "value": "1"
                },
                {
                    "attribute_code": "horizontal_oscillation",
                    "value": "1"
                },
                {
                    "attribute_code": "ionizer",
                    "value": "1"
                },
                {
                    "attribute_code": "easy_carry_handle",
                    "value": "1"
                },
                {
                    "attribute_code": "remote_control_storage_slot",
                    "value": "Yes"
                },
                {
                    "attribute_code": "motor_warranty",
                    "value": "1"
                },
                {
                    "attribute_code": "speed",
                    "value": "3 Speed"
                },
                {
                    "attribute_code": "timer",
                    "value": "7 hours"
                },
                {
                    "attribute_code": "delivery_lead_time",
                    "value": "Dispatches Within 2 Business Days from Bangalore"
                },
                {
                    "attribute_code": "fireboltt_color",
                    "value": "314"
                },
                {
                    "attribute_code": "short_description",
                    "value": "<p>✔️ <strong>FRESH AIR IONIZER</strong>: The built-in ionizer adds millions of negative ions to the air, creating a fresh air feeling like the great outdoors. An ionizer generates negative ions and disperses them to combat and dispel air pollution. As the negative ion levels grow, the air feels naturally fresher. The Air flow is to optimize maximum delivery of Ions.</p>\r\n<p>✔️ <strong>VERY QUIET</strong>: Even on high speed, you can still hear the Television. Creates just the right amount of white noise for sleeping so you can get some rest. Easy to assemble and operate. Built-in carry handle makes it easy to move from bedroom to living room. Electronic timer option automatically turns the fan off after a period of up to 7 hours of use.</p>\r\n<p>✔️ <strong>A REAL SPACE SAVER</strong>: Standing 42” tall with a small 13” x 13” footprint, the vertical design optimizes floor space letting you put the fan in places where large pedestal &amp; box fans won’t fit. Sophisticated profile blends seamlessly into your home décor without sacrificing air circulation, comfort or style.</p>\r\n<p>✔️ <strong>TRUSTED FOR GENERATIONS</strong>: Lasko has been making quality household products for over 100 years. Lasko Fans are ranked Number 1 in U.S. by market share</p>\r\n<p>✔️ <strong>ALTERNATIVE</strong>: This product has less air flow, if you are looking for a fan with high air velocity , without Ionizer we would suggest Lasko's Oscillating 4-speed High Velocity Tower Fan</p>\r\n"
                },
                {
                    "attribute_code": "description",
                    "value": "<p><img src=\"{{media url=&quot;wysiwyg/mom-baby-web2.jpg&quot;}}\" alt=\"\" width=\"637\" height=\"191\" /></p>\r\n<p> </p>\r\n<h3 class=\"a-spacing-mini\">Lasko Wind Curve Ionizer with Tower Fan and Multi-Function Remote Control</h3>\r\n<p class=\"a-spacing-base\">The high-reaching tower fan design, 3 quiet speed and optional oscillation provide just the right amount of white noise for sleeping so you can get some rest. Set your fan to automatically turn off after a period of use with the electronic timer option.</p>\r\n<p class=\"a-spacing-base\">Tastefully designed with distinctive wood-grain accents, this space-saver will quietly circulate air throughout any room or office.</p>\r\n<p class=\"a-spacing-base\">The fan has less amount of air flow. The flow of the air is to optimize maximum delivery of Ions.</p>\r\n<p class=\"a-spacing-base\"> </p>\r\n<p class=\"a-spacing-base\"><img src=\"{{media url=&quot;wysiwyg/qrpd9ga5e4wix7n4bycw.jpg&quot;}}\" alt=\"\" width=\"970\" height=\"600\" /></p>\r\n<div class=\"\" data-block=\"true\" data-editor=\"75st7\" data-offset-key=\"fjbh8-0-0\">\r\n<div class=\"public-DraftStyleDefault-block public-DraftStyleDefault-ltr\" data-offset-key=\"fjbh8-0-0\"><strong>What is an air ionizer?</strong></div>\r\n</div>\r\n<div class=\"\" data-block=\"true\" data-editor=\"75st7\" data-offset-key=\"8honm-0-0\">\r\n<div class=\"public-DraftStyleDefault-block public-DraftStyleDefault-ltr\" data-offset-key=\"8honm-0-0\"> </div>\r\n<div class=\"public-DraftStyleDefault-block public-DraftStyleDefault-ltr\" data-offset-key=\"8honm-0-0\"><span data-offset-key=\"8honm-0-0\">Lasko Air Ionizer rely on the chemical properties of ions. An ion is a negatively or positively charged particle.</span></div>\r\n<div class=\"public-DraftStyleDefault-block public-DraftStyleDefault-ltr\" data-offset-key=\"8honm-0-0\"> </div>\r\n</div>\r\n<div class=\"\" data-block=\"true\" data-editor=\"75st7\" data-offset-key=\"eq4cp-0-0\">\r\n<div class=\"public-DraftStyleDefault-block public-DraftStyleDefault-ltr\" data-offset-key=\"eq4cp-0-0\"><strong>What does an ionizer do?</strong></div>\r\n<div class=\"public-DraftStyleDefault-block public-DraftStyleDefault-ltr\" data-offset-key=\"eq4cp-0-0\"> </div>\r\n</div>\r\n<div class=\"\" data-block=\"true\" data-editor=\"75st7\" data-offset-key=\"316p2-0-0\">\r\n<div class=\"public-DraftStyleDefault-block public-DraftStyleDefault-ltr\" data-offset-key=\"316p2-0-0\"><span data-offset-key=\"316p2-0-0\">Air Ionizers create negative ions using electricity and then discharge them into the air. These negative ions attach to positively charged particles in the room, such as dust, bacteria, pollen, smoke, and other allergens. The positively charged particles and negative ions bond together to create dense dirt particles that cannot float in the air. These heavier dirt particles fall to the ground and wait to be swept up at a later time. Some particles might fall onto other surfaces in the room, such as television screens, computers, countertops, and sofas. Homeowners can easily clean these surfaces by dusting or wiping them off with a rag.</span></div>\r\n</div>"
                }
            ]
        }
    ],
    "search_criteria": {
        "filter_groups": [
            {
                "filters": [
                    {
                        "field": "entity_id",
                        "value": "9",
                        "condition_type": "in"
                    }
                ]
            }
        ]
    },
    "total_count": 1
}
{
    "items": [],
    "search_criteria": {
        "filter_groups": [
            {
                "filters": [
                    {
                        "field": "entity_id",
                        "value": "100",
                        "condition_type": "in"
                    }
                ]
            }
        ]
    },
    "total_count": 0
}

The response indicates that the API successfully retrieved details of a single product with the specified entity_id of 9. Here's a detailed breakdown of the response.

Response Explanation

items

This array contains the details of the retrieved product(s). In this case, there is one product:

  1. Basic Product Details:

    • id: Unique identifier for the product (9).

    • sku: Stock Keeping Unit (SKU) of the product ("T42974IN").

    • name: Name of the product.

    • attribute_set_id: Identifier for the attribute set used by the product (10).

    • price: Price of the product (9999).

    • status: Indicates whether the product is active:

      • 1 = Enabled, 2 = Disabled.

      • Current value 2 implies the product is disabled.

    • visibility: Product visibility settings:

      • 1 = Not visible, 2 = Catalog only, 3 = Search only, 4 = Catalog & Search.

      • Current value 4 makes the product visible in both catalog and search.

    • type_id: Product type, such as "simple" (standard product), "configurable," etc.

    • created_at & updated_at: Timestamps indicating when the product was created and last updated.

    • weight: Product weight (6.66 kg).

  2. extension_attributes:

    • website_ids: Array of website IDs where the product is available (e.g., [1]).

    • category_links: Categories the product is assigned to:

      • Each link contains:

        • position: The position of the product in the category.

        • category_id: Category identifier (e.g., "2", "42", "57").

    • discount_percentage: Discount percentage applied to the product (0).

  3. media_gallery_entries:

    • Contains the media assets (images) associated with the product.

    • Each entry includes:

      • id: Identifier for the media entry.

      • media_type: Type of media (e.g., "image").

      • position: Sorting order for display.

      • file: Path to the image file.

  4. custom_attributes:

    • Key-value pairs for additional product attributes. Examples:

      • split_by_brand: Brand name ("Lasko").

      • warranty: Warranty information ("3 Year Onsite Motor").

      • category_ids: Category assignments (e.g., ["2", "42", "57"]).

      • timer: Timer setting ("7 hours").

      • short_description and description: HTML-formatted text providing detailed product information.

{
    "message": "The \"%1\" attribute name is invalid. Reset the name and try again.",
    "parameters": [
        null
    ]
}
{
    "message": "The consumer isn't authorized to access %resources.",
    "parameters": {
        "resources": "Magento_Catalog::products"
    }
}
PreviousProduct Details by SKUNextProducts in Category

Last updated 4 months ago