Revoke license in php

I am trying to call revoke using the PHP code fund at There is no revoke function but I have added this one

public static function jjRevokeLicense($licenseId)
        $api_url = self::$base_path . "/licenses";
        $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

Hi Juanjo,

You have to use PATCH request instead of POST request.

Thanks. It works now.