Difference between revisions of "API/Minimal"

From Emersion
Jump to: navigation, search
Line 58: Line 58:
 
Outputs:
 
Outputs:
  
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://emersion.com.au/Minimal">
 
 
   <SOAP-ENV:Body>
 
   <SOAP-ENV:Body>
 
       <ns1:CreateAccountResponse>
 
       <ns1:CreateAccountResponse>
Line 64: Line 63:
 
       </ns1:CreateAccountResponse>
 
       </ns1:CreateAccountResponse>
 
   </SOAP-ENV:Body>
 
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
 
  
  
 
Error Strings Used:
 
Error Strings Used:
  
1. Account Id is required field
+
# Account Id is required field
2. Invalid Account Id
+
# Invalid Account Id
3. Invalid Contact Type requested.'.$msg
+
# Invalid Contact Type requested.'.$msg
4. You do not own this account
+
# You do not own this account

Revision as of 12:14, 26 August 2014

Minimal

The first set of web services released by Emersion for Integration by clients, it was the 'minimal' set of services to get up and going, and thus the name. Due to backwards compatibility with anyone using the services, it will remain as 'Minimal', even though there is nothing minimal about it. Account type is inserted based on the parent account type:

* Wholesale Account will create Service Provider Account Type.
* Service Provider Account and Agent Account will create End User Account Type.
* End User and Engineering account are not allowed to create new account.
* Emersion Account is not currently supported because the account has the capability of creating 2 different types of account which are wholesale and service provider.

The WSDL is at https://external-prerelease.emersion.com.au/Minimal.wsdl

Create Account

Purpose: Create a new account as a child of the callers account

Inputs:

  <soapenv:Header/>
  <soapenv:Body>
     <umb:MinimalAccount>
        <umb:id>?</umb:id>
        <umb:Name>?</umb:Name>
        <umb:PrimaryContact>
           <umb:id>?</umb:id>
           <umb:FirstName>?</umb:FirstName>
           <umb:LastName>?</umb:LastName>
           <umb:PrimaryEmail>?</umb:PrimaryEmail>
           <umb:MobileNumber>?</umb:MobileNumber>
           <umb:UserPortalLogin>
              <umb:Username>?</umb:Username>
              <umb:Password>?</umb:Password>
           </umb:UserPortalLogin>
        </umb:PrimaryContact>
        <umb:ReferralName>?</umb:ReferralName>
     </umb:MinimalAccount>
  </soapenv:Body>


Example Validation Error:

  <SOAP-ENV:Body>
     <SOAP-ENV:Fault>
        <faultcode>SOAP-ENV:Client</faultcode>
        <faultstring>Validation Error</faultstring>
        <faultactor>http://emersion.com.au/Minimal</faultactor>
        <detail>UserPortalLogin Username does not contain "@"</detail>
     </SOAP-ENV:Fault>
  </SOAP-ENV:Body>


Outputs:

  <SOAP-ENV:Body>
     <ns1:CreateAccountResponse>
        <AccountID>249795</AccountID>
     </ns1:CreateAccountResponse>
  </SOAP-ENV:Body>


Error Strings Used:

  1. Account Id is required field
  2. Invalid Account Id
  3. Invalid Contact Type requested.'.$msg
  4. You do not own this account