api and coupon validate