move allocateIds to request & generate docs.