public function moveApiAction(Request $request)
    {
        $serializer = $this->get('campaignchain.core.serializer.default');

        $responseData = array();

        $id = $request->request->get('id');

        // Is this a campaign with interval?
        if($request->request->has('start_date')) {
            try {
                $newStartDate = new \DateTime($request->request->get('start_date'));
            } catch(\Exception $e){
                return $this->apiErrorResponse($e->getMessage());
            }
        } else {
            return $this->apiErrorResponse(
                'Please provide a date time value for start_date'
            );
        }

        $newStartDate = DateTimeUtil::roundMinutes(
            $newStartDate,
            $this->getParameter('campaignchain_core.scheduler.interval')
        );

        /** @var CampaignService $campaignService */
        $campaignService = $this->get('campaignchain.core.campaign');
        /** @var Campaign $campaign */
        $campaign = $campaignService->getCampaign($id);

        // Preserve old campaign data for response.
        $responseData['campaign']['id'] = $campaign->getId();
        if(!$campaign->getInterval()) {
            $oldStartDate = clone $campaign->getStartDate();
            $responseData['campaign']['old_start_date'] = $oldStartDate->format(\DateTime::ISO8601);
            $responseData['campaign']['old_end_date'] = $campaign->getEndDate()->format(\DateTime::ISO8601);
        } else {
            $responseData['campaign']['old_interval_start_date'] = $campaign->getIntervalStartDate()->format(\DateTime::ISO8601);
            $responseData['campaign']['old_interval_next_run'] = $campaign->getIntervalNextRun()->format(\DateTime::ISO8601);
            if($campaign->getIntervalEndDate()){
                $responseData['campaign']['old_interval_end_date'] = $campaign->getIntervalEndDate()->format(\DateTime::ISO8601);
            }
        }

        // Move campaign's start date.
        $campaign = $campaignService->moveCampaign($campaign, $newStartDate);

        // Add new campaign dates to response.
        if(!$campaign->getInterval()) {
            $responseData['campaign']['new_start_date'] = $campaign->getStartDate()->format(\DateTime::ISO8601);
            $responseData['campaign']['new_end_date'] = $campaign->getEndDate()->format(\DateTime::ISO8601);
        } else {
            $responseData['campaign']['new_interval_start_date'] = $campaign->getIntervalStartDate()->format(\DateTime::ISO8601);
            $responseData['campaign']['new_interval_next_run'] = $campaign->getIntervalNextRun()->format(\DateTime::ISO8601);
            if($campaign->getIntervalEndDate()){
                $responseData['campaign']['new_interval_end_date'] = $campaign->getIntervalEndDate()->format(\DateTime::ISO8601);
            }
        }

        return new Response($serializer->serialize($responseData, 'json'));
    }