Skip to content
nsin docs

List the domain's invoices

GET
/domains/{domain}/invoices
curl --request GET \
--url https://api.nsin.ir/domains/example.com/invoices \
--header 'Authorization: Bearer <token>'

The domain’s invoices — whoever paid them — newest first, up to 200, each with its line items. Traffic statements are not included. Requires billing on the domain, or being its nominated payer; anyone else gets 404.

domain
required
string

The domain name (for example example.com) — not a numeric id.

Example
example.com

Invoices, newest first.

Media type application/json
Array<object>
object
id
integer
number

Human-facing invoice number, sequential per Jalali year.

string
user_id
integer
domain_id
integer
domain_name
string
subscription_id
integer
payment_id
integer
kind

subscription — a plan purchase or renewal (taxed). period — the traffic of a closed billing period, when it had metered traffic (no VAT). topup — a wallet top-up (no VAT). manual — issued by NSIN support (taxed).

string
Allowed values: subscription period topup manual
status
string
Allowed values: paid unpaid cancelled
subtotal_rials

Before tax, in rials.

integer
tax_rials

VAT, in rials.

integer
total_rials

What was charged, in rials.

integer
issued_at
string format: date-time
paid_at
string | null format: date-time
notes
string
created_at
string format: date-time
updated_at
string format: date-time
items
Array<object>
object
id
integer
invoice_id
integer
description
string
quantity
integer
unit_price_rials
integer
total_rials
integer
Example
[
{
"kind": "subscription",
"status": "paid"
}
]

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"
}

No such domain, or it is not visible to this account. Domains you cannot access are reported as not found rather than forbidden.

Media type application/json

The single error shape used by every endpoint.

object
error
required

Human-readable description of what went wrong.

string
Example
{
"error": "read-only 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"
}