Plan Manager - DeletePlan

Version: 7C

HC7 Build: 7.00.0012 and later

API Build: 1.00.0001 and later

 

Plan Manager - DeletePlan deletes a specified plan. This web service call can be made as http://your-domain.com/HC7API/PlanManager.asmx?op=DeletePlan.

 

Input Parameters

 

Output Parameters

 

 

Sample Optional Parameters

 

<Parameters>

<Parameter Name = "Language">French</Parameter>

</Parameters>

 

Sample SOAP Request

  

 

POST /HC7API/PlanManager.asmx HTTP/1.1

Host: your-domain.com

Content-Type: text/xml; charset=utf-8

Content-Length: length

SOAPAction: "http://tempuri.org/DeletePlan"

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

  <soap:Body>

    <DeletePlan xmlns="http://tempuri.org/">

      <HostUserName>host</HostUserName>

      <HostPassword>host123</HostPassword>

      <OwnerName>david</OwnerName>

      <PlanName>MyPlan</PlanName>

      <OptionalParam>xml</OptionalParam>

    </DeletePlan>

  </soap:Body>

</soap:Envelope>
 

 

Sample HTTP Request

 

 

POST /HC7API/PlanManager.asmx/DeletePlan HTTP/1.1

Host: your-domain.com

Content-Type: application/x-www-form-urlencoded

Content-Length: length

HostUserName=host&HostPassword=host123&OwnerName=david&PlanName=MyPlan&OptionalParam=xml
 

 

Sample C# Code

 

 

public PlanManager.Response DeletePlan(string strHostUserName, string strHostPassword, string strOwnerName, string strPlanName)

{

         try

         {

                   PlanManager.PlanManager oPlan = new PlanManager.PlanManager();

                   PlanManager.Response oResponse = new PlanManager.Response();

                                    

                   oResponse = oPlan.DeletePlan(strHostUserName, strHostPassword, strOwnerName, strPlanName,

                   null);

                    

         }

         catch

         {

         }

         return oResponse;

}
 

 

Sample Response

 

 

<Response>

    <Method>DeletePlan</Method>

    <Status>false</Status>

    <ErrorCode>70101050</ErrorCode>

    <ErrorDescription>Plan cannot be deleted; some quantity of resources is in use.</ErrorDescription>

    <Result>

        <ResultReport xmlns="">

            <ViolatedResources>

            <RecordCount>23</RecordCount>

                <RecordRow>

                    <ResourceName>User Accounts</ResourceName>

                    <ViolationDetails>

                    <RecordCount>2</RecordCount>

                        <RecordRow>

                            <CustomerName>APIUser</CustomerName>

                            <DesiredQuantity>10</DesiredQuantity>

                            <AllocatedQuantity>10</AllocatedQuantity>

                            <SoldQuantity>3 + 1 (Reseller's)</SoldQuantity>

                            <RemainingQuantity>6</RemainingQuantity>

                        </RecordRow>

                        <RecordRow>

                            <CustomerName>john</CustomerName>

                            <DesiredQuantity>10</DesiredQuantity>

                            <AllocatedQuantity>6</AllocatedQuantity>

                            <SoldQuantity>3 + 1 (Reseller's)</SoldQuantity>

                            <RemainingQuantity>2</RemainingQuantity>

                       </RecordRow>

                            .......

                            .......

                            .......

                    </ViolationDetails>

                </RecordRow>

            </ViolatedResources>

        </ResultReport>

    </Result>

</Response>