Get statement PDF
API reference
Returns a PDF of the requested statement document in raw format using the document ID returned from the Get statement doc info call.
You can save this response as a PDF file to view it in human-readable format or use it to display the statement PDF in your app.
IMPORTANT Only pull documents as needed. If you want to pull a large number of documents, speak to your Relationship Manager.
Endpoint: /v1/dda/accounts/{accountNumber}/statements/{statementId}/documents/{documentId}
GET
https://sandbox.crbcos.com/core/v1/dda/accounts/{accountNumber}/statements/{statementId}/documents/{documentId}
Path Parameters
- accountNumberstringrequiredDescription
- statementIdstringrequiredDescription
- documentIdstringrequiredDescription
Response
- PDFstringDescription
curl
curl --location 'https://sandbox.crbcos.com/core/v1/dda/accounts/2819503463/statements/6daf4caa-34d5-4e65-9f98-b388004f0af7/documents/a2276ec1-e851-41e0-8ae1-b38800747098' \
--header 'Authorization: Bearer <token>'nodejs
var https = require('follow-redirects').https;
var fs = require('fs');
var options = {
'method': 'GET',
'hostname': 'sandbox.crbcos.com',
'path': '/core/v1/dda/accounts/2819503463/statements/6daf4caa-34d5-4e65-9f98-b388004f0af7/documents/a2276ec1-e851-41e0-8ae1-b38800747098',
'headers': {
'Authorization': 'Bearer <token>'
},
'maxRedirects': 20
};
var req = https.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function (chunk) {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
res.on("error", function (error) {
console.error(error);
});
});
var postData = "\nMake your API call in Postman\r\nClick \"Save Response\" → \"Save to a file\"\r\nChoose location and filename\r\nOpen the saved PDF in a PDF viewer";
req.write(postData);
req.end();python
import http.client
import json
conn = http.client.HTTPSConnection("sandbox.crbcos.com")
payload = "\nMake your API call in Postman\r\nClick \"Save Response\" → \"Save to a file\"\r\nChoose location and filename\r\nOpen the saved PDF in a PDF viewer"
headers = {
'Authorization': 'Bearer <token>'
}
conn.request("GET", "/core/v1/dda/accounts/2819503463/statements/6daf4caa-34d5-4e65-9f98-b388004f0af7/documents/a2276ec1-e851-41e0-8ae1-b38800747098", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))ruby
require "uri"
require "json"
require "net/http"
url = URI("https://sandbox.crbcos.com/core/v1/dda/accounts/2819503463/statements/6daf4caa-34d5-4e65-9f98-b388004f0af7/documents/a2276ec1-e851-41e0-8ae1-b38800747098")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer <token>"
request.body = "\nMake your API call in Postman\r\nClick \"Save Response\" → \"Save to a file\"\r\nChoose location and filename\r\nOpen the saved PDF in a PDF viewer"
response = https.request(request)
puts response.read_body
go
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sandbox.crbcos.com/core/v1/dda/accounts/2819503463/statements/6daf4caa-34d5-4e65-9f98-b388004f0af7/documents/a2276ec1-e851-41e0-8ae1-b38800747098"
method := "GET"
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Authorization", "Bearer <token>")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}200
%PDF-1.7
2 0 obj
[/PDF /Text /ImageB /ImageC /ImageI]
endobj
8 0 obj
<</Length 9 0 R
/Filter /FlateDecode >>
stream
<PDF string>