Sage 50 API · Developer guides
Last checked November 18, 2026, against Sage 50 US 2026 docs
Sage 50 US ships a 32-bit, read-only ODBC driver: turn on outside access in Maintain Users, connect as user Peachtree with the password you set, and read tables such as CUSTOMER and JRNLHDR.
That's the whole trick. The rest of this page is the detail people usually find out the hard way. Everything here comes from Sage's own help and knowledgebase unless it says otherwise. We don't have a Sage 50 install to test on, so where we're guessing, we say so.
Sage 50 US keeps company data in a Pervasive database. Sage's setup steps call the driver Pervasive ODBC Engine Interface on a single computer, and Pervasive ODBC Client Interface on a network (Sage KB). Pervasive is now called Actian Zen, and forum posts about recent versions use that name (Sage Community Hub).
Sage pitches ODBC and OLEDB as a way for Excel, Access or "any software application that supports OLEDB or ODBC" to read company data without opening Sage 50 (Sage help). It ships with Sage 50 and costs nothing extra.
Yes. Sage's own setup article says that once the password is set, ODBC or OLE DB gives you "read-only access to your company data" (Sage KB). To create or change records from code, the official route is the .NET SDK. We wrote that up separately: the Sage 50 US .NET SDK, plainly.
Sage says no. "ODBC connections won't work with 64-bit database programs or 64-bit versions of Microsoft Excel. You'll need to use the 32-bit version" (Sage KB). A second article, from February 2024, says the same about 64-bit Excel: "Sage 50 uses a 32-bit ODBC driver" (Sage KB).
The same rule applies to your code. An ODBC driver loads inside your process, so a 32-bit driver needs a 32-bit Python, Node or .NET process. One developer on Sage's forum got around it by having a 64-bit tool launch 32-bit Excel macros, and called it "what a hassle" (Sage Community Hub). Some forum users say newer installs include a 64-bit Zen driver. Sage's docs don't say that, and we haven't tested it.
Out of the box, outside access is off. Someone with admin rights in Sage 50 turns it on for each company (Sage help):
The user name is always Peachtree. You can't pick another one. The password is a single data access password for that company, separate from anyone's Sage 50 login (Apideck calls it "a separate data-access password").
Sage's two docs disagree on the password rules. The help page says it's "limited to 8 characters and cannot be blank". The knowledgebase article, last changed March 2025, says it "must be exactly seven characters in length and contain at least one letter and one number". A seven-character password with a letter and a number fits both.
On a 64-bit Windows you have to open the 32-bit ODBC administrator, %systemdrive%\Windows\SysWow64\odbcad32.exe, not the one in the Start menu. Then on the User DSN tab, click Add (Sage KB, Sage help).
When your program connects, it logs in as Peachtree with the data access password. Excel asks for the password twice, once when it connects and again on import (Sage help).
OLEDB works too. Instead of a DSN you point at CrystalReports.udl in the company's data folder, with the same Peachtree login (Sage help).
Sage publishes a list of the tables you can reach "via crystalreports.udl", which is the same set Sage points ODBC users to, with a page of fields for each one (Sage help, 2026). Sage lists them as .DAT files. These are the ones most integrations start with:
| Table | What's in it |
|---|---|
CUSTOMER.DAT | Customers and prospects |
VENDOR.DAT | Vendors |
JRNLHDR.DAT | One row per transaction: invoices, bills, receipts, payments, orders, quotes |
JRNLROW.DAT | The lines and distributions of each transaction |
LINEITEM.DAT | Inventory items, despite the name |
CHART.DAT | Chart of accounts |
EMPLOYEE.DAT | Employees |
PROJECT.DAT | Jobs |
CONTACTS.DAT, ADDRESS.DAT | Contacts and addresses |
COMPANY.DAT | Company information |
Some tables only exist in higher editions. The audit trail table, for one, is Premium Accounting and up. Sage also warns that not everything in Sage 50 is in these tables, and some fields need custom formulas.
There's no invoices table. A sales invoice is a header row in JRNLHDR plus its rows in JRNLROW. Here's how they fit, from Sage's field pages for journal headers, journal rows and customers:
PostOrder ties a header to its rows. It's unique to each whole transaction.JrnlKey_Journal on the header says which journal it's in. 3 is Sales, 4 is Purchase, 1 is Cash Receipts, 2 is Cash Disbursements, 10 is Purchase Orders, 11 is Sales Orders, 12 is Quotes.JournalEx is finer grained. 8 is Sales Invoice and 9 is Customer Credit Memo, for example.Reference holds the invoice or check number. TransactionDate is the date. MainAmount is the net amount.TrxIsPosted is 1 for posted and 0 for saved but not posted.ItemRecordNumber points to LINEITEM, CustomerRecordNumber to CUSTOMER and VendorRecordNumber to VENDOR. A 0 means none. GLAcntNumber is the account.Join customers on CustomerRecordNumber, not CustomerID. Sage says the record number never changes, while the ID can change if someone uses Change ID. And JrnlKey_Per is Sage's internal period number, which doesn't match the periods users see.
Getting several rows per invoice is a common first surprise. On an old forum thread about exactly that, a Sage team member said duplicates usually come from the join type, and a report writer said the header and row tables don't hold every column, so you add the customer and item tables (Sage Community Hub). Expect to build the invoice yourself.
Sage 50 puts an exclusive lock on all of a company's files during some jobs (Sage help):
If anyone else has the company open, those jobs stop with a message that the process "requires single-user access". Sage doesn't say whether an open ODBC connection counts as someone in the company. We haven't tested it. Closing connections when you're done is the safe bet, so you don't break someone's nightly backup.
One Sage 50 2024 user linked tables into Access over ODBC. Queries got slow, then they saw "record larger than 4k" errors and #Name? in every JrnlRow cell, while the same DSN in Excel returned all 910,000 rows. No fix was posted (Sage Community Hub). Another user on 2024.0.1 got "Cannot locate the named database you specified" because the company wasn't in the DSN's database list. That thread has no confirmed fix either (Sage Community Hub).
Sage only supports Sage 50 2026 right now. Support for 2024 ended on March 4, 2026. Sage's support table goes straight from 2024 to 2026 (Sage KB). Sage's field pages have a version switcher back to 2023, so check the one that matches your customer.
Sage 50 2026.2 added an Encrypt Company Data option under Help, Support Utilities (Sage announcement). Sage doesn't say whether it affects ODBC. We haven't tested this ourselves, so check it on an encrypted company before you rely on it.
If the customer runs Sage 50 Cloud, the version Sage hosts on Azure, you can't put a DSN next to the data yourself. Sage lists seven third-party apps that work there, and anything else is a request to Sage's product team (Sage KB). The verified answer on one forum thread is plain: "The Sage Cloud cannot host any third party software applications" (Sage Community Hub).
Sage's ODBC article opens with a caution that Sage support "can't assist with third-party products". Plan on the forum and your own testing.
ODBC is enough when you only read, your code can run as 32-bit on the same network as the Sage 50 data, and you're fine joining raw tables. Reports, dashboards, a nightly copy into your own database and quick lookups all fit.
It isn't enough when you need to:
We're building a hosted API for Sage 50 US. It isn't live yet. Early access is here.
Rowhouse isn't Sage and isn't affiliated with Sage. Sage 50 is a trademark of The Sage Group plc. Quotes from Sage's docs are theirs.