<?php

include_once 'casafari.class.php';

//$client_url = 'https://crmapi.proppydev.com';
//$client_secret = 'ZXh0ZXJuYWxkZXY6Rml0aDVmQmRmZ3NkeEhWTUF4aXpkNW9yNjhn';
$client_url = 'https://crmapi.casafaricrm.com';
$client_secret = 'dGVuIEhvb3BlbiAtIENyZWF0aW9uIE1lZGlhOnRlbkhvb3BlbjIwMjQq';

$casafari_api = new CasafariAPI($client_url, $client_secret);

$params = [
    'CountryCode' => 'pt',
    'ParentId' => 0,
    'ActiveType' => 0,
    'Level' => 0,
    'CorrelationId' => 'string',
    'EchoToken' => 'string',
    'PrimaryLangId' => 0,
    'RetransmissionIndicator' => true,
    'TimeStamp' => 'string',
    'Version' => 0
];

$locations = $casafari_api->getLocations($params);

header('Content-type: application/json; charset=utf-8');
echo json_encode($locations);
