Billing
Get invoice
One invoice: its amount, status and links to pay online or download the PDF.
https://api.scaledmail.com/v2/invoices/:id- Rate limit
- Read: 300 calls per minute per token
A main workspace can read its sub-workspaces' invoices with its own Workspace.
Path parameters
idstringrequiredThe invoice id (
inv_).. . .
Headers
AuthorizationstringrequiredBearer <your API token>. Tokens start withsm_.live_ WorkspacestringrequiredThe workspace id to act on (from
GET /workspacesor Settings › API tokens). Required on every call except the/workspacescalls; without it:400workspace_.required
Response (200)
idstringrequiredThe invoice id (
inv_).. . . numberstringrequiredThe invoice number printed on the PDF.
workspace_idstringrequiredThe workspace it belongs to (
org_). Differs from yours for a sub's invoice.. . . order_idstringoptionalThe order it bills (
ord_). Not on a one-time payment.. . . descriptionstringrequiredWhat it is for: the order's products (e.g.
Google Inboxes), or for a one-time paymentDomain purchase,Domain renewal,Domain purchase + renewal,Credits top-up,Domain Masking,Domain Masking addedorOne-time payment(Subscriptionwhen an order invoice has no lines).statusenumrequiredopen= not paid yet,paid,failed= could not be collected,partly_,refunded refunded,void= cancelled, nothing owed.One of:
openpaidfailedpartly_refundedrefundedvoidamountnumberrequiredWhat the invoice charges, after any promotion code. Paid once
statusispaid.amount_refundednumberoptionalPaid back so far. Only on an invoice with a refund.
period_startstringoptionalStart of the period it covers (
YYYY-MM-DD). Only on an order invoice.period_endstringoptionalEnd of the period it covers (
YYYY-MM-DD). Only on an order invoice.hosted_urlstringoptionalWeb page where the invoice can be viewed and paid. Left out when Stripe has none.
pdf_urlstringoptionalDownload link for the PDF. Left out when Stripe has none.
created_atstringrequiredWhen the invoice was made, as a date:
YYYY-MM-DD(UTC).
Responses
- 200OK. The invoice belongs to this workspace or one of its sub-workspaces.
- 403Not allowed. The token can't use the workspace in
Workspace(workspace_). Or the token's creator is not an owner or admin of this workspace (not_ allowed not_): invoices are for owners and admins only.allowed - 404Not found. No invoice with this id in this workspace (or its subs).
- 429Rate limited. More than 300 read calls in a minute with this token. Wait for the
Retry-Afterseconds.
Like every call, it can also answer 401 (bad key), 400 workspace_, 403 workspace_. See Errors.
