delete_coupons_m Sample Call and Response
This example shows a client deleting two coupons in a single call, identified by their coupon codes. It is based on the delete_coupons_m method as defined in methods_m_r73.yml, Admin Tools API.
This example includes the only field the method accepts beyond client authentication. The response shown here omits the several returned fields the yml marks as nonpublic, since they are internal placeholders with no client-facing value behind them.
Sample call
{
"rest_call": "delete_coupons_m",
"output_format": "json",
"client_no": 700123,
"auth_key": "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6",
"coupon_nos": ["10012341", "10023432"]
}
The rest_call and output_format fields are not part of the method’s own documented arguments. The REST layer adds them to every call: rest_call names the method being invoked, and output_format requests a JSON response rather than the default WDDX format. Within the method’s own arguments, client_no and auth_key identify and authenticate the client making the call. coupon_nos is a flat array of coupon codes to delete; this example deletes two coupons at once, though the array could carry just one code or many more.
Sample response
{
"error_code": 0,
"error_msg": "OK",
"coupons": [
{
"coupon_no": 10012341
},
{
"coupon_no": 10023432
}
]
}
An error_code of zero, paired with an error_msg of “OK,” indicates that Aria deleted both coupons successfully. The coupons array echoes back the Aria-assigned coupon_no for each deleted coupon; this example shows both entries, since only two coupons were deleted, but a larger deletion would return one entry per coupon rather than every one being listed exhaustively. The yml’s coupons structure also defines expires_desc, coupon_cd, coupon_desc, coupon_msg, status_ind, no_of_uses, start_date, and end_date, but each of these carries a nonpublic flag and a description stating it is only a placeholder, so this example leaves all of them out.