Search the database people matching the query

GET /people/search/{searchmethod}/{query}/{page}

Get a list of the first 30 people who match the search term If there are no items to return error:2 is returned

Path parameters

  • searchmethod string Required

    Method to find the people

    all: Return all records. This will ignore the 'query' parameter - suggest you use * there. name: Persons Name email: Email address phone: Personal phone number postcode: Post code country: Country hhname: Household or Organisation name hhid: House ID address: Full Address givenum: Giving number BA: Cheque number in transaction CC: Credit card number in transaction RF: Reference number in transaction

    Values are name, email, phone, postcode, country, hhname, hhid, address, givenum, BA, CC, or RF.

  • query string Required

    The term being searched

  • page integer Required

    The page to return. If not supplied, page 1 is assumed

Responses

  • 200 application/json

    OK

    Hide response attribute Show response attribute object
    • people array[object]
      Hide people attributes Show people attributes object
      • unique_id integer
      • url string
      • title string
      • lastname string
      • Values are Y or N.

      • gender string

        Values are ORGANISATION, Male, or Female.

      • phone array[object]
        Hide phone attributes Show phone attributes object
        • for string

          Wether this is for the organisation/household or the individual

          Values are PERSONAL or ORGANISATION.

        • id integer

          The ID of this phone number record (when 'for' is PERSONAL)

        • type string

          The word used to describe this phone number

        • value string

          Phone number as entered by the user

      • cell array[object]
        Hide cell attributes Show cell attributes object
        • id integer

          The ID of this cell phone record

        • type string

          The word used to describe this cell phone number

        • value string

          Phone number as entered by the user

      • email array[object]
        Hide email attributes Show email attributes object
        • id integer

          The ID of this email address record

        • type string

          The word used to describe this email address

        • value string

          Email address as entered by the user

        • active integer

          Whether this email address is active or not

          Values are 0 or 1.

      • The string contains an image that is base64 encoded image

      • address object
        Hide address attributes Show address attributes object
      • Format yyyy-mm-ddThh:nn:ss

      • notes object
        Hide notes attributes Show notes attributes object
        • view string

          Whether the user retrieving this item has permission to view notes written about them - subject to permissions on each note

          Values are Y or N.

        • create string

          Whether the user retrieving this item has permission to create notes

          Values are Y or N.

      • Hide person_custom_fields attribute Show person_custom_fields attribute object
        • Each object represents a tab. The users can created their own tabs. The tab name "PERSONAL" is always provided which shows the fields on the front of the person profile page.

          Hide person_customised_tab_name attribute Show person_customised_tab_name attribute object
          • Each object represents a custom field. This is repeated for every custom field. The output is common except for the Date of Birth field and the field type P

            Hide person_custom_field attributes Show person_custom_field attributes object
            • type string

              D: Date. Raw is format YYYY-MM-DD. Value e.g. 1 Jul 2022, the format is set by the administration-system-date settings. For Date of Birth, additional field "age" is the text of the age e.g. 45 years. N: integer Y: Yes/No. Raw is 0 or 1. value is Yes or No L: Lookup. Raw is an integer to identify the lookup id. Value is the decode of the lookup ID ML. Multilookup. Raw and Value show the decode of the list of selected items H: URL to a website P: Person Lookup. Raw is the ID of the user ID this person is connected to. The value field is an object: "connectee": [], "connector": { "name": "John Miller", "unique_id": "67284" }

              looking at John Millers record shows "connectee": [ { "name": "Dave Trainer", "unique_id": "779" } ], "connector": "" I: Auto incrementing number G: Long Text. Up to 2k chars. New lines separated by carriage return.

              Values are D, N, Y, L, ML, P, H, or I.

            • raw string

              The unprocessed data value For a "P" data type, this is the unique_id of the "connector". If no connector this is blank.

            • value string
      • Hide household_custom_fields attribute Show household_custom_fields attribute object
        • Only 1 tab is available for households. This is fixed name regardless of whether using household or organisation view.

          Hide HOUSEHOLD attribute Show HOUSEHOLD attribute object
          • Each object represents a custom field. This is repeated for every custom field. The field types and output is the same as for person_custom_fields.

      • connected array[object]
        Hide connected attributes Show connected attributes object
      • alternate array[object]

        A list of contacts that this record is connected to as an alternate household.

        Hide alternate attributes Show alternate attributes object
      • alternateAddresses array[object]

        A list of all the alternate addresses for this contact

        Hide alternateAddresses attributes Show alternateAddresses attributes object
      • The date/time in UTC of the last updated date/time of the contact

      • The local datetime (as per the administration-system-date settings), shown in the local format

GET /people/search/{searchmethod}/{query}/{page}
curl \
 -X GET https://YOURSITE.infoodle.com/apiv2/people/search/{searchmethod}/{query}/{page} \
 -H "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "people": [
    {
      "unique_id": 95923,
      "url": "https://demoinfoodle.infoodle.com/people?uniqueid=2877",
      "title": "Mr",
      "firstname": "Alfred Bees and Hives Ltd",
      "middlename": "string",
      "lastname": "string",
      "organisationcontact": "Y",
      "gender": "ORGANISATION",
      "phone": [
        {
          "for": "PERSONAL",
          "id": 456,
          "type": "work",
          "value": "012 123 1234"
        }
      ],
      "cell": [
        {
          "id": 456,
          "type": "work",
          "value": "012 123 1234"
        }
      ],
      "email": [
        {
          "id": 456,
          "type": "work",
          "value": "my@example.com",
          "active": 1
        }
      ],
      "person_image": "string",
      "address": {
        "houseid": 125,
        "organisation": "string",
        "householdname": "Alfred Bees and Hives Ltd",
        "addressline1": "5 Owens Place",
        "addressline2": "string",
        "area": "string",
        "city": "Mount Maunganui",
        "postcode": "3116",
        "fax": "string",
        "country": "New Zealand",
        "formatted": "5 Owens Place\\nMount Maunganui 3116\\nNew Zealand",
        "phone": "string",
        "phonelabel": "string"
      },
      "date_time_changed_utc": "2019-02-13T01:16:05",
      "notes": {
        "view": "Y",
        "create": "Y"
      },
      "person_custom_fields": {
        "person_customised_tab_name": {
          "person_custom_field": {
            "type": "D",
            "raw": "string",
            "value": "string"
          }
        }
      },
      "household_custom_fields": {
        "HOUSEHOLD": {
          "household_custom_field": {}
        }
      },
      "connected": [
        {
          "unique_id": 67284,
          "name": "John Miller",
          "type": "Unknown",
          "gender": "Male",
          "organisationContact": "N",
          "person_image": "eflkw2erfWEfsldkfj2dflkmsdcWE...."
        }
      ],
      "alternate": [
        {
          "id": 79,
          "unique_id": 61652,
          "text": "12 Tekoa Street"
        }
      ],
      "alternateAddresses": [
        {
          "id": 125,
          "address_type": "PO Box",
          "houseid": 125,
          "text": "45 High Street, Lower Valley, AB12 12",
          "formatted": "45 High Street\\nLower Valley\\nAB12 12\\nUnited Kingdom",
          "organisation": "Bobs Burgers Ltd",
          "householdname": "The Smith Family",
          "addressline1": "5 Owens Place",
          "addressline2": "string",
          "addressline3": "string",
          "addressline4": "string",
          "area": "string",
          "city": "Mount Maunganui",
          "postcode": "3116",
          "fax": "string",
          "country": "New Zealand",
          "phone": "string",
          "phonelabel": "string"
        }
      ],
      "last_updated_datetime_utc": "2022-05-17 03:09:58",
      "lastUpdatedDatetimeUtcShowLocal": "17 May 2022 15:09"
    }
  ]
}