Billing
List documents
Every invoice, receipt and credit note issued to the organization, newest first.
Updated
https://cloud.cahaves.com/api/billing/documents
Authorization
cahaves.cloud.sessionstringcookierequired
The session cookie Cloud sets when a customer signs in to the console with GitHub or Google. It is HttpOnly, so scripts cannot read it, and there are no API keys or tokens yet.
Query parameters
pageinteger
The page to answer, from 1. Anything but a whole number reads as absent, and a page past the last answers an empty list.
Default: 1
perinteger
Rows per page, 1 to 50. A number outside that range is clamped to it, and anything but a whole number reads as absent.
Default: 20
Headers
X-Cloud-Organizationstring<uuid>
The id of the organization the request works in, one the signed-in customer owns. Left out or empty, the request works in their oldest organization. Any other value answers 404 with `reason: "organization"`. A customer with no organization yet gets 409 "Create an organization first." from every route that works in one.
Example: "2f6c8e0a-4b1d-4e7f-9a3c-5d7e9f1b3a5c"
Responses
application/json
A page of documents.
perintegerrequired
pageintegerrequired
totalintegerrequired
documentsobject[]required
Every invoice, receipt and credit note the invoicing service holds for the organization the request works in, which is a client of its own there, newest first, a document staff wrote by hand in Ops included. An organization with no linked client answers an empty first page, not an error. A draft invoice never reaches this list, so every document here carries a number; an invoice's status is open, paid or void, a receipt's issued or awaiting_stamp, and a credit note's issued. total and balance_due are decimal strings in the currency's own units, whole rupiah or dollars with cents. 503 means the invoicing service did not answer.
At most 30 requests a minute are accepted per account, and 120 across the platform.