Menu
Invoices
The invoices issued when credits are bought.
| Operation | Method and path |
|---|---|
| The caller's invoices, newest first | GET /invoices |
| One of the caller's invoices | GET /invoices/{id} |
| The PDF of one of the caller's invoices | GET /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.
| Credential | an API key holding the permission below, or a session (x-weird-auth: key) |
| Permission | billing:read |
| Charged | no |
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
cursor | query | string | no | the next_cursor of the previous page |
limit | query | integer | no | 1 to 100, default 25 (default 25; 1 to 100) |
Answer 200 (InvoiceList): the result
invoices, array of objects, requiredorder_ref, string, requiredtotal, string, required — a decimal amount as textdate_emitted, string or nullpaid, boolean, requiredcurrency, string, requiredid, string, requireddate_due, string or nullnumber, string or nullseries, string or nullimported, boolean, required — an invoice of the previous platformpurpose, string (one oftopup,credit-gift)
next_cursor, string or null, required
Refusals ({"error": {"code", "message"}}; see errors):
| Status | Codes | When |
|---|---|---|
| 400 | invalid-params | invalid-params (field cursor or limit) |
| 401 | unauthorized | unauthorized |
| 403 | insufficient-scope, terms-acceptance-required | insufficient-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) |
| 429 | rate-limited | rate-limited |
Example
curl -X GET 'https://api.weird.ro/invoices' \
-H "Authorization: Bearer $WEIRD_API_KEY"With the CLI (weird invoices):
$ weird invoicesMCP: 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.
| Credential | an API key holding the permission below, or a session (x-weird-auth: key) |
| Permission | billing:read |
| Charged | no |
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
Answer 200 (Invoice): the result
order_ref, string, requiredtotal, string, required — a decimal amount as textdate_emitted, string or nullpaid, boolean, requiredcurrency, string, requiredid, string, requireddate_due, string or nullnumber, string or nullseries, string or nullimported, boolean, required — an invoice of the previous platformpurpose, string (one oftopup,credit-gift)
Refusals ({"error": {"code", "message"}}; see errors):
| Status | Codes | When |
|---|---|---|
| 401 | unauthorized | unauthorized |
| 403 | insufficient-scope, terms-acceptance-required | insufficient-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) |
| 404 | not-found | not-found |
| 429 | rate-limited | rate-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.
| Credential | an API key holding the permission below, or a session (x-weird-auth: key) |
| Permission | billing:read |
| Charged | no |
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
Answer 200 (InvoicePdf): the result — string (binary)
Refusals ({"error": {"code", "message"}}; see errors):
| Status | Codes | When |
|---|---|---|
| 401 | unauthorized | unauthorized |
| 403 | insufficient-scope, terms-acceptance-required | insufficient-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) |
| 404 | not-found | not-found |
| 429 | rate-limited | rate-limited |
| 502 | provider-unavailable | provider-unavailable (the document cannot be fetched now: try again later) |
| 503 | unavailable | unavailable (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.