Skip to content
Testnet only: a reference implementation, not a production service.Tokens and bank transfers here are simulated and have no value.

Reports

4 operations under reports. Examples read $API and $KEY from your shell.

GET /v1/reports

Parameters

  • limit integer required in query
  • starting_after string optional in query

Responses

200 Default Response

object

  • data array required

    Each item:

    • object string required one of report
    • id string required
    • kind string required one of statement, transfers
    • status string required one of queued, running, completed, failed
    • parameters object required
    • progress object required
      • rows_done integer required
    • row_count integer required (nullable)
    • content_sha256 string required (nullable)
    • failure_reason string required (nullable)
    • created_at string required
    • completed_at string required (nullable)
    • download_url string required (nullable)
    • version integer required
  • has_more boolean required

Errors are RFC 9457 problem documents (application/problem+json).

curl

curl -s \
  "$API/v1/reports?limit=1" \
  -H "authorization: Bearer $KEY"
Copied

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 } },
});
Copied

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

  1. Variant 1: object

    • kind string required one of statement
    • account_id string required
    • from string required
    • to string required
    • format string optional
  2. Variant 2: object

    • kind string required one of transfers
    • from string required
    • to string required
    • transfer_kind string optional
    • status string optional
    • format string optional

Responses

202 Default Response

object

  • object string required one of report
  • id string required
  • kind string required one of statement, transfers
  • status string required one of queued, running, completed, failed
  • parameters object required
  • progress object required
    • rows_done integer required
  • row_count integer required (nullable)
  • content_sha256 string required (nullable)
  • failure_reason string required (nullable)
  • created_at string required
  • completed_at string required (nullable)
  • download_url string required (nullable)
  • version integer 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>"}'
Copied

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>"
  },
});
Copied

GET /v1/reports/{id}

Parameters

  • id string required in path

Responses

200 Default Response

object

  • object string required one of report
  • id string required
  • kind string required one of statement, transfers
  • status string required one of queued, running, completed, failed
  • parameters object required
  • progress object required
    • rows_done integer required
  • row_count integer required (nullable)
  • content_sha256 string required (nullable)
  • failure_reason string required (nullable)
  • created_at string required
  • completed_at string required (nullable)
  • download_url string required (nullable)
  • version integer required

Errors are RFC 9457 problem documents (application/problem+json).

curl

curl -s \
  "$API/v1/reports/$ID" \
  -H "authorization: Bearer $KEY"
Copied

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>" } },
});
Copied

GET /v1/reports/{id}/download

Parameters

  • id string 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"
Copied

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>" } },
});
Copied

Edit on GitHub