Menu

Invoices

The invoices issued when credits are bought.

OperationMethod and path
The caller's invoices, newest firstGET /invoices
One of the caller's invoicesGET /invoices/{id}
The PDF of one of the caller's invoicesGET /invoices/{id}/pdf

The caller's invoices, newest first#

GET /invoices · operation listInvoices

One page of the invoices of the caller's orders (an order has one once its invoice is issued), newest order first. series, number, date_emitted, date_due and paid may be null until known: GET /invoices/{id} completes them. This call is not charged.

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissionbilling:read
Chargedno

Parameters

NameInTypeRequiredDescription
cursorquerystringnothe next_cursor of the previous page
limitqueryintegerno1 to 100, default 25 (default 25; 1 to 100)

Answer 200 (InvoiceList): the result

  • invoices, array of objects, required
    • order_ref, string, required
    • total, string, required — a decimal amount as text
    • date_emitted, string or null
    • paid, boolean, required
    • currency, string, required
    • id, string, required
    • date_due, string or null
    • number, string or null
    • series, string or null
    • imported, boolean, required — an invoice of the previous platform
    • purpose, string (one of topup, credit-gift)
  • next_cursor, string or null, required

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
400invalid-paramsinvalid-params (field cursor or limit)
401unauthorizedunauthorized
403insufficient-scope, terms-acceptance-requiredinsufficient-scope (an API key without the route's scope: required, granted); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: required lists them; read them with GET /legal/documents and accept with POST /auth/legal/accept)
429rate-limitedrate-limited

Example

curl -X GET 'https://api.weird.ro/invoices' \
  -H "Authorization: Bearer $WEIRD_API_KEY"

With the CLI (weird invoices):

$ weird invoices

MCP: weird_invoices.

One of the caller's invoices#

GET /invoices/{id} · operation getInvoice

The invoice's own facts. An invoice belongs to the account whose order produced it; another account's, or an unknown id, is 404. This call is not charged.

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissionbilling:read
Chargedno

Parameters

NameInTypeRequiredDescription
idpathstringyes

Answer 200 (Invoice): the result

  • order_ref, string, required
  • total, string, required — a decimal amount as text
  • date_emitted, string or null
  • paid, boolean, required
  • currency, string, required
  • id, string, required
  • date_due, string or null
  • number, string or null
  • series, string or null
  • imported, boolean, required — an invoice of the previous platform
  • purpose, string (one of topup, credit-gift)

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
401unauthorizedunauthorized
403insufficient-scope, terms-acceptance-requiredinsufficient-scope (an API key without the route's scope: required, granted); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: required lists them; read them with GET /legal/documents and accept with POST /auth/legal/accept)
404not-foundnot-found
429rate-limitedrate-limited

Example

curl -X GET 'https://api.weird.ro/invoices/{id}' \
  -H "Authorization: Bearer $WEIRD_API_KEY"

With the CLI (weird invoices show):

$ weird invoices show <id>

MCP: weird_invoices.

The PDF of one of the caller's invoices#

GET /invoices/{id}/pdf · operation getInvoicePdf

The fiscal document itself (application/pdf, as an attachment named after the invoice's series and number). The refusals are JSON. This call is not charged.

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissionbilling:read
Chargedno

Parameters

NameInTypeRequiredDescription
idpathstringyes

Answer 200 (InvoicePdf): the result — string (binary)

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
401unauthorizedunauthorized
403insufficient-scope, terms-acceptance-requiredinsufficient-scope (an API key without the route's scope: required, granted); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: required lists them; read them with GET /legal/documents and accept with POST /auth/legal/accept)
404not-foundnot-found
429rate-limitedrate-limited
502provider-unavailableprovider-unavailable (the document cannot be fetched now: try again later)
503unavailableunavailable (the document is not available now: try again later, then contact support)

Example

curl -X GET 'https://api.weird.ro/invoices/{id}/pdf' \
  -H "Authorization: Bearer $WEIRD_API_KEY"

With the CLI (weird invoices download):

$ weird invoices download <id>

MCP: weird_invoice_download.

This page is generated from the API's public document; it changes when the document does.