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'));

        $milestoneService = $this->get('campaignchain.core.milestone');
        $milestone = $milestoneService->getMilestone($id);
        $responseData['id'] = $milestone->getId();

        $oldDue = clone $milestone->getStartDate();
        $responseData['old_due_date'] = $oldDue->format(\DateTime::ISO8601);

        // Calculate time difference.
        // TODO: Check whether start = end date.
        $interval = $milestone->getStartDate()->diff($newDue);
        $responseData['interval']['object'] = json_encode($interval, true);
        $responseData['interval']['string'] = $interval->format(self::FORMAT_DATEINTERVAL);

        // Set new due date.
        $milestone = $milestoneService->moveMilestone($milestone, $interval);
        $responseData['new_due_date'] = $milestone->getStartDate()->format(\DateTime::ISO8601);

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

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