Getting List of Companies

XML request for getting the list of online companies is sent to the URL (Test/Live).

HTTP Headers

ID          : TPGETCOMPANIES

SOURCE      : <Partner Source Name>

TARGET      : TNS

CONTENT-TYPE: text/xml;charset=utf-16

XML Message

<ENVELOPE>

<HEADER>

<VERSION>1</VERSION>

<REQVERSION>1</REQVERSION>

<TALLYREQUEST>Export</TALLYREQUEST>

<TYPE>DATA</TYPE>

<ID>TPGETCOMPANIES</ID>

<SESSIONID>{ Session ID} </SESSIONID>

<TOKEN >{Incremental Token Number} </TOKEN>

</HEADER>

<BODY>

<DESC>

<STATICVARIABLES>

<SVINCLUDE>Connected</SVINCLUDE>

</STATICVARIABLES>

</DESC>

</BODY>

</ENVELOPE>

In the XML Request,

1. {Session ID} is obtained after the user logs in to the authentication library, when online.

2. Apart from the <SESSIONID>, TNS expects one more tag <TOKEN>. This is an incremented number for every request made by the application. For example, if in the first request, the <TOKEN> value is 1, then the subsequent request would have the value incremented by 1 i.e., 2 and so on.

3. <SVINCLUDE> is the variable used to filter and return only the online or connected companies.

Note: In developer mode (testing phase), redirect the initial request to the URL https://dev1.tallyenterprise.com, and in live mode redirect the initial request to the URL to https://tallynet.tallyenterprise.com

XML response with the list of online/connected companies.

XML Message

<ENVELOPE>

<HEADER>

<VERSION>{XML Version}</VERSION>

<STATUS>{0 or 1}</STATUS>

</HEADER>

<BODY>

<DATA>

<COMPANY.LIST>

<REMOTECOMPANY>

<COMPANYCONNECTNAME>

{Tally Remote Company Name1}

</COMPANYCONNECTNAME>

<ACCOUNTINTERNALID> {Account ID} </ACCOUNTINTERNALID>

<TRBURL> {URL} </TRBURL>

<CONNECTED> {0 or 1} </CONNECTED>

</REMOTECOMPANY>

<REMOTECOMPANY>

<COMPANYCONNECTNAME>

{Tally Remote Company Name2}

</COMPANYCONNECTNAME>

<ACCOUNTINTERNALID> {Account ID} </ACCOUNTINTERNALID>

<TRBURL> {URL} </TRBURL>

<CONNECTED> {0 or 1} </CONNECTED>

</REMOTECOMPANY>

.

.

</COMPANY.LIST>

</DATA>

</BODY>

</ENVELOPE>

In the XML response, <REMOTECOMPANY> tag repeats for every company accessible to the user.

color="black" style="font-size:8.000000pt;">               .

               .

      </COMPANY.LIST>

    </DATA>

  </BODY>

</ENVELOPE>

In the XML response, <REMOTECOMPANY> tag repeats for every company accessible to the user.