Reports
4 operations under reports. Examples read $API and $KEY from your shell.
GET /v1/reports
Parameters
limitinteger required in querystarting_afterstring optional in query
Responses
200 Default Response
object
dataarray requiredEach item:
objectstring required one ofreportidstring requiredkindstring required one ofstatement,transfersstatusstring required one ofqueued,running,completed,failedparametersobject requiredprogressobject requiredrows_doneinteger required
row_countinteger required (nullable)content_sha256string required (nullable)failure_reasonstring required (nullable)created_atstring requiredcompleted_atstring required (nullable)download_urlstring required (nullable)versioninteger required
has_moreboolean required
Errors are RFC 9457 problem documents (application/problem+json).
curl
curl -s \
"$API/v1/reports?limit=1" \
-H "authorization: Bearer $KEY"SDK
import { createScrClient } from "@scr/sdk";
// The client sends the API key for you.
const client = createScrClient({ baseUrl: process.env.API!, apiKey: process.env.KEY! });
const { data, error } = await client.GET("/v1/reports", {
params: { query: { limit: 1 } },
});POST /v1/reports
Send an Idempotency-Key header on every POST so a retry never repeats the request.
Request body
application/json, required
one of
Variant 1:
objectkindstring required one ofstatementaccount_idstring requiredfromstring requiredtostring requiredformatstring optional
Variant 2:
objectkindstring required one oftransfersfromstring requiredtostring requiredtransfer_kindstring optionalstatusstring optionalformatstring optional
Responses
202 Default Response
object
objectstring required one ofreportidstring requiredkindstring required one ofstatement,transfersstatusstring required one ofqueued,running,completed,failedparametersobject requiredprogressobject requiredrows_doneinteger required
row_countinteger required (nullable)content_sha256string required (nullable)failure_reasonstring required (nullable)created_atstring requiredcompleted_atstring required (nullable)download_urlstring required (nullable)versioninteger required
Errors are RFC 9457 problem documents (application/problem+json).
curl
curl -s \
-X POST \
"$API/v1/reports" \
-H "authorization: Bearer $KEY" \
-H "idempotency-key: $(uuidgen)" \
-H "content-type: application/json" \
-d '{"kind":"statement","account_id":"<account_id>","from":"<from>","to":"<to>"}'SDK
import { createScrClient } from "@scr/sdk";
// The client sends the API key and an Idempotency-Key for you.
const client = createScrClient({ baseUrl: process.env.API!, apiKey: process.env.KEY! });
const { data, error } = await client.POST("/v1/reports", {
body: {
"kind": "statement",
"account_id": "<account_id>",
"from": "<from>",
"to": "<to>"
},
});GET /v1/reports/{id}
Parameters
idstring required in path
Responses
200 Default Response
object
objectstring required one ofreportidstring requiredkindstring required one ofstatement,transfersstatusstring required one ofqueued,running,completed,failedparametersobject requiredprogressobject requiredrows_doneinteger required
row_countinteger required (nullable)content_sha256string required (nullable)failure_reasonstring required (nullable)created_atstring requiredcompleted_atstring required (nullable)download_urlstring required (nullable)versioninteger required
Errors are RFC 9457 problem documents (application/problem+json).
curl
curl -s \
"$API/v1/reports/$ID" \
-H "authorization: Bearer $KEY"SDK
import { createScrClient } from "@scr/sdk";
// The client sends the API key for you.
const client = createScrClient({ baseUrl: process.env.API!, apiKey: process.env.KEY! });
const { data, error } = await client.GET("/v1/reports/{id}", {
params: { path: { id: "<id>" } },
});GET /v1/reports/{id}/download
Parameters
idstring required in path
Responses
200 Default Response
Errors are RFC 9457 problem documents (application/problem+json).
curl
curl -s \
"$API/v1/reports/$ID/download" \
-H "authorization: Bearer $KEY"SDK
import { createScrClient } from "@scr/sdk";
// The client sends the API key for you.
const client = createScrClient({ baseUrl: process.env.API!, apiKey: process.env.KEY! });
const { data, error } = await client.GET("/v1/reports/{id}/download", {
params: { path: { id: "<id>" } },
});