class IMSController {

    @RequestMapping(value = "/api/{advId}/bookings", method = RequestMethod.GET)
    @ResponseBody
    public ResponseEntity getAdvID(@PathVariable("advId") String advId)
    {
        List<Booking> result;

        try
        {
            result = bookingService.getBookingsByAdvId(advId);
        }
        catch (Exception e)
        {
            LOGGER.error(e.getMessage());
            return ResponseBuilder.buildError(e);
        }

        return ResponseBuilder.build(result, HTTP_OK_CODE);
    }

}