Skip to main content

Notifications

Dynamics 365 Community / Forums / Commerce forum / Commerce/Carts('XX...
Commerce forum

Commerce/Carts('XXX')/AddCoupons returns blank cart not validating the CouponCode

Posted on by Microsoft Employee

Hi All,

When online site call the CRT Commerce/Carts('XXXX')/AddCoupons  api its returning the cart not CartValidationException .

M new to retail development any one have any idea about this.

 

Thanks & Regards,

Abhisek

  • Oksana Kovaliova Profile Picture
    Oksana Kovaliova 3,595 on at
    RE: Commerce/Carts('XXX')/AddCoupons returns blank cart not validating the CouponCode

    Hi Abhisek, why do you expect validation error?

  • Suggested answer
    Adrian Begovich Profile Picture
    Adrian Begovich 21,009 Super User 2024 Season 2 on at
    RE: Commerce/Carts('XXX')/AddCoupons returns blank cart not validating the CouponCode

    Hi Abhisek Patnaik,

    The CartValidationException class is used to indicate invalid data passed to a cart operation. What data are you passing into the API?

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Commerce/Carts('XXX')/AddCoupons returns blank cart not validating the CouponCode

    I am not getting any error, the api simply returning cart object. Is there any way to get datavalidation error message.

  • Oksana Kovaliova Profile Picture
    Oksana Kovaliova 3,595 on at
    RE: Commerce/Carts('XXX')/AddCoupons returns blank cart not validating the CouponCode

    Could you, please, post full error text that your receive? It should show that exactly is wrong with the cart

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans