Retrieve a journal report

Retrieves a journal report which displays revenue for each account.

A revenue journal is a detailed revenue waterfall report that describes revenue which is recognized at a certain month, aggregated by product ID, product accounting code, or plan ID. It contains information on booked revenue, recognized revenue for the aggregation field in the booked period, and the remaining revenue up to the selected month.

SecuritySecretApiKey or JWT
Request
query Parameters
currency
required
string (CurrencyCode) = 3 characters

Revenue currency.

Example: currency=USD
recognizedAt
required
string^\d{4}-\d{2}$

Year and month when revenue is recognized.

Example: recognizedAt=2022-04
aggregationField
required
string

Report aggregation field.

Enum: "product.accountingCode" "product.id" "plan.id"
bookedFrom
string^\d{4}-\d{2}$

Year and month from which revenue is booked. If this value is omitted, booked revenue is recorded from the first booked amount.

Example: bookedFrom=2022-01
bookedTo
string^\d{4}-\d{2}$

Year and month in which revenue is booked until. If this value is omitted, booked revenue is recorded until the most recently booked amount.

Example: bookedTo=2022-01
limit
integer [ 0 .. 1000 ]

Limits the number of collection items to be returned.

offset
integer >= 0

Specifies the starting point within the collection of items to be returned.

filter
string

Filters the collection items. This field requires a special format. Use , for multiple allowed values. Use ; for multiple fields.

For more information, see Using filter with collections.

Responses
200

Report retrieved.

Response Headers
Pagination-Total
integer

Total number of items.

Example: 332
Pagination-Limit
integer

Maximum number of items per page.

Example: 100
Pagination-Offset
integer

Specifies the starting point within the collection of resource results. For example, a request with limit=20 retrieves and displays the first 20 results on a page. A following request with limit=20 and offset=20, retrieves the next page of 20 results.

Example: 2
Response Schema: application/json
aggregationField
string

Report data grouped by aggregation field.

Enum: "product.accountingCode" "product.id" "plan.id"
currency
string (CurrencyCode) = 3 characters

Currency code in ISO 4217 format.

bookedFrom
string^\d{4}-\d{2}$

Year and month when revenue is booked. If this value is omitted, booked revenue is recorded from the first booked amount.

bookedTo
string^\d{4}-\d{2}$

Year and month when revenue is booked until. If this value is omitted, booked revenue is recorded until the most recently booked amount.

recognizedAt
string^\d{4}-\d{2}$

Year and month when revenue is recognized.

Array of objects

Revenue data.

Array
aggregationValue
string

Aggregation field value.

bookedMonth
string^\d{4}-\d{2}$

Month when revenue is booked.

bookedAmount
number <double>

Revenue amount which is booked for recognition.

recognizedAmount
number <double>

Amount of recognized revenue.

remainingAmount
number <double>

Remaining revenue amount to be recognized.

401

Unauthorized access. Invalid credentials used.

403

Access forbidden.

get/experimental/reports/journal
Request samples
const params = {
    currency: 'USD',
    bookedFrom: '2022-01',
    bookedTo: '2022-06',
    recognizedAt: '2022-06',
    aggregationField: 'product.accountingCode',
    limit: 20,
    offset: 0,
    tz: 0
};
const report = await api.reports.getJournal(params);
Response samples
application/json
{
  • "aggregationField": "product.accountingCode",
  • "currency": "USD",
  • "bookedFrom": "2022-01",
  • "bookedTo": "2022-01",
  • "recognizedAt": "2022-01",
  • "data": [
    ]
}