API/Services/UpdateAccount

From Emersion
Jump to: navigation, search

Update Account

Purpose

This allows you to update the primary contact details of an existing account. It is quite similar to creating an account only it has to be performed with existing end user accounts. Please note that the same input rules from create account apply here with respect to account type, org information and org types. Account ID is a mandatory field and must be supplied – it is the same account ID returned when creating an account.

Inputs

<xmlns:ser="http://emersion.com.au/ServiceObjects">

  <soapenv:Header/>
  <soapenv:Body>
     <ser:UpdateComplexAccount>
        <ser:AccountID>?</ser:AccountID>
        <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:UpdateComplexAccount>
  </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/Services</faultactor>
        <detail>Invalid or Missing Account ID</detail>
     </SOAP-ENV:Fault>

Output

  <xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"     xmlns:ns1="http://emersion.com.au/ServiceObjects">
   <SOAP-ENV:Body>
     <ns1:UpdateAccountResponse>
        <ns1:Result>true</ns1:Result>
     </ns1:UpdateAccountResponse>
   </SOAP-ENV:Body>


Error String

47. Invalid or Missing Account Type

48. Invalid or Missing Account ID

49. Could not find Account ID!

50. You do not have permission to modify this Account!

51. Invalid CumulusUser Username

52. CumulusUser Username does not contain "@"

53. CumulusUser Username contains an invalid suffix

54. CumulusUser Username is already in use

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

70. Invalid or Missing CumulusUser Username

71. Invalid or Missing Password