Record Query Language (RQL)
The Record Query Language allows one to filter merchant records using different modifiers.
Multiple modifiers in one query are supported, e.g. country:"DK" name:"Acme Corporation"
.
You can check for the existence of a property by suffixing the modifier with ?
, e.g. country?
.
You can do negative search by prefixing a modifier with !
, e.g. !country
. A common case for this is to search for resources without a certain property, e.g. !country?
.
Query | Will search for… |
---|---|
id:"6c1ce8b0" | records with id "6c1ce8b0" |
merchant_id:"3000001" | records with merchant_id "3000001" |
name:"Acme Corporation" | records with name "Acme Corporation" |
trading_name:"Acme Co." | records with trading name "Acme Co." |
registration_number:"33749996" | records with registration number "33749996" |
country:"DK" | records with country "DK" |
currencies:"DKK" | records with currencies "DKK" |
websites:"www.example.com" | records with websites "www.example.com" |
email:"CarolineSBech@example.com" | records with email "CarolineSBech@example.com" |
created_at:>2016-07-251 | records created after July 25th, 2016 |
states.application:"accepted"2 | records with application state "accepted" |
states.contract:"signed"3 | records with contract state "signed" |
states.account:"live"4 | records with account state "live" |
archived
, unsubmitted
, submitted
, needs_information
, declined
, under_review
, accepted
. needs_signature
, signed
, declined
, cancelled
. in_progress
, live
, closed
. Free text querying
In addition to querying with modifiers, it is possible to combine modifiers with free text e.g. country:"DK" Acme Corporation
. This will filter by the modifier(s) and then try to match what is left by the free text part of the query.
You can also query without any modifiers e.g. Acme Corporation
. This will try to match everything by the query. If you know exactly what you are looking for, you can quote the string e.g. "Acme Corporation"
which will only return results with that exact match.
Date
Query | Will search for… |
---|---|
created_at:today | records created today |
created_at:yesterday | records created yesterday |
created_at:last_week | records created last week |
created_at:last_month | records created last month |
created_at:last_year | records created last year |
created_at:this_week | records created from the beginning of this week until now |
created_at:this_month | records created from the beginning of this month until now |
created_at:this_year | records created from the beginning of this year until now |
created_at:>=2016-01-20 | records created after or during January 20th, 2016 |
created_at:>2016-01-20 | records created after January 20th, 2016 |
created_at:<=2016-01-20 | records created before or during January 20th, 2016 |
created_at:<2016-01-20 | records created before January 20th, 2016 |
created_at:*..2016-01-20 | records created before or during January 20th, 2016 |
created_at:2016-01-20..* | records created after or during January 20th, 2016 |
created_at:2016-01-18..2016-01-20 | records created after or during January 18th and before or during January 20th, 2016 |