<?php

$curl = curl_init();
//$filter = urlencode("filter=(BillAddressCountry eq 'Canada')");
curl_setopt_array($curl, array(
    CURLOPT_URL => "https://rest.method.me/api/v1/tables/Contacts?filter=(Banner%20eq%20'PCH'),
   // CURLOPT_URL => https://rest.method.me/api/v1/tables/cases/3766",
    // table is Contacts, method record id is 544
    //CURLOPT_URL => "https://rest.method.me/api/v1/tables/Contacts?skip=10&top=10&filter=(BillAddressCountry%20eq%20'Canada')",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 0,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    //CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_CUSTOMREQUEST => "PATCH",
    CURLOPT_POSTFIELDS =>"{\n   \"NewRx\": \"Direct to Kroll\" \n }",
    CURLOPT_HTTPHEADER => array(
        "Authorization: APIKey NjI5OGNkMmM2MjU3OGY0NWQ1MzFiYjQzLjcwQzU0RjVDNTNDNjQzMkU5NTkwQ0EzQTU3MUZBMThG",
        "Content-Type: application/json"

    ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
