Forum Discussion

Stuart_W's avatar
Stuart_W
MYOB Staff
2 months ago
Solved

Reminder: Update your MYOB Business API integrations by 1 September 2026

Hi Everybody,   MYOB is strengthening its app ecosystem by upgrading integration endpoints to enhance data privacy and security.    From 1 September 2026, all developers using the MYOB Busine...
  • MarshallArts's avatar
    MarshallArts
    1 month ago

    Finally, I have an answer.  It is necessary to create your own instance of a CompanyFile object in code, rather than getting it via the (soon to disappear) CompanyFile Service.  So, after authentication is complete and you have your businessId value, the following steps (in C#) worked for me:

     

    1. Make a Guid object, and populate it.  myBusinessID is the string value of the business ID
      Guid myCFGuid = Guid.Parse(myBusinessID);
    2. Declare a CompanyFile object, and create the instance
      CompanyFile myCompany;
      myCompany = new CompanyFile {
          Id = myCFGuid,
          Uri = new Uri($"https://api.myob.com/accountright/{myCFGuid}")
      };

      This code creates the CompanyFile instance, and initialises the Id and Uri members.
      That appears to be all that is required.  You could also collect the Business Name and set that if you wanted.

    This CompanyFile object can then be used as the first parameter to the Get/GetRange calls to the various Service objects that request data from the MYOB cloud.  And the other calls for updating etc no doubt.  So simple once you see it.  I hope this might save someone else the hours I have burnt trying to figure this out.