Updates to the API using the query builder and database transactions.