Edit a person

PATCH /people/{unique_id}

Editing an existing person to the site which can include person, household, email, cell, phone, custom fields. The data structure is the same as the Add person end point with the addition of some IDs. The update logic is the same in regards to mandatory fields also.

Path parameters

application/json

Body Required

  • Contacts first name. Mandatory

  • lastname string

    Contacts last name. Mandatory

  • Contacts middle name. Optional

  • title string

    Contacts title. Optional

  • gender string

    Contacts gender. Organisation can be used to determine an organisation contact. Optional.

    Values are Male, Female, or ORGANISATION.

  • archived integer

    Whether this contact is archived (1) or not (0). Optional. Will default to 0. Authenticated user must have access to archived people to be able to use this field.

    Values are 0 or 1.

  • The ID of the marital status lookup. Use the lookup/list end point to identify. Optional

  • occupation integer

    The ID of the occupation list. Use the occupation/list end point to identify Optional

  • guardian integer

    Whether this person is a guardian (1) or not (0) of children in this household. Optional

    Values are 0 or 1.

  • The date in local time. Use YYYY-MM-DD format. Optional but must be a date before or on todays date.

  • The date in local time. Use YYYY-MM-DD format. Optional but must be a date before or on todays date.

  • An alternative value to refer to this contact. Optional. Uses firstname if not provided.

  • nickname string

    An alternative value to refer to this contact. Optional. Uses firstname if not provided.

  • userName string

    Login name for the user - must be unique. Optional. Must have ability to "Create account and set roles" in authenticated uses role.

  • Whether the login is active (1) or not (0). Optional. Must have ability to "Create account and set roles" in authenticated uses role.

    Values are 0 or 1.

  • roleId integer

    Role for this users login. See the role list end points. Optional. Must have ability to "Create account and set roles" in authenticated uses role.

  • Contacts preferred contact method. Optional Use these codes. EML: Email TXT: Text DOC: Letter TEL: Phone FB: Facebook SL: Slack CEL: Cell

    Values are EML, TXT, DOC, TEL, FB, SL, or CEL.

  • Whether the contact is an Organisation Contact. If not used, you can use Gender field to set it - using ORGANISATION as the gender value. If set to Y, this overrides the setting in gender. Optional

    Values are Y or N.

  • Either the Household or the Organisation Name. Optional

  • For UK Addresses - used for Gift Aid claims, stores first part of the address. Optional.

  • Optional.

  • Optional.

  • Only used for sites in countries with this address line enabled. Optional.

  • Only used for sites in countries with this address line enabled. Optional.

  • Area string

    The Area (see the mysettings endpoint for label). Optional

  • City string

    The City (see the mysettings endpoint for label). Optional

  • The postcode (see the mysettings endpoint to label). Optional. Required for UK clients when they are used to make a claim.

  • See the country list endpoint to get list of codes

  • The primary phone number for this household (or organisation). Optional

  • Fax string

    The primary fax number for this household (or organisation). Optional

  • Used when receipting to identify the name this receipt should be be issued to. Optional. The other names are used if this is not provided.

  • The default Receipt To setting for transactions. Use the following codes. hh: Household (or organisation) ind: Individual

    Values are hh or ind.

  • The default setting as to how to combine transactions. Use the following codes. 0 : Combined 1 : One-off -1 : No receipt

    Values are 0, 1, or -1.

  • email array[object]

    A list of email addresses for this person

    Hide email attributes Show email attributes object
    • id integer

      The id of this specific email address. Obtained from the people/search end point

    • type string

      The text to describe the purpose or type of this email address. Optional

    • value string

      The email address. Required

    • active integer

      Whether this is an active email address (1) or not (0)

      Values are 0 or 1.

  • phone array[object]

    A list of personal phone numbers for this person

    Hide phone attributes Show phone attributes object
    • id integer

      The id of this specific phone number. Obtained from the people/search end point

    • type string

      The text to describe the purpose or type of this phone number. Optional

    • value string

      The phone number. Required

  • cell array[object]

    A list of personal cell phone (mobile) numbers for this person

    Hide cell attributes Show cell attributes object
    • id integer

      The id of this specific phone number. Obtained from the people/search end point

    • type string

      The text to describe the purpose or type of this number. Optional

    • value string

      The phone number. Required

  • if supplying a single custom field, you can use this method. Just provide the ID and the value. For a list of custom fields, use customfields property

  • customfields array[object]

    This is an array of custom fields. Each array element includes:

    • custom field id
    • value Use the customfield list endpoint to determine the ID of the custom field you want to add along with its type type - can be string or integer as determined by the type of field

    Lookup: Use the ID of the associated lookup using the lookup end point to inspect Multi Lookup: Use a comma separated list of IDs of the associated lookup

    Hide customfields attributes Show customfields attributes object

Responses

  • 200 application/json

    OK

    Hide response attributes Show response attributes object
    • ok integer

      Whether the add worked (1) or not (0)

      Values are 0 or 1.

    • errors array[object]

      A list of errors for each field in error. Returned if ok = 0. For multi lookup custom fields can return multiple errors for the one field.

      Hide errors attributes Show errors attributes object
PATCH /people/{unique_id}
curl \
 -X PATCH https://YOURSITE.infoodle.com/apiv2/people/{unique_id} \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"firstname":"John","lastname":"Smith","middlename":"Andrew","title":"Mr","gender":"Male","archived":0,"maritalStatus":9,"occupation":98,"guardian":1,"dateOfBirth":"1980-10-31","dateOfDeath":"2021-10-31","salutation":"Mr Jimmy James","nickname":"Jimmy","userName":"JohnSmith","loginActive":1,"roleId":43,"preferredContactMethod":"EML","organisationcontact":"N","HouseholdName":"The Jones Company Ltd","HouseNameNum":"The Vicarage","Addressline1":"1 The High Street","Addressline2":"1 Lower East Hampton","Addressline3":"string","Addressline4":"string","Area":"West Area","City":"Glasgow","PostalCode":"SW1A 1AA","CountryCode":"NZ","HousedholdPhone":"012 123 1234","Fax":"012 123 1234","ReceiptToAlias":"James' Institute","ReceiptTo":"hh","ReceiptToOneOff":1,"email":[{"id":4312321,"type":"home","value":"c@b.com","active":1}],"phone":[{"id":4421,"type":"home","value":"+1 123 3214 1234"}],"cell":[{"id":76221,"type":"work","value":"+1 123 3214 1234"}],"customfields":[{"id":101,"value":"new text"}]}'
Request examples
{
  "firstname": "John",
  "lastname": "Smith",
  "middlename": "Andrew",
  "title": "Mr",
  "gender": "Male",
  "archived": 0,
  "maritalStatus": 9,
  "occupation": 98,
  "guardian": 1,
  "dateOfBirth": "1980-10-31",
  "dateOfDeath": "2021-10-31",
  "salutation": "Mr Jimmy James",
  "nickname": "Jimmy",
  "userName": "JohnSmith",
  "loginActive": 1,
  "roleId": 43,
  "preferredContactMethod": "EML",
  "organisationcontact": "N",
  "HouseholdName": "The Jones Company Ltd",
  "HouseNameNum": "The Vicarage",
  "Addressline1": "1 The High Street",
  "Addressline2": "1 Lower East Hampton",
  "Addressline3": "string",
  "Addressline4": "string",
  "Area": "West Area",
  "City": "Glasgow",
  "PostalCode": "SW1A 1AA",
  "CountryCode": "NZ",
  "HousedholdPhone": "012 123 1234",
  "Fax": "012 123 1234",
  "ReceiptToAlias": "James' Institute",
  "ReceiptTo": "hh",
  "ReceiptToOneOff": 1,
  "email": [
    {
      "id": 4312321,
      "type": "home",
      "value": "c@b.com",
      "active": 1
    }
  ],
  "phone": [
    {
      "id": 4421,
      "type": "home",
      "value": "+1 123 3214 1234"
    }
  ],
  "cell": [
    {
      "id": 76221,
      "type": "work",
      "value": "+1 123 3214 1234"
    }
  ],
  "customfields": [
    {
      "id": 101,
      "value": "new text"
    }
  ]
}
Response examples (200)
{
  "ok": 1,
  "errors": [
    {
      "fieldname": "firstname",
      "message": "Mandatory field not provided"
    }
  ]
}