URI: https://api.onlinephotosubmission.com/photo/{id}
HTTP Method: POST
Required Headers:
X-Auth-Token (see: Authentication)
Content-Type: application/json
Accept: application/json
Description: Triggers specific photo processing tasks. Allowed tasks are:
crop
rotate
removeBackground
classify
sendFeedback
Example Request Body
{ "process": "rotate" }
The response body will contain a new photo ID when calling rotate/crop/removeBackground, since this generates a new photo (and discards the old one). It is important to retrieve the new photo ID from the response body in order to continue the processing workflow. Calling “classify” will return the same photo, but with a classification score in the response body.
Example Response Body
{ "id": 299, "dateCreated": "2022-09-13T17:49:58Z", "upVotes": 0, "width": 400, "dateApproved": null, "externalURL": "https://s3-ca-central-1.amazonaws.com/photos.cloudcard/000001.22.115.vbndcede0fbebmbig1dmq05gb2qeniopscjt23iqoc35spmco0hokqnafr2vrd0f5ldm4pcr3nteo2f4.jpg", "lastUpdated": "2022-09-13T18:17:29Z", "helperBotReviewed": false, "aspectRatio": 0.8620689655172413, "height": 464, "backgroundReplaced": false, "downVotes": 0, "automaticallyApprovedOrDenied": false, "publicKey": "000001.22.115.vbndcede0fbebmbig1dmq05gb2qeniopscjt23iqoc35spmco0hokqnafr2vrd0f5ldm4pcr3nteo2f4", "manuallyEdited": false, "status": "DISCARDED", "domainClass": "us.cloudcard.api.Photo", "person": { "id": 1, "dateCreated": "2021-03-22T15:20:04Z", "passwordResetRequired": false, "organization": { "id": 1, "downloadLabel": "Download Photos", "allowAutoCrop": true, "idealHeadTop": 0.1, "logoutUrl": "", "allowAutoRotate": true, "allowAutoDenial": false, "allowDeprecatedEndpoints": false, "maxNumberOfInvitations": 10000, "photoDimensions": { "id": 1, "width": 200, "height": 200, "description": "200:200 (1:1)", "domainClass": "us.cloudcard.api.PhotoDimensions", "version": 0, "value": 1.0, "longSide": 200, "shortSide": 200 }, "name": "Foo University", "badPhotoThreshold": 0.4, "helpScoutBeacons": [ { "id": 6, "helpScoutId": "3ffde53d-8320-4d6d-8ecf-cf58a55b0fc9", "organization": { "id": 1 }, "icon": "fa fa-question-circle", "role": { "id": 5, "authority": "ROLE_OFFICE", "domainClass": "us.cloudcard.api.Role", "version": 0 }, "name": "Office Knowledge Base", "version": 1 } ], "allowAutoBackgroundReplacement": true, "sendEmailFrom": "hello@onlinephotosubmission.com", "identifier": null, "emailReplyTo": "hello@onlinephotosubmission.com", "expirationDate": null, "approvalsPerDay": 200000, "backgroundColor": "f5f5f8", "parent": null, "allowAutoApproval": true, "termsOfService": "null", "siteURL": "", "autoArchiveAction": null, "lastUpdated": "2022-09-12T17:54:03Z", "daysBetweenInvitations": 1, "backgroundImage": null, "sendAutomaticFeedback": false, "usePersonIdentifier": true, "emailDomains": [ { "id": 2, "lastUpdated": "2021-03-22T15:20:03Z", "organization": { "id": 1 }, "domain": "mail.foo.edu", "domainClass": "us.cloudcard.api.EmailDomain", "version": 0 } ], "autoArchiveStatus": null, "additionalPhotoTypes": [], "defaultGroup": { "id": 1, "enableAutoIdentifier": false, "organization": { "id": 1 }, "receivableEmails": "welcome,login,approval,denial,BAD,GOOD,MAYBE", "identifierPrefix": null, "name": "Default", "domainClass": "us.cloudcard.api.CardholderGroup", "version": 0 }, "goodPhotoThreshold": 0.6, "personIdentifierLabel": "ID Number", "minPhotoResolution": 0.5, "preventMultiplePhotos": false, "idealHeadSize": 0.6, "customCssUrl": "", "useEmailAsUsername": true, "helperBotDelay": 2000, "downloadStrategy": { "id": "ZIP", "name": "Zip File" }, "approvalsMadeToday": 0, "backgroundReplacementEnabled": true, "canApproveMorePhotosToday": true, "customFields": [], "photoRequirements": [ { "id": 1, "listIndex": 0, "lastUpdated": "2021-03-22T15:20:06Z", "organization": { "id": 1 }, "uniqueName": "Crop", "preventDeletion": false, "classifierUrl": null, "hidden": false, "photoRequirementTypes": [], "requirement": "Should be cropped slightly above head to middle of chest", "version": 0, "domainClass": "us.cloudcard.api.PhotoRequirement" }, { "id": 2, "listIndex": 1, "lastUpdated": "2021-03-22T15:20:06Z", "organization": { "id": 1 }, "uniqueName": "Plain Background", "preventDeletion": false, "classifierUrl": null, "hidden": false, "photoRequirementTypes": [], "requirement": "Should be taken against a plain, light background", "version": 0, "domainClass": "us.cloudcard.api.PhotoRequirement" }, { "id": 3, "listIndex": 2, "lastUpdated": "2021-03-22T15:20:06Z", "organization": { "id": 1 }, "uniqueName": "Color Photo", "preventDeletion": false, "classifierUrl": null, "hidden": false, "photoRequirementTypes": [], "requirement": "Must be a color photo", "version": 0, "domainClass": "us.cloudcard.api.PhotoRequirement" }, { "id": 4, "listIndex": 3, "lastUpdated": "2021-03-22T15:20:06Z", "organization": { "id": 1 }, "uniqueName": "No Accessories", "preventDeletion": false, "classifierUrl": null, "hidden": false, "photoRequirementTypes": [], "requirement": "Must not include sunglasses or hat", "version": 0, "domainClass": "us.cloudcard.api.PhotoRequirement" }, { "id": 5, "listIndex": 4, "lastUpdated": "2021-03-22T15:20:06Z", "organization": { "id": 1 }, "uniqueName": "Face Camera", "preventDeletion": false, "classifierUrl": null, "hidden": false, "photoRequirementTypes": [], "requirement": "Must be positioned directly facing the camera", "version": 0, "domainClass": "us.cloudcard.api.PhotoRequirement" }, { "id": 6, "listIndex": 9, "lastUpdated": "2021-03-22T15:20:06Z", "organization": { "id": 1 }, "uniqueName": "Helper Bot", "preventDeletion": false, "classifierUrl": "https://helper-bot.onlinephotosubmission.com/generic", "hidden": true, "photoRequirementTypes": [], "requirement": "Must be a good photo", "version": 0, "domainClass": "us.cloudcard.api.PhotoRequirement" } ], "locale": "en" }, "preArchiveEmail": null, "accountExpired": false, "dateArchived": null, "unsubscribe": false, "identifier": "1", "preArchiveIdentifier": null, "dateTermsAccepted": "2022-04-19T15:24:27Z", "passwordExpired": false, "lastUpdated": "2022-07-07T19:27:56Z", "cardholderGroup": { "id": 1 }, "additionalPhotoRequired": true, "quicksightArn": "arn:aws:quicksight:us-east-1:836233235704:user/default/embed-dashboard/a@foo.edu", "preArchiveUsername": null, "username": "a", "accountLocked": false, "activatedDate": "2021-03-23T15:20:04Z", "enabled": true, "email": "a@foo.edu", "additionalPhotos": [] }, "classifications": [], "lowestClassification": null, "isAspectRatioCorrect": false, "links": { "bytes": "https://s3-ca-central-1.amazonaws.com/photos.cloudcard/000001.22.115.vbndcede0fbebmbig1dmq05gb2qeniopscjt23iqoc35spmco0hokqnafr2vrd0f5ldm4pcr3nteo2f4" }, "originalPhoto": { "id": 179, "publicKey": "000001.22.115.vbndcede0fbebmbig1dmq05gb2qeniopscjt23iqoc35spmco0hokqnafr2vrd0f5ldm4pcr3nteo2f4", "links": { "bytes": "https://s3-ca-central-1.amazonaws.com/photos.cloudcard/000001.22.115.vbndcede0fbebmbig1dmq05gb2qeniopscjt23iqoc35spmco0hokqnafr2vrd0f5ldm4pcr3nteo2f4.jpg" } }, "personHasApprovedPhoto": true, "version": 1 }