Skip to content

Get a statement's document

A link to the PDF of Paddle's invoice or Cahaves' invoice for a month.

Updated

post

https://cloud.cahaves.com/api/billing/statements/{id}/document

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.

Path parameters

idstring<uuid>required

Example: "5d7f9b1c-3e5a-4c7e-9f1b-3d5f7a9c1e3b"

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 link to the PDF.

urlstring<uri>required

Answers a link to the PDF of a statement of the organization the request works in; a statement of another of your organizations answers 404. The PDF is Paddle's invoice for a card charge, which the link opens for an hour, or Cahaves' invoice, for 30 days. Ask again for a new link rather than keeping one. A statement whose document_available is false answers 409, and 502 means the invoicing service could not be reached; try again in a minute. With List statements, at most 30 are accepted a minute per account.