...
- CloudCard user approves photos.
- CloudCard user views approved photos and clicks a "Download" button.
- The approved photos are then marked as "Ready for Download".
- This requires the organization to have the external download strategy. Consult your CloudCard representative if you don't know what that means.
- We can also modify the text of the "Download" button. For example, you could make that button say "Send photos to Card Printer".
- Your external downloader polls the server at a suitable interval, using the Photo List request with a status of
READY_FOR_DOWNLOAD
.- We have recently developed Status Queues as an alternative to polling. Your code would subscribe to an SQS queue connected to the
READY_FOR_DOWNLOAD
status (or any other appropriate status) and download photos when messages were received from the queue.
- We have recently developed Status Queues as an alternative to polling. Your code would subscribe to an SQS queue connected to the
- If the list contains photos, download each photo's bytes from the
photo.links.bytes
value in the JSON output. (This link corresponds to the Get Binary Photo Data request). - Once you have the bytes in your application, you can either write them to the file system, save them to a database, or send them to another API endpoint – whatever suits your application.
- In order to prevent your application from processing the same photo multiple times, you will want to mark it as downloaded. To do this, send an Update Photo request with a status of
DOWNLOADED
.
...