Get all promotion offers without passing slug in application api

Hi,

How to get the all promotion offer (without slug, with promotionGroup ) using applicationClient Api. without passing slug, getting 400 Error. Need to show the all promotion offers in landing page.

Thanks,

You can use the following API without providing a slug:

cURL Request:

curl --location 'https://api.fynd.com/service/application/cart/v1.0/available-promotions?page_size=<integer>&promotion_group=<string>&store_id=<integer>&cart_type=<string>' \
--header 'Accept: application/json' \
--header 'Cookie: <Cookies>; anonymous_id=8b52837f95e34093bdc388a09a5384fa; old_browser_anonymous_id=8b52837f95e34093bdc388a09a5384fa' \
--header 'Authorization: Basic MDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAzOnVVWTdJUU9Cd00='

Expected Response:

{
    "available_promotions": [
        {
            "offer_text": "Buy 2 apple/gionee product get 500 off",
            "description": "Test promotion",
            "id": "61d1db23f5b315cf265126c0",
            "valid_till": "2022-03-29T09:05:49.063Z",
            "promotion_group": "cart"
        },
        {
            "offer_text": "Buy 2 apple/gionee product get 500 off",
            "description": "Test promotion",
            "id": "6203cb1393506f8a75ecd566",
            "valid_till": "2022-03-29T09:05:49.063Z",
            "promotion_group": "product"
        },
        {
            "offer_text": "Buy 2 apple/gionee product get 500 off",
            "description": "Test promotion",
            "id": "6203cb1393506f8a75ecd567",
            "valid_till": "2022-03-29T09:05:49.063Z",
            "promotion_group": "product"
        },
        {
            "offer_text": "Buy 2 apple/gionee product get 500 off",
            "description": "Test promotion",
            "id": "6203cb1393506f8a75ecd569",
            "valid_till": "2022-03-29T09:05:49.063Z",
            "promotion_group": "product"
        },
        {
            "free_gift_items": [
                {
                    "item_id": 7513738,
                    "item_name": "dinshaws milk",
                    "item_images_url": [
                        "https://hdn-1.jmpx2.de/jmpx2/products/pictures/item/free/original/-uah4-ZMe-ProductTestAR2.jpeg"
                    ],
                    "item_brand_name": "Arpita",
                    "item_price_details": {
                        "effective": {
                            "min": 80,
                            "max": 700
                        },
                        "marked": {
                            "min": 100,
                            "max": 800
                        },
                        "currency": "INR"
                    }
                },
                {
                    "item_slug": "Dinshaw"
                }
            ]
        }
    ]
}

If you continue to encounter issues, please provide the cURL command you are using.