Skip to content
 


GET /api.xro/1.0/accounts

Gets all accounts for a specific organization in Xero.

Request

Parameter Description
apiKey(Required) Your partner API Key.
xeroKey(Required) The Xero Customer Key generated by the Xero customer and provided to you to access their organization data.

Example

To get all the accounts for a particular Xero customer perform the following HTTP request:

GET https://networktest.xero.com/api.xro/1.0/accounts?apiKey=[Your API Key]&xeroKey=[The Xero Customer Key]

This will respond with the following XML document describing the accounts

<Response>
	<ID>89a1d50c-f528-470c-b924-c10281ff67d6</ID>
	<Status>OK</Status>
	<ProviderName>XeroTest</ProviderName>
	<DateTimeUTC>2008-04-20T20:16:51.7072529Z</DateTimeUTC>
	<Accounts>
		<Account>
			<Code>200</Code>
			<Name>Sales</Name>
			<Type>REVENUE</Type>
			<TaxType>OUTPUT</TaxType>
			<Description>Income from any normal business activity</Description>
		</Account>
		<Account>
			<Code>260</Code>
			<Name>Other Revenue</Name>
			<Type>REVENUE</Type>
			<TaxType>OUTPUT</TaxType>
			<Description>Any other income that does not relate to normal business activities and is not recurring</Description>
		</Account>
	</Accounts>
</Response>

Response Xml Schema


<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="Response">
        <xs:complexType>
            <xs:sequence>
                <xs:element name="ID" type="xs:string" />
                <xs:element name="Status" type="xs:string" />
                <xs:element name="ProviderName" type="xs:string" />
                <xs:element name="DateTimeUTC" type="xs:dateTime" />
                <xs:element name="Accounts">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element maxOccurs="unbounded" name="Account">
                                <xs:element minOccurs="0" type="xs:string" />
                                <xs:element name="Name" type="xs:string" />
                                <xs:element name="Type" type="xs:string" />
                                <xs:element name="TaxType" type="xs:string" />
                                <xs:element minOccurs="0" name="Description" type="xs:string" />
                            </xs:element>
                        </xs:sequence>
                    </xs:complexType>
                </xs:element>
            </xs:sequence>
        </xs:complexType>
    </xs:element>
</xs:schema>