API reference

Reporting

Knox answers these operations with the same requests and responses as Stripe's API. Authenticate with your secret key, Authorization: Bearer sk_test_..., from your server, and send form-encoded bodies. Test mode only: live processing is currently disabled.

Create a Report Run

POST/v1/reporting/report_runs

Creates a new object and begin running the report. (Certain report types require a live-mode API key.)

Body parameters

  • report_typestringRequired

    The ID of the report type to run, such as "balance.summary.1".

  • expandarray of strings

    Specifies which fields in the response should be expanded.

  • parametersobject

    Parameters specifying how the report should be run. Different Report Types have different required and optional parameters, listed in the API Access to Reports documentation.

    Show 8 child parameters
    • columnsarray of strings
    • connected_accountstring
    • currencystring
    • interval_endinteger
    • interval_startinteger
    • payoutstring
    • reporting_categorystring
      Possible values
      • advance
      • advance_funding
      • anticipation_repayment
      • charge
      • charge_failure
      • climate_order_purchase
      • climate_order_refund
      • connect_collection_transfer
      • connect_reserved_funds
      • contribution
      • dispute
      • dispute_reversal
      • fee
      • financing_paydown
      • financing_paydown_reversal
      • financing_payout
      • and 21 more
    • timezonestring
      Possible values
      • Africa/Abidjan
      • Africa/Accra
      • Africa/Addis_Ababa
      • Africa/Algiers
      • Africa/Asmara
      • Africa/Asmera
      • Africa/Bamako
      • Africa/Bangui
      • Africa/Banjul
      • Africa/Bissau
      • Africa/Blantyre
      • Africa/Brazzaville
      • Africa/Bujumbura
      • Africa/Cairo
      • Africa/Casablanca
      • Africa/Ceuta
      • and 583 more

Returns

The reporting.report_run object.

POST /v1/reporting/report_runs
curl https://api.knoxapi.com/v1/reporting/report_runs \
  -H "Authorization: Bearer $KNOX_SECRET_KEY" \
  -d report_type=balance.summary.1
Response
{
  "created": 1234567890,
  "error": null,
  "id": "frr_1Pgc79B7WZ01zgkWMmsefTsj",
  "livemode": true,
  "object": "reporting.report_run",
  "parameters": {
    "interval_end": 1525132800,
    "interval_start": 1522540800
  },
  "report_type": "balance.summary.1",
  "result": {
    "created": 1028554472,
    "expires_at": null,
    "filename": null,
    "id": "obj_123",
    "object": "file",
    "purpose": "dispute_evidence",
    "size": 3530753,
    "title": null,
    "type": null,
    "url": null
  },
  "status": "succeeded",
  "succeeded_at": 1234567890
}

List all Report Runs

GET/v1/reporting/report_runs

Returns a list of Report Runs, with the most recent appearing first.

Query parameters

  • createdobject | integer

    Only return Report Runs that were created during the given date interval.

    Show 4 child parameters
    • gtinteger
    • gteinteger
    • ltinteger
    • lteinteger
  • ending_beforestring

    A cursor for use in pagination. ending_before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_bar, your subsequent call can include ending_before=obj_bar in order to fetch the previous page of the list.

  • expandarray of strings

    Specifies which fields in the response should be expanded.

  • limitinteger

    A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

  • starting_afterstring

    A cursor for use in pagination. starting_after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include starting_after=obj_foo in order to fetch the next page of the list.

Returns

A list of reporting.report_run objects.

GET /v1/reporting/report_runs
curl -G https://api.knoxapi.com/v1/reporting/report_runs \
  -H "Authorization: Bearer $KNOX_SECRET_KEY" \
  --data-urlencode limit=3
Response
{
  "object": "list",
  "url": "/v1/reporting/report_runs",
  "has_more": false,
  "data": [
    {
      "created": 1234567890,
      "error": null,
      "id": "frr_1Pgc79B7WZ01zgkWMmsefTsj",
      "livemode": true,
      "object": "reporting.report_run",
      "parameters": {
        "interval_end": 1525132800,
        "interval_start": 1522540800
      },
      "report_type": "balance.summary.1",
      "result": {
        "created": 1028554472,
        "expires_at": null,
        "filename": null,
        "id": "obj_123",
        "object": "file",
        "purpose": "dispute_evidence",
        "size": 3530753,
        "title": null,
        "type": null,
        "url": null
      },
      "status": "succeeded",
      "succeeded_at": 1234567890
    }
  ]
}

List all Report Types

GET/v1/reporting/report_types

Returns a full list of Report Types.

Query parameters

  • expandarray of strings

    Specifies which fields in the response should be expanded.

Returns

A list of reporting.report_type objects.

GET /v1/reporting/report_types
curl https://api.knoxapi.com/v1/reporting/report_types \
  -H "Authorization: Bearer $KNOX_SECRET_KEY"
Response
{
  "object": "list",
  "url": "/v1/reporting/report_types",
  "has_more": false,
  "data": [
    {
      "data_available_end": 1234567890,
      "data_available_start": 1234567890,
      "default_columns": [
        "category",
        "currency",
        "description",
        "net_amount"
      ],
      "id": "balance.summary.1",
      "livemode": true,
      "name": "Balance summary",
      "object": "reporting.report_type",
      "updated": 1234567890,
      "version": 1
    }
  ]
}

Retrieve a Report Run

GET/v1/reporting/report_runs/{report_run}

Retrieves the details of an existing Report Run.

Path parameters

  • report_runstringRequired

Query parameters

  • expandarray of strings

    Specifies which fields in the response should be expanded.

Returns

The reporting.report_run object.

GET /v1/reporting/report_runs/{report_run}
curl https://api.knoxapi.com/v1/reporting/report_runs/frr_1Pgc79B7WZ01zgkWMmsefTsj \
  -H "Authorization: Bearer $KNOX_SECRET_KEY"
Response
{
  "created": 1234567890,
  "error": null,
  "id": "frr_1Pgc79B7WZ01zgkWMmsefTsj",
  "livemode": true,
  "object": "reporting.report_run",
  "parameters": {
    "interval_end": 1525132800,
    "interval_start": 1522540800
  },
  "report_type": "balance.summary.1",
  "result": {
    "created": 1028554472,
    "expires_at": null,
    "filename": null,
    "id": "obj_123",
    "object": "file",
    "purpose": "dispute_evidence",
    "size": 3530753,
    "title": null,
    "type": null,
    "url": null
  },
  "status": "succeeded",
  "succeeded_at": 1234567890
}

Retrieve a Report Type

GET/v1/reporting/report_types/{report_type}

Retrieves the details of a Report Type. (Certain report types require a live-mode API key.)

Path parameters

  • report_typestringRequired

Query parameters

  • expandarray of strings

    Specifies which fields in the response should be expanded.

Returns

The reporting.report_type object.

GET /v1/reporting/report_types/{report_type}
curl https://api.knoxapi.com/v1/reporting/report_types/balance.summary.1 \
  -H "Authorization: Bearer $KNOX_SECRET_KEY"
Response
{
  "data_available_end": 1234567890,
  "data_available_start": 1234567890,
  "default_columns": [
    "category",
    "currency",
    "description",
    "net_amount"
  ],
  "id": "balance.summary.1",
  "livemode": true,
  "name": "Balance summary",
  "object": "reporting.report_type",
  "updated": 1234567890,
  "version": 1
}

Operations and schemas come from the pinned Stripe OpenAPI specification (MIT); response examples from its fixtures. Nested object definitions and enums are in the complete specification.