Get a customer by ID
Get a customer by ID
Example
Use the $API->findById('customer', '{id}')
method to find a customer by ID.
<?php
header('Content-Type: text/plain');
require '../ChargeOverAPI.php';
require 'config.php';
$API = new ChargeOverAPI($url, $authmode, $username, $password);
//Find a customer by the ChargeOver customer ID
$resp = $API->findById('customer', '8');
if (!$API->isError($resp))
{
$customer = $resp->response;
print('SUCCESS! got back customer: ' . $customer->company);
}
else
{
print('There was an error looking up the customer!' . "\n");
}