Searching

Search Fieldsanchor

We support three types of search fields:

  • Text fields
  • Multiple value fields
  • Range fields

Learn more about working with search results.

Text fieldsanchor

Text Fields can be searched using 5 operators: is, isNot, startsWith, endsWith, and contains. Each search Text Field can't exceed 255 characters. Here is an example searching for customer email on a transaction.

  1. Java
TransactionSearchRequest searchRequest = new TransactionSearchRequest()
  .customerEmail().is("john.smith@example.com");

TransactionSearchRequest searchRequest = new TransactionSearchRequest()
  .customerEmail().isNot("john.smith@example.com");

TransactionSearchRequest searchRequest = new TransactionSearchRequest()
  .customerEmail().startsWith("john.smith");

TransactionSearchRequest searchRequest = new TransactionSearchRequest()
  .customerEmail().endsWith("example.com");

TransactionSearchRequest searchRequest = new TransactionSearchRequest()
  .customerEmail().contains("smith");

Multiple value fieldsanchor

Search fields that accept multiple values support two operators: is and in.

  1. java
TransactionSearchRequest searchRequest = new TransactionSearchRequest()
  .status().is(Transaction.Status.AUTHORIZED);

TransactionSearchRequest searchRequest = new TransactionSearchRequest()
  .status().in(Transaction.Status.AUTHORIZED,
               Transaction.Status.SUBMITTED_FOR_SETTLEMENT);

Range fieldsanchor

Ranges support four operators: is, between, greaterThanOrEqualTo, and lessThanOrEqualTo. between is inclusive.

  1. Java
TransactionSearchRequest searchRequest = new TransactionSearchRequest()
  .amount().is(new BigDecimal("15.00"));

TransactionSearchRequest searchRequest = new TransactionSearchRequest()
  .amount().greaterThanOrEqualTo(new BigDecimal("10.00"));

TransactionSearchRequest searchRequest = new TransactionSearchRequest()
  .amount().lessThanOrEqualTo(new BigDecimal("20.00"));

TransactionSearchRequest searchRequest = new TransactionSearchRequest()
  .amount().between(new BigDecimal("10.00"), new BigDecimal("20.00"));
note

Ranges with a date/time value are precise to the minute; the results of search for transactions created between 12/17/2015 17:00 and 12/17/2015 17:00 will include a transaction created at 12/17/2015 17:00:59.