One Central Place API reference - XML Response Format

Introduction

To return the response in XML-RPC format, simply omit the 'format' parameter from your request. The default response format is XML.

A simple call to the ocp.list.categories service returns this:

<?xml version="1.0" encoding="utf-8"?>
<rsp stat="ok">
	<object uid="1">
		<field name="name">Advice, Information and Counselling</field>
		<field name="description"/>
	</object>
	<object uid="2">
		<field name="name">Alcohol and Drug Services</field>
		<field name="description"/>
	</object>

	...

	<object uid="32">
		<field name="name">Young People</field>
		<field name="description"/>
	</object>
</rsp>

If an error occurs, the following is returned:

<?xml version="1.0" encoding="utf-8"?>
<rsp stat="fail">
	<err code="403" msg="Error message here."/>
</rsp>

You can find out more about XML-RPC at www.xmlrpc.com.