Versions Compared

Key

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

URI: https://api.cloudcard.us/person/{id}

Example URI: https://

...

api.

...

cloudcard.

...

us/

...

HTTP Method: PUT

...

person/123 
Example URI: https://api.cloudcard.us/person/jon.doe@foo.edu?findBy=email
Example URI: https://api.cloudcard.us/person/A1234567?findBy=identifier

Optional URL Parameters: 

  • allowCreate

    findBy=[

    true

    id|email|

    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

    identifier] (default id)

  • updateRoles=[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"
}
Code Block
titleExample HTTP Request Body - Using option "identifier" field to set ID Number
{
  "email": "jon.doe@foo.edu",
  "identifier":"ABC123"
}

...

  • (default true)
    If updateRoles is true or absent, any roles not explicitly granted will be removed

HTTP Method: PUT
Required Headers: X-Auth-Token (see: Authentication)
Optional URL Parameters: none

Example HTTP Request Body - All fields are optional
Code Block
languagejson
{
  "email": "jon.doe@foo.edu",
  "identifier":"ABC123",
  "customFields":{Some Custom     "Last_Field Name":"Card",Some Custom    "First Name":"Carry AField Value",
 
  "Upload Date":"2017 - 06 - 22 11:17AM",
    "BatchAnother Custom Field Name":"1"Another Custom  }
}
Code Block
titleExample Response
201 created
{ 

   "accountExpired":falseField Value",
   "accountLockedROLE_DIRECTOR":false,
   "activatedDate":null,
   "authorities":[ 
      { 
         "class":"com.campuscardtools.myphotoid.Role",
         "id":3,
      
  "authority":"ROLE_CARDHOLDER"
      }
   ],
   "currentPhoto":null,
OFFICE":true,
  "customFieldscardholderGroupName":{ 
      "Upload Date":{ 
         "class":"com.campuscardtools.myphotoid.CustomFieldValue",
      "Online Students",
  "id":3541,
         "customField":{ 
            "class":"com.campuscardtools.myphotoid.CustomField",
         additionalPhotoRequired":true ,
  "idenabled":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"
}true
}
Response
Code Block
202 ACCEPTED

Field Descriptions
Include Page
Person Field Descriptions
Person Field Descriptions