Query operators
The following operators are permitted when querying in requests to the Reporting API:
Operator name | Syntax | Example |
---|---|---|
Equal | variable = value | status = 'COMPLETED' |
Not equal | variable <> value | status <> 'COMPLETED' |
Like | variable ~ 'value' | id ~ '35b' |
Less than | variable < value | amount < 5.00 |
Less or equal than | variable <= value | amount <= 5.00 |
Greater than | variable > value | createdAt > '2022-05-12' |
Greater or equal than | variable >= value | createdAt >= '2022-05-12T10:00:00Z' |
IN operator | variable IN ('value1', 'value2') | status IN ('COMPLETED', 'REFUNDED') |
AND operator | variable1 = 'value1' AND variable2 = 'value2' | merchantId = 'b4c134ae8d251d76' AND status = 'FAILED' |
OR operator | variable1 = 'value1' OR variable2 = 'value2' | merchantId = 'b4c134ae8d251d76' OR status = 'FAILED' |
Parenthesis operator | (variable1 = 'value1' OR variable2 = 'value2') AND variable3 = 'value3' | (status = 'PART_REFUNDED' OR status = 'EXPIRED') AND currency = 'GBP' |
DateTime format
Use the
DateTime
format2022-01-01T00:00:00
in your query operators.Date
format is also supported (e.g.2022-01-01
).
Updated about 2 years ago