Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 46 Next »

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 is true
    If sendInvitation is false, cardholders will not receive an email invitation.
    If sendInvitation is true (or not specified), an email invitation will be sent to the cardholder.

Example HTTP Request Body - Email Only

{
  "email": "jon.doe@foo.edu"
}
Example HTTP Request Body - Setting other optional fields
{
  "email": "jon.doe@foo.edu",
  "identifier":"ABC123",
  "emailGroupName":"Online Students",
  "additionalPhotoRequired":"true",
  "enabled":true,
  "customFields":{ 
    "Last_Name":"Card",
    "First Name":"Carry A",
    "Upload Date":"2017 - 06 - 22 11:17AM",
    "Batch":"1"
  }
}
Field Descriptions

Field

Description

email

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.

cardholderGroupName

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.

enabled

(default: true), Must be true for the user to access CloudCard

Example Response
202 ACCEPTED
Headers: 
  Location: https://api.onlinephotosubmission.com/api/people/{id}
Example Response (with ?renderResource=true)
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"
}
  • No labels