When using Restangular, default behavior for PUT/PATCH/POST operations is to use the id of an item as the primary key. But what if you want to use a custom key like a slug or number instead?
// GET to /users
Users.getList().then(function(users) {
var user = users[0]; // user === {id: 1, number: 123456, name: "Tonto"}
user.name = "Gonto";
// PUT to /users/1 <-- Here the id is used. But I'd like to use number to post to PUT to /users/123456
user.put();
})