Kontentga o'tish

Chekni qayta hisoblash

POST
/v1/recalculate-order-bill/{order_id}
curl --request POST \
--url https://api-admin.billz.ai/v1/recalculate-order-bill/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \
--header 'Authorization: Bearer <token>' \
--header 'platform-id: 7d4a4c38-dd84-4902-b744-0488b80a4c01'

Xato kodlari: 400 — kiruvchi ma’lumotlar validatsiya xatosi; 404 — obyekt topilmadi; 401, 403, 429, 500 — barcha metodlar uchun umumiy. Tana formatlari va semantikasi: Javob kodlari va xatolar.

order_id
required
string format: uuid

Yo’ldan olinadi; yaroqli UUID bo’lishi kerak, aks holda 400

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

Platforma identifikatori. Integratsiyalar uchun statik qiymat ishlatiladi.

Muvaffaqiyatli javob

Media typeapplication/json
object
order_id

Sotuv id si

string
discount_unit

Chegirma turi

string
discount_value

Chegirma

number format: double
customer

Mijoz

object
id
string
items

Chek pozitsiyalari

Array<object>
object
id
string
product_id
string
measurement_value
number
returned_measurement_value
number
price
number
total_price
number
product
object
id
string
name
string
barcode
string
additional_barcodes
Array<object>
object
sku
string
base_name
string
amount
number
gift_card_id
integer
gift_card_use_type
string
measurement_unit
object
id
string
name
string
company_id
string
short_name
string
precision
string
is_default
boolean
custom_fields
Array<object>
nullable
object
is_marked
boolean
free_price
boolean
brand_name
string
categories
Array<object>
nullable
object
shop_free_prices
Array<object>
nullable
object
has_manual_discount
boolean
used_wholesale_price
boolean
discount_value
integer
discount_unit
string
discount_percent
integer
free_price
boolean
marking_codes
Array<string>
nullable
marking_code_infos
Array<object>
nullable
object
left_measurement_value
number
sale_price_without_rounding
number
rounding_applied
boolean
search_result

Odatda null

Array<string>
nullable
left_measurement_value

Qoldiq

object
product_id
string
left_measurement_value
number
returned_cashback

Qaytarilgan keshbek

number format: double
total_price

Jami

number format: double
is_postponed

Kechiktirish

boolean
promo_codes

Promokodlar

Array<string>
nullable
free_price

Erkin narx

boolean
order_version

Buyurtma versiyasi

integer format: int32
order_bill_version

Chek versiyasi

integer format: int32
is_calculated

Qayta hisoblanganlik belgisi

boolean
discount_reset
boolean
Examplegenerated
{
"order_id": "example",
"discount_unit": "example",
"discount_value": 1,
"customer": {
"id": "example"
},
"items": [
{
"id": "example",
"product_id": "example",
"measurement_value": 1,
"returned_measurement_value": 1,
"price": 1,
"total_price": 1,
"product": {
"id": "example",
"name": "example",
"barcode": "example",
"additional_barcodes": [
{}
],
"sku": "example",
"base_name": "example",
"amount": 1,
"gift_card_id": 1,
"gift_card_use_type": "example",
"measurement_unit": {
"id": "example",
"name": "example",
"company_id": "example",
"short_name": "example",
"precision": "example",
"is_default": true
},
"custom_fields": [
{}
],
"is_marked": true,
"free_price": true,
"brand_name": "example",
"categories": [
{}
],
"shop_free_prices": [
{}
]
},
"has_manual_discount": true,
"used_wholesale_price": true,
"discount_value": 1,
"discount_unit": "example",
"discount_percent": 1,
"free_price": true,
"marking_codes": [
"example"
],
"marking_code_infos": [
{}
],
"left_measurement_value": 1,
"sale_price_without_rounding": 1,
"rounding_applied": true
}
],
"search_result": [
"example"
],
"left_measurement_value": {
"product_id": "example",
"left_measurement_value": 1
},
"returned_cashback": 1,
"total_price": 1,
"is_postponed": true,
"promo_codes": [
"example"
],
"free_price": true,
"order_version": 1,
"order_bill_version": 1,
"is_calculated": true,
"discount_reset": true
}