List the domain's invoices
const url = 'https://api.nsin.ir/domains/example.com/invoices';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/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.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”The domain name (for example example.com) — not a numeric id.
Example
example.comResponses
Section titled “ Responses ”Invoices, newest first.
object
Human-facing invoice number, sequential per Jalali year.
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).
Before tax, in rials.
VAT, in rials.
What was charged, in rials.
object
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.)
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Examples
{ "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.
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Example
{ "error": "read-only 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"}