You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
« Previous
Version 2
Next »
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 is false
- 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.
getLoginLink=[true|false]
default is false
If false
, just the person is returned as the root element of the JSON object
If true
, the person is return alongside his login link as the user
and access_link
elements of the JSON response object. A person's login link contains a unique, secure token that allows them to log into the CloudCard without entering their username or password.
{
"email": "jon.doe@foo.edu",
"identifier":"ABC123",
"Some Custom Field":"Some Custom Field Value",
"Another Custom Field":"Another Custom Field Value"
}
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"
}
200 OK
{
"user": {
"class": "com.campuscardtools.myphotoid.Person",
"id": 19674,
"accountExpired": false,
"accountLocked": false,
"activatedDate": null,
"additionalPhotos": [],
"customFieldValues": [
{
"class": "com.campuscardtools.myphotoid.CustomFieldValue",
"id": 11790
}
],
"dateTermsAccepted": null,
"email": "bacon@test.edu",
"enabled": true,
"identifier": "bacon",
"lastUpdated": "2018-01-16T20:47:44Z",
"organization": {
"class": "com.campuscardtools.myphotoid.Organization",
"id": 38
},
"password": "29cDb7jiPtjXG0vEgiRl3Shn",
"passwordExpired": false,
"passwordResetRequired": false,
"photos": [
{
"class": "com.campuscardtools.myphotoid.Photo",
"id": 11982
}
],
"roles": [
{
"class": "com.campuscardtools.myphotoid.PersonRole",
"id": null
}
],
"username": "bacon@test.edu"
},
"access_link": "https://test.cloudcardtools.com/#/login?access_token=YmFjb25AdGVzdC5lZHUsMjljRGI3amlQdGpYRzB2RWdpUmwzU2hu"
}