setOp("add") // string containing a JSON-Pointer value that references a location within the target document (the target location) where the operation is performed. Required. ->setPath("/presentation/brand_name") // New value to apply based on the operation. ->setValue("New Brand Name"); // Similar patch operation to remove the landing page type $patchOperation2 = new \PayPal\Api\Patch(); $patchOperation2->setOp("remove") ->setPath("/flow_config/landing_page_type"); //Generate an array of patch operations $patches = array($patchOperation1, $patchOperation2); try { // Execute the partial update, to carry out these two operations on a given web profile object if ($webProfile->partial_update($patches, $apiContext)) { $webProfile = \PayPal\Api\WebProfile::get($webProfile->getId(), $apiContext); } } catch (\Exception $ex) { ResultPrinter::printError("Partially Updated Web Profile", "Web Profile", $webProfile->getId(), $patches, $ex); exit(1); } ResultPrinter::printResult("Partially Updated Web Profile", "Web Profile", $webProfile->getId(), $patches, $webProfile);