Update bulk endpoint, add type checking and tests.