Welcome to the RQL (REST Query Language) documentation for the Sage 50 REST Server. This guide shows you how to filter and retrieve live, read-only Sage 50 data using clean, expressive query syntax—no SQL required.
RQL lets you target exactly the records you need with simple, URL-friendly filters like:
- eq(CustomerID,’datasoft’) – exact match
- contains(ItemID,’AVRY’) – partial match
- and(eq(shipdate,’11/30/25′),eq(shippingstate,’GA’)) – compound logic
Whether you’re building dashboards, syncing to external systems, or powering mobile apps, RQL gives you precise control over what data comes back—securely and efficiently.
| Filter Type | What it Does | Example Usage |
| Equals ( eq ) | Findex exact matches | eq(CustomerID,'AC2') → Only customers with ID “AC2” |
| Contains ( contains ) | Finds partial matches anywhere in the text | contains(ItemDescription,'widget') → Items with “widget” in the description |
Starts With ( like ) | Finds values that begin with a pattern | like(CustomerName,'A%') → Names starting with “A” |
Is Empty ( isnull ) | Finds records with missing values | isnull(ShipDate) → Invoices with no ship date |
Not Equal ( ne ) | Excludes specific matches | ne(Status,'Cancelled') → Everything except cancelled items |
| Greater than ( gt ) | Finds values greater than a value | gt(invoiceamount,500) → show invoices whose amount is greater than $500 |
| Greater than Equal ( ge ) | Finds values greater than or equal a value | ge(invoiceamount,500) → show invoices whose amount are equal or greater than $500 |
| Less than ( lt ) | Finds values less than a value | lt(invoiceamount,500) → show invoices whose amount is less than $500 |
| Less than ( le ) | Finds values less than or equal a value | le(invoiceamount,500) → show invoices whose amount are equal or less than $500 |
| IN List ( in ) | Match any value from a list. | in(state,('NY','FL','MN')) → returns records that are from the states of NY, FL, and MN |
| Not in List ( out ) | Excludes any value from a list | out(state,('NY','FL','MN')) → excludes any records that are from the states of NY, FL, and MN |
| Combination ( and ) | Allows multiple filters | and(eq(companyid,3),gt(invoiceamount,500)) → returns records for companyid 3 with invoice amount greater than $500 |
| Combination ( or ) | Allows multiple filters | or(eq(status,'open'),eq(status,'hold')) → returns record with status of open and hold. |
| Nested Logic | Allows multiple filters | and(or(eq(type,'AR'),eq(type,'AP')),gt(amount,2000)) → returns type AR and AP with amount greater than 2000 |
| Sorting ( sort ) | Sorts returned records | sort(+name,-price) → sorts name ascending and price descending |
| Limit ( limit ) | Limit the number of returned records | limit(20,10) → Offset 20 rows fetch next 10 rows only |
Mixed Example
and(or(eq(type,'INV'),eq(type,'CM')),and(gt(total,100),lt(total,10000)),contains(customerid,'smith')),sort(+invoicenumber)
Returns rows with type of INV or CM with total greater than 100 and less than 10000 for customerid smith, sorted ascending by invoice number