class IMSController {

    @RequestMapping(value = "/api/bookings", method = RequestMethod.POST)
    @ResponseBody
    public ResponseEntity book(@RequestBody IMSBookingRequest payload)
    {
        BookResult bookResult;
        try
        {
            bookResult = bookingService.book(payload.getTargetingChannel(), payload.getDays(), payload.getPrice(), payload.getAdvID(), payload.getRequestCount());
        }
        catch (Exception e)
        {
            LOGGER.error(e.getMessage());
            return ResponseBuilder.buildError(e);
        }
        return ResponseBuilder.build(bookResult, HTTP_OK_CODE);
    }

}