cal = mapper.readValue(params.get("body"), ServiceCalendar.class);
if(Agency.findById(cal.agency.id) == null)
badRequest();
cal.save();
// check if gtfsServiceId is specified, if not create from DB id
if(cal.gtfsServiceId == null) {
cal.gtfsServiceId = "CAL_" + cal.id.toString();
cal.save();