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

        $responseData = array();

        $id = $request->request->get('id');
        $newDue = new \DateTime($request->request->get('start_date'));

        $activityService = $this->get('campaignchain.core.activity');
        $activity = $activityService->getActivity($id);

        $responseData['id'] = $activity->getId();

        $oldActivityStartDate = clone $activity->getStartDate();
        $responseData['old_start_date'] = $oldActivityStartDate->format(\DateTime::ISO8601);
//        $oldActivityEndDate = clone $activity->getEndDate();
        // TODO: Check whether start = end date.
        $responseData['old_end_date'] = $responseData['old_start_date'];


        // Calculate time difference.
        $interval = $activity->getStartDate()->diff($newDue);
        $responseData['interval']['object'] = json_encode($interval, true);
        $responseData['interval']['string'] = $interval->format(self::FORMAT_DATEINTERVAL);

        // TODO: Also move operations.
        $activity = $activityService->moveActivity($activity, $interval);

        // Set new dates.
        $responseData['new_start_date'] = $activity->getStartDate()->format(\DateTime::ISO8601);
        // TODO: Check whether start = end date.
        $responseData['new_end_date'] = $responseData['new_start_date'];

        $em = $this->getDoctrine()->getManager();
        $em->persist($activity);
        $em->flush();

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