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

Version 1 Next »

URI: https://api.onlinephotosubmission.com/api/bulk-action

HTTP Method: POST
Required Headers: 

Required Form Parameters: 

  • csv: the file path to a CSV file you wish to upload

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: default true

  • skipLines: default 0. Ignore the first N lines of the CSV.B

  • invitationDefault

    • default: NEW_USERS

    • options: NEW_USERS, ALL_USERS, NO_USERS

  • actionDefault

    • default CREATE_OR_UPDATE

    • options: CREATE, CREATE_OR_UPDATE

    • not yet supported options: UPDATE, ARCHIVE, ANONYMIZE, DELETE

This is in development and is scheduled to be deployed in Feb 2023 or later

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"'

CSV Format

Required Fields

  • email or identifier

Optional Fields

  • email

  • identifier

  • Custom Field Value
    The column name must exactly match the name of a predefined custom field on your organization

  • cardholderGroupName: the value must exactly match the name of a predefined cardholder group on your organization

  • managerEmail: the email address of the Person Manager for this cardholder. If a Person Manager with this email address does not already exist, it will be created.

  • sendInvitation

    • TRUE: send the welcome email to this person

    • FALSE: do not send the welcome email to this person

    • null, empty, or any other value: use the default behavior defined by the invitationDefault form parameter

  • action

    • CREATE: only create this person. Throw an error if this person already exists

    • CREATE_OR_UPDATE: create this person or update them if they already exist

Example CSV - Simple
email,identifier
tony.montana@company.net,00450631
john.smith@gmail.com,00450731
sally.smith@company.net,00450831
jane.doe@company.net,00450832
john.doe@company.net,00450833
william.wallace@company.net,00450834
Example CSV
email,identifier,Campus,Legal Name,cardholderGroupName,Card Type,managerEmail,sendInvitation,action
tony.montana@company.net,00450631-demo,Alamo,Davy Crockett,Default,random-4439,gm@foo.edu,TRUE,create_or_update
john.smith@gmail.com,00450731-demo,Alamo,William Travis,bacon,random-4998,gm@foo.edu,FALSE,
sally.smith@company.net,00450831-demo,San Jacinto,Sam Huston,Default,random-4011,gm@foo.edu,null,create_or_update
jane.doe@company.net,00450832-demo,San Jacinto,Sam Huston,Default,random-5012,gm@foo.edu,TRUE,create_or_update
john.doe@company.net,00450833-demo,San Jacinto,Sam Huston,Default,random-7098,gm@foo.edu,FALSE,create
william.wallace@company.net,00450834-demo,San Jacinto,Sam Huston,Default,random-7738,gm@foo.edu,,create
  • No labels