Update Account

Use this operation to update any of the writable fields of an existing Account object.

Parameters

Body Params
JSON:json
Account details needs to be passed as body parameter,it should be in JSON format.Unique parameter need to be passed in JSON for eg. AccountID/Account Number/Account Email/Account Name.
XML:string
Account details needs to be passed as body parameter,it should be in XML format.Unique parameter need to be passed in XML for eg. AccountID/Account Number/Account Email/Account Name.
Path Params
yourCompany:string
The Company name need to passed in the base URL.For eg. if you enter xyzcompany name, the url https://{yourCompany}.agiliron.net/agiliron/api-40.php/Accounts will change to https://xyzcompany.agiliron.net/agiliron/api-40.php/Accounts
Header Params
Accept:string
Response header need to be passed for eg. application/json or application/xml.
Query Auth
key:string
API key needs to be passed in this variable.The option to enter API key will appear when you click on Try it button.This will be the first option in AUTHENTICATION block.Default is SET to 0.
Header Auth
apiKey:string
Dedicated API key needs to be passed in this variable via header.The option to enter API key will appear when you click on Try it button.This will be the second option in AUTHENTICATION block.Default is SET to 0.

Sample Code
NOTE: For Account ,

  • AccountNumber is auto generated field it cannot be updated.
{
	"Accounts": {
		"Account": [{
			"AccountNumber": "105835",
			"ParentCompany": "",
			"AccountName": "Test Account",
			"Website": "www.abc.com",
			"Telephone": "56412356",
			"Fax": "5689746",
			"TickerSymbol": "",
			"OtherPhone": "56984663",
			"Email": "[email protected]",
			"Employees": "25",
			"OtherEmail": "[email protected]",
			"Ownership": "Ownership info",
			"Rating": "none",
			"Industry": "Recreation",
			"SICCode": "10",
			"Type": "Wholesale",
			"AnnualRevenue": "65",
			"SalesManager": "",
			"AssignedToUser": "admin",
			"CreatedTime": "01-24-2020 05:19:56",
			"ModifiedTime": "01-24-2020 05:19:56",
			"TaxAuthority": "Indiana State",
			"SalesArea": "United States",
			"SalesPerson": "SalesRep2",
			"AccountStatus": "",
			"Priority": "--None--",
			"PaymentMethod": "Cash",
			"TermsAndConditions": "",
			"Carrier": "Not Specified25",
			"ShippingMethod": "???",
			"DeliverFrom": "OAK",
			"BackorderHandling": "--None--",
			"SpecialHandling": "",
			"BillingAddress": "1515 Clay Street",
			"BillingSuburb": "",
			"BillingCity": "Oakland",
			"BillingPostcode": "94624",
			"BillingState": "CA",
			"BillingCountry": "United States",
			"ShippingAddress": "1515 Clay Street",
			"ShippingCity": "Oakland",
			"ShippingPostcode": "94624",
			"ShippingState": "CA",
			"ShippingCountry": "United States",
			"PriceBook": "Bargains",
			"SpecialsPriceBook": "Retail - OAKS",
			"Discount": "10",
			"CreditLimitExpires": "01-24-2020",
			"CreditLimit": "1000.00",
			"TaxID": "45659",
			"ResellerID": "8965",
			"DefaultCurrency": "USD",
			"Credits": "0",
			"Description": "The Description Goes here.",
			"AccountCustomFields": {
				"CustomField": [{
						"Name": "CustomField1",
						"Value": "Custom info 1"
					},
					{
						"Name": "CustomField2",
						"Value": "Custom info 2"
					},
					{
						"Name": "CustomDateField",
						"Value": "yyyy-mm-dd"
					}
				]
			}
		}]
	}
}
<Accounts>
    <Account>
        <AccountNumber>105835</AccountNumber>
        <ParentCompany></ParentCompany>
        <AccountName>Test Account</AccountName>
        <Website>www.abc.com</Website>
        <Telephone>56412356</Telephone>
        <Fax>5689746</Fax>
        <TickerSymbol></TickerSymbol>
        <OtherPhone>56984663</OtherPhone>
        <Email>[email protected]</Email>
        <Employees>25</Employees>
        <OtherEmail>[email protected]</OtherEmail>
        <Ownership>Ownership info</Ownership>
        <Rating>none</Rating>
        <Industry>Recreation</Industry>
        <SICCode>10</SICCode>
        <Type>Wholesale</Type>
        <AnnualRevenue>65</AnnualRevenue>
        <SalesManager></SalesManager>
        <AssignedToUser>admin</AssignedToUser>
        <CreatedTime>01-24-2020 05:19:56</CreatedTime>
        <ModifiedTime>01-24-2020 05:19:56</ModifiedTime>
        <TaxAuthority>Indiana State</TaxAuthority>
        <SalesArea>United States</SalesArea>
        <SalesPerson>SalesRep2</SalesPerson>
        <AccountStatus></AccountStatus>
        <Priority>--None--</Priority>
        <PaymentMethod>Cash</PaymentMethod>
        <TermsAndConditions></TermsAndConditions>
        <Carrier>Not Specified25</Carrier>
        <ShippingMethod>???</ShippingMethod>
        <DeliverFrom>OAK</DeliverFrom>
        <BackorderHandling>--None--</BackorderHandling>
        <SpecialHandling></SpecialHandling>
        <BillingAddress>1515 Clay Street</BillingAddress>
        <BillingSuburb></BillingSuburb>
        <BillingCity>Oakland</BillingCity>
        <BillingPostcode>94624</BillingPostcode>
        <BillingState>CA</BillingState>
        <BillingCountry>United States</BillingCountry>
        <ShippingAddress>1515 Clay Street</ShippingAddress>
        <ShippingCity>Oakland</ShippingCity>
        <ShippingPostcode>94624</ShippingPostcode>
        <ShippingState>CA</ShippingState>
        <ShippingCountry>United States</ShippingCountry>
        <PriceBook>Bargains</PriceBook>
        <SpecialsPriceBook>Retail - OAKS</SpecialsPriceBook>
        <Discount>10</Discount>
        <CreditLimitExpires>01-24-2020</CreditLimitExpires>
        <CreditLimit>1000.00</CreditLimit>
        <TaxID>45659</TaxID>
        <ResellerID>8965</ResellerID>
        <DefaultCurrency>USD</DefaultCurrency>
        <Credits>0</Credits>
        <Description>The Description Goes here.</Description>
        <AccountCustomFields>
            <CustomField>
                <Name>CustomFied1</Name>
                <Value>Custom info 1</Value>
            </CustomField>
            <CustomField>
                <Name>CustomFied2</Name>
                <Value>Custom info 2</Value>
            </CustomField>
          	<CustomField>
                <Name>CustomDateFied</Name>
                <Value>yyyy-mm-dd</Value>
            </CustomField>
        </AccountCustomFields>
    </Account>
</Accounts>

Sample Response

{
    "MCM": {
        "response": {
            "objectType": "Accounts",
            "syncTime": "2021-06-10 03:23:14"
        },
        "parameters": {
            "results": {
                "message": {
                    "status": "Success",
                    "success_message": {
                        "account_name": "Test Account",
                        "account_id": "203060"
                    }
                }
            }
        }
    }
}
<MCM>
  <response>
    <objectType>Accounts</objectType>
    <syncTime>2021-06-10 03:23:14</syncTime>
  </response>
  <parameters>
    <results>
      <message>
        <status>Success</status>
        <success_message>
          <account_name>Test Account</account_name>
          <account_id>203060</account_id>
        </success_message>
      </message>
    </results>
  </parameters>
</MCM>

WADL

<?xml version="1.0" encoding="utf-8"?>
<application>
   <resources base="https://{yourCompany}.agiliron.net/agiliron/api-40/">
     <resource path="Accounts">
       <method name="PUT">
         <request>
           <param name="key" type="xsd:string" style="query" required="true"/>
           <param name="AccountNumber" type="xsd:int" style="body"/>
           <param name="AccountID" type="xsd:int" style="body" required="true"/>
           <param name="ParentCompany" type="xsd:string" style="body"/>
           <param name="AccountName" type="xsd:string" style="body" required="true"/>
           <param name="Website" type="xsd:string" style="body"/>
           <param name="Telephone" type="xsd:string" style="body"/>
           <param name="Fax" type="xsd:string" style="body"/>
           <param name="OtherPhone" type="xsd:string" style="body"/>
           <param name="Email" type="xsd:string" style="body"/>
           <param name="Employees" type="xsd:string" style="body"/>
           <param name="OtherEmail" type="xsd:string" style="body"/>
           <param name="Ownership" type="xsd:string" style="body"/>
           <param name="Rating" type="xsd:string" style="body"/>
           <param name="Industry" type="xsd:string" style="body"/>
           <param name="SICCode" type="xsd:int" style="body"/>
           <param name="Type" type="xsd:string" style="body"/>
           <param name="AnnualRevenue" type="xsd:int" style="body"/>
           <param name="AssignedToUser" type="xsd:string" style="body"/>
           <param name="CreatedTime" type="xsd:dateTime" style="body"/>
           <param name="ModifiedTime" type="xsd:dateTime" style="body"/>
           <param name="TaxAuthority" type="xsd:string" style="body"/>
           <param name="SalesArea" type="xsd:string" style="body"/>
           <param name="SalesPerson" type="xsd:string" style="body"/>
           <param name="AccountStatus" type="xsd:string" style="body"/>
           <param name="PaymentMethod" type="xsd:string" style="body"/>
           <param name="TermsAndConditions" type="xsd:string" style="body"/>
           <param name="Carrier" type="xsd:string" style="body"/>
           <param name="ShippingMethod" type="xsd:string" style="body"/>
           <param name="DeliverFrom" type="xsd:string" style="body"/>
           <param name="BillingAddress" type="xsd:string" style="body"/>
           <param name="BillingSuburb" type="xsd:string" style="body"/>
           <param name="BillingCity" type="xsd:string" style="body"/>
           <param name="BillingPostcode" type="xsd:string" style="body"/>
           <param name="BillingState" type="xsd:string" style="body"/>
           <param name="BillingCountry" type="xsd:string" style="body"/>
           <param name="ShippingAddress" type="xsd:string" style="body"/>
           <param name="ShippingCity" type="xsd:string" style="body"/>
           <param name="ShippingPostcode" type="xsd:string" style="body"/>
           <param name="ShippingState" type="xsd:string" style="body"/>
           <param name="ShippingCountry" type="xsd:string" style="body"/>
           <param name="PriceBook" type="xsd:string" style="body"/>
           <param name="SpecialsPriceBook" type="xsd:string" style="body"/>
           <param name="Discount" type="xsd:decimal" style="body"/>
           <param name="CreditLimitExpires" type="xsd:date" style="body"/>
           <param name="CreditLimit" type="xsd:decimal" style="body"/>
           <param name="TaxID" type="xsd:string" style="body"/>
           <param name="ResellerID" type="xsd:string" style="body"/>
           <param name="DefaultCurrency" type="xsd:string" style="body"/>
           <param name="Credits" type="xsd:decimal" style="body"/>
           <param name="Description" type="xsd:string" style="body"/>
         </request> 
         <response status="200"> 
            <representation mediaType="application/xml" element="yn:ResultSet"/> 
         </response> 
         <response status="400"> 
            <representation mediaType="application/xml" element="ya:Error"/> 
         </response> 
       </method> 
     </resource> 
   </resources>
 </application>