Knox Docs Sign in

API reference

Test mode. Use your secret key on your server; live processing is currently disabled.

https://api.knoxapi.com

Send form-encoded requests with Authorization: Bearer sk_test_....

Complete OpenAPI specification · Integration guide

Operations and schemas are based on the pinned Stripe OpenAPI specification (MIT). Nested object definitions and enums are available in the complete specification.

GET /v1/reporting/report_runs

List all Report Runs

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

Request parameters

ParameterLocationTypeDescription
createdqueryone of multiple schemasOnly return Report Runs that were created during the given date interval.
ending_beforequerystringA 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.
expandqueryarray of stringSpecifies which fields in the response should be expanded.
limitqueryintegerA limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
starting_afterquerystringA 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.

object. See the OpenAPI specification for the complete schema.

Responses

HTTP 200: Successful response.
FieldTypeDescription
data requiredarray of reporting.report_run
has_more requiredbooleanTrue if this list has another page of items after this one that can be fetched.
object requiredstringString representing the object's type. Objects of the same type share the same value. Always has the value `list`.
url requiredstringThe URL where this list can be accessed.
HTTP default: Error response.
FieldTypeDescription
error requiredapi_errors
POST /v1/reporting/report_runs

Create a Report Run

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

Request parameters

FieldTypeDescription
expandarray of stringSpecifies which fields in the response should be expanded.
parametersobjectParameters specifying how the report should be run. Different Report Types have different required and optional parameters, listed in the [API Access to Reports](https://docs.stripe.com/reporting/statements/api) documentation.
report_type requiredstringThe ID of the [report type](https://docs.stripe.com/reporting/statements/api#report-types) to run, such as `"balance.summary.1"`.

Responses

HTTP 200: Successful response.
FieldTypeDescription
created requiredintegerTime at which the object was created. Measured in seconds since the Unix epoch.
errorstringIf something should go wrong during the run, a message about the failure (populated when `status=failed`).
id requiredstringUnique identifier for the object.
livemode requiredboolean`true` if the report is run on live mode data and `false` if it is run on test mode data.
object requiredstringString representing the object's type. Objects of the same type share the same value.
parameters requiredfinancial_reporting_finance_report_run_run_parameters
report_type requiredstringThe ID of the [report type](https://docs.stripe.com/reports/report-types) to run, such as `"balance.summary.1"`.
resultone of multiple schemasThe file object representing the result of the report run (populated when `status=succeeded`).
status requiredstringStatus of this report run. This will be `pending` when the run is initially created. When the run finishes, this will be set to `succeeded` and the `result` field will be populated. Rarely, we may encounter an error, at which point this will be set to `failed` and the `error` field will be populated.
succeeded_atintegerTimestamp at which this run successfully finished (populated when `status=succeeded`). Measured in seconds since the Unix epoch.
HTTP default: Error response.
FieldTypeDescription
error requiredapi_errors
GET /v1/reporting/report_types

List all Report Types

Returns a full list of Report Types.

Request parameters

ParameterLocationTypeDescription
expandqueryarray of stringSpecifies which fields in the response should be expanded.

object. See the OpenAPI specification for the complete schema.

Responses

HTTP 200: Successful response.
FieldTypeDescription
data requiredarray of reporting.report_type
has_more requiredbooleanTrue if this list has another page of items after this one that can be fetched.
object requiredstringString representing the object's type. Objects of the same type share the same value. Always has the value `list`.
url requiredstringThe URL where this list can be accessed.
HTTP default: Error response.
FieldTypeDescription
error requiredapi_errors
GET /v1/reporting/report_runs/{report_run}

Retrieve a Report Run

Retrieves the details of an existing Report Run.

Request parameters

ParameterLocationTypeDescription
expandqueryarray of stringSpecifies which fields in the response should be expanded.
report_runpathstring

object. See the OpenAPI specification for the complete schema.

Responses

HTTP 200: Successful response.
FieldTypeDescription
created requiredintegerTime at which the object was created. Measured in seconds since the Unix epoch.
errorstringIf something should go wrong during the run, a message about the failure (populated when `status=failed`).
id requiredstringUnique identifier for the object.
livemode requiredboolean`true` if the report is run on live mode data and `false` if it is run on test mode data.
object requiredstringString representing the object's type. Objects of the same type share the same value.
parameters requiredfinancial_reporting_finance_report_run_run_parameters
report_type requiredstringThe ID of the [report type](https://docs.stripe.com/reports/report-types) to run, such as `"balance.summary.1"`.
resultone of multiple schemasThe file object representing the result of the report run (populated when `status=succeeded`).
status requiredstringStatus of this report run. This will be `pending` when the run is initially created. When the run finishes, this will be set to `succeeded` and the `result` field will be populated. Rarely, we may encounter an error, at which point this will be set to `failed` and the `error` field will be populated.
succeeded_atintegerTimestamp at which this run successfully finished (populated when `status=succeeded`). Measured in seconds since the Unix epoch.
HTTP default: Error response.
FieldTypeDescription
error requiredapi_errors
GET /v1/reporting/report_types/{report_type}

Retrieve a Report Type

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

Request parameters

ParameterLocationTypeDescription
expandqueryarray of stringSpecifies which fields in the response should be expanded.
report_typepathstring

object. See the OpenAPI specification for the complete schema.

Responses

HTTP 200: Successful response.
FieldTypeDescription
data_available_end requiredintegerMost recent time for which this Report Type is available. Measured in seconds since the Unix epoch.
data_available_start requiredintegerEarliest time for which this Report Type is available. Measured in seconds since the Unix epoch.
default_columnsarray of stringList of column names that are included by default when this Report Type gets run. (If the Report Type doesn't support the `columns` parameter, this will be null.)
id requiredstringThe [ID of the Report Type](https://docs.stripe.com/reporting/statements/api#available-report-types), such as `balance.summary.1`.
livemode requiredbooleanIf the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
name requiredstringHuman-readable name of the Report Type
object requiredstringString representing the object's type. Objects of the same type share the same value.
updated requiredintegerWhen this Report Type was latest updated. Measured in seconds since the Unix epoch.
version requiredintegerVersion of the Report Type. Different versions report with the same ID will have the same purpose, but may take different run parameters or have different result schemas.
HTTP default: Error response.
FieldTypeDescription
error requiredapi_errors