Get Statement Download URL
Use the Get Statement Download URL API endpoint to retrieve a temporary download link for a billing statement PDF.
Early AccessCredit API endpoints are currently being finalised as part of ongoing product development. While we do not anticipate significant changes, some interfaces, behaviours, and documentation may be refined before general availability.
The Get Statement Download URL endpoint retrieves a temporary, signed download URL for a billing statement PDF, identified by its statement ID. Use this endpoint when a customer wants to view or download a copy of a specific statement — for example, from a statements list in your user interface.
More InformationFor more information about the Explorer endpoints, see: Credit Explorer.
Prerequisites
To integrate calls to the Get Statement Download URL endpoint, you need:
- A valid statement ID, returned as
statementIdfor each statement in the response from the Get Account Statements endpoint. Pass this value as thestatement_idpath parameter below.
Example Request
Retrieve a statement download URL by making a GET request to the Get Statement Download URL endpoint, passing the statement ID as a path parameter.
GET {{baseUrl}}/api/v1/credit/explorer/accounts/statements/{statement_id}/download
Path Parameters
| Parameter | Description |
|---|---|
statement_id | integer. Required. The unique identifier of the statement. |
Example Response
A successful request returns a 200 HTTP status code with a temporary download URL for the statement PDF.
{
"pdfUrl": "https://example.com/statements/stmt_001.pdf"
}{
"detail": [
{
"loc": ["path", "statement_id"],
"msg": "Field required",
"type": "missing"
}
]
}Response Fields
| Attribute | Description |
|---|---|
pdfUrl | string. A temporary, signed URL from which the statement PDF can be downloaded. |
NoteThe URL is time-limited. Request a fresh URL each time a user wants to view or download a statement, rather than storing it for later use.
Updated 4 days ago
