Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

URI: https://app.cloudcardtools.com/api/people/{id}

...

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.  

Code Block
titleExample HTTP Request Body - Email Only
{
  "email": "jon.doe@foo.edu"
}

...

titleExample HTTP Request Body - Using option "identifier" field to set ID Number

...

    •   A person's login link contains a unique, secure token that allows them to log into the CloudCard without entering their username or password.

Code Block
titleExample HTTP Request Body - Set the user's custom fieldsAll fields are optional
{
  "email": "jon.doe@foo.edu",
  "identifier":"ABC123",
  "customFields":{Some 
    "Last_NameCustom Field":"Card",Some Custom Field   "First Name":"Carry A"Value",
  "Another Custom Field"Upload Date":"2017Another -Custom 06 - 22 11:17AM",
    "Batch":"1"
  }Field Value"
}


Code Block
titleExample Response
collapsetrue
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"
}


Code Block
titleExample HTTP Response (w/ Login Link)
collapsetrue
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"
}