MYOBCommunity
Partner Zone
|
|
Partner Zone

Essential API Sample for retrieve Business info.

This thread is now closed to new comments.
Some of the links provided in this thread may no longer be available or relevant.
If you have a question please start a new post.
1 REPLY
MYOB Moderator HelenB
277 Posts
MYOB Moderator
HelenB
MYOB Moderator

277Posts

216Kudos

62Solutions

Re: Essential API Sample for retrieve Business info.

Hi @nexusdemo

 

Was there something that you needed help with in regards to the MYOB Essentials API? If so, we recommend that you reach out to us directly at developers@myob.com.

 

Thanks

@HelenB
Helen Brophy
MYOB Developer Support Liaison

Are you a developer? Check out http://developer.myob.com
Looking for an Add-on? Check out http://myob.com/addons/
MYOB API Support Centre - https://apisupport.myob.com
Contributing Partner nexusdemo
12 Posts
Contributing Partner
nexusdemo
Contributing Partner

12Posts

0Kudos

0Solutions

Essential API Sample for retrieve Business info.

Retrieve Business Info

string MYOBToken = OAuthInformation.Token.AccessToken;     //Access token
string bURL = "https://api.myob.com/au/essentials/businesses/";

 

//string bURL = "https://api.myob.com/au/essentials/businesses/{uid}/contacts";
//string bURL = "https://api.myob.com/au/essentials/businesses/tax/types";


HttpWebRequest businessRequest = (HttpWebRequest)WebRequest.Create(bURL);
businessRequest.Headers.Add("Authorization", "Bearer " + MYOBToken);
businessRequest.Headers.Add("x-myobapi-key", client_id);
businessRequest.Headers.Add("x-myobapi-version", "v0");
businessRequest.Method = "GET";
businessRequest.ContentType = "application/json";

var businessResponse = (HttpWebResponse)businessRequest.GetResponse();
using (StreamReader reader = new StreamReader(businessResponse.GetResponseStream()))
{
// Get the Response Stream
string jsondata = reader.ReadLine();
MessageBox.Show(jsondata);
}

 

 

 

Didn't find your answer here?
Try using advanced search to find a post more easily Advanced Search
or
Get the conversation started and make a new post Start a Post