Account
The account/get api request returns your customer account information.
Version
1.0.0
Request Parameters
Parameter | Valid Input | Default | Required | Description |
---|---|---|---|---|
customer_id | unsigned integer | - | yes | The customer_id the data should be requested for |
token | string | - | yes | The token generated for this request. See token for more information |
Examples
For all examples we are using GuzzleHttpClient.
Get information for customer_id 1
<?php
use GuzzleHttp\Client;
use GuzzleHttp\Exception\ClientException;
function getAccount() {
try {
$client = new Client();
$response = $client->post('https://my.ngz.net/api/account/get',
array(
'json' => array(
'customer_id' => 1,
'token' => 'C9FBFB090B8E6BBB1EED94D2259F94D98CDBCB57A710558DA0'
)
)
);
} catch (ClientException $e) {
throw new Exception($e->getResponse()->getBody()->getContents(), $e->getResponse()->getStatusCode());
}
if(is_object($response) && $response->getStatusCode() == 200) {
$reply = json_decode($response->getBody()->getContents());
}
return $reply;
}
Sample output
Array
(
[0] => stdClass Object
(
[id] => 12
[customer_id] => 1
[balance] => 12.50
[invoice] => 1.99
)
)
Copyright 2016 by United Gameserver GmbH. Alle Rechte vorbehalten.V3.1.5.1337