Get User Cart (13/01)

Get the user cart

GET https://castleindia.in/emart/public /api/cart

Note : If no offers found then key : offers will come null

Note 2 : If no coupon applied then key : appliedCoupan will come null.

Query Parameters

NameTypeDescription

currency*

String

Three digit currency code eg : INR.

Headers

NameTypeDescription

Authentication

String

Bearer {bearer_token} goes here.

{
    "products": [
        {
            "cartid": 3,
            "productid": 159,
            "variantid": 115,
            "type": "v",
            "off_in_percent": 72,
            "productname": "Sunglasses",
            "orignalprice": 19.8,
            "orignalofferprice": 5.5,
            "mainprice": 39.6,
            "offerprice": 11,
            "qty": 2,
            "rating": 0,
            "review": 0,
            "thumbnail_path": "https://emart.test/variantimages/thumbnails",
            "thumbnail": "variant_1637146697mpZnZQ5lcx.jpeg",
            "tax_info": "Inclusive of all taxes",
            "soldby": "emart",
            "variant": [
                {
                    "var_name": "Red",
                    "attr_name": "Color",
                    "type": "c"
                }
            ],
            "minorderqty": 1,
            "maxorderqty": 0
        },
        {
            "cartid": 5,
            "productid": 4,
            "variantid": 0,
            "type": "s",
            "off_in_percent": 70,
            "productname": "Maggi Masala Ae Magic 6 g (Pack of 12)",
            "orignalprice": 2.56,
            "orignalofferprice": 0.77,
            "mainprice": 2.56,
            "offerprice": 0.77,
            "qty": 1,
            "rating": 0,
            "review": 0,
            "thumbnail_path": "https://emart.test/images/simple_products",
            "thumbnail": "thum_dgp_611f37e27933e.jpg",
            "tax_info": "Inclusive of all taxes",
            "soldby": "emart",
            "variant": null,
            "minorderqty": 1,
            "maxorderqty": 1
        }
    ],
    "subtotal": 11.77,
    "shipping": 12,
    "coupan_discount": 0,
    "grand_total": 23.77,
    "currency": "USD",
    "symbol": "$",
    "appliedCoupan": null,
    "offers": [
        {
            "coupanid": 4,
            "code": "WELCOME",
            "discount": 100,
            "discount_type": "fix",
            "minamount": 99.9,
            "is_login": 0,
            "description": null,
            "linked_to": null,
            "offertext": [
                {
                    "text": "Get flat $100.00 off"
                }
            ],
            "validationtext": [
                {
                    "text": "Valid on orders above $99.90"
                }
            ]
        },
        {
            "coupanid": 5,
            "code": "SIMPLEPRODUCT20",
            "discount": 20,
            "discount_type": "per",
            "minamount": 0,
            "is_login": 1,
            "description": null,
            "linked_to": {
                "id": 4,
                "name": {
                    "en": "Maggi Masala Ae Magic 6 g (Pack of 12)"
                },
                "appliedon": "simple_product"
            },
            "offertext": [
                {
                    "text": "Get 20% off"
                }
            ],
            "validationtext": [
                {
                    "text": "Offer applicable for registered users only."
                }
            ]
        },
        {
            "coupanid": 3,
            "code": "PASTAMANIA",
            "discount": 0.5,
            "discount_type": "fix",
            "minamount": 0,
            "is_login": 0,
            "description": null,
            "linked_to": {
                "id": 1,
                "name": {
                    "en": "iTab",
                    "hi": "आईटैब"
                },
                "appliedon": "category"
            },
            "offertext": [
                {
                    "text": "Get flat $0.50 off"
                }
            ],
            "validationtext": null
        }
    ]
}

IF cart is empty

{
    "msg": "Your cart is empty !",
    "status": "success"
}

If response fail

{
    "msg": "Currency is required",
    "status": "fail"
}

Last updated