rearrange assignment_api to accept an array of key_ids instead of either a code or a quantity