# Variable PDP Screen

## Product Details API

The Product Detail Page (PDP) API is a country-specific endpoint that provides comprehensive information about a specific product on the e-commerce platform. This API ensures that users in different countries receive relevant details and pricing for the product, enabling a localized shopping experience. It allows users to retrieve comprehensive information about a specific product from the e-commerce platform. Users can access various attributes and details related to the product by sending a GET request to the endpoint.

<figure><img src="https://3686328336-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fd1Iq7THDAagTQzeC9rTN%2Fuploads%2FthhqXgRUCbhLRfqUn6nW%2Fimage.png?alt=media&#x26;token=11988e47-be57-4e70-a6d6-fb0abba29864" alt=""><figcaption><p><strong>Product detail page</strong></p></figcaption></figure>

### **Endpoint**

* **`{{baseurl}}/api/v1/product-details/{product_id}`**

### **Method**

* **GET**

### **Request Parameters:**

* `product_id`: The unique identifier of the product for which details are requested.
* `lang_code` (optional): A two-letter language code (e.g., "en" for English, "ar" for Arabic, etc.) to support language-based localization. If provided, the API returns product details in the specified language.

### **Authorization:**

The API requires a bearer token in the request header for authentication. Users need to include their valid bearer token in the "Authorization" header of the HTTP request to access product details.

### **Response Format**

The API responds with a JSON object containing product details for the specified product ID. The response includes various attributes related to the product, such as its name, description, unit, thumbnail, gallery images, size chart, minimum and maximum quantity, variant information, discount details, and more.

````json
```json
{
    "success": true,
    "data": {
        "id": 7,
        "product_name": "Majarat Henna Design Sticker - MJ 501",
        "description": "<p>It’s used to celebrate love, beauty, and grace through special occasions, personal and cultural milestones, or simply relish its artistic elegance. Majarat  Henna Sticker’s ability to empower people through its trade and craft is admirable, and we aspire to cultivate a brand that magnifies this notion of community and togetherness through artistic expression.\r\n</p><p>SELF ADHESIVE; simple way to obtain henna designs without great expenditure of time and practice , suitable for beginners.\r\n</p><p>How to use:-\r\n</p><p>You can cut the stencil into small parts to apply on your skin.\r\n</p><p>Carefully remove white backing paper from stencil.\r\n</p><p>Apply stencil to skin, adhesive side down.\r\n</p><p>Slowly remove clear protective sheet.\r\n</p><p>Apply henna to skin showing the though the stencil.\r\n</p><p>Let dry according to henna instructions.\r\n</p><p>Once henna is completely dry, rub off excess henna and remove stencil.\r\n</p><p>Reduced contact with water can make the pattern last longer.\r\n</p><p>Not for use on sensitive skin around eyes or lips, or with young babys.\r\n</p><p><br></p>",
        "unit": "PC",
        "thumbnail": "https://app.majarat.ae/uploads/all/B 501-B.jpg",
        "gallery": [
            "https://app.majarat.ae/uploads/all/B 501-B.jpg",
            "https://app.majarat.ae/uploads/all/B 501-A.jpg"
        ],
        "size_chart_upload": null,
        "delivery":4
        "min_qty": 1,
        "max_qty": 1000,
        "is_variant": 1,
        "discount_start_date": null,
        "discount_end_date": null,
        "discount_percentage": null,
        "offer_label": 0,
        "variations": [
            {
                "id": 9,
                "code": [
                    "2:6"
                ],
                "img": [
                    "https://app.majarat.ae/uploads/all/B 501-A.jpg",
                    "https://app.majarat.ae/uploads/all/B 501-C.jpg",
                    "https://app.majarat.ae/uploads/all/B 501-B.jpg"
                ],
                "offer_price": 5,
                "mrp_price": 5,
                "in_stock_status": 1,
                "number_of_stock": 100,
                "stock_alert_qty": 5
            },
            {
                "id": 10,
                "code": [
                    "2:7"
                ],
                "img": [
                    "https://app.majarat.ae/uploads/all/K 501-A.jpg",
                    "https://app.majarat.ae/uploads/all/K 501-B.jpg",
                    "https://app.majarat.ae/uploads/all/K 501-C.jpg"
                ],
                "offer_price": 10,
                "mrp_price": 10,
                "in_stock_status": 1,
                "number_of_stock": 100,
                "stock_alert_qty": 5
            },
            {
                "id": 11,
                "code": [
                    "2:8"
                ],
                "img": [],
                "offer_price": 20,
                "mrp_price": 20,
                "in_stock_status": 1,
                "number_of_stock": 100,
                "stock_alert_qty": 5
            },
            {
                "id": 12,
                "code": [
                    "2:9"
                ],
                "img": [
                    "https://app.majarat.ae/uploads/all/M 501-A.jpg",
                    "https://app.majarat.ae/uploads/all/M 501-B.jpg",
                    "https://app.majarat.ae/uploads/all/M 501-C.jpg"
                ],
                "offer_price": 20,
                "mrp_price": 15,
                "in_stock_status": 1,
                "number_of_stock": 100,
                "stock_alert_qty": 5
            }
        ],
        "variation_options": [
            {
                "id": 2,
                "name": "Size",
                "values": [
                    {
                        "id": 6,
                        "name": "BABY / الرضع",
                        "code": null
                    },
                    {
                        "id": 7,
                        "name": "KIDS / الأطفال",
                        "code": null
                    },
                    {
                        "id": 8,
                        "name": "LARGE / كبير",
                        "code": null
                    },
                    {
                        "id": 9,
                        "name": "MEDIUM / متوسط",
                        "code": null
                    }
                ]
            }
        ],
        "avg_rating": 0,
        "total_ratings": 0,
        "bundle_product": "no",
        "is_wishlisted": "no"
    },
    "message": "Success",
    "status_code": 200
}
```
````

### Features

* The API provides detailed information about a specific product, such as its name, description, unit, thumbnail image, gallery images, size chart, variations, stock availability, pricing, discounts, stock alert qty and more.
* The `lang_code` parameter allows users to receive product details in their preferred language for a more personalized shopping experience.
* The API supports pagination for product variations, allowing users to access multiple variants of the same product.

### Bundle Products

The `bundle_product` attribute indicates whether the product is part of a bundle or not. A bundle product is a collection of multiple individual products sold together as a package.

### Variant and Non-Variant Products:

The `is_variant` attribute determines whether the product has variants (different options like size and color) or not. If `is_variant` is set to 1, the product has multiple variations, and users can choose different options. If `is_variant` is set to 0, the product does not have variations and is non-varian

### Usage:

The Product Details API is typically used in the product detail page of the e-commerce platform. It fetches comprehensive information about a particular product based on its unique ID, and then the retrieved data is displayed to the user on the product detail page. Users can view product images, read descriptions, check stock availability, explore variant options, and obtain pricing details before making a purchase decision.
