Secure Payments API – Pull NACHA Reports

There are two ways to get a list of NACHA export files.

Method 1: Elasticsearch Query

Most people prefer using an Elasticsearch query because it lets them narrow their results down to a specific timeframe. Send a POST request to this endpoint:

POST https://pciwallet.simnang.com/api/search/nacha_export?export=false

Here's a sample JSON payload:

{ 
"search":{
"query":{
"bool":{
"must":[
{
"range":{
"created":{
"gte":"2021-07-01 00:00:00",
"lte":"2021-07-01 23:59:59"
}
}
}
]
}
},
"size":10
}
}

Inside the "created" property you can define a search range for when the files were created. The "size" property dictates how many records will be returned.

To try out the Elasticsearch method, see our ReadMe page: Pull NACHA Reports

Method 2: GET Request

The other method just involves a GET request. Here's the endpoint:

GET https://pciwallet.simnang.com/api/nacha/reports

This will get all NACHA reports associated with your account.

curl -X GET --header 'Accept: application/json' --header 'authorization: YOUR AUTH' --header 'secret: YOUR SECRET' 'https://pciwallet.simnang.com/api/nacha/reports'

Response:

[
{
"id": 36,
"name": "NACHA-export-Sample-2017-03-16-ecf4173d-028d-47b8-bc82-e0ab037888dc.txt",
"generation-date": "2017-03-16",
"uuid": "ecf4173d-028d-47b8-bc82-e0ab037888dc"
},
{
"id": 36,
"name": "NACHA-export-Sample-2017-03-16-7bc0be0f-0e5f-4729-b35a-d3d24ab9e66e.txt",
"generation-date": "2017-03-16",
"uuid": "7bc0be0f-0e5f-4729-b35a-d3d24ab9e66e"
}
]

Unfortunately, this method doesn't let you narrow the search, and only returns a maximum of 50 records.

To try out the GET Request, see our ReadMe page: GET NACHA File Reports


How did we do?


Powered by HelpDocs (opens in a new tab)