API - Delete Coupon

Delete Coupon

This API is used to delete a coupon by specifying the coupon id.


API Details


Signature of API call

connection.invokeApi(String uri, String realUserName, Map<String, String> requestParameters);

See details about invoking API in general


Parameter 1 - URI



Parameter 2 - UserName

Username of the site admin


Parameter 3 - Request Parameters

Name Value
dispatch deleteCoupon
xml true
id Coupon id



Response on successfully deleting the coupon

HTTP Response Code = HttpServletResponse.SC_OK

Response XML

<response code="0">
            <![CDATA[Deleted Successfully]]>


Code Snippet

/* Check API Call for detail */

Map<String, String> parameters = new HashMap<String, String>();
String result = connection.invokeApi("couponService.do", "adminusername", parameters);
private void populateMapForCouponDelete(Map<String, String> parameters) {
    parameters.put("dispatch", "deleteCoupon");
    parameters.put("xml", String.valueOf(true));
    parameters.put("id", "xxxx-xxxx-xxxx-xxxx");