Highrise API

People

Show

GET /people/#{id}.xml

Returns a single person.

Response

Status: 200 OK

<person>
  <id type="integer">1</id>
  <first-name>John</first-name>
  <last-name>Doe</last-name>
  <title>Stand-in</title>
  <background>A popular guy for random data</background>
  <company-id type="integer">5</company-id>
  <created-at type="datetime">2007-02-27T03:11:52Z</created-at>
  <updated-at type="datetime">2007-03-10T15:11:52Z</updated-at>
  <visible-to>Everyone</visible-to>
  <owner-id type="integer"></owner-id>
  <group-id type="integer"></group-id>
  <author-id type="integer">2</author-id>
  <contact-data>
    <email-addresses>
      <email-address>
        <id type="integer">1</id>
        <address>john.doe@example.com</address>
        <location>Work</location>
      </email-address>
    </email-addresses>
    <phone-numbers>
      <phone-number>
        <id type="integer">2</id>
        <number>555-555-5555</number>
        <location>Work</location>
      </phone-number>
      <phone-number>
        <id type="integer">3</id>
        <number>555-666-6666</number>
        <location>Home</location>
      </phone-number>
    </phone-numbers>
  </contact-data>
</person>

List All

GET /people.xml (with pagination: /people.xml?n=#{offset})

Returns a collection of people that are visible to the authenticated user. The list is paginated using offsets. If 50 elements are returned (the page limit), use ?n=50 to check for the next 50 and so on.

Response

Status: 200 OK

<people>
  <person>
    ...
  </person>
  <person>
    ...
  </person>
</people>

List With Title

GET /people.xml?title=CEO

Returns a collection of people that has a specific title. Uses pagination like List All. If no people with that title exist, an empty people container will be returned.

Response

Status: 200 OK

<people>
  <person>
    <title>CEO</title>
    ...
  </person>
  <person>
    <title>CEO</title>
    ...
  </person>
</people>

List With Tag

GET /people.xml?tag_id=#{tag_id}

Returns a collection of people that has been tagged with the tag responding to #{tag_id}. Uses pagination like List All. If no people with that tag exist, an empty people container will be returned.

Response

Status: 200 OK

<people>
  <person>
    ...
  </person>
  <person>
    ...
  </person>
</people>

List With Company

GET /companies/#{company_id}/people.xml

Returns a collection of people that belongs to the company referenced in the URL. Uses pagination like List All. If no people with that tag exist, an empty people container will be returned.

Response

Status: 200 OK

<people>
  <person>
    ...
  </person>
  <person>
    ...
  </person>
</people>

List By Search Term

GET /people/search.xml?term=David

Returns a collection of people that has a name matching the term passed in through the URL. Uses pagination like List All. If no people with that tag exist, an empty people container will be returned.

Response

Status: 200 OK

<people>
  <person>
    ...
    <first_name>David</first_name>
    <last_name>Heinemeier Hansson</last_name>
  </person>
  <person>
    ...
    <first_name>Donald</first_name>
    <last_name>Davidson</last_name>
  </person>
</people>

List Since Time

GET /people.xml?since=20070425154546

Returns a collection of people that has been created or updated since the time passed in through the URL. The since parameter should be in the yyyymmddhhmmss format and in UTC. Uses pagination like List All.

Response

Status: 200 OK

<people>
  <person>
    ...
    <updated-at>2007-04-26T13:12:52Z</updated-at>
  </person>
  <person>
    ...
    <updated-at>2007-04-25T17:11:52Z</updated-at>
  </person>
</people>

Create

POST /people.xml

Creates a new person with the currently authenticated user as the author. The XML for the new person is returned on a successful request with the timestamps recorded and ids for the contact data associated. Additionally, the company-name is used to either lookup a company with that name or create a new one if it didn't already exist. You can also refer to an existing company instead using company-id. By default, a new person is assumed to be visible to Everyone. You can also chose to make the person only visible to the creator using "Owner" as the value for the visible-to tag. Or "NamedGroup" and pass in a group-id tag too. If the account doesn't allow for more people to be created, a "507 Insufficient Storage" response will be returned.

Request

<person>
  <first-name>John</first-name>
  <last-name>Doe</last-name>
  <title>CEO</title>
  <company-name>Doe Inc.</company-name>
  <background>A popular guy for random data</background>
  <contact-data>
    <email-addresses>
      <email-address>
        <address>john.doe@example.com</address>
        <location>Work</location>
      </email-address>
    </email-addresses>
    <phone-numbers>
      <phone-number>
        <number>555-555-5555</number>
        <location>Work</location>
      </phone-number>
      <phone-number>
        <number>555-666-6666</number>
        <location>Home</location>
      </phone-number>
    </phone-numbers>
  </contact-data>
</person>

Response

Status: 201 Created
Location: http://example.highrisehq.com/people/#{new-person-id}.xml

<person>
  ...
</person>

Update

PUT /people/#{id}.xml

Updates an existing person with new details from the submitted XML. Contact data that includes an id will be updated, contact data that doesn't will be assumed to be new and created from scratch.

Request

<person>
  <first-name>John</first-name>
  <last-name>Doe</last-name>
  <title>CEO</title>
  <company-id>1</company-id>
  <background>A popular guy for random data</background>
  <contact-data>
    <email-addresses>
      <email-address>
        <id type="integer">1</id>
        <address>john.doe@example.com</address>
        <location>Work</location>
      </email-address>
      <email-address>
        <address>john.doe.home@example.com</address>
        <location>Home</location>
      </email-address>
    </email-addresses>
  </contact-data>
</person>

Response

Status: 200 OK

Destroy

DELETE /people/#{id}.xml

Destroys the person at the referenced URL.

Response

Status: 200 OK