read
finance

Profit and loss by dimension of one entity, as rows of a versioned analytics view.

Changed on

Revenue and expense per period per account per store, channel and project. result_base is credit − debit: revenue positive, expense negative, so its sum is the result. Year-end closing entries are left out. Amounts in *_base columns are in the entity's base currency (base_currency). Rows are keyset-paged on row_id (up to 1000 per page): pass page.next_cursor back as cursor while page.has_more is true; reading every page returns exactly row_count rows. Decimals are decimal strings. Also served as an OData v4 feed at /api/v1/finance/odata/{entity_id}/ (entity set ProfitAndLoss) for Excel, Power BI and any OData client: HTTP Basic with any user name and the API key as the password, or a Bearer token. Answers 403 finance_feature_off until the BI feed is switched on.

post/api/v1/finance/bi/profit-and-loss

Request

  • Base URL
    https://app.magistry.io
  • Auth
    • HTTP bearer
    • or OAuth 2
      Authorization codehttps://app.magistry.io/api/oauth/authorize
      Token URLhttps://app.magistry.io/api/oauth/token
      Scopesfinance:read

Request body

object required
entity_id, string uuid required

The entity, one of those this app was granted (GET /api/v1/finance/entities lists them). In a GET query string entity is accepted too.

cursor, string

The next_cursor of the previous page. Opaque.

limit, integer

Rows per page.

count, boolean

Also return row_count, count(*) of the view for this entity.

Response

Result

object required
ok, boolean required
result, unknown required

Changes

    • warning

      added the new method_not_allowed enum value to the error response property for the response status

    • warning

      added the new method_not_allowed enum value to the error response property for the response status

    • warning

      added the new method_not_allowed enum value to the error response property for the response status

    11 more changes in this revision