Jump to content

Trial Balance API Nominal Code


 Share

Recommended Posts

Hi Sage,

I am trying to access data using trial balance API https://api.accounting.sage.com/v3.1/trial_balance?from_date=2022-03-31&to_date=2021-03-31 and X-Business:"mybusinessid" in header

But in response all the the prefix zeros are lost e.g i can see Nominal code as 0010 or 0051 on Sage but when i try to access the same data using trial balance API what i get is 10 or 51 the zeros before the 1 or 5 are not in response.

In attached example you can see nominal code for Motor Vehicles 0051 on Sage and in json response it is "displayed_as": "Motor Vehicles - Accumulated Depreciation (51)"

Image from sage and sample json response are attached for your consideration.

Cheers

Reg Mubasher

nominal_code_missing.png

sage_nominal_code_missing_json.png

Link to comment
Share on other sites

HI Reg

Thanks for bringing this to our attention. The trial balance endpoint has been available for some time and is used widely by 3rd party integrators. The problem lies in not understanding how those integrations work around this issue. If we were to make a change and show the proceeding zeros for the ledger accounts this could cause a breaking change for others. 

Are you caching the ledger accounts outside of Sage Business Cloud Accounting? If so, the trial balance returns the ledger_account_id which could be used to obtain the ledger_account number from the cached data. Alternatively, you could pad out the number with zeros so 51 would be padded out to 0051.
  

We'll update our documentation to ensure this is highlighted. 

Thanks

Mark

  • Thanks 1
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...