Accounts
Account mgmt APIs
Get statement PDF
api reference returns a pdf of the requested statement document in raw format using the document id returned from the docid 4tf9s1ugk6evhifgq2zfs 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 { "name" "endpoint /v1/dda/accounts/{accountnumber}/statements/{statementid}/documents/{documentid}", "method" "get", "url" "https //sandbox crbcos com/core/v1/dda/accounts/{accountnumber}/statements/{statementid}/documents/{documentid}", "description" "", "tab" "examples", "examples" { "languages" \[ { "id" "orrps9pk6lteodalyxbx5", "language" "curl", "code" "curl location request get 'https //sandbox crbcos com/core/v1/dda/accounts/2819503463/statements/6daf4caa 34d5 4e65 9f98 b388004f0af7/documents/a2276ec1 e851 41e0 8ae1 b38800747098' \\\\\n header 'content type application/json' \\\\\n header 'authorization bearer \<token>' \\\\\n data '", "customlabel" "" }, { "id" "wxqmh8hlvdflodyg42yxy", "language" "nodejs", "code" "var https = require('follow redirects') https;\nvar fs = require('fs');\n\nvar options = {\n 'method' 'get',\n 'hostname' 'sandbox crbcos com',\n 'path' '/core/v1/dda/accounts/2819503463/statements/6daf4caa 34d5 4e65 9f98 b388004f0af7/documents/a2276ec1 e851 41e0 8ae1 b38800747098',\n 'headers' {\n 'content type' 'application/json',\n 'authorization' 'bearer \<token>'\n },\n 'maxredirects' 20\n};\n\nvar req = https request(options, function (res) {\n var chunks = \[];\n\n res on(\\"data\\", function (chunk) {\n chunks push(chunk);\n });\n\n res on(\\"end\\", function (chunk) {\n var body = buffer concat(chunks);\n console log(body tostring());\n });\n\n res on(\\"error\\", function (error) {\n console error(error);\n });\n});\n\nvar 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\\";\n\nreq write(postdata);\n\nreq end();", "customlabel" "" }, { "id" " ybdqbvdmtqq eketerrt", "language" "python", "code" "import http client\nimport json\n\nconn = http client httpsconnection(\\"sandbox crbcos com\\")\npayload = \\"\\\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\\"\nheaders = {\n 'content type' 'application/json',\n 'authorization' 'bearer \<token>'\n}\nconn request(\\"get\\", \\"/core/v1/dda/accounts/2819503463/statements/6daf4caa 34d5 4e65 9f98 b388004f0af7/documents/a2276ec1 e851 41e0 8ae1 b38800747098\\", payload, headers)\nres = conn getresponse()\ndata = res read()\nprint(data decode(\\"utf 8\\"))", "customlabel" "" }, { "id" "oi9iqfentyr 2pfcwoiqc", "language" "ruby", "code" "require \\"uri\\"\nrequire \\"json\\"\nrequire \\"net/http\"\n\nurl = uri(\\"https //sandbox crbcos com/core/v1/dda/accounts/2819503463/statements/6daf4caa 34d5 4e65 9f98 b388004f0af7/documents/a2276ec1 e851 41e0 8ae1 b38800747098\\")\n\nhttps = net http new(url host, url port)\nhttps use ssl = true\n\nrequest = net http get new(url)\nrequest\[\\"content type\\"] = \\"application/json\\"\nrequest\[\\"authorization\\"] = \\"bearer \<token>\\"\nrequest 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\\"\n\nresponse = https request(request)\nputs response read body\n", "customlabel" "" }, { "id" "dynvjllajxj 2q tz3vu2", "language" "go", "code" "package main\n\nimport (\n \\"fmt\\"\n \\"strings\\"\n \\"net/http\"\n \\"io\\"\n)\n\nfunc main() {\n\n url = \\"https //sandbox crbcos com/core/v1/dda/accounts/2819503463/statements/6daf4caa 34d5 4e65 9f98 b388004f0af7/documents/a2276ec1 e851 41e0 8ae1 b38800747098\\"\n method = \\"get\\"\n\n payload = strings newreader(`\nmake your api call in postman`+\\"\n\\"+`\nclick \\"save response\\" → \\"save to a file\\"`+\\"\n\\"+`\nchoose location and filename`+\\"\n\\"+`\nopen the saved pdf in a pdf viewer`)\n\n client = \&http client {\n }\n req, err = http newrequest(method, url, payload)\n\n if err != nil {\n fmt println(err)\n return\n }\n req header add(\\"content type\\", \\"application/json\\")\n req header add(\\"authorization\\", \\"bearer \<token>\\")\n\n res, err = client do(req)\n if err != nil {\n fmt println(err)\n return\n }\n defer res body close()\n\n body, err = io readall(res body)\n if err != nil {\n fmt println(err)\n return\n }\n fmt println(string(body))\n}", "customlabel" "" } ], "selectedlanguageid" "orrps9pk6lteodalyxbx5" }, "results" { "languages" \[ { "id" "bpj4xgoxiawf9cgszfqrr", "language" "200", "code" "%pdf 1 7\n2 0 obj\n\[/pdf /text /imageb /imagec /imagei]\nendobj\n8 0 obj\n<\</length 9 0 r\n/filter /flatedecode >>\nstream\n\<pdf string>", "customlabel" "" } ], "selectedlanguageid" "bpj4xgoxiawf9cgszfqrr" }, "request" { "pathparameters" \[ { "name" "accountnumber", "kind" "required", "type" "string", "description" "number of the account that you want the bank statement for", "" "number of the account that you want the bank statement for" }, { "name" "statementid", "kind" "required", "type" "string", "description" "the id of the statement you want find this id in the 'id' parameter value of the get statement info response ", "" "the id of the statement you want find this id in the 'id' parameter value of the get statement info response " }, { "name" "documentid", "kind" "required", "type" "string", "description" "id of the specific statement document you want find this id in the 'id' parameter value of the get statement doc info response ", "" "required" } ], "queryparameters" \[], "headerparameters" \[], "bodydataparameters" \[], "formdataparameters" \[] }, "currentnewparameter" { "label" "path parameter", "value" "pathparameters" }, "hastryitout" false, "response" \[ { "name" "pdf", "kind" "optional", "type" "string", "description" "the response contains the actual pdf of the requested statement document in raw format " } ] }