GET
/
api
/
reports
/
sales-by-items

Headers

Authorization
string
required

Value must be 'Bearer <token>' where <token> is an API key prefixed with 'bc_' or a JWT token.

Example:

"Bearer bc_1234567890abcdef"

organization-id
string
required

Required if Authorization is a JWT token. The organization ID to operate within.

accept
string
required

Query Parameters

fromDate
string

Start date for the sales by items report

Example:

"2024-01-01"

toDate
string

End date for the sales by items report

Example:

"2024-01-31"

precision
number

Number of decimal places to display

Example:

2

divideOn1000
boolean

Whether to divide the number by 1000

Example:

false

showZero
boolean

Whether to show zero values

Example:

true

formatMoney
enum<string>

How to format money values

Available options:
total,
always,
none
Example:

"total"

negativeFormat
enum<string>

How to format negative numbers

Available options:
parentheses,
mines
Example:

"parentheses"

noneTransactions
boolean
default:false

Whether to exclude items with no transactions

Example:

false

onlyActive
boolean
default:false

Whether to include only active items

Example:

false

itemsIds
number[]

Array of item IDs to filter the sales report

Example:
[1, 2, 3]

Response

200

Sales by items report