Secure File Transfer Protocol, or SFTP, is a network protocol that provides encrypted file access over the internet. PushCoin customers can utilize SFTP for uploading student photos or student records.

This article describes steps for uploading student records via SFTP, including the file format, directory where to upload the file and the filename convention. Alternative method for uploading student records is via Web API.

Connecting to SFTP server

The import file can be uploaded interactively using any SFTP client or automated via a nightly process. The SFTP server address is: img.pushcoin.com

 icon-warning Important: You must provide PushCoin with the IP address or the IP range from where the uploads will originate. Otherwise all SFTP connection attempts will time out due to firewall blocking them.

The login credentials for the SFTP service are not the same as your PushCoin website login. You were provided with the SFTP credentials separately when you signed up for PushCoin. If you don’t remember or lost this information, send email to ask@pushcoin.com

Following the successful login to the SFTP server, go to the directory named after your login name.  This is your school’s private repository and nobody else has read nor write access to it. Next, go to the incoming/ directory where you will be putting the students file. Here is the full path example:

<login name>/incoming/users.csv

When you upload the students file, a scheduled PushCoin process picks it up (about every 15 minutes), parses the file and if no errors are found, it imports the records to PushCoin. If errors are found, the process is aborted. A detailed report which includes any errors can be accessed from this path:

<login name>/outgoing/log_users_import.txt

Filename convention

There are two options to choose from:

  1. If your students CSV file meets our requirements described in your PushCoin account, Students -> Import section then use the filename users.csv
  2. If your CSV file requires further processing on our end, use the filename users-unformatted.csv

Tell us which option you decide to use by sending request to ask@pushcoin.com. If you choose the unformatted-file (option #2), we can assist you by making arbitrary transformations to your file to satisfy our needs. For example:

  • SIS system does not export the gender as “M” or “F”.
  • Your SIS uses TAB as the field-delimiter instead of a comma.
  • Date in the file does not meet either ISO (YYYY-MM-DD) or U.S. formats (MM/DD/YYYY).
  • No header is present (order of columns should be used instead).

Above are just a few examples of types of on-the-fly transformations that we can apply to your users-unformatted.csv file. Should you choose option #2, notify us and allow our team some time to work on the “adapter plugin” specific to your school.

Dealing with partially uploaded files

If your file upload coincides with our scheduled pickup process or the upload never finishes due to a network error, the system may attempt to import a partially uploaded file. To avoid this, we recommend that you always upload the file using a temporary name first, like tmp_users.csv, and once the upload finishes simply rename the file to users.csv or users-unformatted.csv as appropriate.

Example #1: upload the users.csv

Below example illustrates how to safely upload the users.csv file. You should substitute SCHOOLID with your school login:

$ sftp SCHOOLID@img.pushcoin.com
SCHOOLID@img.pushcoin.com's password: <password entered>
Connected to img.pushcoin.com.
sftp> cd SCHOOLID/incoming/           # change destination
sftp> rm tmp_users.csv                # clean up (OK if fails)
sftp> rm users.csv                    # clean up (OK if fails)
sftp> put tmp_users.csv               # upload
sftp> rename tmp_users.csv users.csv  # rename

Example #2: download the report

$ sftp SCHOOLID@img.pushcoin.com
SCHOOLID@img.pushcoin.com's password: <password entered>
Connected to img.pushcoin.com.
sftp> cd SCHOOLID/outgoing/
sftp> get log_users_import.txt