Class VouchersController

java.lang.Object
de.hybris.platform.ycommercewebservices.v1.controller.BaseController
de.hybris.platform.ycommercewebservices.v1.controller.VouchersController

@Controller("vouchersControllerV1") @RequestMapping("/{baseSiteId}/vouchers") public class VouchersController extends BaseController
Main Controller for Vouchers
  • Constructor Details

    • VouchersController

      public VouchersController()
  • Method Details

    • getVoucherByCode

      @Secured("ROLE_TRUSTED_CLIENT") @RequestMapping(value="/{code}", method=GET) @ResponseBody public VoucherData getVoucherByCode(@PathVariable String code) throws VoucherOperationException
      Web service for getting voucher information by voucher code.
      Sample call: https://localhost:9002/rest/v1/mysite/vouchers/abc-9PSW-EDH2-RXKA
      This method requires authentication.
      Method type : GET.
      Method is restricted for HTTPS channel.
      Parameters:
      code - - voucher code - must be given as path variable.
      Returns:
      VoucherData which will be marshaled to JSON or XML based on Accept-Header
      Throws:
      VoucherOperationException - if voucher cannot be found