Job costs posted while the job is running
Field hours, materials and change orders from the project or field service tool, posted to Sage the same day and coded so a job's costs report together, instead of keyed in three weeks later.
The bookkeeper says the books are in Sage and asks for the timesheet app to post straight into them. Before you register anything, find out where those books open. If it's in a browser, on Sage Accounting (sold for years as Sage Business Cloud Accounting, and before that as Sage One), the interface is the Sage Accounting API v3.1: REST and JSON, OAuth 2.0 and one base URL. If they open in a desktop program, that's Sage 50, and this API won't see them.
Register: sign up in Sage's developer self-service portal and create a client application with your callback URL. That gives you a client ID and secret.
Authorize: send the user to https://www.sageone.com/oauth2/auth/central?filter=apiv3.1, then trade the returned code at https://oauth.accounting.sage.com/token.
Call: https://api.accounting.sage.com/v3.1/, with the access token as a Bearer header and the business in an X-Business header.
Reach: Sage Accounting businesses in the UK, Ireland and Canada. Sage 50 and Sage Intacct are separate products with their own ways in, mapped on our Sage APIs by product page.
In the developer self-service portal (developerselfservice.sageone.com), add an application and enter the callback URL your server will listen on. Copy the client ID and client secret into your server's configuration. They never belong in browser code.
Watch for: the callback URL you send during authorization has to match the registered one exactly.
Sage's sample apps point developers to a free product trial. Sign up for one, so your first writes land in a business you can throw away instead of a client's live books.
Send the user to the authorization URL with your client ID, callback URL, a state value and the scope. Sage's own samples ask for full_access. The user signs in, Sage redirects back with a code and the country, and your server exchanges the code at the token endpoint.
Watch for: the token response includes expires_in and refresh_token_expires_in. Store both, and refresh before the access token lapses, or the overnight job fails on its first call.
Request contacts on the v3.1 base URL with Authorization: Bearer and your token, Content-Type: application/json and the X-Business header. A list of the business's customers and suppliers back means the plumbing works.
Watch for: one Sage login can reach more than one business. X-Business decides which set of books a call touches, so log it with every write.
Field hours, materials and change orders from the project or field service tool, posted to Sage the same day and coded so a job's costs report together, instead of keyed in three weeks later.
Sage Accounting reports one business at a time. A connection that reads each business through its own X-Business value can build the combined view finance currently assembles from separate exports.
Sage's AutoEntry reads bills and receipts into the books. What it can't know is which job or purchase order in another system a bill belongs to, and that's the piece a custom link can add.
Sage 50 on an office server is reached through its desktop SDK or a scheduled export, not this API. The route for each desktop edition is on Sage APIs by product. n-frames builds those too, through the Sage 50 SDK or scheduled exports.
How you'll know: Everything works for a while after setup, then every call returns 401 until someone authorizes again.
Fix: Persist whatever refresh token the latest token response returns, along with both expiry values, in storage that survives a restart.
How you'll know: A test invoice turns up in the trial company, or in the client's other entity.
Fix: Set X-Business explicitly on every call from a stored mapping per client, and never rely on whichever business the login happens to default to.
How you'll know: Code built against a UK business fails or posts oddly on a Canadian one.
Fix: Tax setups differ by country. Read each business's own tax rates and ledger accounts through the API and map to those, rather than hard-coding IDs.
Sage is a family of accounting and ERP products rather than one program. For a small business it usually means Sage 50, the desktop software, or Sage Accounting, the cloud product. Both handle invoicing, bank reconciliation and sales tax or VAT. Bigger operations run Sage Intacct, Sage 100, Sage 300 or Sage X3.
It depends on the product, the country and the number of users. Sage Accounting is a monthly subscription, while Sage's mid-market products are quoted and often implemented by a partner. Take current figures from Sage's pricing page for your country.
Some Sage products are. Sage 50 and Sage Accounting are accounting software. Sage 100, Sage 300 and Sage X3 are ERP systems for distribution and manufacturing, and Sage Intacct is cloud financial management for multi-entity businesses, with its own API documentation.
It has a long track record there, and Sage sells construction products built around job costing, Sage 100 Contractor and Sage 300 Construction and Real Estate. The weak spot is getting field hours, materials and change orders from the crew's project tool into the job without retyping. n-frames builds that link on whichever interface your Sage product offers.
Sage 50 is installed software that runs on a PC or a local server, with some cloud features added over the years. Sage Business Cloud Accounting, now simply called Sage Accounting, runs in the browser. For integration that's the deciding difference: Sage Accounting has the cloud API on this page, and Sage 50 is reached through a desktop SDK on the machine that holds the data.
For the screens themselves, Sage's help center for your product is the place to start, since Sage 50 and Sage Accounting look nothing alike. If you mean getting other software to read or write Sage Accounting, the four steps above get you to a first API response.
No. It only reaches Sage Accounting businesses. Sage 50 keeps its data in a desktop company file, so an integration runs through the Sage 50 SDK for your region on a machine that can open that file, or through scheduled exports where the SDK can't do the job.
For common pairings, look in Sage's marketplace first. When the link has to follow your own rules (which ledger account, which business, which job), n-frames writes it, from the OAuth setup and token storage to the X-Business mapping and the posting logic itself.