Xero - beautiful accounting software

Xero Developer Help Center

Xero Developer Community

Community > Wrapper libraries >

Create more than one Employee at once?

Started by Eric Tester -   in Wrapper libraries

Is it possible to create more than one Employee in one call? I am trying to do it in C#

var items = new List<Employee>();
items.Add(new Employee() { FirstName = EmpFirstName.Text, LastName=EmpLastName.Text });
items.Add(new Employee() { FirstName = EmpFirstName2.Text, LastName = EmpLastName2.Text });
var emp = repo.UpdateOrCreate<Employee>(items);

but I get 400 "BadRequest" error:

<Response xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ErrorNumber>0</ErrorNumber><Type>Error</Type><Message>Bad request</Message></Response>