Get Gross Profit Report

Returns gross profit totals across the outlets in the library.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Requires the Sales module or the Inventory module, and Insights Hub access for the user.

For a per-outlet breakdown, use Get Inventory Movement and Get Sales Performance.

Period boundaries

This report combines inventory figures and sales figures, which follow different period rules:

  • Inventory runs per outlet from just after its opening boundary up to and including its closing boundary. A boundary is the finished timestamp of the full count the outlet closed on that date (the latest, if it closed several), or the start_datetime or end_datetime you passed if it closed none.
  • Sales are counted in whole days, so a day on which an outlet closed a full count goes wholly to one period. count_moment decides which:
    • after_closing (default): the count is taken after the day's last sale. A full count on the start date leaves that whole day's sales out, as they belong to the previous period. The end day is always included.
    • before_opening: the count is taken before the day's first sale. The start day is always included. A full count on the end date leaves that whole day's sales out, as they belong to the next period.

theoretical_cost covers the same days as net_sales. actual_cost adds waste and negative variance, which follow the inventory boundaries.

Calendar days are resolved in local time, not UTC. When the report covers a single outlet, that outlet's timezone is used, or the library's if the outlet has none set. Otherwise the library's timezone is used. The offset you send on start_datetime does not change which day a moment falls on.

So with after_closing, for an outlet that counted at 14:00 on the start date, sold_stock_value leaves out only the movements booked before 14:00, while net_sales leaves out the entire day. With before_opening, for an outlet that counted at 08:00 on the end date, the inventory figures stop at 08:00, while net_sales leaves out the entire end day.

Signs

The response mixes two sign conventions, so adding the fields up as they are double-counts what left the outlet:

  • sold_stock_value, created_out_stock_value, transfers_out_value, shipped_out_stock_value and wasted_stock_value are negative, because that stock left the outlet.
  • positive_variance_value and negative_variance_value are both positive, even though a negative variance is a loss. Use net_variance_value for the signed figure.
Query Params
date-time
required

Start of the reporting period, in ISO 8601 format.

date-time
required

End of the reporting period, in ISO 8601 format. Must not be earlier than start_datetime.

string
enum
Defaults to after_closing

When the outlets take their full counts, which decides the period a count day's sales belong to. after_closing: a full count on the start date leaves that day's sales out. before_opening: a full count on the end date leaves that day's sales out. See Period boundaries below.

Allowed:
string

A single outlet ID to report on. Omit to report on every outlet in the library. Unlike the other two reports this takes one ID, not a comma-separated list. An ID that does not exist, or that belongs to another library, returns 404.

Responses

400

A filter is missing or malformed.

403

The library has neither the Sales nor the Inventory module, or the user lacks Insights Hub access.

Language
Credentials
OAuth2
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json