Difference between revisions of "API/Services/CreateAccount"

From Emersion
Jump to: navigation, search
(Create Account)
 
(One intermediate revision by one other user not shown)
Line 2: Line 2:
  
 
'''Purpose'''
 
'''Purpose'''
Create a new account as a child of the callers account. This is a slightly more complex version than the one in Minimal.
+
Create a new account as a child of the callers account. This is a more complex version than the one in Minimal.
  
 
'''Inputs'''
 
'''Inputs'''
Line 85: Line 85:
 
       </ser:CreateComplexAccount>
 
       </ser:CreateComplexAccount>
 
   </soapenv:Body>
 
   </soapenv:Body>
 +
 +
'''Sample Call with Creating New Xero Contact'''
 +
 +
'''Request'''
 +
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:emersion:api" xmlns:urn1="urn:emersion:types">
 +
  <soapenv:Header/>
 +
  <soapenv:Body>
 +
      <urn:CreateAccount>
 +
        <urn:Account>
 +
            <urn1:Type>End User</urn1:Type>
 +
            <urn1:Status>Active</urn1:Status>
 +
            <urn1:StartDate>2019-05-31</urn1:StartDate>
 +
            <!--Optional:-->
 +
            <urn1:Contacts>
 +
              <!--Zero or more repetitions:-->
 +
              <urn1:Contact>
 +
                  <!--Optional:-->
 +
                  <urn1:IsPrimary>1</urn1:IsPrimary>
 +
                  <!--Optional:-->
 +
                  <urn1:IsBilling>1</urn1:IsBilling>
 +
                  <urn1:Type>Resident</urn1:Type>
 +
                  <urn1:Title>MR</urn1:Title>
 +
                  <urn1:FirstName>Rory</urn1:FirstName>
 +
                  <urn1:LastName>Lusher</urn1:LastName>
 +
                  <urn1:DateOfBirth>1975-04-28</urn1:DateOfBirth>
 +
                  <urn1:Addresses></urn1:Addresses>
 +
                  <urn1:PhoneNumbers/>
 +
                  <!--Zero or more repetitions:-->
 +
                  <urn1:EmailAddresses>
 +
                    <!--Zero or more repetitions:-->
 +
                  </urn1:EmailAddresses>
 +
              </urn1:Contact>
 +
            </urn1:Contacts>
 +
            <!--Optional:-->
 +
            <urn1:Organisation>
 +
              <urn1:RegistrationNames>
 +
                  <!--1 to 2 repetitions:-->
 +
                  <urn1:RegistrationName>
 +
                    <urn1:RegistrationType>Legal</urn1:RegistrationType>
 +
                    <urn1:Name>Fakhir</urn1:Name>
 +
                    <urn1:OrganisationType>Ltd</urn1:OrganisationType>
 +
                    <urn1:RegistrationNumbers>
 +
                        <!--Zero or more repetitions:-->
 +
                        <urn1:RegistrationNumber>
 +
                          <urn1:Number>12121212</urn1:Number>
 +
                          <urn1:Type>UEN</urn1:Type>
 +
                        </urn1:RegistrationNumber>
 +
                    </urn1:RegistrationNumbers>
 +
                  </urn1:RegistrationName>
 +
              </urn1:RegistrationNames>
 +
              <urn1:TradingName>Fakhir</urn1:TradingName>
 +
              <urn1:OrganisationCountry>Singapore</urn1:OrganisationCountry>
 +
              <urn1:Addresses></urn1:Addresses>
 +
              <urn1:PhoneNumbers>
 +
                  <!--Zero or more repetitions:-->
 +
              </urn1:PhoneNumbers>
 +
              <urn1:EmailAddresses></urn1:EmailAddresses>
 +
            </urn1:Organisation>
 +
            <!--Optional:-->
 +
            <urn1:ExternalIntegrations>
 +
              <!--Optional:-->
 +
              <urn1:XeroContact Action="Create"></urn1:XeroContact>
 +
            </urn1:ExternalIntegrations>
 +
        </urn:Account>
 +
      </urn:CreateAccount>
 +
  </soapenv:Body>
 +
</soapenv:Envelope>
 +
 +
'''Response'''
 +
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:emersion:types" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="urn:emersion:api">
 +
  <SOAP-ENV:Body>
 +
      <ns2:CreateAccountResponse>
 +
        <ns2:Account ID="3818461">
 +
            <ns1:DisplayName>Fakhir Ltd</ns1:DisplayName>
 +
            <ns1:Type>End User</ns1:Type>
 +
            <ns1:Status>Active</ns1:Status>
 +
            <ns1:StartDate>2019-05-31</ns1:StartDate>
 +
            <ns1:Contacts>
 +
              <ns1:Contact ID="730651">
 +
                  <ns1:IsPrimary>true</ns1:IsPrimary>
 +
                  <ns1:IsBilling>true</ns1:IsBilling>
 +
                  <ns1:Type>Resident</ns1:Type>
 +
                  <ns1:Title>MR</ns1:Title>
 +
                  <ns1:FirstName>Rory</ns1:FirstName>
 +
                  <ns1:LastName>Lusher</ns1:LastName>
 +
                  <ns1:DateOfBirth>1975-04-28</ns1:DateOfBirth>
 +
                  <ns1:Identifiers/>
 +
                  <ns1:Addresses/>
 +
                  <ns1:PreferredPhoneNumber xsi:nil="true"/>
 +
                  <ns1:PhoneNumbers/>
 +
                  <ns1:EmailAddresses/>
 +
                  <ns1:LastUpdated>2019-09-11T10:41:18+10:00</ns1:LastUpdated>
 +
              </ns1:Contact>
 +
            </ns1:Contacts>
 +
            <ns1:Organisation ID="203965">
 +
              <ns1:RegistrationNames>
 +
                  <ns1:RegistrationName ID="193614">
 +
                    <ns1:RegistrationType>Legal</ns1:RegistrationType>
 +
                    <ns1:Name>Fakhir</ns1:Name>
 +
                    <ns1:OrganisationType>Ltd</ns1:OrganisationType>
 +
                    <ns1:RegistrationNumbers>
 +
                        <ns1:RegistrationNumber ID="231508">
 +
                          <ns1:Number>12121212</ns1:Number>
 +
                          <ns1:Type>UEN</ns1:Type>
 +
                          <ns1:RegistrationDate xsi:nil="true"/>
 +
                          <ns1:DeRegistrationDate xsi:nil="true"/>
 +
                          <ns1:LastUpdated>2019-09-11T10:41:21+10:00</ns1:LastUpdated>
 +
                        </ns1:RegistrationNumber>
 +
                    </ns1:RegistrationNumbers>
 +
                    <ns1:LastUpdated>2019-09-11T10:41:21+10:00</ns1:LastUpdated>
 +
                  </ns1:RegistrationName>
 +
              </ns1:RegistrationNames>
 +
              <ns1:TradingName>Fakhir</ns1:TradingName>
 +
              <ns1:OrganisationCountry>Singapore</ns1:OrganisationCountry>
 +
              <ns1:Addresses/>
 +
              <ns1:PhoneNumbers/>
 +
              <ns1:EmailAddresses/>
 +
              <ns1:LastUpdated>2019-09-11T10:41:21+10:00</ns1:LastUpdated>
 +
            </ns1:Organisation>
 +
            <ns1:Attributes>
 +
              <ns1:Attribute>
 +
                  <ns1:Name>account_billing_day</ns1:Name>
 +
                  <ns1:Value>1</ns1:Value>
 +
              </ns1:Attribute>
 +
            </ns1:Attributes>
 +
            <ns1:ExportReference xsi:nil="true"/>
 +
            <ns1:CrmExportReference xsi:nil="true"/>
 +
            <ns1:ExternalIntegrations>
 +
              <ns1:XeroContact>60d30150-2e8e-43f2-9ea6-e31142cf905a</ns1:XeroContact>
 +
            </ns1:ExternalIntegrations>
 +
        </ns2:Account>
 +
      </ns2:CreateAccountResponse>
 +
  </SOAP-ENV:Body>
 +
</SOAP-ENV:Envelope>
 +
 +
'''Sample Call with Using Existing Xero Contact ID'''
 +
 +
'''Request'''
 +
 +
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:emersion:api" xmlns:urn1="urn:emersion:types">
 +
  <soapenv:Header/>
 +
  <soapenv:Body>
 +
      <urn:CreateAccount>
 +
        <urn:Account>
 +
            <urn1:Type>End User</urn1:Type>
 +
            <urn1:Status>Active</urn1:Status>
 +
            <urn1:StartDate>2019-05-31</urn1:StartDate>
 +
            <!--Optional:-->
 +
            <urn1:Contacts>
 +
              <!--Zero or more repetitions:-->
 +
              <urn1:Contact>
 +
                  <!--Optional:-->
 +
                  <urn1:IsPrimary>1</urn1:IsPrimary>
 +
                  <!--Optional:-->
 +
                  <urn1:IsBilling>1</urn1:IsBilling>
 +
                  <urn1:Type>Resident</urn1:Type>
 +
                  <urn1:Title>MR</urn1:Title>
 +
                  <urn1:FirstName>Dean</urn1:FirstName>
 +
                  <urn1:LastName>Cowan</urn1:LastName>
 +
                  <urn1:DateOfBirth>1975-04-28</urn1:DateOfBirth>
 +
                  <urn1:Addresses></urn1:Addresses>
 +
                  <urn1:PhoneNumbers/>
 +
                  <!--Zero or more repetitions:-->
 +
                  <urn1:EmailAddresses>
 +
                    <!--Zero or more repetitions:-->
 +
                  </urn1:EmailAddresses>
 +
              </urn1:Contact>
 +
            </urn1:Contacts>
 +
            <!--Optional:-->
 +
            <urn1:Organisation>
 +
              <urn1:RegistrationNames>
 +
                  <!--1 to 2 repetitions:-->
 +
                  <urn1:RegistrationName>
 +
                    <urn1:RegistrationType>Legal</urn1:RegistrationType>
 +
                    <urn1:Name>Dean</urn1:Name>
 +
                    <urn1:OrganisationType>Ltd</urn1:OrganisationType>
 +
                    <urn1:RegistrationNumbers>
 +
                        <!--Zero or more repetitions:-->
 +
                        <urn1:RegistrationNumber>
 +
                          <urn1:Number>12121212</urn1:Number>
 +
                          <urn1:Type>UEN</urn1:Type>
 +
                        </urn1:RegistrationNumber>
 +
                    </urn1:RegistrationNumbers>
 +
                  </urn1:RegistrationName>
 +
              </urn1:RegistrationNames>
 +
              <urn1:TradingName>Fakhir</urn1:TradingName>
 +
              <urn1:OrganisationCountry>Singapore</urn1:OrganisationCountry>
 +
              <urn1:Addresses></urn1:Addresses>
 +
              <urn1:PhoneNumbers>
 +
                  <!--Zero or more repetitions:-->
 +
              </urn1:PhoneNumbers>
 +
              <urn1:EmailAddresses></urn1:EmailAddresses>
 +
            </urn1:Organisation>
 +
            <!--Optional:-->
 +
            <urn1:ExternalIntegrations>
 +
              <!--Optional:-->
 +
              <urn1:XeroContact>60d30150-2e8e-43f2-9ea6-e31142cf905a</urn1:XeroContact>
 +
            </urn1:ExternalIntegrations>
 +
        </urn:Account>
 +
      </urn:CreateAccount>
 +
  </soapenv:Body>
 +
</soapenv:Envelope>
 +
 +
'''Response'''
 +
 +
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:emersion:types" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="urn:emersion:api">
 +
  <SOAP-ENV:Body>
 +
      <ns2:CreateAccountResponse>
 +
        <ns2:Account ID="3818462">
 +
            <ns1:DisplayName>Dean Ltd</ns1:DisplayName>
 +
            <ns1:Type>End User</ns1:Type>
 +
            <ns1:Status>Active</ns1:Status>
 +
            <ns1:StartDate>2019-05-31</ns1:StartDate>
 +
            <ns1:Contacts>
 +
              <ns1:Contact ID="730652">
 +
                  <ns1:IsPrimary>true</ns1:IsPrimary>
 +
                  <ns1:IsBilling>true</ns1:IsBilling>
 +
                  <ns1:Type>Resident</ns1:Type>
 +
                  <ns1:Title>MR</ns1:Title>
 +
                  <ns1:FirstName>Dean</ns1:FirstName>
 +
                  <ns1:LastName>Cowan</ns1:LastName>
 +
                  <ns1:DateOfBirth>1975-04-28</ns1:DateOfBirth>
 +
                  <ns1:Identifiers/>
 +
                  <ns1:Addresses/>
 +
                  <ns1:PreferredPhoneNumber xsi:nil="true"/>
 +
                  <ns1:PhoneNumbers/>
 +
                  <ns1:EmailAddresses/>
 +
                  <ns1:LastUpdated>2019-09-11T10:44:43+10:00</ns1:LastUpdated>
 +
              </ns1:Contact>
 +
            </ns1:Contacts>
 +
            <ns1:Organisation ID="203966">
 +
              <ns1:RegistrationNames>
 +
                  <ns1:RegistrationName ID="193615">
 +
                    <ns1:RegistrationType>Legal</ns1:RegistrationType>
 +
                    <ns1:Name>Dean</ns1:Name>
 +
                    <ns1:OrganisationType>Ltd</ns1:OrganisationType>
 +
                    <ns1:RegistrationNumbers>
 +
                        <ns1:RegistrationNumber ID="231509">
 +
                          <ns1:Number>12121212</ns1:Number>
 +
                          <ns1:Type>UEN</ns1:Type>
 +
                          <ns1:RegistrationDate xsi:nil="true"/>
 +
                          <ns1:DeRegistrationDate xsi:nil="true"/>
 +
                          <ns1:LastUpdated>2019-09-11T10:44:44+10:00</ns1:LastUpdated>
 +
                        </ns1:RegistrationNumber>
 +
                    </ns1:RegistrationNumbers>
 +
                    <ns1:LastUpdated>2019-09-11T10:44:44+10:00</ns1:LastUpdated>
 +
                  </ns1:RegistrationName>
 +
              </ns1:RegistrationNames>
 +
              <ns1:TradingName>Fakhir</ns1:TradingName>
 +
              <ns1:OrganisationCountry>Singapore</ns1:OrganisationCountry>
 +
              <ns1:Addresses/>
 +
              <ns1:PhoneNumbers/>
 +
              <ns1:EmailAddresses/>
 +
              <ns1:LastUpdated>2019-09-11T10:44:44+10:00</ns1:LastUpdated>
 +
            </ns1:Organisation>
 +
            <ns1:Attributes>
 +
              <ns1:Attribute>
 +
                  <ns1:Name>account_billing_day</ns1:Name>
 +
                  <ns1:Value>1</ns1:Value>
 +
              </ns1:Attribute>
 +
            </ns1:Attributes>
 +
            <ns1:ExportReference xsi:nil="true"/>
 +
            <ns1:CrmExportReference xsi:nil="true"/>
 +
            <ns1:ExternalIntegrations>
 +
              <ns1:XeroContact>60d30150-2e8e-43f2-9ea6-e31142cf905a</ns1:XeroContact>
 +
            </ns1:ExternalIntegrations>
 +
        </ns2:Account>
 +
      </ns2:CreateAccountResponse>
 +
  </SOAP-ENV:Body>
 +
</SOAP-ENV:Envelope>
 +
  
 
'''Important notes:'''
 
'''Important notes:'''
Line 152: Line 423:
  
 
'''Error String:'''
 
'''Error String:'''
 +
 
25. Invalid or Missing Account Type
 
25. Invalid or Missing Account Type
 +
 
26. Invalid CumulusUser Username
 
26. Invalid CumulusUser Username
 +
 
27. CumulusUser Username does not contain "@"
 
27. CumulusUser Username does not contain "@"
 +
 
28. CumulusUser Username contains an invalid suffix
 
28. CumulusUser Username contains an invalid suffix
 +
 
29. CumulusUser Username is already in use
 
29. CumulusUser Username is already in use
 +
 
30. Missing AccountContactType. Type Value must be either 'Organisation' or 'Org' or 'Individual'
 
30. Missing AccountContactType. Type Value must be either 'Organisation' or 'Org' or 'Individual'
 +
 
31. Invalid AccountContactType. Type Value must be either 'Organisation' or 'Org' or 'Individual'
 
31. Invalid AccountContactType. Type Value must be either 'Organisation' or 'Org' or 'Individual'
 +
 
32. Missing OrgName. When AccountContactType is 'Organisation' OrgName is required
 
32. Missing OrgName. When AccountContactType is 'Organisation' OrgName is required
 +
 
33. Invalid OrgType. If given OrgType value,then it must valid integer. Otherwise leave blank to set default value 29 for org type 'Company'
 
33. Invalid OrgType. If given OrgType value,then it must valid integer. Otherwise leave blank to set default value 29 for org type 'Company'
 +
 
34. $contactType.': ' . 'Invalid or Missing Title
 
34. $contactType.': ' . 'Invalid or Missing Title
 +
 
35. $contactType.': ' . 'Invalid or Missing First Name
 
35. $contactType.': ' . 'Invalid or Missing First Name
 +
 
36. $contactType.': ' . 'Invalid or Missing Last Name
 
36. $contactType.': ' . 'Invalid or Missing Last Name
 +
 
37. $contactType.': ' . 'Invalid or Missing Address
 
37. $contactType.': ' . 'Invalid or Missing Address
 +
 
38. $contactType.': ' . 'Invalid or Missing Suburb
 
38. $contactType.': ' . 'Invalid or Missing Suburb
 +
 
39. $contactType.': ' . 'Invalid or Missing State
 
39. $contactType.': ' . 'Invalid or Missing State
 +
 
40. $contactType.': ' . 'Invalid or Missing Postcode
 
40. $contactType.': ' . 'Invalid or Missing Postcode
 +
 
41. $contactType.': ' . 'Invalid or Missing Country
 
41. $contactType.': ' . 'Invalid or Missing Country
 +
 
42. $contactType.': ' . 'Invalid or Missing Email Address
 
42. $contactType.': ' . 'Invalid or Missing Email Address
 +
 
43. $contactType.': ' . 'Invalid or Missing Phone Number
 
43. $contactType.': ' . 'Invalid or Missing Phone Number
 +
 
44. $contactType.': ' . "Invalid Website
 
44. $contactType.': ' . "Invalid Website
 +
 
45. Invalid or Missing CumulusUser Username
 
45. Invalid or Missing CumulusUser Username
 +
 
46. Invalid or Missing Password
 
46. Invalid or Missing Password

Latest revision as of 11:58, 20 September 2019

Create Account

Purpose Create a new account as a child of the callers account. This is a more complex version than the one in Minimal.

Inputs

  <soapenv:Header/>
  <soapenv:Body>
     <ser:CreateComplexAccount>
        <ser:LicenceeUsername>?</ser:LicenceeUsername>
        <ser:AccountType>?</ser:AccountType>
        <ser:PrimaryContact>
           <ser:Detail>
              <ser:Title>?</ser:Title>
              <ser:FirstName>?</ser:FirstName>
              <ser:LastName>?</ser:LastName>
              <ser:AddressLine1>?</ser:AddressLine1>
              <ser:AddressLine2>?</ser:AddressLine2>
              <ser:AddressLine3>?</ser:AddressLine3>
              <ser:Suburb>?</ser:Suburb>
              <ser:State>?</ser:State>
              <ser:Postcode>?</ser:Postcode>
              <ser:Country>?</ser:Country>
              <ser:EmailAddress>?</ser:EmailAddress>
              <ser:PhoneNumber>?</ser:PhoneNumber>
              <ser:MobileNumber>?</ser:MobileNumber>
              <ser:FaxNumber>?</ser:FaxNumber>
              <ser:Website>?</ser:Website>
           </ser:Detail>
           <ser:CumulusUser>
              <ser:UserName>?</ser:UserName>
              <ser:Password>?</ser:Password>
           </ser:CumulusUser>
        </ser:PrimaryContact>
        <ser:AccountContactType>
           <ser:Type>?</ser:Type>
        </ser:AccountContactType>
        <ser:AccountOrganisation>
           <ser:OrgName>?</ser:OrgName>
           <ser:OrgTradingName>?</ser:OrgTradingName>
           <ser:OrgType>?</ser:OrgType>
           <ser:OrgIdentifier>?</ser:OrgIdentifier>
           <ser:OrgIdentifierType>?</ser:OrgIdentifierType>
        </ser:AccountOrganisation>
        <ser:BillingContact>
           <ser:Detail>
              <ser:Title>?</ser:Title>
              <ser:FirstName>?</ser:FirstName>
              <ser:LastName>?</ser:LastName>
              <ser:AddressLine1>?</ser:AddressLine1>
              <ser:AddressLine2>?</ser:AddressLine2>
              <ser:AddressLine3>?</ser:AddressLine3>
              <ser:Suburb>?</ser:Suburb>
              <ser:State>?</ser:State>
              <ser:Postcode>?</ser:Postcode>
              <ser:Country>?</ser:Country>
              <ser:EmailAddress>?</ser:EmailAddress>
              <ser:PhoneNumber>?</ser:PhoneNumber>
              <ser:MobileNumber>?</ser:MobileNumber>
              <ser:FaxNumber>?</ser:FaxNumber>
              <ser:Website>?</ser:Website>
           </ser:Detail>
        </ser:BillingContact>
        <ser:AccountReference>?</ser:AccountReference>
     </ser:CreateComplexAccount>
  </soapenv:Body>

Sample Call with Creating New Xero Contact

Request <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:emersion:api" xmlns:urn1="urn:emersion:types">

  <soapenv:Header/>
  <soapenv:Body>
     <urn:CreateAccount>
        <urn:Account>
           <urn1:Type>End User</urn1:Type>
           <urn1:Status>Active</urn1:Status>
           <urn1:StartDate>2019-05-31</urn1:StartDate>
           <urn1:Contacts>
              <urn1:Contact>
                 <urn1:IsPrimary>1</urn1:IsPrimary>
                 <urn1:IsBilling>1</urn1:IsBilling>
                 <urn1:Type>Resident</urn1:Type>
                 <urn1:Title>MR</urn1:Title>
                 <urn1:FirstName>Rory</urn1:FirstName>
                 <urn1:LastName>Lusher</urn1:LastName>
                 <urn1:DateOfBirth>1975-04-28</urn1:DateOfBirth>
                 <urn1:Addresses></urn1:Addresses>
                 <urn1:PhoneNumbers/>
                 <urn1:EmailAddresses>
                 </urn1:EmailAddresses>
              </urn1:Contact>
           </urn1:Contacts>
           <urn1:Organisation>
              <urn1:RegistrationNames>
                 <urn1:RegistrationName>
                    <urn1:RegistrationType>Legal</urn1:RegistrationType>
                    <urn1:Name>Fakhir</urn1:Name>
                    <urn1:OrganisationType>Ltd</urn1:OrganisationType>
                    <urn1:RegistrationNumbers>
                       <urn1:RegistrationNumber>
                          <urn1:Number>12121212</urn1:Number>
                          <urn1:Type>UEN</urn1:Type>
                       </urn1:RegistrationNumber>
                    </urn1:RegistrationNumbers>
                 </urn1:RegistrationName>
              </urn1:RegistrationNames>
              <urn1:TradingName>Fakhir</urn1:TradingName>
              <urn1:OrganisationCountry>Singapore</urn1:OrganisationCountry>
              <urn1:Addresses></urn1:Addresses>
              <urn1:PhoneNumbers>
              </urn1:PhoneNumbers>
              <urn1:EmailAddresses></urn1:EmailAddresses>
           </urn1:Organisation>
           <urn1:ExternalIntegrations>
              <urn1:XeroContact Action="Create"></urn1:XeroContact>
           </urn1:ExternalIntegrations>
        </urn:Account>
     </urn:CreateAccount>
  </soapenv:Body>

</soapenv:Envelope>

Response <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:emersion:types" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="urn:emersion:api">

  <SOAP-ENV:Body>
     <ns2:CreateAccountResponse>
        <ns2:Account ID="3818461">
           <ns1:DisplayName>Fakhir Ltd</ns1:DisplayName>
           <ns1:Type>End User</ns1:Type>
           <ns1:Status>Active</ns1:Status>
           <ns1:StartDate>2019-05-31</ns1:StartDate>
           <ns1:Contacts>
              <ns1:Contact ID="730651">
                 <ns1:IsPrimary>true</ns1:IsPrimary>
                 <ns1:IsBilling>true</ns1:IsBilling>
                 <ns1:Type>Resident</ns1:Type>
                 <ns1:Title>MR</ns1:Title>
                 <ns1:FirstName>Rory</ns1:FirstName>
                 <ns1:LastName>Lusher</ns1:LastName>
                 <ns1:DateOfBirth>1975-04-28</ns1:DateOfBirth>
                 <ns1:Identifiers/>
                 <ns1:Addresses/>
                 <ns1:PreferredPhoneNumber xsi:nil="true"/>
                 <ns1:PhoneNumbers/>
                 <ns1:EmailAddresses/>
                 <ns1:LastUpdated>2019-09-11T10:41:18+10:00</ns1:LastUpdated>
              </ns1:Contact>
           </ns1:Contacts>
           <ns1:Organisation ID="203965">
              <ns1:RegistrationNames>
                 <ns1:RegistrationName ID="193614">
                    <ns1:RegistrationType>Legal</ns1:RegistrationType>
                    <ns1:Name>Fakhir</ns1:Name>
                    <ns1:OrganisationType>Ltd</ns1:OrganisationType>
                    <ns1:RegistrationNumbers>
                       <ns1:RegistrationNumber ID="231508">
                          <ns1:Number>12121212</ns1:Number>
                          <ns1:Type>UEN</ns1:Type>
                          <ns1:RegistrationDate xsi:nil="true"/>
                          <ns1:DeRegistrationDate xsi:nil="true"/>
                          <ns1:LastUpdated>2019-09-11T10:41:21+10:00</ns1:LastUpdated>
                       </ns1:RegistrationNumber>
                    </ns1:RegistrationNumbers>
                    <ns1:LastUpdated>2019-09-11T10:41:21+10:00</ns1:LastUpdated>
                 </ns1:RegistrationName>
              </ns1:RegistrationNames>
              <ns1:TradingName>Fakhir</ns1:TradingName>
              <ns1:OrganisationCountry>Singapore</ns1:OrganisationCountry>
              <ns1:Addresses/>
              <ns1:PhoneNumbers/>
              <ns1:EmailAddresses/>
              <ns1:LastUpdated>2019-09-11T10:41:21+10:00</ns1:LastUpdated>
           </ns1:Organisation>
           <ns1:Attributes>
              <ns1:Attribute>
                 <ns1:Name>account_billing_day</ns1:Name>
                 <ns1:Value>1</ns1:Value>
              </ns1:Attribute>
           </ns1:Attributes>
           <ns1:ExportReference xsi:nil="true"/>
           <ns1:CrmExportReference xsi:nil="true"/>
           <ns1:ExternalIntegrations>
              <ns1:XeroContact>60d30150-2e8e-43f2-9ea6-e31142cf905a</ns1:XeroContact>
           </ns1:ExternalIntegrations>
        </ns2:Account>
     </ns2:CreateAccountResponse>
  </SOAP-ENV:Body>

</SOAP-ENV:Envelope>

Sample Call with Using Existing Xero Contact ID

Request

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:emersion:api" xmlns:urn1="urn:emersion:types">

  <soapenv:Header/>
  <soapenv:Body>
     <urn:CreateAccount>
        <urn:Account>
           <urn1:Type>End User</urn1:Type>
           <urn1:Status>Active</urn1:Status>
           <urn1:StartDate>2019-05-31</urn1:StartDate>
           <urn1:Contacts>
              <urn1:Contact>
                 <urn1:IsPrimary>1</urn1:IsPrimary>
                 <urn1:IsBilling>1</urn1:IsBilling>
                 <urn1:Type>Resident</urn1:Type>
                 <urn1:Title>MR</urn1:Title>
                 <urn1:FirstName>Dean</urn1:FirstName>
                 <urn1:LastName>Cowan</urn1:LastName>
                 <urn1:DateOfBirth>1975-04-28</urn1:DateOfBirth>
                 <urn1:Addresses></urn1:Addresses>
                 <urn1:PhoneNumbers/>
                 <urn1:EmailAddresses>
                 </urn1:EmailAddresses>
              </urn1:Contact>
           </urn1:Contacts>
           <urn1:Organisation>
              <urn1:RegistrationNames>
                 <urn1:RegistrationName>
                    <urn1:RegistrationType>Legal</urn1:RegistrationType>
                    <urn1:Name>Dean</urn1:Name>
                    <urn1:OrganisationType>Ltd</urn1:OrganisationType>
                    <urn1:RegistrationNumbers>
                       <urn1:RegistrationNumber>
                          <urn1:Number>12121212</urn1:Number>
                          <urn1:Type>UEN</urn1:Type>
                       </urn1:RegistrationNumber>
                    </urn1:RegistrationNumbers>
                 </urn1:RegistrationName>
              </urn1:RegistrationNames>
              <urn1:TradingName>Fakhir</urn1:TradingName>
              <urn1:OrganisationCountry>Singapore</urn1:OrganisationCountry>
              <urn1:Addresses></urn1:Addresses>
              <urn1:PhoneNumbers>
              </urn1:PhoneNumbers>
              <urn1:EmailAddresses></urn1:EmailAddresses>
           </urn1:Organisation>
           <urn1:ExternalIntegrations>
              <urn1:XeroContact>60d30150-2e8e-43f2-9ea6-e31142cf905a</urn1:XeroContact>
           </urn1:ExternalIntegrations>
        </urn:Account>
     </urn:CreateAccount>
  </soapenv:Body>

</soapenv:Envelope>

Response

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:emersion:types" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="urn:emersion:api">

  <SOAP-ENV:Body>
     <ns2:CreateAccountResponse>
        <ns2:Account ID="3818462">
           <ns1:DisplayName>Dean Ltd</ns1:DisplayName>
           <ns1:Type>End User</ns1:Type>
           <ns1:Status>Active</ns1:Status>
           <ns1:StartDate>2019-05-31</ns1:StartDate>
           <ns1:Contacts>
              <ns1:Contact ID="730652">
                 <ns1:IsPrimary>true</ns1:IsPrimary>
                 <ns1:IsBilling>true</ns1:IsBilling>
                 <ns1:Type>Resident</ns1:Type>
                 <ns1:Title>MR</ns1:Title>
                 <ns1:FirstName>Dean</ns1:FirstName>
                 <ns1:LastName>Cowan</ns1:LastName>
                 <ns1:DateOfBirth>1975-04-28</ns1:DateOfBirth>
                 <ns1:Identifiers/>
                 <ns1:Addresses/>
                 <ns1:PreferredPhoneNumber xsi:nil="true"/>
                 <ns1:PhoneNumbers/>
                 <ns1:EmailAddresses/>
                 <ns1:LastUpdated>2019-09-11T10:44:43+10:00</ns1:LastUpdated>
              </ns1:Contact>
           </ns1:Contacts>
           <ns1:Organisation ID="203966">
              <ns1:RegistrationNames>
                 <ns1:RegistrationName ID="193615">
                    <ns1:RegistrationType>Legal</ns1:RegistrationType>
                    <ns1:Name>Dean</ns1:Name>
                    <ns1:OrganisationType>Ltd</ns1:OrganisationType>
                    <ns1:RegistrationNumbers>
                       <ns1:RegistrationNumber ID="231509">
                          <ns1:Number>12121212</ns1:Number>
                          <ns1:Type>UEN</ns1:Type>
                          <ns1:RegistrationDate xsi:nil="true"/>
                          <ns1:DeRegistrationDate xsi:nil="true"/>
                          <ns1:LastUpdated>2019-09-11T10:44:44+10:00</ns1:LastUpdated>
                       </ns1:RegistrationNumber>
                    </ns1:RegistrationNumbers>
                    <ns1:LastUpdated>2019-09-11T10:44:44+10:00</ns1:LastUpdated>
                 </ns1:RegistrationName>
              </ns1:RegistrationNames>
              <ns1:TradingName>Fakhir</ns1:TradingName>
              <ns1:OrganisationCountry>Singapore</ns1:OrganisationCountry>
              <ns1:Addresses/>
              <ns1:PhoneNumbers/>
              <ns1:EmailAddresses/>
              <ns1:LastUpdated>2019-09-11T10:44:44+10:00</ns1:LastUpdated>
           </ns1:Organisation>
           <ns1:Attributes>
              <ns1:Attribute>
                 <ns1:Name>account_billing_day</ns1:Name>
                 <ns1:Value>1</ns1:Value>
              </ns1:Attribute>
           </ns1:Attributes>
           <ns1:ExportReference xsi:nil="true"/>
           <ns1:CrmExportReference xsi:nil="true"/>
           <ns1:ExternalIntegrations>
              <ns1:XeroContact>60d30150-2e8e-43f2-9ea6-e31142cf905a</ns1:XeroContact>
           </ns1:ExternalIntegrations>
        </ns2:Account>
     </ns2:CreateAccountResponse>
  </SOAP-ENV:Body>

</SOAP-ENV:Envelope>


Important notes:

8. AccountType needs to be ‘End User

9. CumulusUser-Username has to be the fully qualified domain name i.e. username@domain.com.au

10. CumulusUser-Password needs to be a minimum of 6 characters

11. AccountContactType needs to be Either ‘Individual’ or ‘Organisation’. In case of ‘Organisation’ ‘Org’ can be used as alternative option.

12. OrgIdentifierType needs to be one of ‘ABN’, ‘ACN’, ‘RBN’ or ‘TFN’

13. OrgIdentifier is the value attached to the type. i.e. for ‘ABN’ you would put your ABN number here.

14. Account reference will be stored against the account as an optional piece of text.

15. This will automatically place the default account profile of your SP against the account. If you need a non-default profile, this will need to be managed manually via the Cumulus interface.

16. OrgType is an integer value and can accept any of the below. If not given default will be 29 ‘Company’

Company Types

17. BillingContact is optional. If BillingContact - Detail - Title value is given then script will check all fields and will add Billing Contact.

18. Country and State needs to be a text value from either name or code.

19. Currently only Australian STATES are supported

20. In case of any other country please use ‘Other’ or ‘oth’ as a state value

21. Currently there is no country based state input validation

22. Available list of countries and states are as below

23. State List:

State List

24. Country List:

Country List


Example Validation Error

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


Output

  <xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://emersion.com.au/ServiceObjects">
  <SOAP-ENV:Body>
     <ns1:CreateAccountResponse>
        <ns1:AccountID>399301</ns1:AccountID>
     </ns1:CreateAccountResponse>
  </SOAP-ENV:Body>


Error String:

25. Invalid or Missing Account Type

26. Invalid CumulusUser Username

27. CumulusUser Username does not contain "@"

28. CumulusUser Username contains an invalid suffix

29. CumulusUser Username is already in use

30. Missing AccountContactType. Type Value must be either 'Organisation' or 'Org' or 'Individual'

31. Invalid AccountContactType. Type Value must be either 'Organisation' or 'Org' or 'Individual'

32. Missing OrgName. When AccountContactType is 'Organisation' OrgName is required

33. Invalid OrgType. If given OrgType value,then it must valid integer. Otherwise leave blank to set default value 29 for org type 'Company'

34. $contactType.': ' . 'Invalid or Missing Title

35. $contactType.': ' . 'Invalid or Missing First Name

36. $contactType.': ' . 'Invalid or Missing Last Name

37. $contactType.': ' . 'Invalid or Missing Address

38. $contactType.': ' . 'Invalid or Missing Suburb

39. $contactType.': ' . 'Invalid or Missing State

40. $contactType.': ' . 'Invalid or Missing Postcode

41. $contactType.': ' . 'Invalid or Missing Country

42. $contactType.': ' . 'Invalid or Missing Email Address

43. $contactType.': ' . 'Invalid or Missing Phone Number

44. $contactType.': ' . "Invalid Website

45. Invalid or Missing CumulusUser Username

46. Invalid or Missing Password