Added if statement to check if values are prefilled then don't use api