Get account data: retrieve account information
Get /account
Parameters:
None
Response:
| Name | Description | Type |
|---|---|---|
| creationDate | Creation date of the account on timestamp format | Int |
| subscriptionDate | Subscription date of the plan on timestamp format. Only for paid account | Int |
| expirationDate | Next date when credits will be renew. Only for paid account | Int |
| credits | Number of credit available | Int |
| creditsSubscription | Number of credits choice on your current plan | Int |
| quotaReachedRenew | Automatically credit the account if the credit quota is reached | Boolean |
| quotaReachedPercent | Quota to reach for credit the account | Int |
| automaticSuperiorPlan | Subscribe automatically to higher offers | Boolean |
| tacitAgreement | Credit the account from month to month | Int |
| formulaTypeName | Type of the current plan: free / monthly / annual | String |
| displayName | Account name | String |
Programming language:
Response exemple:
{
"credits": 42377,
"creditsSubscription": 50000,
"quotaReachedRenew": false,
"quotaReachedPercent": 0,
"automaticSuperiorPlan": false,
"tacitAgreement": 0,
"displayName": "Tipimail",
"formulaTypeName": "MONTHLY",
"creationDate" : 1447149668,
"subscriptionDate" : 1447153268,
"expirationDate" : 1449745268
}
Code example:
curl -X GET -H "X-Tipimail-ApiUser: YOUR_SMTP_USERNAME" -H "X-Tipimail-ApiKey: YOUR_SMTP_KEY" -H "Content-Type: application/json" -H "Cache-Control: no-cache" https://api.tipimail.com/v1/account
require 'vendor/autoload.php';
$tipimail = new Tipimail\Tipimail('YOUR_SMTP_USERNAME', 'YOUR_API_KEY');
try {
$result = $tipimail->getAccountsService()->getAccountData();
var_dump($result);
}
catch(Tipimail\Exceptions\TipimailException $e) {
echo 'Exception received :', $e->getMessage(), "\n";
}