List completed billing-period statements
const url = 'https://api.nsin.ir/wallet/period-statements?limit=50';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.nsin.ir/wallet/period-statements?limit=50' \ --header 'Authorization: Bearer <token>'One statement per closed billing period across all your
subscriptions, newest period first: the plan price, traffic by class
and what the traffic cost, with the per-GB prices in force for that
period. These are statements, not tax invoices
(not_a_tax_invoice: true).
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters ”How many statements to return, 1–200.
Only this subscription’s statements.
Only statements of the subscriptions you have held on this domain.
Responses
Section titled “ Responses ”Completed statements, newest first.
One billing period’s cost. For the period in progress the traffic figures are a running estimate.
object
What the plan cost for this period.
Bytes served from cache in the period.
Bytes fetched through the edge proxy.
Bytes on the direct path.
Legacy two-tier column, on historical periods only.
What the period’s traffic cost.
Price per GB of cached traffic in force for the period.
Price per GB of proxied traffic.
Price per GB of direct traffic.
Legacy two-tier price, on historical periods only.
Per-domain split. Only on an estimate for a running period.
One domain’s traffic in a period estimate.
object
Bytes served from cache.
Bytes fetched through the edge proxy.
Bytes sent directly to the origin path.
Estimated cost of this traffic at current rates.
When the statement was closed.
true for a running period’s estimate; false for a closed period.
This is a statement, not a tax invoice.
Present (true) on an estimate whose traffic figures run up to now.
Example
[ { "not_a_tax_invoice": true }]Missing, malformed, revoked or expired API key. (A valid key whose
account has been deactivated gets 403 account is inactive instead.)
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Examples
{ "error": "invalid API key"}The key exceeded its request budget (300 requests per minute by default).
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Examples
{ "error": "rate limit exceeded"}