If necessary, Authenticate
If necessary, Client Registration
Check if the cardholder exists in CloudCard
Get a Person using
findBy=email
orfindBy=identifier
. For example,https://api.onlinephotosubmissioncloudcard.comus/person/jon.doe@foo.edu?findBy=email
https://api.onlinephotosubmissioncloudcard.comus/person/A1234567?findBy=identifier
If the cardholder exists the request will return
200 OK
. If not, it will return404 NOT FOUND
.
If the cardholder does not exist, create the cardholder.
If the cardholder exists, check the cardholder’s current photo status:
Examine the
currentPhoto
field from the resonse to Get a Person.If
null
, the person has no photo.If
currentPhoto
is notnull
,currentPhoto.status
contains the status of the person’s current photo.
If
currentPhoto
isnull
orcurrentPhoto.status
isDENIED
, instruct the user to upload a photo to your application. (The implementations details of this are outside the scope of this document.)Create a photo for the cardholder using the photo uploaded above.
Process the photo (separate requests; in order). Use the URL stored in the
links.bytes
field in the response to retrieve the processed photo.{ "process": "rotate" }
{ "process": "crop" }
{ "process": "removeBackground" }
{ "process": "classify" }
{ "process": "sendFeedback" }
...