client.create: Create a new client and return the corresponding client_id.
<?xml version="1.0" encoding="UTF-8"?> <request method="client.create"> <client> <name>ABC Corp</name> //mandatory <address1>123 Fake St.</address1> <address2>Unit 555</address2> <city>New York</city> <state>NY</state> <zip>553132</zip> <country>US</country> <url>http://www.janedoe.com</url> <phone>(123) 456-7890</phone> <fax>(123) 456-7890</fax> <contacts> <contact> <first_name>Jane</first_name> //mandatory <last_name>Doe</last_name> //mandatory <email>janedoe@janedoe.com</email>//mandatory <phone>(123) 456-7890</phone> <mobile_phone>(123) 456-7890</mobile_phone> </contact> </contacts> </client> </request>
<?xml version="1.0" encoding="UTF-8"?> <response status="ok"> <client_id>1</client_id> </response>
client.update Update the details of the client with the given client_id. Any fields not referenced in the request will remain unchanged.
<?xml version="1.0" encoding="UTF-8"?> <request method="client.update"> <client> <client_id>1</client_id> # Same params as client.create </client> </request>
<?xml version="1.0" encoding="UTF-8"?> <response status="ok"/>
client.get: Return the client details associated with the given client_id.
<?xml version="1.0" encoding="UTF-8"?> <request method="client.get"> <client_id>1</client_id> </request>
<?xml version="1.0" encoding="UTF-8"?> <response status="ok"> <client> <client_id>1</client_id> <name>ABC Corp</name> <address1>123 Fake St.</address1> <address2>Unit 555</address2> <city>New York</city> <state>NY</state> <zip>553132</zip> <country>US</country> <url>http://www.janedoe.com</url> <phone>(123) 456-7890</phone> <fax>(123) 456-7890</fax> <contacts> <contact> <first_name>Jane</first_name> <last_name>Doe</last_name> <email>janedoe@janedoe.com</email> <phone>(123) 456-7890</phone> <mobile_phone>(123) 456-7890</mobile_phone> </contact> </contacts> </client> </response>
client.delete: Delete the client with the given client_id.
<?xml version="1.0" encoding="UTF-8"?> <request method="client.delete"> <client_id>1</client_id> </request>
<?xml version="1.0" encoding="UTF-8"?> <response status="ok"/>
client.list: Returns a list of clients.
<?xml version="1.0" encoding="UTF-8"?> <request method="client.list"> <name>ABC Corp</name> # Filter by name (Optional) <page>1</page> # The page number to show (Optional) <per_page>15</per_page> # Number of results per page, default 25 (Optional) </request>
<?xml version="1.0" encoding="UTF-8"?> <response status="ok"> <client> <client_id>1</client_id> <name>ABC Corp</name> <address1>123 Fake St.</address1> <address2>Unit 555</address2> <city>New York</city> <state>NY</state> <zip>553132</zip> <country>US</country> <url>http://www.janedoe.com</url> <phone>(123) 456-7890</phone> <fax>(123) 456-7890</fax> <contacts> <contact> <first_name>Jane</first_name> <last_name>Doe</last_name> <email>janedoe@janedoe.com</email> <phone>(123) 456-7890</phone> <mobile_phone>(123) 456-7890</mobile_phone> </contact> </contacts> </client> </response>