# Bundle Product (PDP)

## Bundle Product Details API

The Bundle Product Details API allows users to retrieve comprehensive information about a bundle product available on the e-commerce platform. Users can access various attributes and details related to the bundle 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%2FhCIte95JT9N1rkf3vURu%2Fimage.png?alt=media&#x26;token=2a55305b-c301-46b9-ac09-2cdb70e128d8" alt=""><figcaption><p><strong>Bundle product list</strong></p></figcaption></figure>

### **Endpoint**

* **`{{baseurl}}/api/v1/product/bundles/{bundle_id}?lang_code={lang_code}`**

### **Method**

* **GET**

### **Request Parameters:**

* `bundle_id`: The unique identifier of the bundle 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 bundle 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 bundle product details.

### **Response Format**

The API responds with a JSON object containing bundle product details for the specified bundle ID. The response includes various attributes related to the bundle product, such as its name, description, thumbnail, bundled products, pricing, and more.

```json
{
    "success": true,
    "data": [
        {
            "id": 30,
            "product_name": "NETPLAY Zip-Front Puffer Jacket with Insert Pockets with premium colour of which has high quality",
            "thumbnail": "https://majarat-developemt.s3.ap-southeast-1.wasabisys.com/uploads/all/4e1de374f4894f6a51fa4a908905c150.png",
            "unit": "pc",
            "variations": [
                {
                    "attribute": "Size",
                    "attribute_value": "SMALL",
                    "attribute_code": null
                },
                {
                    "attribute": "Colour",
                    "attribute_value": "BLACK",
                    "attribute_code": "#000000"
                }
            ]
        },
        {
            "id": 30,
            "product_name": "NETPLAY Zip-Front Puffer Jacket with Insert Pockets with premium colour of which has high quality",
            "thumbnail": "https://majarat-developemt.s3.ap-southeast-1.wasabisys.com/uploads/all/71%2B4KeTwI-L._SL1500_.jpg",
            "quantity": 3,
            "unit": "pc",
            "variations": [
                {
                    "attribute": "Size",
                    "attribute_value": "SMALL",
                    "attribute_code": null
                },
                {
                    "attribute": "Colour",
                    "attribute_value": "WHITE",
                    "attribute_code": "#ffffff"
                }
            ]
        },
        {
            "id": 30,
            "product_name": "NETPLAY Zip-Front Puffer Jacket with Insert Pockets with premium colour of which has high quality",
            "thumbnail": "https://majarat-developemt.s3.ap-southeast-1.wasabisys.com/uploads/all/71%2B4KeTwI-L._SL1500_.jpg",
            "quantity": 3,
            "unit": "pc",
            "variations": [
                {
                    "attribute": "Size",
                    "attribute_value": "SMALL",
                    "attribute_code": null
                },
                {
                    "attribute": "Colour",
                    "attribute_value": "PINK",
                    "attribute_code": "#e8179b"
                }
            ]
        },
        {
            "id": 30,
            "product_name": "NETPLAY Zip-Front Puffer Jacket with Insert Pockets with premium colour of which has high quality",
            "thumbnail": "https://majarat-developemt.s3.ap-southeast-1.wasabisys.com/uploads/all/71%2B4KeTwI-L._SL1500_.jpg",
            "quantity": 3,
            "unit": "pc",
            "variations": [
                {
                    "attribute": "Size",
                    "attribute_value": "MEDIUM",
                    "attribute_code": null
                },
                {
                    "attribute": "Colour",
                    "attribute_value": "BLACK",
                    "attribute_code": "#000000"
                }
            ]
        },
        {
            "id": 30,
            "product_name": "NETPLAY Zip-Front Puffer Jacket with Insert Pockets with premium colour of which has high quality",
            "thumbnail": "https://majarat-developemt.s3.ap-southeast-1.wasabisys.com/uploads/all/71%2B4KeTwI-L._SL1500_.jpg",
            "quantity": 3,
            "unit": "pc",
            "variations": [
                {
                    "attribute": "Size",
                    "attribute_value": "MEDIUM",
                    "attribute_code": null
                },
                {
                    "attribute": "Colour",
                    "attribute_value": "PINK",
                    "attribute_code": "#e8179b"
                }
            ]
        },
        {
            "id": 30,
            "product_name": "NETPLAY Zip-Front Puffer Jacket with Insert Pockets with premium colour of which has high quality",
            "thumbnail": "https://majarat-developemt.s3.ap-southeast-1.wasabisys.com/uploads/all/71srbo5I7VL._SL1500_.jpg",
            "quantity": 3,
            "unit": "pc",
            "variations": [
                {
                    "attribute": "Size",
                    "attribute_value": "LARGE",
                    "attribute_code": null
                },
                {
                    "attribute": "Colour",
                    "attribute_value": "BLACK",
                    "attribute_code": "#000000"
                }
            ]
        },
        {
            "id": 30,
            "product_name": "NETPLAY Zip-Front Puffer Jacket with Insert Pockets with premium colour of which has high quality",
            "thumbnail": null,
            "quantity": 3,
            "unit": "pc",
            "variations": [
                {
                    "attribute": "Size",
                    "attribute_value": "LARGE",
                    "attribute_code": null
                },
                {
                    "attribute": "Colour",
                    "attribute_value": "PINK",
                    "attribute_code": "#e8179b"
                }
            ]
        },
        {
            "id": 33,
            "product_name": "Body-Contouring Bandage Mini Dress",
            "thumbnail": "https://majarat-developemt.s3.ap-southeast-1.wasabisys.com/uploads/all/502-B.jpg",
            "quantity": 3,
            "unit": "pc",
            "variations": []
        },
        {
            "id": 34,
            "product_name": "Nature-Inspired Sticker Pack",
            "thumbnail": "https://majarat-developemt.s3.ap-southeast-1.wasabisys.com/uploads/all/504-B.jpg",
            "quantity": 3,
            "unit": "Pack",
            "variations": []
        }
    ],
    "message": "Success",
    "status_code": 200
}
```

#### Features:

* The API provides detailed information about a bundle product, including its name, description, bundled products, pricing, and savings.
* The `lang_code` parameter allows users to receive bundle product details in their preferred language for a more personalized shopping experience.

#### Usage:

The Bundle Product Details API is used to display comprehensive information about a bundle product on the e-commerce platform. Users can view the bundle name, description, bundled products, and pricing details before deciding to purchase the entire bundle.

#### Importance:

The Bundle Product Details API enhances the user experience by presenting bundled products as a package, encouraging customers to buy multiple items together at a discounted price. It simplifies the shopping process and allows users to explore curated product bundles that cater to specific needs or interests.

#### Best Practices:

* Ensure that the API response contains accurate and up-to-date information about the bundled products, including their names, quantities, and individual prices.
* Make sure to handle cases where the bundle ID does not exist or is invalid, returning an appropriate error message to users.
* Leverage the `lang_code` parameter to provide bundle product details in the user's preferred language, facilitating better communication with users from diverse language backgrounds.
