Overview

The purpose of this call is to return package plans pertaining to a service type. It includes:

  • external name
  • description
  • status
  • start date
  • end date
  • saleable in user portal
  • default contract type - the name and length are returned
  • service plans - the name, service type, available quantity and mandatory flag are returned.

Getting Package Plans of a Service Type

 To retrieve package plans:

  1. Create a getPackagePlans request(). 
  2. Specify the login token that was returned in the authentication step.
  3. Specify lists of service type ID.
  4. Optionally specify the additional fields (saleable, saleable in user portal).

WSDL

https://userapi.emersion.com/Plans.wsdl 


Operation name

Plans/getPackagePlans



Business Rules


  • Service type id must exist in the database.
  • Only sell package plans are returned in this call. Buy plan information is not retrievable using the End User APIs.




SOAP Example


<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:emersion:userapi">
   <soapenv:Header/>
   <soapenv:Body>
      <urn:getPackagePlansRequest>
         <urn:loginToken>50ddac1fd05141005ccca08bd116d210fa7f1602446775a05621fbdda0c2e53c</urn:loginToken>
         <!--Optional:-->
         <urn:ServiceTypes>
            <!--1 or more repetitions:-->
            <urn:ID>3976</urn:ID>
         </urn:ServiceTypes>
         <!--Optional:-->
         <urn:Saleable>true</urn:Saleable>
         <!--Optional:-->
         <urn:SaleableInUserPortal>true</urn:SaleableInUserPortal>
      </urn:getPackagePlansRequest>
   </soapenv:Body>
</soapenv:Envelope>
Sample Response
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:emersion:usertypes" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="urn:emersion:userapi">
   <SOAP-ENV:Body>
      <ns2:getPackagePlansResponse>
         <ns2:PackagePlan ID="213462">
            <ns1:ExternalName>Prepay Plan</ns1:ExternalName>
            <ns1:Status>Saleable</ns1:Status>
            <ns1:StartDate>2018-08-01</ns1:StartDate>
            <ns1:EndDate xsi:nil="true"/>
            <ns1:SaleableInUserPortal>true</ns1:SaleableInUserPortal>
            <ns1:ServicePlans>
               <ns1:ServicePlan ID="196625">
                  <ns1:ExternalName> Prepay Service Plan</ns1:ExternalName>
                  <ns1:ServiceType ID="3976">Your Mobile Phone Thing</ns1:ServiceType>
                  <ns1:AvailableQuantity>1</ns1:AvailableQuantity>
                  <ns1:Mandatory>true</ns1:Mandatory>
               </ns1:ServicePlan>
            </ns1:ServicePlans>
         </ns2:PackagePlan>
         <ns2:PackagePlan ID="212165">
            <ns1:ExternalName>Sample Mobile Package Plan</ns1:ExternalName>
            <ns1:Status>Saleable</ns1:Status>
            <ns1:StartDate>2018-04-26</ns1:StartDate>
            <ns1:EndDate xsi:nil="true"/>
            <ns1:SaleableInUserPortal>true</ns1:SaleableInUserPortal>
            <ns1:ServicePlans>
               <ns1:ServicePlan ID="194666">
                  <ns1:ExternalName>Sample Mobile Service Plan</ns1:ExternalName>
                  <ns1:ServiceType ID="3976">Your Mobile Phone Thing</ns1:ServiceType>
                  <ns1:AvailableQuantity>1</ns1:AvailableQuantity>
                  <ns1:Mandatory>true</ns1:Mandatory>
               </ns1:ServicePlan>
            </ns1:ServicePlans>
         </ns2:PackagePlan>
         <ns2:PackagePlan ID="212638">
            <ns1:ExternalName>Another sample Package Plan</ns1:ExternalName>
            <ns1:Status>Active</ns1:Status>
            <ns1:StartDate>2018-06-04</ns1:StartDate>
            <ns1:EndDate xsi:nil="true"/>
            <ns1:SaleableInUserPortal>true</ns1:SaleableInUserPortal>
            <ns1:ServicePlans>
               <ns1:ServicePlan ID="195462">
                  <ns1:ExternalName>Another Sample Service Plan</ns1:ExternalName>
                  <ns1:ServiceType ID="3976">Your Mobile Phone Thing</ns1:ServiceType>
                  <ns1:AvailableQuantity>1</ns1:AvailableQuantity>
                  <ns1:Mandatory>true</ns1:Mandatory>
               </ns1:ServicePlan>
            </ns1:ServicePlans>
         </ns2:PackagePlan>
      </ns2:getPackagePlansResponse>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>





Field Descriptions

All field names are case sensitive. Check enumerated values in the descriptions to confirm capitalisation and spacing. See field types for additional information..

NameDescriptionRequired?Field Type

Character

limit

Values
loginToken
The authentication token as it was returned by the Authentication/login API call.YesString64

A valid session token.

ServiceTypes
The repetition of service type ID.Yes
Int28A valid service type ID
Saleable

The plan is in one of the following statuses:

  • approved
  • saleable
  • active

and;

the saleable from date is in the past.

and;

the saleable to date is in the future, or blank.

NoBoolean

Enter:

  • true
  • false
SaleableInUserPortal
This flag allows the plan to be accessible via the End User Portal.NoBoolean

Enter:

  • true
  • false