Skip to main content

Download Statement

Returns a signed download URL for a statement’s original file. The URL expires in 1 hour.

Request

GET /v1/statements/{statement_id}/download

Path Parameters

ParameterTypeRequiredDescription
statement_idintegerYesThe statement ID

Query Parameters

ParameterTypeRequiredDefaultDescription
projectIdUUIDYesThe project the statement belongs to

Headers

HeaderRequiredDescription
AuthorizationYesBearer <token> — must be scoped to the requested project

Response

{
  "data": {
    "url": "https://storage.example.com/statements/Q1-2025-royalties.xlsx?token=...",
    "fileName": "Q1-2025-royalties.xlsx",
    "fileType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
    "expiresIn": 3600
  }
}
FieldTypeDescription
urlstringPre-signed download URL
fileNamestringOriginal file name
fileTypestringMIME type of the file
expiresInintegerURL expiration time in seconds

Errors

StatusDescription
400Missing or invalid projectId
403Token is not scoped to the requested project
404Statement not found
429Rate limit exceeded

Example

curl "https://api.royaltyport.com/v1/statements/1234/download?projectId=a1b2c3d4-..." \
  -H "Authorization: Bearer rp_your_token_here"