public
Description: OneBody is free, open-source, web-based social networking and online directory software for churches.
Home | Edit | New

BatchPeople

POST to /people/batch.xml

Example

curl -u admin@example.com:APIKEYHERE -d="<?xml version='1.0' encoding='UTF-8'?><records type='array'><person><legacy-id>1806</legacy-id><legacy-family-id>123</legacy-family-id><first-name>Tim</first-name><last-name>Morgan</last-name></person><person><legacy-id>1807</legacy-id><legacy-family-id>123</legacy-family-id><first-name>Jennie</first-name><last-name>Morgan</last-name></person></records>" -H "Content-Type: text/xml" http://yoursite.com/people/batch.xml
<?xml version="1.0" encoding="UTF-8"?>
<records type="array">
  <record>
    <status>saved</status>
    <id type="integer">27942</id>
    <legacy-id type="integer">1806</legacy-id>
  </record>
  <record>
    <status>saved</status>
    <id type="integer">27943</id>
    <legacy-id type="integer">1807</legacy-id>
  </record>
</records>

Errors

curl -u admin@example.com:APIKEYHERE -d="<?xml version='1.0' encoding='UTF-8'?><records type='array'><person><legacy-id>1806</legacy-id><first-name>Jim</first-name><last-name>Morgan</last-name><gender>Unicorn</gender></person></records>" -H "Content-Type: text/xml" http://yoursite.com/people/batch.xml
<?xml version="1.0" encoding="UTF-8"?>
<records type="array">
  <record>
    <status>error</status>
    <error>Gender is not included in the list</error>
    <legacy-id>1806</legacy-id>
  </record>
</records>
Last edited by powerchurch, Tue Oct 06 14:01:18 -0700 2009
Home | Edit | New
Versions: