Statistics

Turnover over a period, bucketed, optionally compared against the same period in previous years

Changed on
get/v1/statistics/turnoverevolution

Request

Query parameters

fromstring date

First day of the period. Combined with to, takes precedence over year.

tostring date

Last day of the period, included

yearinteger

Shorthand for a whole calendar year (defaults to the current one). Ignored when a range is given.

periodicity'Daily' | 'Weekly' | 'Monthly' | 'Quarterly' | 'Annually'

Bucket size: Daily, Weekly, Monthly (default), Quarterly or Annually

compareinteger

Number of previous periods to return alongside, each one calendar year further back (0–2, defaults to 0)

type'Sales' | 'Expenses' | 'Customer' | 'Supplier' | 'Product' | 'Colleague' | 'Margin' | 'Discount'

Dimension used to break down turnover evolution

Dimension to break down by

cumulativeboolean

Return running totals instead of per-bucket values

customerIdinteger

Filter by customer ID

supplierIdinteger

Filter by supplier ID

colleagueIdinteger

Filter by colleague ID

productIdinteger

Filter by product ID

Response

OK

periodicity'Daily' | 'Weekly' | 'Monthly' | 'Quarterly' | 'Annually'

Changes

    • breaking

      the response's body type changed from array to object for status (media type: text/plain)

    • breaking

      the response's body type changed from array to object for status (media type: application/json)

    • breaking

      the response's body type changed from array to object for status (media type: text/json)

    • warning

      deleted the query request parameter years

    • info

      added the new optional query request parameter compare

    • info

      added the new optional query request parameter from

    • info

      added the new optional query request parameter periodicity

    • info

      added the new optional query request parameter to

    • info

      added the new enum value Discount to the query request parameter type

    • info

      added the new enum value Margin to the query request parameter type

    • info

      added the optional property to the response with the status (media type: text/plain)

    • info

      added the optional property to the response with the status (media type: application/json)

    • info

      added the optional property to the response with the status (media type: text/json)

    • info

      added the optional property to the response with the status (media type: text/plain)

    • info

      added the optional property to the response with the status (media type: application/json)

    • info

      added the optional property to the response with the status (media type: text/json)

    • info

      added the optional property to the response with the status (media type: text/plain)

    • info

      added the optional property to the response with the status (media type: application/json)

    • info

      added the optional property to the response with the status (media type: text/json)