Get Statement Download URL

Use the Get Statement Download URL API endpoint to retrieve a temporary download link for a billing statement PDF.

📘

Early Access

Credit 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 Information

For 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 statementId for each statement in the response from the Get Account Statements endpoint. Pass this value as the statement_id path 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

ParameterDescription
statement_idinteger. 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

AttributeDescription
pdfUrlstring. A temporary, signed URL from which the statement PDF can be downloaded.
📘

Note

The 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.



Did this page help you?