Forum Discussion

jp_auckland's avatar
jp_auckland
Contributing Cover User
4 years ago

AR API access slow

Hi there

We are experiencing a painfully slow access to API endpoints. This was reported by a particular tenant in our multi tenanted application. I have attached a log of the process with time the duration it took to process 79 invoices in a batch. The module in our .NET 4.8 based application running on Microsoft Azure cloud goes through each invoice for the tenant and bring the payments from MYOB and update our invoices. There are 4 occassions in the batch run where the application encountered (504) Gateway Timeout and continued with rest of the invoices. The slow issue was reported by our client before you have had some issues with API yesterday (03-08-2021) as per your site status, but after resolving your issues the slowness still persists as reported by the client today. We are using  MYOB.AccountRight.SDK used is 2021.3.314.0. I have tried with previous versions as well. A snippet of program psuedocode  is below

psuedocode ===========

var service = new MYOB.AccountRight.SDK.Services.CompanyFileService(APIConfiguration, null, KeyService);

---

--LOOP

foreach (var invoice in unpaidInvoices)

{

--

--

//Below code to fetch the invoice takes variable time range from 5 seconds to 110 seconds on each invoice

PagedCollection<MYOB.AccountRight.SDK.Contracts.Version2.Sale.Invoice> MYOBinvoices = invSvc.GetRange(companyFile, "$top=1&$filter=Number eq '" + invoice.myinvoicenumber + "'", credentials);

---

--- Rest of the code

}

 

Please help with this and if anything to be done to fetch the invoices in a better way we are happy to change the code. Or if the problem is at your end, let us know and we can relay this to our client and wait for a solution from your side.

 

Thanks

 

Looking for something else?

Search the Community Forum for answers or find your topic and get the conversation started!

Community home

Dig into MYOB Academy for free courses, learning paths and live events to help build your business with MYOB.