Add Bulk Accounts
Use this operation to add new Accounts object.
Parameters
Body Params | |
---|---|
JSON: | json |
XML: | string |
Path Params | |
---|---|
yourCompany: | 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/Bulk-Accounts will change to https://xyzcompany.agiliron.net/agiliron/api-40.php/Bulk-Accounts |
callback_url | string |
sendRecordNo | string
|
Header Params | |
---|---|
Accept: | string |
Query Auth | |
---|---|
key: | string |
Header Auth | |
---|---|
apiKey: | string |
Sample Code
{
"Accounts": {
"Account": [{
"AccountNumber": "105835",
"ParentCompany": "",
"AccountName": "Test Account1",
"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": "CustomFied1",
"Value": "Custom info 1"
},
{
"Name": "CustomFied2",
"Value": "Custom info 2"
}
]
}
},
{
"AccountNumber": "105836",
"ParentCompany": "",
"AccountName": "Test Account2",
"Website": "www.abc1.com",
"Telephone": "56412357",
"Fax": "5689746",
"TickerSymbol": "",
"OtherPhone": "56984664",
"Email": "[email protected]",
"Employees": "20",
"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": "CustomFied1",
"Value": "Custom info 1"
},
{
"Name": "CustomFied2",
"Value": "Custom info 2"
}
]
}
}
]
}
}
<Accounts>
<Account>
<AccountNumber>105835</AccountNumber>
<ParentCompany></ParentCompany>
<AccountName>Test Account1</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>
<SalesManager></SalesManager>
<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>
</AccountCustomFields>
</Account>
<Account>
<AccountNumber>105836</AccountNumber>
<ParentCompany></ParentCompany>
<AccountName>Test Account2</AccountName>
<Website>www.abc1.com</Website>
<Telephone>56412357</Telephone>
<Fax>5689746</Fax>
<TickerSymbol></TickerSymbol>
<OtherPhone>56984664</OtherPhone>
<Email>[email protected]</Email>
<Employees>20</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>
</AccountCustomFields>
</Account>
</Accounts>
Sample Response
{
"MCM": {
"response": {
"objectType": "Accounts",
"syncTime": "2021-06-11 04:13:24"
},
"parameters": {
"results": {
"message": {
"status": "Success",
"success_message": "Bulk Account Add Initiated Successfully.",
"batch_id": "thggii1212kjkl"
}
}
}
}
}
<MCM>
<response>
<objectType>Accounts</objectType>
<syncTime>2021-06-11 04:13:24</syncTime>
</response>
<parameters>
<results>
<message>
<status>Success</status>
<success_message> Bulk Account Add Initiated Successfully. </success_message>
<batch_id>thggii1212kjkl</batch_id>
</message>
</results>
</parameters>
</MCM>
WADL
<?xml version="1.0" encoding="utf-8"?>
<application>
<resources base="https://{yourCompany}.agiliron.net/agiliron/api-40/">
<resource path="Bulk-Accounts">
<method name="POST">
<request>
<param name="key" type="xsd:string" style="query" required="true"/>
<param name="AccountNumber" type="xsd:int" style="body"/>
<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="TickerSymbol" 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="SalesManager" type="xsd:string" 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="Priority" 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="BackorderHandling" type="xsd:string" style="body"/>
<param name="SpecialHandling" 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>
Sample Webhook
<?php
$url = "https://{your_custom_url}"; //this custom url will be called after the code is executed
$curlConn = curl_init();
curl_setopt($curlConn, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($curlConn, CURLOPT_POSTFIELDS,$results); //$results contain the result set
curl_setopt($curlConn,CURLOPT_URL,$url);
curl_setopt($curlConn, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($curlConn, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($curlConn, CURLOPT_RETURNTRANSFER, 1);
$ret = curl_exec($curlConn);
?>
<result>
<SuccessNumber>1</SuccessNumber>
<FailureNumber>1</FailureNumber>
<Success>
<Account>
<Account_Id>2563</Account_Id>
<Account_Number>5689764</Account_Number>
<Account_Name>Account1</Account_Name>
<Email_Address>[email protected]</Email_Address>
<Tax_Id>5684</Tax_Id>
</Account>
</Success>
<Failure>
<Account>
<AccountName>Account2</AccountName>
<Message>Invalid Account Name</Message>
</Account>
</Failure>
</result>
{
"result": {
"SuccessNumber": "1",
"FailureNumber": "1",
"Success": {
"Account": {
"Account_Id": "2563",
"Account_Number": "5689764",
"Account_Name": "Account1",
"Email_Address": "[email protected]",
"Tax_Id": "5684"
}
},
"Failure": {
"Account": {
"AccountName": "Account2",
"Message": "Invalid Account Name"
}
}
}
}
<result>
<SuccessNumber>1</SuccessNumber>
<FailureNumber>1</FailureNumber>
<Success>
<Account>
<Account_Id>2563</Account_Id>
<Account_Number>5689764</Account_Number>
<Account_Name>Account1</Account_Name>
<Email_Address>[email protected]</Email_Address>
<Tax_Id>5684</Tax_Id>
<Record>1</Record>
</Account>
</Success>
<Failure>
<Account>
<AccountName>Account2</AccountName>
<Message>Invalid Account Name</Message>
<Record>2</Record>
</Account>
</Failure>
</result>
{
"result": {
"SuccessNumber": "1",
"FailureNumber": "1",
"Success": {
"Account": {
"Account_Id": "2563",
"Account_Number": "5689764",
"Account_Name": "Account1",
"Email_Address": "[email protected]",
"Tax_Id": "5684",
"Record": "1"
}
},
"Failure": {
"Account": {
"AccountName": "Account2",
"Message": "Invalid Account Name",
"Record": "2"
}
}
}
}
Updated about 21 hours ago