URI: https://app.cloudcardtools.com/api/people/{id}
HTTP Method: PUT
Required Headers: X-Auth-Token (see: Authentication)
Optional URL Parameters:
allowCreate=[true|false]
default isfalse
- If
true
a new person will be created if a person is not found for the specified URI. - If
false
an error,404 Not Found
, is returned if a person is not found for the specified URI.
- If
getLoginLink=[true|false]
default isfalse
If
false
, just the person is returned as the root element of the JSON objectIf
true
, the person is return alongside his login link as theuser
andaccess_link
elements of the JSON response object.
Example HTTP Request Body - Email Only
{ "email": "jon.doe@foo.edu" }
Example HTTP Request Body - Using option "identifier" field to set ID Number
{ "email": "jon.doe@foo.edu", "identifier":"ABC123" }
Example HTTP Request Body - Set the user's custom fields
{ "email": "jon.doe@foo.edu", "identifier":"ABC123", "customFields":{ "Last_Name":"Card", "First Name":"Carry A", "Upload Date":"2017 - 06 - 22 11:17AM", "Batch":"1" } }
Example Response
201 created { "accountExpired":false, "accountLocked":false, "activatedDate":null, "authorities":[ { "class":"com.campuscardtools.myphotoid.Role", "id":3, "authority":"ROLE_CARDHOLDER" } ], "currentPhoto":null, "customFields":{ "Upload Date":{ "class":"com.campuscardtools.myphotoid.CustomFieldValue", "id":3541, "customField":{ "class":"com.campuscardtools.myphotoid.CustomField", "id":34 }, "lastUpdated":"2017-06-26T20:00:47Z", "person":{ "class":"com.campuscardtools.myphotoid.Person", "id":123 }, "value":"2017 - 06 - 22 11:17AM" }, "Last Name":null, "First Name":{ "class":"com.campuscardtools.myphotoid.CustomFieldValue", "id":3540, "customField":{ "class":"com.campuscardtools.myphotoid.CustomField", "id":31 }, "lastUpdated":"2017-06-26T20:00:47Z", "person":{ "class":"com.campuscardtools.myphotoid.Person", "id":123 }, "value":"Carry A" }, "Batch":{ "class":"com.campuscardtools.myphotoid.CustomFieldValue", "id":3542, "customField":{ "class":"com.campuscardtools.myphotoid.CustomField", "id":33 }, "lastUpdated":"2017-06-26T20:00:47Z", "person":{ "class":"com.campuscardtools.myphotoid.Person", "id":123 }, "value":"1" } }, "dateTermsAccepted":null, "domainClass":"com.campuscardtools.myphotoid.Person", "email":"john.doe@foo.edu", "enabled":true, "id":123, "identifier":"ABC123", "latestPhoto": null, "organization":{ ... }, "passwordExpired":false, "passwordResetRequired":false, "readOnly":false, "username":"john.doe@foo.edu" }