Sections

» Introduction
» Public
» Hosts
» Students
» Placements
» Agents
» Admin

Developers

» Apply

Agents

Authentication required

Successful authentication provides the developer with access to the list of Agents on the AHN. The Homestay Network API provides access to Agent data in the RESTful approach (GET, POST, PUT, DELETE). All requests must provide the token parameter.

List Agents

Returns the title and id for all Agency organisations in the AHN.

GET: http://api.homestaynetwork.org/agents?token=xxxxx

Response

<agents>
	<agent>
		<id>1</id>
		<title>A & A International</title>
	</agent>
	...
</agents>

List Agent Offices

Returns the id, title, address, and contact details for all Offices for a particular Agent.

GET: http://api.homestaynetwork.org/agents/1/agent_offices?token=xxxxx

Response

<agent-offices>
	<agent-office>
		<id>169</id>
		<title>A & A International</title>
		...
	</agent-office>
	...
</agent-offices>