Can't create Business or Employee

Hello,
We are able to successfully export timeheets to KeyPay for valid companies and employees, good win for our team. However, we would like to create missing KeyPay companies and employees as part of the export process. In the .Net client employee gives
“message”: “KiwiSaver enrollment status must be a valid option”
And Business gives
“modelState”: { “model.NZBN”: [ “NZBN is not valid”]
Neither of these properties are exposed in the API models. Can I get an idea when/if these properties will be exposed?

In the meantime, I am trying to create them via the Rest API. I have created C# versions of the two models with the properties but can’t get it to work.

Employee:
“message”: “The request is invalid.”,

Business:
“modelState”: {
“model”: [
“An error has occurred.”
]
}
}

I am trying
private void CreateKeyPayBusinessModelRestSharp()
{

		var businessModel = new BusinessModel()
		{
			//ExternalId = "CompanyUniqueID",
			//AddressLine1 = "CompanyExAddrStreet1",
			//AddressLine2 = "CompanyExAddrStreet2",
			Name = "CompanyExName",
			LegalName = "CompanyExName",
			//NZBN = "CompanyExName",// string.Empty,
			DateCreated = DateTime.Now
		};

		var client = SetupRestSharpClient();

		var request = new RestRequest("business", Method.POST);

		request.AddQueryParameter("setupDefaultData", "true");

		var jsonModel = JsonConvert.SerializeObject(businessModel);

		request.AddBody(jsonModel);

		var response = client.Execute(request);

		var responseContent = response.Content;

	}

Any examples of this working?

Thanks
Scott

Hi Scott,

I’ve answered your question through the support channel.