def prepare_payload(module_id, activity_id, parsed):
    """Format the payload in order to send the declaration."""
    data = {'module': module_id, 'activity': activity_id}
    start_date = parsed.start_date
    end_date = parsed.end_date
    declaration = {'start': start_date, 'end': end_date, 'content': parsed.
        declaration.read()}
    data['declaration'] = declaration
    return data
