Note |
---|
This endpoint should only be used to create a person. The ability to update a person via this endpoint has been deprecated. If you need to update a person, please refer to the Update a Person endpoint. |
URI:
...
https://api.onlinephotosubmission.com/api/people
HTTP Method: POST
Required Headers: X-Auth-Token (see: Authentication)
Optional URL Parameters:
sendInvitation=[true|false]
default istrue
IfsendInvitation
isfalse
, cardholders will not receive an email invitation.
IfsendInvitation
istrue
(or not specified), an email invitation will be sent to the cardholder.
...
...
Example HTTP Request Body - Email Only
Code Block | ||
---|---|---|
| ||
{ "email": "jon.doe@foo.edu" } | ||
title |
Example HTTP Request Body - Setting other optional fields
Code Block | ||
---|---|---|
| ||
{ "email": "jon.doe@foo.edu", "identifier":"ABC123", "emailGroupName":"Online Students", "additionalPhotoRequired":"true", "customFields":{ "Last_Name":"Card", "First Name":"Carry A", "Upload Date":"2017 - 06 - 22 11:17AM", "Batch":"1" } } |
Field | Description |
---|---|
The cardholders' email address. Also used as the username | |
identifier | The organization's unique identifier for the cardholder, i.e. student ID or employee ID. |
emailGroupName | The email recipient group into which the cardholder should be place |
additionalPhotoRequired | If true, the cardholder is required to submit all supplemental documents defined for that organization, i.e. government issued ID, signature, etc. |
custom fields | A map of key value pairs. The keys are the names of the custom fields. The values are the custom field values for this cardholder. |
Info |
---|
Because this endpoint is currently being improved, we've included the examples of both the current HTTP response and the proposed HTTP response. Please, be aware this could change in the near future; and contact support if you have more questions. |
...
title | Example Response |
---|
Example Response
Code Block |
---|
202 ACCEPTED Headers: Location: https://api.onlinephotosubmission.com/api/people/{id} |
Code Block |
Example Response (with ?renderResource=true)
collapse | true
---|
Code Block |
201 created { "accountExpired": false, "accountLocked": false, "activatedDate": null, "additionalPhotoRequired": true, "additionalPhotos": {}, "authorities": [ { "authority": "ROLE_CARDHOLDER", "id": 3, "version": 0 } ], "canSwitchOrganizations": false, "canViewOrganizationList": false, "currentPhoto": null, "customFields": { "Notes": null }, "dateTermsAccepted": null, "domainClass": "com.campuscardtools.myphotoid.Person", "email": "black.beard@pirates.com", "emailGroup": { "id": 23, "name": "Default", "receivableEmails": "login,approval,denial,BAD,GOOD,MAYBE,welcome" }, "enabled": true, "homeOrganization": { "id": 92, "hasDescendents": false, "descendents": [] }, "id": 385828, "identifier": "K0001", "links": { "login": null }, "organization": { "id": 92, "domainClass": "com.campuscardtools.myphotoid.Organization", "name": "Test Org.", "isPaid": true, "termsOfService": "null", "photoRequirements": [...], "customFields": [ { "name": "Notes", "prompt": null, "sortOrder": 1, "showInList": true, "allowUserInput": false, "requireUserInput": false, "lastUpdated": "2018-12-18T21:05:18Z", "id": 100067, "version": 0 } ], "customCssUrl": "https://sharptopco.github.io/cloudcard-custom-assets/blankcssfile.css", "logoutUrl": null, "useEmailAsUsername": true, "usePersonIdentifier": true, "personIdentifierLabel": "ID Number", "downloadStrategy": { "id": "EXTERNAL", "name": "External Application" }, "downloadLabel": "Download Photos", "photoDimensions": { "width": 200, "height": 200, "description": "200:200 (1:1)", "id": 3, "version": 0 }, "preventMultiplePhotos": false, "approvalsPerDay": 0, "approvalsMadeToday": 0, "canApproveMorePhotosToday": true, "emailReplyTo": "Hello From CloudCard <hello@cloudcardtools.com>", "helperBotDelay": 1000 }, "passwordExpired": false, "passwordResetRequired": false, "readOnly": false, "unsubscribe": false, "username": "black.beard@pirates.com" } |