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, and the end day is always included in full. If an outlet closed a full count on the start date, that whole day's sales is left out: the count is treated as end-of-day, so the sales of that day belongs to the previous period.

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 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.

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

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