Skip to content

List Import Attempts

Request URL

POST /transfer-to/ach/csv-import-attempts/list

Description

A csv-import-attempt file is a file containing ACH transactions that was previously uploaded to the connectFi system via SFTP file transfer. This endpoint will list csv-import-attempts, or attempts to import these .csv files, that match the desired search criteria. Search criteria may be a specific fileName, a date range, or a combination of criteria. You may also specify a maximum number of records to return using the numberOfRecords property (up to 1000) and you may specify a number of records to skip using the skipRecords property. Combine the numberOfRecords property with the skipRecords property to make displaying paginated lists easy. For example, if you want to list by groups of 150, you can set numberOfRecords to 150 and skipRecords to 0 in the first request. Then, increase skipRecords by 150 in each subsequent request to return the next group and so on.

When making a request, if the number of csv-import-attempts matching the criteria is greater than the numberOfRecords maximum requested, the response body will indicate that there are additional packages ("more": true).

If no properties are included, an unfiltered csv-import-attempts list will be returned (up to a maximum of 1000).

Schema

Property table for transfer-to/ach/csv-import-attempts/list

Property Description Required Schema
dateCreateFrom A beginning date in ISO Date format No {
  "type": "string",
  "format": "dateISO",
  "nullable": true
}
dateCreateTo An ending date in ISO Date format No {
  "type": "string",
  "format": "dateISO",
  "nullable": true
}
numberOfRecords The maximum number of desired records to return No {
  "type": "integer",
  "minimum": 1,
  "nullable": true,
  "$id": "common-numberOfRecords"
}
skipRecords The number of records to skip when returning results No {
  "type": "integer",
  "minimum": 0,
  "nullable": true,
  "$id": "common-skipRecords"
}
fileName fileName No {
  "type": "string",
  "pattern": "^((?![<>]).)*$",
  "minLength": 0,
  "maxLength": 500,
  "nullable": true,
  "$id": "common-commonStr500"
}

Request Body

{
  "dateCreateFrom": "2023-10-15T00:00:00.001Z",
  "dateCreateTo": "2023-12-15T23:59:59.999Z",
  "fileName": "2023_11_01_P.csv",
  "numberOfRecords": 1000,
  "skipRecords": 0
}

Snippet Examples

javascript

const axios = require('axios');
const data = {
  "dateCreateFrom": "2023-10-15T00:00:00.001Z",
  "dateCreateTo": "2023-12-15T23:59:59.999Z",
  "fileName": "2023_11_01_P.csv",
  "numberOfRecords": 1000,
  "skipRecords": 0
};
const config = {
  method: 'POST',
  url: '${CONNECTFI_BASE_URL}/transfer-to/ach/csv-import-attempts/list',
  headers: {
    'Content-Type': "application/json",
    'x-connectfi-token': "A long random string token received from /auth/get-token request"
  },
  data
};

let result;
try {
  result = await axios.request(config);
  if (result.status === 200) {
    console.log(JSON.stringify(result.data));
  }
} catch (err) {
  console.log({
    errCode: err.code,
    responseStatus: err.response && err.response.status,
    data: err.response && JSON.stringify(err.response.data)
  });
}

cURL

curl --location "CONNECTFI_BASE_URL/transfer-to/ach/csv-import-attempts/list" --data "{  \"dateCreateFrom\":\"2023-10-15T00:00:00.001Z\", \"dateCreateTo\":\"2023-12-15T23:59:59.999Z\", \"fileName\":\"2023_11_01_P.csv\", \"numberOfRecords\":1000, \"skipRecords\":0}" --header "Content-Type: application/json" --header "x-connectfi-token: A long random string token received from /auth/get-token request" 

Successful Response Examples

200 SUCCESSFUL RESPONSE

HEADERS

Header Value
Content-Type application/json
x-connectfi-token A long random string token received from /auth/get-token request

REQUEST BODY

{
  "dateCreateFrom": "2023-10-15T00:00:00.001Z",
  "dateCreateTo": "2023-12-15T23:59:59.999Z",
  "fileName": "2023_11_01_P.csv",
  "numberOfRecords": 1000,
  "skipRecords": 0
}

RESPONSE BODY

{
    "code": "0",
    "data": {
        "total": {
            "skipRecords": 0,
            "numberOfRecords": 1,
            "more": false
        },
        "items": [
            {
                "id": "testssOatBnwLhN0Er5k3NcHu",
                "cFiAggregatorId": "CLIENTID",
                "clientCode": "CLIENTID",
                "fileName": "2023_11_01_P.csv",
                "path": "CLIENTID\\2023_11_01_P.csv",
                "isValidAch": true,
                "cFiPackageId": "pkg_R4OqANPMM6cvKWW9",
                "requestId": "0f15b75178b111eeb21456da8a864da0",
                "defects": [],
                "dtsCreatedAt": "2023-11-01T12:20:35.271Z"
            }
        ]
    },
    "requestId": "678945d0a1ca11efadaf56da8a860aa8"
}