1. Home
  2. /
  3. Docs
  4. /
  5. Sage 50 REST Server
  6. /
  7. RQL – REST Query La...
  8. /
  9. RQL Usage Documentation

RQL Usage Documentation

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 TypeWhat it DoesExample Usage
Equals ( eq )Findex exact matcheseq(CustomerID,'AC2') → Only customers with ID “AC2”
Contains ( contains )Finds partial matches anywhere in the textcontains(ItemDescription,'widget') → Items with “widget” in the description
Starts With ( like )Finds values that begin with a patternlike(CustomerName,'A%') → Names starting with “A”
Is Empty ( isnull )Finds records with missing valuesisnull(ShipDate) → Invoices with no ship date
Not Equal ( ne )Excludes specific matchesne(Status,'Cancelled') → Everything except cancelled items
Greater than ( gt )Finds values greater than a valuegt(invoiceamount,500) → show invoices whose amount is greater than $500
Greater than Equal ( ge )Finds values greater than or equal a valuege(invoiceamount,500) → show invoices whose amount are equal or greater than $500
Less than ( lt )Finds values less than a valuelt(invoiceamount,500) → show invoices whose amount is less than $500
Less than ( le )Finds values less than or equal a valuele(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 listout(state,('NY','FL','MN')) → excludes any records that are from the states of NY, FL, and MN
Combination ( and )Allows multiple filtersand(eq(companyid,3),gt(invoiceamount,500)) → returns records for companyid 3 with invoice amount greater than $500
Combination ( or )Allows multiple filtersor(eq(status,'open'),eq(status,'hold')) → returns record with status of open and hold.
Nested LogicAllows multiple filtersand(or(eq(type,'AR'),eq(type,'AP')),gt(amount,2000)) → returns type AR and AP with amount greater than 2000
Sorting ( sort )Sorts returned recordssort(+name,-price) → sorts name ascending and price descending
Limit ( limit )Limit the number of returned recordslimit(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