Search

Introduction

This request displays how you can use an Elasticsearch query to pull transaction data from Secure Payments. Changing the type in the endpoint allows you to search for different objects and determine if the results should be exported and emailed in a report.

For more information, see our article on The NACHA Process – Start to Finish.

{
  "search": {
    "size": 10,
    "from": 0,
    "aggregations": {
      "aggs": {
        "terms": {
          "field": "batch.keyword",
          "size": 100
        }
      }
    },
    "sort": [],
    "query": {
      "bool": {
        "must": [
          {
            "bool": {
              "should": {
                "query_string": {
                  "query": "*Wells Fargo*",
                  "default_operator": "AND",
                  "fields": [
                    "customer_name",
                    "processor",
                    "metadata",
                    "status",
                    "batch"
                  ]
                }
              }
            }
          },
          {
            "bool": {
              "must": [
                {
                  "range": {
                    "created": {
                      "gte": "2021-04-22",
                      "lte": "2021-04-29"
                    }
                  }
                }
              ]
            }
          },
          {
            "match": {
              "status": "PROCESSING"
            }
          }
        ]
      }
    }
  }
}

📘

Try It

To receive a 200 response, simply click the button. The payload is a standard Elasticsearch query object, which you can change in the Body Params section.

This example is linked to our demo account. If you'd like to use a different account, enter values for Authorization and Secret in the Headers section above the payload.

Language
Authorization
Click Try It! to start a request and see the response here!