Insight API (LATEST)

Download OpenAPI specification:Download

API Integration Support: integration@dintero.com License: UNLICENSED

Changelog

All notable changes to the API.

2024-05-31

Add missing response type "Conflict"

2024-05-01

Add support for generating Wallets transactions reports and manage Wallets transaction report configuration

2022-12-13

Extend the reportFilters parameter to support filtering on payout_destination_id for checkout/transactions

2022-08-01

Extend the aggregate_functions query parameter to support currency

2022-05-30

Updates made to the endpoint - GET /v1/accounts/{aid}/insight/report/configuration

  • Added new type of report configuration for checkout transactions, allowing reports showing open transactions
  • Added daily schedule option to existing insight transactions report

2022-05-13

Updated the endpoint - GET /v1/accounts/{aid}/insight/kpi/checkout Added new input param event_created_at_gte to filter the period to create kpis from.

2022-05-01

Change base path for the API to /v1/accounts/{aid}/insight/. The original prefix /v1/accounts/{aid}/insight-service/ is deprecated.

2022-03-07

Added endpoint for fecthing kpis from checkout data \

2021-12-01

Updated Report configuration with the following fields \

  • Name (custom report name)
  • Emails (will be used by the reports api to send email containing the final report)
  • Language
  • ReportFilters
  • Added discriminator field to ensure valid report configuration input

2021-06-29

Initial version

Generate report

Generate reports from parameters

Generate report from reportparams

Create a report from the report params, this bypasses the normal schedule report setup and triggers report generation instantly

The "from" and "to" parameters needs to be populated with values matching the provided schedule

NB! For internal use only!

scopes:

  • admin:insight
  • write:insight
scopes: ["admin:insight","write:insight"]
Authorizations:
JWT
path Parameters
aid
required
string <^[PT]{1}\d{8}$> = 9 characters

An id that uniquely identifies the account.

Request Body schema: application/json
required

Insight Report Params

name
required
string <= 64 characters

Custom name of the report. Will be shown in report listing and in the report filename

from
required
string <date-time>

The start of the data interval, must adhere to ISO 8601 dateformat (YYYY-MM-DD)

to
required
string <date-time>

The end of the data interval, must adhere to ISO 8601 dateformat (YYYY-MM-DD)

dataType
required
string

Service (source) and type of data used to create the report

language
required
string
Enum: "no" "en"

Report Language

schedule
required
string
Enum: "monthly" "weekly" "daily"

Schedule for the report, how often will the report be generated

emails
Array of strings

Emails will receive auto-generated report (or link to report if the report is to large)

Array of objects (InsightTransactionReportFilter)

List of filters used to filter the data for the report. Similar to SQL WHERE-clause. i.e, WHERE filter=value

contentType
string
Enum: "application/pdf" "text/csv"

Content type for the report

Responses

Request samples

Content type
application/json
Example
{
  • "dataType": "checkout/transactions",
  • "name": "string",
  • "emails": [
    ],
  • "from": "2019-08-24T14:15:22Z",
  • "to": "2019-08-24T14:15:22Z",
  • "schedule": "monthly",
  • "language": "no",
  • "reportFilters": [
    ],
  • "contentType": "application/pdf"
}

Response samples

Content type
application/json
Example
{
  • "dataType": "checkout/transactions",
  • "name": "string",
  • "emails": [
    ],
  • "from": "2019-08-24T14:15:22Z",
  • "to": "2019-08-24T14:15:22Z",
  • "schedule": "monthly",
  • "language": "no",
  • "reportFilters": [
    ],
  • "contentType": "application/pdf"
}

KPI

Get KPI data

List checkout kpis

Get a list of kpis where the transactiosn used is in the aggregations are transactions from "event_created_at_gte", until now. However, transactions from the "current" interval are not included.
E.g if week is provided as interval, then no transactions from the current week are included. This is true for day and month intervals aswell.

Scopes:

  • read:insight
  • admin:insight
scopes: ["read:insight","admin:insight"]
Authorizations:
JWT
path Parameters
aid
required
string <^[PT]{1}\d{8}$> = 9 characters

An id that uniquely identifies the account.

query Parameters
interval
required
string
Enum: "day" "week" "month"

The interval over which the data will be aggregated.

field
required
string
Value: "total_amount"

The field (db column) used as source for the kpi, eg, total_amount, vat etc.

transaction_status
required
string
Enum: "CAPTURED" "REFUNDED" "AUTHORIZED"

Only transactions with this status will be included in the aggregation

aggregate_functions
required
string
Example: aggregate_functions=["count","sum","avg","currency"]

The functions applied to the data for every interval.

  • The functions should be provided as a stringified array
  • At least one function must be provided, currency must be combined with another function

Available functions:

  • sum
  • avg
  • count
  • currency
event_created_at_gte
string

Transaction events with created_at date at or later than this date will be included in the aggregations.
If this date parameter is not included, all transactions regardless of creation date are included.
NB! This is not the transactions created_at date, this is the date the event was created (e.g AUTHORIZE, CAPTURE etc..)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Report configuration

Manage report configurations

List insight configurations

List all insight report configurations for the account.

scopes:

  • read:insight
  • admin:insight
scopes: ["read:insight","admin:insight"]
Authorizations:
JWT
path Parameters
aid
required
string <^[PT]{1}\d{8}$> = 9 characters

An id that uniquely identifies the account.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create new insight report configuration

Create a new report configuration

scopes:

  • write:insight
  • admin:insight
scopes: ["write:insight","admin:insight"]
Authorizations:
JWT
path Parameters
aid
required
string <^[PT]{1}\d{8}$> = 9 characters

An id that uniquely identifies the account.

Request Body schema: application/json
required

Insight Report Configuration

name
required
string <= 64 characters

Custom name of the report. Will be shown in report listing and in the report filename

dataType
required
string

Service (source) and type of data used to create the report

language
required
string
Enum: "no" "en"

Report Language

schedule
required
string
Enum: "monthly" "weekly" "daily"

Schedule for the report, how often will the report be generated

emails
Array of strings

Emails will receive auto-generated report (or link to report if the report is to large)

Array of objects (InsightTransactionReportFilter)

List of filters used to filter the data for the report. Similar to SQL WHERE-clause. i.e, WHERE filter=value

contentTypes
Array of strings
Items Enum: "application/pdf" "text/csv"

Content types for the report

Responses

Request samples

Content type
application/json
Example
{
  • "dataType": "checkout/transactions",
  • "name": "string",
  • "emails": [
    ],
  • "schedule": "monthly",
  • "language": "no",
  • "reportFilters": [
    ],
  • "contentTypes": [
    ]
}

Response samples

Content type
application/json
Example
{
  • "dataType": "checkout/transactions",
  • "name": "string",
  • "emails": [
    ],
  • "schedule": "monthly",
  • "language": "no",
  • "reportFilters": [
    ],
  • "contentTypes": [
    ]
}

Delete insight report configuration

Delete insight report configuration.

scopes:

  • write:insight
  • admin:insight
scopes: ["admin:insight","write:insight"]
Authorizations:
JWT
path Parameters
aid
required
string <^[PT]{1}\d{8}$> = 9 characters

An id that uniquely identifies the account.

id
required
string

An id that uniquely identifies the insight report configuration.

Responses

Response samples

Content type
application/json
Example
{
  • "dataType": "checkout/transactions",
  • "name": "string",
  • "emails": [
    ],
  • "schedule": "monthly",
  • "language": "no",
  • "reportFilters": [
    ],
  • "contentTypes": [
    ]
}