Updated client for new API, implemented createOrUpdate feature