API requests submitted to BankruptcyWatch by SFTP must have the following format:
- They must be in CSV format. Office documents in XLS or XLSX format are not supported.
- They must be encoded as UTF-8. Text will be converted to ASCII before processing.
- They must consist of three blocks of rows (see Figure 1):
- A header block, containing a list of name/value pairs
- An empty row
- A data block, containing an unlimited number of rows of data
Header Block
The header block consists of a list of rows each containing two cells. In each row, the first cell contains the header name, and the second cell contains the header value. The order of the headers is not important.
Header | Description | Required |
version | The API version | yes |
operation | The operation name, e.g., AddPortfolioItems | yes |
username | The BankruptcyWatch username | yes |
password | The BankruptcyWatch password | yes |
subscriptionId | The subscription ID | Required by AddPortfolioItems and RemovePortfolioItems |
Data Block
The data block consists of a list of rows whose interpretation depends on the operation being called. For the operations AddPortfolioItems and RemovePortfolioItems, the data block consists of a list of portfolio items. The number of columns in each row, and the interpretation of each column, depends on whether the subscription has type consumer portfolio or case portfolio.
To simplify integration of the BankruptcyWatch API, we allow several API operations to be invoked by sending a CSV file over SFTP, instead of by calling the API directly. Currently, the following two API operations are supported:
If you wish to make API requests via SFTP, BankruptcyWatch will issue you a username and password for its SFTP server.
BankruptcyWatch SFTP Server
BankruptcyWatch provides an SFTP server for its clients to use. You can log into the SFTP server using the command line or a graphical SFTP client.
Property | Value |
Domain | sftp.bk.watch |
Username | Provided by BankruptcyWatch |
Password | Provided by BankruptcyWatch |
Home Directory | /home/sftp.USERNAME |
Each user home directory has two subdirectories:
Directory | Description |
inbox | Stores messages sent to the user. The user is responsible for deleting the messages after they have been viewed. |
outbox | Stores messages created by the user. BankruptcyWatch processes these messages each day and deletes them. |
BankruptcyWatch creates two types of messages in a user’s inbox:
- CSV files containing error messages generated when processing SFTP requests. See Error Reporting
- Notifications sent by the subscriptions system. To have subscriptions notifications delivered to your SFTP inbox, add a delivery method with message transport SFTP and the following delivery address:
See Next: Importing Results from BankruptcyWatch