Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
  1. If necessary, Authenticate

  2. If necessary, Client Registration

  3. Check if the cardholder exists in CloudCard

    1. Get a Person using findBy=email or findBy=identifier. For example,

      1. https://api.onlinephotosubmissioncloudcard.comus/person/jon.doe@foo.edu?findBy=email

      2. https://api.onlinephotosubmissioncloudcard.comus/person/A1234567?findBy=identifier

    2. If the cardholder exists the request will return 200 OK. If not, it will return 404 NOT FOUND.

  4. If the cardholder does not exist, create the cardholder.

  5. If the cardholder exists, check the cardholder’s current photo status:

    1. Examine the currentPhoto field from the resonse to Get a Person.

      1. If null, the person has no photo.

      2. If currentPhoto is not null, currentPhoto.status contains the status of the person’s current photo.

  6. If currentPhoto is null or currentPhoto.status is DENIED, instruct the user to upload a photo to your application. (The implementations details of this are outside the scope of this document.)

  7. Create a photo for the cardholder using the photo uploaded above.

  8. Process the photo (separate requests; in order). Use the URL stored in the links.bytes field in the response to retrieve the processed photo.

    1. { "process": "rotate" }

    2. { "process": "crop" }

    3. { "process": "removeBackground" }

    4. { "process": "classify" }

    5. { "process": "sendFeedback" }

...