Edit a person
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
-
unique_id
integer Required The record being updated
Body
Required
-
firstname
string Contacts first name. Mandatory
-
lastname
string Contacts last name. Mandatory
-
middlename
string 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
, orORGANISATION
. -
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
or1
. -
maritalStatus
integer 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
or1
. -
dateOfBirth
string The date in local time. Use YYYY-MM-DD format. Optional but must be a date before or on todays date.
-
dateOfDeath
string The date in local time. Use YYYY-MM-DD format. Optional but must be a date before or on todays date.
-
salutation
string 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.
-
loginActive
integer 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
or1
. -
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.
-
preferredContactMethod
string 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
, orCEL
. -
organisationcontact
string 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
orN
. -
HouseholdName
string Either the Household or the Organisation Name. Optional
-
Addressline1
string Optional.
-
Addressline2
string Optional.
-
Addressline3
string Only used for sites in countries with this address line enabled. Optional.
-
Addressline4
string 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
-
PostalCode
string The postcode (see the mysettings endpoint to label). Optional. Required for UK clients when they are used to make a claim.
-
CountryCode
string See the country list endpoint to get list of codes
-
HousedholdPhone
string The primary phone number for this household (or organisation). Optional
-
Fax
string The primary fax number for this household (or organisation). Optional
-
ReceiptToAlias
string 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.
-
ReceiptTo
string The default Receipt To setting for transactions. Use the following codes. hh: Household (or organisation) ind: Individual
Values are
hh
orind
. -
ReceiptToOneOff
integer 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
-
phone
array[object] A list of personal phone numbers for this person
-
cell
array[object] A list of personal cell phone (mobile) numbers for this person
-
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
curl \
--request PATCH 'https://YOURSITE.infoodle.com/apiv2/people/{unique_id}' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{"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"}]}'
{
"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"
}
]
}
{
"ok": 1,
"errors": [
{
"fieldname": "firstname",
"message": "Mandatory field not provided"
}
]
}