Revoke license in php

I am trying to call revoke using the PHP code fund at https://github.com/cryptlex/php-license-generator. There is no revoke function but I have added this one

public static function jjRevokeLicense($licenseId)
{
        $api_url = self::$base_path . "/licenses";
        $body["revoked"]=true;
        $revokedLicense = self::PostRequest($api_url."/".$licenseId, $body);

        return $revokedLicense;
}

The PostRequest function gets an http error 405 from the server. I’d like to know if there is a problem in my function or it’s another problem. It seems to me that I am following the specification at https://docs.cryptlex.com/license-management/revoking-licenses

Hi Juanjo,

You have to use PATCH request instead of POST request.

Thanks. It works now.