I am trying to create a new Business unit via API. I am only finding create new user or update an existing account. Can someone send me a sample code to create a new business unit using Account ID?
I got it to work its as i missed bu.ParentIDSpecified = true;.
Here is the sample code to create a business unit to an existing account.
BusinessUnit bu = new BusinessUnit();
bu.AccountType = AccountTypeEnum.BUSINESS_UNIT;
bu.Name = "TestAPI";
bu.Email = "Test@businessunit.com";
bu.FromName = "Test BU";
bu.ParentID = // my account id
//This tells that create user in subaccount
ClientID clientID = new ClientID();
clientID.ID = XXXX;
clientID.IDSpecified = true;
bu.Client = clientID;
String requestId = null;
String overAllStatus = null;
CreateResult[] results = client.Create(new CreateOptions(), new APIObject[] { bu }, out requestId, out overAllStatus);