Overview

RSQL operators can be used to retrieve Customer data based on specific criteria. The following table lists the available criteria and operators that can be used to filter Customer data:

CriteriaDescriptionOperator Used
billing.address_1string==, !=, =in=, =out=, =regex=
billing.address_2string==, !=, =in=, =out=, =regex=
billing.address_3string==, !=, =in=, =out=, =regex=
billing.citystring==, !=, =in=, =out=, =regex=
billing.country_codestring==, !=, =in=, =out=, =regex=
billing.first_namestring==, !=, =in=, =out=, =regex=
billing.middle_namestring==, !=, =in=, =out=, =regex=
billing.last_namestring==, !=, =in=, =out=, =regex=
billing.phonestring==, !=, =in=, =out=, =regex=
billing.postal_codestring==, !=, =in=, =out=, =regex=
billing.statestring==, !=, =in=, =out=, =regex=
company_namestring==, !=, =in=, =out=, =regex=
company_registration_numberstring==, !=, =in=, =out=, =regex=
email_addressstring==, !=, =in=, =out=, =regex=
entity_idstring==, !=, =in=, =out=, =regex=
idstring==, !=, =in=, =out=, =regex=
phone_numberstring==, !=, =in=, =out=, =regex=
shipping.address_1string==, !=, =in=, =out=, =regex=
shipping.address_2string==, !=, =in=, =out=, =regex=
shipping.address_3string==, !=, =in=, =out=, =regex=
shipping.citystring==, !=, =in=, =out=, =regex=
shipping.country_codestring==, !=, =in=, =out=, =regex=
shipping.first_namestring==, !=, =in=, =out=, =regex=
shipping.middle_namestring==, !=, =in=, =out=, =regex=
shipping.last_namestring==, !=, =in=, =out=, =regex=
shipping.phonenumber==, !=, =in=, =out=, =gt=, =ge=, =lt=, =le=
shipping.postal_codestring==, !=, =in=, =out=, =regex=
shipping.statestring==, !=, =in=, =out=, =regex=
titlestring==, !=, =in=, =out=, =regex=
work_phonestring==, !=, =in=, =out=, =regex=
tax.identifierstring==, !=, =in=, =out=, =regex=
created_atdate==, !=, =in=, =out=, =gt=, =ge=, =lt=, =le=
updated_atdate==, !=, =in=, =out=, =gt=, =ge=, =lt=, =le=
languagestring==, !=, =in=, =out=, =regex=

RSQL operators

The following table lists the RSQL operators that can be used to filter Customer data:

OperatorDescription
==equal
!=not equal
=lt=less than
=le=less than and equal to
=gt=greater than
=ge=greater than and equal to
=regex=pattern matching
=in=multiple arguments search
=out=exclude
;Logical AND
,Logical OR

ℹ️

Logical AND (;) has higher precedence than Logical OR (,). This means that in an expression without parentheses, the AND operations will be evaluated before the OR operations. To change the order of evaluation, you can use parentheses () to group expressions and override the default precedence.

For example:

  • criteria1;criteria2,criteria3 is evaluated as (criteria1 AND criteria2) OR criteria3
  • (criteria1,criteria2);criteria3 is evaluated as (criteria1 OR criteria2) AND criteria3

Example Queries

The following table provides example RSQL queries for the Customer API and their descriptions:

QueryDescription
/v2/customer?search=id==123&order_by=ASC&order_criteria=email_address&page_size=1&page_number=2Retrieves the customer with id 123, ordered by email address in ascending order, with a page size of 1 and page number 2.
/v2/customer?search=id==123435&order_by=DESC&order_criteria=billing.address_1&page_size=10&page_number=1Retrieves the customer with id 123435, ordered by billing address 1 in descending order, with a page size of 10 and page number 1.
/v2/customer?search=id==dg373&order_by=ASC&order_criteria=company_name&page_size=1&page_number=2Retrieves the customer with id dg373, ordered by company name in ascending order, with a page size of 1 and page number 2.

St. George BankSA Bank of Melbourne

This information is a general statement for information purposes only and should only be used as a guide. While all care has been taken in preparation of this document, no member of the Westpac Group, nor any of their employees or directors gives any warranty of accuracy or reliability nor accepts any liability in any other way, including by reason of negligence for any errors or omissions contained herein, to the extent permitted by law. Unless otherwise specified, the products and services described are available only in Australia.

© St.George, Bank of Melbourne and BankSA – Divisions of Westpac Banking Corporation ABN 33 007 457 141 AFSL and Australian credit licence 233714.