Balance and Plan (Billing)¶
Get a list of all transactions within the account¶
POST /user/billing/transactions/list The method returns a list of all transactions within the account.
In the request body you can use standard filters through the filters array. 
curl 'https://cloud.roistat.com/api/v1/user/billing/transactions/list?project=12345' \
    --request POST \
    --header 'Content-type: application/json' \ 
    --header 'Api-key: {KEY}' \ 
    --data Request body - see below
Request Body:
{
    "period": {
        "from": "2016-09-01T07:36:00.000Z",
        "to": "2016-09-29T07:36:00.000Z"
    }
}
{
    "data": [
        {
            "date": "2016-09-02T18:59:15+0000",
            "type": "charge",
            "system_name": null,
            "display_name": null,
            "project_id": null,
            "sum": 16.600000000000001,
            "balance": -16.600000000000001,
            "virtual_balance": 0
        },
        {
            "date": "2016-09-26T13:51:29+0000",
            "type": "topup",
            "system_name": "top_up_balance",
            "display_name": "Deposit to balance",
            "project_id": null,
            "sum": 1000,
            "balance": 691.57000000000005,
            "virtual_balance": 0
        }
    ],
    "status": "success"
}
Query String:
| Parameter | Type | Description | Required | 
|---|---|---|---|
| project | string | Project number | yes | 
Request Body:
| Parameter | Type | Description | Required | 
|---|---|---|---|
| period | object | Transaction period | yes | 
| > from | string | Start date of the period in the format 2016-09-01T07:36:00.000Z |  yes | 
| > to | string | End date of the period in the format 2016-09-29T07:36:00.000Z |  yes | 
| Parameter | Type | Description | 
|---|---|---|
| data | array[object] | |
| > date | string | Transaction date | 
| > type | string | Type of transaction: charge - widthdraw, topup - deposit |  
| > system_name | null or string | System name of the transaction | 
| > display_name | null or string | Human-readable name of the transaction | 
| > project_id | null or integer | Project ID if the transacstions refers to a project | 
| > sum | integer or number | Transaction amount | 
| > balance | integer or number | Money balance of the account after the transaction | 
| > virtual_balance | integer or number | Bonus balance of the account after the transaction | 
| status | string | 
Get a list of all transactions within the account in the Excel format¶
POST /user/billing/transactions/list/export/excel This method is similar to the /user/billing/transactions/list method, however, an Excel file with a list of transactions for the project is returned. 
curl 'https://cloud.roistat.com/api/v1/user/billing/transactions/list/export/excel?project=12345' \
    --request POST \
    --header 'Content-type: application/json' \ 
    --header 'Api-key: {KEY}' \ 
    --data Request body - see below
Request Body:
{
    "period": {
        "from": "2016-09-01T07:36:00.000Z",
        "to": "2016-09-29T07:36:00.000Z"
    }
}
An Excel file.
Query String:
| Parameter | Type | Description | Required | 
|---|---|---|---|
| project | string | Project number | yes | 
Request Body:
| Parameter | Type | Description | Required | 
|---|---|---|---|
| period | object | Transaction period | yes | 
| > from | string | Start date of the period in the format 2016-09-01T07:36:00.000Z |  yes | 
| > to | string | End date of the period in the format 2016-09-29T07:36:00.000Z |  yes | 
No parameters.