Get Cart Details Mis-matched

Response received from Get Cart API of ApplicationClient – Cart API and PlatformClient Cart API are not matching to the response received from the web-browser

FDK Logger - prints the similar response received from web browser.

CartDetailResponse detailResponse = appClient.getCart().getCart(id, i, b, assignCardId, areaCode, buyNow,
constructRequestHeaders(headers));

But CartDetailResponse provided by API is the downsized/minimized response then the actual response received from Core API.

@Pitchaimani Can you Please specify what FDK version you are using? Also, let me know the required fields in the FDK response that are present in the Web API response.

fdk-extension.version – 0.0.49
fdk-client.version – 1.3.4

I hope, you can execute the API and comparing that response with the web browser response, can give you the difference.

Here are the missing Objects:
{
“cart_id”: 21497,
“uid”: “21497”,
“coupon”: {
“coupon_code”: “”,
“coupon_type”: “cart”,
“is_applied”: false,
“is_valid”: false,
“message”: “Sorry! Invalid coupon”,
“coupon_id”: null,
“discount”: 0,
“cashback_amount”: 0,
“cashback_message_primary”: “”,
“cashback_message_secondary”: “”,
“coupon_title”: “”,
“coupon_subtitle”: “”,
“coupon_description”: “”,
“minimum_cart_value”: 0,
“maximum_discount_value”: 0,
“coupon_value”: 0
},
“notification”: {},
“staff_user_id”: null,
“success”: true,
“common_config”: {
“delivery_charges_config”: {
“enabled”: true,
“charges”: [
{
“threshold”: 1200,
“charges”: 50
}
]
}
}
}

@Pitchaimani , the response of the FDK method is correct as per the documentation too

The response that you are asking seems to be from addItems FDK method. Please check the documentation once, let me know if any further queries.

1 Like

Hello Shubh,

Please try yourself using the API and WebBrowser, which will help you to observe the issue, raised here…

Sales Channel URL: JioMart: India's online shopping destination

Here is URL Used by Web Browser:::
https://jiomartplaypitcompany.jiox1.de/api/service/application/cart/v1.0/detail?area_code=400020&b=true&i=true

User Web Browser DevTools to take the response and compare it.

Note: I am not able to attach the response received from WebBrowser due to some technical reasons.

Hello @shubh / @Akshay , can we try comparing the web response of GET https://jiomartplaypitcompany.jiox1.de/api/service/application/cart/v1.0/detail?area_code=400001&b=true&i=true with following FDK method responses:

  1. Java FDK method getCart which @Pitchaimani is asking/mentioned about.
  2. JavaScript FDK method getCart (just to check if it’s varying from language-specific FDK to FDK)

Still there are 181 items are missing. Kindly cross verify using https://www.jsondiff.com/ website.

I am sharing the content via email