Skip to content
nsin docs

List completed billing-period statements

GET
/wallet/period-statements
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).

limit
integer
default: 50 >= 1 <= 200

How many statements to return, 1–200.

subscription_id
integer

Only this subscription’s statements.

domain
string

Only statements of the subscriptions you have held on this domain.

Completed statements, newest first.

Media type application/json
Array<object>

One billing period’s cost. For the period in progress the traffic figures are a running estimate.

object
id
integer
subscription_id
integer
plan_id
integer
plan_name
string
plan_term_id
integer
billing_duration_days
integer
quota_reset_days
integer
period_start
string format: date-time
period_end
string format: date-time
plan_price_rials

What the plan cost for this period.

integer
traffic_cached_bytes

Bytes served from cache in the period.

integer
traffic_proxied_bytes

Bytes fetched through the edge proxy.

integer
traffic_direct_bytes

Bytes on the direct path.

integer
traffic_bypass_bytes

Legacy two-tier column, on historical periods only.

integer
traffic_charged_rials

What the period’s traffic cost.

integer
cached_price_rials_per_gb

Price per GB of cached traffic in force for the period.

integer
proxied_price_rials_per_gb

Price per GB of proxied traffic.

integer
direct_price_rials_per_gb

Price per GB of direct traffic.

integer
bypass_price_rials_per_gb

Legacy two-tier price, on historical periods only.

integer
traffic_by_domain

Per-domain split. Only on an estimate for a running period.

Array<object>

One domain’s traffic in a period estimate.

object
domain
string
cached_bytes

Bytes served from cache.

integer
proxied_bytes

Bytes fetched through the edge proxy.

integer
direct_bytes

Bytes sent directly to the origin path.

integer
estimated_charged_rials

Estimated cost of this traffic at current rates.

integer
created_at

When the statement was closed.

string format: date-time
is_estimate

true for a running period’s estimate; false for a closed period.

boolean
not_a_tax_invoice

This is a statement, not a tax invoice.

boolean
traffic_realtime

Present (true) on an estimate whose traffic figures run up to now.

boolean
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.)

Media type application/json

The single error shape used by every endpoint.

object
error
required

Human-readable description of what went wrong.

string
Examples
Example invalidKey
{
"error": "invalid API key"
}

The key exceeded its request budget (300 requests per minute by default).

Media type application/json

The single error shape used by every endpoint.

object
error
required

Human-readable description of what went wrong.

string
Examples
Example limited
{
"error": "rate limit exceeded"
}