Bulk Action
URI:Â https://api.cloudcard.us/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"
}
]