Added documentation to api-sample.php