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.
Body
Required
-
Contacts first name. Mandatory
-
Contacts last name. Mandatory
-
Contacts middle name. Optional
-
Contacts title. Optional
-
Contacts gender. Organisation can be used to determine an organisation contact. Optional.
Values are
Male
,Female
, orORGANISATION
. -
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
. -
The ID of the marital status lookup. Use the lookup/list end point to identify. Optional
-
The ID of the occupation list. Use the occupation/list end point to identify Optional
-
Whether this person is a guardian (1) or not (0) of children in this household. Optional
Values are
0
or1
. -
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.
-
An alternative value to refer to this contact. Optional. Uses firstname if not provided.
-
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
or1
. -
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
, orCEL
. -
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
. -
Either the Household or the Organisation Name. 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.
-
The Area (see the mysettings endpoint for label). Optional
-
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
-
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
orind
. -
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
. -
A list of email addresses for this person
-
A list of personal phone numbers for this person
-
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
-
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"
}
]
}