Getting Below error :
023-12-05T12:09:07.550+05:30 ERROR 1 --- [p-nio-80-exec-3] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed: java.lang.RuntimeException: com.sdk.common.model.FDKServerResponseError: HTTP responseCode: 400 responseBody :{"success":false,"errors":"'validation'"}] with root cause
com.sdk.common.model.FDKServerResponseError: HTTP responseCode: 400 responseBody :{"success":false,"errors":"'validation'"}
at com.sdk.platform.cart.CartPlatformService$ApplicationClient.createCoupon(CartPlatformService.java:259) ~[fdk-client-java-1.3.6.jar!/:1.3.6]
at com.sdk.platform.cart.CartPlatformService$ApplicationClient.createCoupon(CartPlatformService.java:244) ~[fdk-client-java-1.3.6.jar!/:1.3.6]
at com.jio.campaign.service.CouponService.createCoupon(CouponService.java:48) ~[classes!/:1.0-SNAPSHOT]
at com.jio.campaign.controller.CouponController.create(CouponController.java:26) ~[classes!/:1.0-SNAPSHOT]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
Coupon Add Request Body :
{
“dateMeta”: {
“modifiedOn”: “2023-12-05 12:27:32”,
“createdOn”: “2023-12-05 12:27:32”
},
“ownership”: {
“payableCategory”: “seller”,
“payableBy”: “”
},
“author”: {
“createdBy”: “CMS”,
“modifiedBy”: “CMS”
},
“state”: {
“isArchived”: false,
“isDisplay”: true,
“isPublic”: true
},
“restrictions”: {
“userType”: “registered”,
“priceRange”: {
“max”: -1,
“min”: -1
},
“platforms”: [
“web”,
“android”,
“ios”
],
“postOrder”: {
“cancellationAllowed”: false,
“returnAllowed”: false
},
“uses”: {
“maximum”: {
“total”: 10
}
}
},
“action”: {
“txnMode”: “coupon”
},
“tags”: [
“platform”
],
“rule”: [
{
“key”: 10000,
“value”: 9,
“max”: 1000
}
],
“displayMeta”: {
“title”: “CMS Coupon”,
“apply”: {
“title”: “Coupon applied successfully”
},
“subtitle”: “CMS Coupon”,
“description”: “CMS Coupon”
},
“code”: “TESTAPICOUPON100”,
“typeSlug”: “percentage_quantity_percentage”,
“identifiers”: {},
“validity”: {
“priority”: 0
},
“ruleDefinition”: {
“currencyCode”: “TESTAPICOUPON100”,
“autoApply”: false,
“type”: “bundle”,
“isExact”: true,
“applicableOn”: “quantity”,
“calculateOn”: “esp”,
“valueType”: “percentage”,
“scope”: [
“category_id”
]
}
}