Preparation API PHP