using code instead of id for all rest operations