PCI Vault Logo
SFTP

These endpoints allow for interacting with bulk data sent through SFTP. Please e-mail [email protected] to have an SFTP account set up.

Once the SFTP account has been set up, these endpoints can be used to tokenize the data in the files.

GET /sftp/files List Files
PCI DSS Scope: SAQ-A/D

List all the files in your SFTP folder.

GET
https://api.pcivault.io/v1/sftp/files
# No Body
Response Code: 200 (example)
POST /sftp/store Parse And Store File Data
PCI DSS Scope: SAQ-A/D

Read a PGP encrypted CSV file, and store the items in the vault. This request triggers the processing of the file, use GET /sftp/files to list the files which have been processed and are ready to download.

(query)

The identifier for the key used to originally encrypt the data.

(query)

The passphrase for the key used to originally encrypt the data.

(query)

A reference to assist with lookups in the vault. This reference can be static and applied to all parsed items or be a field from the CSV file using a mustache template like {{customer_id}}.

(query)

Setting this to true will include all fields in the stored data, even the ones that are not on the field map in the body.

(query)

Setting this to true will include all the fields of the CSV file as a JSON string in an original_data field.

(query)

The tokenization algorithm to use. See the tokenization guide for more information.

(query)

A comma separated list of rule ids to apply to the data after being mapped. The rules will be applied before it is stored.

(body)

The path of the file to parse. This must be the same as the path returned by the List Files endpoint.

A map of composite fields (CSV fields which consist of multiple values). The keys in this map are the fields as they are in the CSV file, the values are regular expressions with named capture groups. If the value matches the regular expression, each named parameter is extracted and the original field is replaced. If the regular expression doesn't match, the data is unchanged. This happens before any rules are applied to the data.

Example data presets:

A map of fields. The keys in this map are the fields as they are in the CSV file, the values are the fields as they must be in the stored JSON.

Example data presets:

(body)

A webhook to send the capture result to.

(body -> webhook)

The URL for the webhook. This must be an https URL.

(body -> webhook)

A secret that will be returned in the webhook call's X-PCIVault-Webhook-Secret header.

(body -> webhook)

A value between 1 and 8 for the maximum amount of times the webhook should be called per token update. Calls to the webhook will stop on a 200 HTTP response, or when max_attempts are reached.

(body -> webhook)

Some metadata which will be merged into the webhook response. This is useful for uniquely identifying webhook responses to requests.

POST
https://api.pcivault.io/v1/sftp/store
Response Code: 202 (example)
POST /sftp/fetch Fetch Files From Third Party SFTP Server
PCI DSS Scope: SAQ-A/D

Fetch PGP encrypted CSV files from a third party SFTP server and copy them to your SFTP account in PCI Vault. This request triggers the copy of the files, use GET /sftp/files to list the files which have been copied over and are ready to be processed with POST /sftp/store.

(body)

A list of file paths to fetch from the third party SFTP server.

The PGP encrypted credentials to connect to the third party SFTP server.

The PGP encrypted credentials to connect to the third party SFTP server.

(body)

An optional path to copy the fetched files to on the PCI Vault SFTP server.

(body)

If the server credentials string does not contain the host, it can be specified here. If it does contain the host, it will take precedence and this field won't be used.

(body)

If the server credentials string does not contain the port, it can be specified here. If it does contain the port, it will take precedence and this field won't be used.

POST
https://api.pcivault.io/v1/sftp/fetch
Response Code: 202 (example)