//[Authorize]
        public JsonResult Reimport(ReimportClass context)
        {
            //Check permission - maybe later
            //if ( !IsAuthorized() )
            //{
            //	return JsonHelper.GetJsonWithWrapper( null, false, "You are not authorized for this request type.", null );
            //}
            bool valid = true;

            ImportRequest mgr    = new ImportRequest();
            SaveStatus    status = new SaveStatus();

            //Do the register
            switch (context.TypeName)
            {
            case "credential":
            case "CredentialProfile":
                if (!string.IsNullOrWhiteSpace(context.Ctid))
                {
                    status = mgr.ImportCredentialByCtid(context.Ctid);
                }
                else
                if (!string.IsNullOrWhiteSpace(context.CredentialRegistryId))
                {
                    status = mgr.ImportCredential(context.CredentialRegistryId);
                }
                else
                {
                    status.AddError("Must provide either an valid CTID or envelopeId");
                }
                break;

            case "organization":
            case "QAOrganization":
                if (!string.IsNullOrWhiteSpace(context.Ctid))
                {
                    status = mgr.ImportOrganizationByCtid(context.Ctid);
                }
                else if (!string.IsNullOrWhiteSpace(context.CredentialRegistryId))
                {
                    status = mgr.ImportOrganization(context.CredentialRegistryId);
                }
                else
                {
                    status.AddError("Must provide either an valid CTID or envelopeId");
                }
                break;

            case "AssessmentProfile":
            case "assessment":
                if (!string.IsNullOrWhiteSpace(context.Ctid))
                {
                    status = mgr.ImportAssessmentByCtid(context.Ctid);
                }
                else if (!string.IsNullOrWhiteSpace(context.CredentialRegistryId))
                {
                    status = mgr.ImportAssessment(context.CredentialRegistryId);
                }
                else
                {
                    status.AddError("Must provide either an valid CTID or envelopeId");
                }

                break;

            case "LearningOpportunityProfile":
            case "learningopportunity":
                if (!string.IsNullOrWhiteSpace(context.Ctid))
                {
                    status = mgr.ImportLearningOpportuntyByCtid(context.Ctid);
                }
                else if (!string.IsNullOrWhiteSpace(context.CredentialRegistryId))
                {
                    status = mgr.ImportLearningOpportunty(context.CredentialRegistryId);
                }
                else
                {
                    status.AddError("Must provide either an valid CTID or envelopeId");
                }

                break;

            default:
                valid = false;
                status.AddError("Profile not handled");
                break;
            }
            string returnStatus = "";

            if (status.HasErrors)
            {
                valid        = false;
                returnStatus = string.Join("<br/>", status.GetAllMessages().ToArray());
            }
            else if (status.GetAllMessages().Count > 0)
            {
                returnStatus = string.Join("<br/>", status.GetAllMessages().ToArray());
            }
            else
            {
                returnStatus = "Seems to have worked??";
                ElasticServices.UpdateElastic(true);
            }


            //Return the result
            return(JsonHelper.GetJsonWithWrapper(null, valid, returnStatus, null));
        }