// Persist the User with cascade for the Customer
User persistentUser = userReadService.saveOrUpdate(user);
// Provide a minimal representation to the client
Representation representation = new ClientUserRepresentation().get(persistentUser);
URI location = uriInfo.getAbsolutePathBuilder().path(persistentUser.getApiKey()).build();
return created(representation, location);
}