Skip to content
 


GET /api.xro/1.0/contact

Gets a contact record for a specific Xero organisation.

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 organisation data.
contactID The unique identifier for a contact generated by the Xero system. Overrides all other parameters.
contactNumber Customer/supplier number stored against the contact.

Example

To get a contact with contactID of 4C76FFB5-02E7-47C5-9A86-B0A5A35D1682 perform the following HTTP request:

GET https://networktest.xero.com/api.xro/1.0/contact?apiKey=[Your API Key]&xeroKey=[The Xero Customer Key]&contactID=4C76FFB5-02E7-47C5-9A86-B0A5A35D1682

This will respond with the following XML document describing that contact:

<Response>
	<ID>3a1827e4-fea7-4440-84e6-28aef9451118</ID>
	<Status>OK</Status>
	<ProviderName>XeroTest</ProviderName>
	<DateTimeUTC>2008-04-18T03:15:02.0020444Z</DateTimeUTC>
	<Contact>
		<ContactID>4c76ffb5-02e7-47c5-9a86-b0a5a35d1682</ContactID>
		<ContactNumber>C20081234</ContactNumber>
		<ContactStatus>ACTIVE</ContactStatus>
		<Name>Red House Reads</Name>
		<EmailAddress>accounts@redhousereads.co.nz</EmailAddress>
		<Addresses>
			<Address>
				<AddressType>STREET</AddressType>
				<AddressLine1></AddressLine1>
				<AddressLine2></AddressLine2>
				<AddressLine3></AddressLine3>
				<AddressLine4></AddressLine4>
				<City></City>
				<Region></Region>
				<PostalCode></PostalCode>
				<Country></Country>
			</Address>
			<Address>
				<AddressType>POBOX</AddressType>
				<AddressLine1>Lvl 1</AddressLine1>
				<AddressLine2>Herd St Building</AddressLine2>
				<AddressLine3>Herd St</AddressLine3>
				<AddressLine4>Wellington</AddressLine4>
				<City>Wellington</City>
				<Region>Wellington</Region>
				<PostalCode>6011</PostalCode>
				<Country>New Zealand</Country>
			</Address>
		</Addresses>
		<Phones>
			<Phone>
				<PhoneType>DDI</PhoneType>
				<PhoneNumber>1234567</PhoneNumber>
				<PhoneAreaCode>4</PhoneAreaCode>
				<PhoneCountryCode>64</PhoneCountryCode>
			</Phone>
			<Phone>
				<PhoneType>DEFAULT</PhoneType>
				<PhoneNumber>1234567</PhoneNumber>
				<PhoneAreaCode>4</PhoneAreaCode>
				<PhoneCountryCode>64</PhoneCountryCode>
			</Phone>
			<Phone>
				<PhoneType>MOBILE</PhoneType>
				<PhoneNumber>123123</PhoneNumber>
				<PhoneAreaCode>21</PhoneAreaCode>
				<PhoneCountryCode>64</PhoneCountryCode>
			</Phone>
			<Phone>
				<PhoneType>FAX</PhoneType>
				<PhoneNumber>1234568</PhoneNumber>
				<PhoneAreaCode>4</PhoneAreaCode>
				<PhoneCountryCode>64</PhoneCountryCode>
			</Phone>
		</Phones>
		<UpdatedDateUTC>2008-08-2008T03:14:02</UpdatedDateUTC>
		<SkypeUserName>echo123</SkypeUserName>
		<BankAccountDetails>123-456-789</BankAccountDetails>
	</Contact>
</Response>

Response 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="Contact">
					<xs:complexType>
						<xs:sequence>
							<xs:element name="ContactID" type="xs:string" />
							<xs:element minOccurs="0" name="ContactNumber" type="xs:string" />
							<xs:element name="ContactStatus" type="xs:string" />
							<xs:element name="Name" type="xs:string" />
							<xs:element minOccurs="0" name="EmailAddress" type="xs:string" />
							<xs:element name="Addresses">
								<xs:complexType>
									<xs:sequence>
										<xs:element name="Address">
											<xs:complexType>
												<xs:sequence>
													<xs:element name="AddressType" type="xs:string" />
													<xs:element minOccurs="0" name="AddressLine1"
														type="xs:string" />
													<xs:element minOccurs="0" name="AddressLine2"
														type="xs:string" />
													<xs:element minOccurs="0" name="AddressLine3"
														type="xs:string" />
													<xs:element minOccurs="0" name="AddressLine4"
														type="xs:string" />
													<xs:element minOccurs="0" name="City" type="xs:string" />
													<xs:element minOccurs="0" name="Region" type="xs:string" />
													<xs:element minOccurs="0" name="PostalCode"
														type="xs:string" />
													<xs:element minOccurs="0" name="Country" type="xs:string" />
												</xs:sequence>
											</xs:complexType>
										</xs:element>
									</xs:sequence>
								</xs:complexType>
							</xs:element>
							<xs:element name="Phones">
								<xs:complexType>
									<xs:sequence>
										<xs:element maxOccurs="unbounded" name="Phone">
											<xs:complexType>
												<xs:sequence>
													<xs:element name="PhoneType" type="xs:string" />
													<xs:element minOccurs="0" name="PhoneNumber"
														type="xs:string" />
													<xs:element minOccurs="0" name="PhoneAreaCode"
														type="xs:string" />
													<xs:element minOccurs="0" name="PhoneCountryCode"
														type="xs:string" />
												</xs:sequence>
											</xs:complexType>
										</xs:element>
									</xs:sequence>
								</xs:complexType>
							</xs:element>
							<xs:element name="UpdatedDateUTC" type="xs:dateTime" />
							<xs:element minOccurs="0" name="SkypeUserName" type="xs:string" />
							<xs:element minOccurs="0" name="BankAccountDetails" type="xs:string" />
						</xs:sequence>
					</xs:complexType>
				</xs:element>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
</xs:schema>