URI: https://api.onlinephotosubmission.com/bulk-action
HTTP Method: POST
Required Headers:
X-Auth-Token
: (see: Authentication)Content-Type
:multipart/form-data
Required Form Parameters:
csv
: the file path to a CSV file you wish to upload (See CSV Format)
Optional Form Parameters:
columnNames
: comma-separated list of column names. Defines the names for each column. This will override the column names defined in the header row if it exists.fieldSeparator
: default,
quoteChar
: default"
escapeChar
: default\
hasHeaderRow
: defaulttrue
skipLines
: Ignore the first N lines of the CSV.default:
0
allowed: positive integers
invitationDefault
default:
NEW_USERS
options:
NEW_USERS
: Send welcome emails only to newly created usersALL_USERS
: Send welcome emails to newly created & existing usersNO_USERS
: Don’t send welcome emails to everyone
actionDefault
default
CREATE_OR_UPDATE
options:
CREATE
,CREATE_OR_UPDATE
not yet supported options:
UPDATE
,ARCHIVE
,ANONYMIZE
,DELETE
Example cURL Request
curl --location --request POST 'https://api.onlinephotosubmission.com/api/bulk-action' \ --header 'X-Auth-Token: PUT-YOUR-AUTH-TOKEN-HERE' \ --form 'csv=@"/Users/jsmith/test-people.csv"'
Example Response
{ "id": 52, "dateCreated": "2023-03-23T19:02:48Z", "lastUpdated": "2023-03-23T19:02:48Z", "organization": { "id": 2 }, "skipLines": 0, "escapeChar": "\\", "columnNames": null, "invitationDefault": "NEW_USERS", "hasHeaderRow": true, "fieldSeparator": ",", "quoteChar": "\"", "filename": "test-people.csv", "status": "QUEUED", "actionDefault": "CREATE_OR_UPDATE", "label": "2023-03-23T15:02:48.497627_eugC", "lineCount": 5, "authenticatedUser": { "id": 7, "username": "tony@sharptop.co" }, "formattedTimestamp": "03:02 PM EDT", "personActions": null, "domainClass": "us.cloudcard.api.BulkAction", "version": 0 }
Getting Bulk Action Results
the id
below refers to the id
field in the JSON object above
URI: https://api.onlinephotosubmission.com/bulk-action/{id}/result
HTTP Method: GET
Required Headers:
X-Auth-Token
: (see: Authentication)Accept
:text/csv
orapplication/json
Example JSON Response
[ { "personId": 8118, "success": true, "message": "null", "bulkAction": "2023-03-23T16:20:15.409292_YsXR", "line": 2, "email": "cloudcard.demo@gmail.com", "identifier": "00450731-demo", "Campus": "Alamo", "Legal Name": "William Travis", "cardholderGroupName": "bacon", "managerEmail": "gm@foo.edu", "sendInvitation": "false", "action": "create", "additionalPhotoRequired": "true", "managerIdentifier": "gm123", "managerCardholderGroupName": "Alamo" }, { "personId": 8117, "success": true, "message": "null", "bulkAction": "2023-03-23T16:20:15.409292_YsXR", "line": 3, "email": "tony+null@sharptop.net", "identifier": "00450831-demo", "Campus": "San Jacinto", "Legal Name": "Sam Huston", "cardholderGroupName": "Default", "managerEmail": "gm@foo.edu", "sendInvitation": "null", "action": "create", "additionalPhotoRequired": "false", "managerIdentifier": "gm123", "managerCardholderGroupName": "Alamo" }, { "personId": 8120, "success": true, "message": "null", "bulkAction": "2023-03-23T16:20:15.409292_YsXR", "line": 4, "email": "tony+true@sharptop.net", "identifier": "00450832-demo", "Campus": "San Jacinto", "Legal Name": "Sam Huston", "cardholderGroupName": "Default", "managerEmail": "gm@foo.edu", "sendInvitation": "true", "action": "create", "additionalPhotoRequired": "true", "managerIdentifier": "gm123", "managerCardholderGroupName": "Alamo" }, { "personId": 8119, "success": true, "message": "null", "bulkAction": "2023-03-23T16:20:15.409292_YsXR", "line": 5, "email": "tony+false@sharptop.net", "identifier": "00450833-demo", "Campus": "San Jacinto", "Legal Name": "Sam Huston", "cardholderGroupName": "Default", "managerEmail": "gm@foo.edu", "sendInvitation": "false", "action": "create", "additionalPhotoRequired": "null", "managerIdentifier": "gm123", "managerCardholderGroupName": "Alamo" }, { "personId": 8116, "success": true, "message": "null", "bulkAction": "2023-03-23T16:20:15.409292_YsXR", "line": 6, "email": "tony+blank@sharptop.net", "identifier": "00450834-demo", "Campus": "San Jacinto", "Legal Name": "Sam Huston", "cardholderGroupName": "Default", "managerEmail": "gm@foo.edu", "sendInvitation": " ", "action": "create", "additionalPhotoRequired": " ", "managerIdentifier": "gm123", "managerCardholderGroupName": "Alamo" } ]
Example CSV Response
"personId","success","message","bulkAction","line","email","identifier","Campus","Legal Name","cardholderGroupName","managerEmail","sendInvitation","action","additionalPhotoRequired","managerIdentifier","managerCardholderGroupName" "8118","true","null","2023-03-23T16:20:15.409292_YsXR","2","cloudcard.demo@gmail.com","00450731-demo","Alamo","William Travis","bacon","gm@foo.edu","false","create","true","gm123","Alamo" "8117","true","null","2023-03-23T16:20:15.409292_YsXR","3","tony+null@sharptop.net","00450831-demo","San Jacinto","Sam Huston","Default","gm@foo.edu","null","create","false","gm123","Alamo" "8120","true","null","2023-03-23T16:20:15.409292_YsXR","4","tony+true@sharptop.net","00450832-demo","San Jacinto","Sam Huston","Default","gm@foo.edu","true","create","true","gm123","Alamo" "8119","true","null","2023-03-23T16:20:15.409292_YsXR","5","tony+false@sharptop.net","00450833-demo","San Jacinto","Sam Huston","Default","gm@foo.edu","false","create","null","gm123","Alamo" "8116","true","null","2023-03-23T16:20:15.409292_YsXR","6","tony+blank@sharptop.net","00450834-demo","San Jacinto","Sam Huston","Default","gm@foo.edu"," ","create"," ","gm123","Alamo"