Skip to content

Stock by product

GET
/v1/stock-report-table
curl --request GET \
--url 'https://api-admin.billz.ai/v1/stock-report-table?report_date=2023-01-01&shop_ids=fbfb9d6c-cbb2-43ab-8c90-e97d2eeb34d6%2C92302dfb-fa33-4e6a-8d19-87214852b25d&page=1&limit=10&currency=UZS' \
--header 'Authorization: Bearer <token>' \
--header 'platform-id: 7d4a4c38-dd84-4902-b744-0488b80a4c01'

Error codes: 400 — input validation error; 404 — object not found; 401, 403, 429, 500 — shared by all methods. Body formats and semantics: Response codes and errors.

report_date
string

Date for which the stock is needed (as of end of day); invalid format — 400

Example
2023-01-01
shop_ids
required
Array<string>

Each element must be a UUID, otherwise 400

Example
[
"fbfb9d6c-cbb2-43ab-8c90-e97d2eeb34d6",
"92302dfb-fa33-4e6a-8d19-87214852b25d"
]
page
integer format: int32
default: 1

A non-numeric value silently yields 1

Example
1
limit
integer format: int32
default: 10

A non-numeric value silently yields 10

Example
10
currency
string

Currency of report amounts

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

Platform identifier. A static value is used for integrations.

Successful response

Media typeapplication/json
object
rows
Array<object>
object
shop_id
string
shop_name
string
product_id
string
supplier_id
string
supplier_name
string
supply_price
number
retail_price
number
measurement_value
number
last_import
string
estimated_income
number
estimated_margin
number
rows_count
integer
product_name
string
product_base_name
string
product_barcode
string
product_brand_name
string
product_categories
Array<object>
object
id
string
name
string
parent_id
string
company_id
string
level_number
integer
deleted_at
integer
categories_path
Array<string>
level_1
Array<string>
level_2
Array<string>
level_3
Array<string>
level_4
Array<string>
level_5
Array<string>
product_sku
string
product_attributes
Array<object>
object
product_custom_fields
Array<object>
object
custom_field_name
string
custom_field_id
string
custom_field_value
string
product_measurement_unit_short_name
string
product_is_archived
boolean
count
integer format: int32
Examplegenerated
{
"rows": [
{
"shop_id": "example",
"shop_name": "example",
"product_id": "example",
"supplier_id": "example",
"supplier_name": "example",
"supply_price": 1,
"retail_price": 1,
"measurement_value": 1,
"last_import": "example",
"estimated_income": 1,
"estimated_margin": 1,
"rows_count": 1,
"product_name": "example",
"product_base_name": "example",
"product_barcode": "example",
"product_brand_name": "example",
"product_categories": [
{
"id": "example",
"name": "example",
"parent_id": "example",
"company_id": "example",
"level_number": 1,
"deleted_at": 1
}
],
"categories_path": [
"example"
],
"level_1": [
"example"
],
"level_2": [
"example"
],
"level_3": [
"example"
],
"level_4": [
"example"
],
"level_5": [
"example"
],
"product_sku": "example",
"product_attributes": [
{}
],
"product_custom_fields": [
{
"custom_field_name": "example",
"custom_field_id": "example",
"custom_field_value": "example"
}
],
"product_measurement_unit_short_name": "example",
"product_is_archived": true
}
],
"count": 1
}