contract api