Jump to content

Recommended Posts

Posted (edited)

Hi dear Support,

I recently faced an issue, and I could not find any information in the API doc. I am receiving the following message when trying to query data.

[{"$severity":"error","$dataCode":"AuthorizationFailure","$message":"Business not found (LOM)","$source":""}])

What does it mean exactly, and what needs to be done to solve it?

Cheers,

Guillaume PETIT

Silverfin

Edited by guillaume petit
  • Administrators
Posted

Hi Guillaume,

That error basically means that the business you are querying hasn't been found in our database.

Can you confirm you are passing the correct business_id in the X-Business header when making your API calls? I'd recommend making a call to /businesses and noting the id(s) of the business(es) returned.

 

Ben

Posted

Hi Ben, thanks for your reply.

I'm following up as Guillaume is currently away.

I can confirm that the id of the business is included in the response from the `/businesses` endpoint. Thereafter, we make a call to https://api.accounting.sage.com/v3.1/financial_settings with headers `Authorization: Bearer <token>` & `X-Business: <business_id>` and receive the following response

-> "HTTP/1.1 401 Unauthorized\r\n"
-> "Content-Type: application/json\r\n"
-> "Content-Length: 109\r\n"
-> "Connection: keep-alive\r\n"
-> "Date: Wed, 09 Mar 2022 13:28:36 GMT\r\n"
-> "x-amzn-RequestId: 8d34f5ad-30ad-414a-b84d-bd9bea1514ec\r\n"
-> "x-runtime: 0.016653\r\n"
-> "x-frame-options: SAMEORIGIN\r\n"
-> "x-amzn-Remapped-content-length: 118\r\n"
-> "x-protected-by: Sqreen\r\n"
-> "x-amzn-Remapped-connection: Close\r\n"
-> "x-request-id: 0bcea6ae-c244-4de6-9e45-72b788e4693b\r\n"
-> "x-correlation-context: {}\r\n"
-> "x-amz-apigw-id: Ot-8uFeuDoEF_Iw=\r\n"
-> "status: 401 Unauthorized\r\n"
-> "cache-control: no-cache\r\n"
-> "vary: Accept-Encoding\r\n"
-> "x-amzn-Remapped-server: Apache\r\n"
-> "x-server: sageone-uk-production-gac-api-537 (production), sageone-uk-production-modproxy-waf-99\r\n"
-> "X-Amzn-Trace-Id: Root=1-6228ab84-02ed39bf3e8848d957f324e3;Sampled=0\r\n"
-> "x-amzn-Remapped-date: Wed, 09 Mar 2022 13:28:36 GMT\r\n"
-> "X-Cache: Error from cloudfront\r\n"
-> "Via: 1.1 a3199f4241d6b00e311978572ceb4a90.cloudfront.net (CloudFront)\r\n"
-> "X-Amz-Cf-Pop: CDG3-C1\r\n"
-> "X-Amz-Cf-Id: ncJjw-LQWBYeOZYaQ1_N3O2EKIiwMWLaXmuFiaMt5xQi5vyn7_FBfQ==\r\n"
-> "\r\n"
reading 109 bytes...
-> "[{\"$severity\":\"error\",\"$dataCode\":\"AuthorizationFailure\",\"$message\":\"Business not found (LOM)\",\"$source\":\"\"}]"

I'd prefer not to share the client's business id & name in a public forum. The same call succeeds when performed with other business ids picked randomly from the initial response.

Thanks for looking into this!

Nikita

Silverfin

Posted

Hi Nikita, thanks for the information.

Is this business being accessed by an accountant/partner in Sage Partner Edition please?

I ask this as we have a similar outstanding issue which is only applicable in Partner Edition.

Thanks

Mark

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...