Skip to content

Product performance

POST
/v1/report-product-performance-excel
curl --request POST \
--url 'https://api-admin.billz.ai/v1/report-product-performance-excel?Billz-Response-Channel=HTTP' \
--header 'Authorization: Bearer <token>' \
--header 'Billz-Response-Channel: HTTP' \
--header 'Content-Type: application/json' \
--header 'platform-id: 7d4a4c38-dd84-4902-b744-0488b80a4c01' \
--data '{ "shop_ids": [ "2339a738-a67f-48d2-bb60-8cf4ec54d6cd" ], "start_date": "2026-08-01", "end_date": "2026-08-31", "grouping_fields": "attribute.color", "group_id": "9f1c2e3a-5b7d-4c1e-8a2f-3d6b0e4c7a91", "filter": { "skus": [ "SKU-001" ] }, "order_by": "+product_name", "currency": "UZS", "fields": [ "name", "sold_amount", "sold_retail_sum" ] }'

Asynchronous method. The file is built in the background. The Billz-Response-Channel: HTTP header is required: only with it does the response carry a link to the finished file, with a wait of up to 100 seconds. Without the header the response is 200 {"message": "<correlation_id>"}, and the file can no longer be fetched through the API: the link is delivered as a notification to the BILLZ interface.

All movements of every product over the period: opening and closing stock, imports, sales, write-offs, transfers, sales velocity and turnover.

Error codes: 400 — input validation error; 404 — object not found; 408 — timed out waiting for the asynchronous result; 401, 403, 429, 500 — shared by all methods. Body formats and semantics: Response codes and errors.

platform-id
string
default: 7d4a4c38-dd84-4902-b744-0488b80a4c01

Platform identifier. A static value is used for integrations.

Billz-Response-Channel
string
Allowed values: HTTP

HTTP — wait for the event processing result and return it in the HTTP response. Without the header the method returns only the correlation_id of the published event.

Billz-Response-Channel
string
Allowed values: HTTP

Same as the Billz-Response-Channel header — for clients that cannot send a custom header. If both are passed, the header applies.

Media typeapplication/json
object
start_date

Start of the period, YYYY-MM-DD

string
end_date

End of the period, YYYY-MM-DD

string
shop_ids

Shops of the report; intersected with the list of shops available to the token

Array<string>
filter

Filter products by barcode, SKU or name

object
barcodes
Array<string>
skus
Array<string>
names
Array<string>
grouping_fields

Grouping of rows: category, or customField.<suffix>, or attribute.<suffix>

string
group_id

UUID of a custom field or an attribute, if grouping_fields starts with customField. or attribute.

string format: uuid
order_by

Sorting, for example +product_name

string
currency

Currency in which the amounts are shown

string
fields

The file columns in the order they appear. Without fields the file has no data columns; the list of values is in Report export to Excel. Instead of a column name you may pass the UUID of a product attribute or custom field — the column then takes its name and its values from the product cards

Array<string>
Example
{
"shop_ids": [
"2339a738-a67f-48d2-bb60-8cf4ec54d6cd"
],
"start_date": "2026-08-01",
"end_date": "2026-08-31",
"grouping_fields": "attribute.color",
"group_id": "9f1c2e3a-5b7d-4c1e-8a2f-3d6b0e4c7a91",
"filter": {
"skus": [
"SKU-001"
]
},
"order_by": "+product_name",
"currency": "UZS",
"fields": [
"name",
"sold_amount",
"sold_retail_sum"
]
}

Success. With the Billz-Response-Channel: HTTP header — the asynchronous response envelope with a link to the file, without it — {"message": "<correlation_id>"}.

Media typeapplication/json
One of:

Asynchronous response envelope. Returned when the Billz-Response-Channel: HTTP header is passed. The final HTTP code of the request is taken from the status_code field.

object
session_id

Customer session identifier

string format: uuid
status_code

Event processing status (also the final HTTP response code)

integer
error
object
code

Error code, empty string if there is no error

string
message

Error text, empty string if there is no error

string
correlation_id

Request identifier, matches the ID of the published event

string format: uuid
topic

Response event type, for example <event_type>.success

string
data

Operation result, if the method returns one

object
Examplegenerated
{
"session_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"status_code": 1,
"error": {
"code": "example",
"message": "example"
},
"correlation_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"topic": "example",
"data": {}
}