Sale settings
INFO
Каждый ответ приходит в общем конверте — code, message, messages, status_code, time — а полезная нагрузка лежит в data. Таблицы ниже описывают содержимое data.
GET /sale-settings/get
Get all sale-settings
Нужное разрешение: нет — закрыто для приложения, объявившего разрешения · как работают разрешения
Пример запроса
bash
curl -X GET 'https://api.bito.uz/integration-api/integration/api/v2/sale-settings/get' \
-H "api-key: $BITO_API_KEY"js
const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/sale-settings/get', {
method: 'GET',
headers: { 'api-key': process.env.BITO_API_KEY },
})
const { code, data } = await res.json()python
import os
import requests
res = requests.request(
"GET",
"https://api.bito.uz/integration-api/integration/api/v2/sale-settings/get",
headers={"api-key": os.environ["BITO_API_KEY"]},
)
print(res.json())php
<?php
$ch = curl_init('https://api.bito.uz/integration-api/integration/api/v2/sale-settings/get');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => ['api-key: ' . getenv('BITO_API_KEY')],
CURLOPT_RETURNTRANSFER => true,
]);
$response = json_decode(curl_exec($ch), true);Тело запроса
Тело запроса не требуется.
Ответ
| Поле | Тип | Описание |
|---|---|---|
booking_product_in_order | boolean | По умолчанию: false |
sell_product_in_negative | boolean | По умолчанию: false |
calc_tax_after_discount | boolean | По умолчанию: false |
past_date_sell | boolean | По умолчанию: true |
max_day_past_date_sell | number | |
calc_sale_discount_after_product | boolean | По умолчанию: true |
is_tax_active | boolean | По умолчанию: false |
is_cashback_active | boolean | По умолчанию: false |
trade_state | string | Допустимые значения: new, draft, done, cancelled, in_progress. По умолчанию: "new" |
show_gross_weight | boolean | По умолчанию: false |
show_netto_weight | boolean | По умолчанию: false |
debt_approve_by_boss | boolean | По умолчанию: false |
discount_approve_by_boss | boolean | По умолчанию: false |
on_revision | string | Допустимые значения: warning, error. По умолчанию: "warning" |
discount | object | |
discount.is_enabled | boolean | По умолчанию: false |
discount.limit_by_percent | number | По умолчанию: 0 |
json
{
"code": 0,
"message": "Success",
"status_code": 200,
"data": {
"booking_product_in_order": false,
"sell_product_in_negative": false,
"calc_tax_after_discount": false,
"past_date_sell": true,
"max_day_past_date_sell": 0,
"calc_sale_discount_after_product": true,
"is_tax_active": false,
"is_cashback_active": false,
"trade_state": "new",
"show_gross_weight": false,
"show_netto_weight": false,
"debt_approve_by_boss": false,
"discount_approve_by_boss": false,
"on_revision": "warning",
"discount": {
"is_enabled": false,
"limit_by_percent": 0
}
},
"time": "2025-05-01T12:00:00Z"
}PUT /sale-settings/set
This method allows updating sale-settings in the account.
Нужное разрешение: нет — закрыто для приложения, объявившего разрешения · как работают разрешения
Пример запроса
bash
curl -X PUT 'https://api.bito.uz/integration-api/integration/api/v2/sale-settings/set' \
-H "api-key: $BITO_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"booking_product_in_order": false,
"sell_product_in_negative": false,
"calc_tax_after_discount": false,
"is_tax_active": false,
"is_cashback_active": false,
"show_gross_weight": false,
"show_netto_weight": false,
"debt_approve_by_boss": false,
"discount_approve_by_boss": false,
"past_date_sell": false,
"max_day_past_date_sell": 0,
"on_revision": "error",
"on_black_list_customer": "allow",
"trade_state": "new",
"discount.is_enabled": false,
"discount.limit_by_percent": 0,
"is_customer_required": false,
"book_by_open_ticket": false,
"multi_currency_receipt": false
}'js
const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/sale-settings/set', {
method: 'PUT',
headers: { 'api-key': process.env.BITO_API_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({
"booking_product_in_order": false,
"sell_product_in_negative": false,
"calc_tax_after_discount": false,
"is_tax_active": false,
"is_cashback_active": false,
"show_gross_weight": false,
"show_netto_weight": false,
"debt_approve_by_boss": false,
"discount_approve_by_boss": false,
"past_date_sell": false,
"max_day_past_date_sell": 0,
"on_revision": "error",
"on_black_list_customer": "allow",
"trade_state": "new",
"discount.is_enabled": false,
"discount.limit_by_percent": 0,
"is_customer_required": false,
"book_by_open_ticket": false,
"multi_currency_receipt": false
}),
})
const { code, data } = await res.json()python
import os
import requests
res = requests.request(
"PUT",
"https://api.bito.uz/integration-api/integration/api/v2/sale-settings/set",
headers={"api-key": os.environ["BITO_API_KEY"]},
json={
"booking_product_in_order": False,
"sell_product_in_negative": False,
"calc_tax_after_discount": False,
"is_tax_active": False,
"is_cashback_active": False,
"show_gross_weight": False,
"show_netto_weight": False,
"debt_approve_by_boss": False,
"discount_approve_by_boss": False,
"past_date_sell": False,
"max_day_past_date_sell": 0,
"on_revision": "error",
"on_black_list_customer": "allow",
"trade_state": "new",
"discount.is_enabled": False,
"discount.limit_by_percent": 0,
"is_customer_required": False,
"book_by_open_ticket": False,
"multi_currency_receipt": False,
},
)
print(res.json())php
<?php
$body = <<<'JSON'
{
"booking_product_in_order": false,
"sell_product_in_negative": false,
"calc_tax_after_discount": false,
"is_tax_active": false,
"is_cashback_active": false,
"show_gross_weight": false,
"show_netto_weight": false,
"debt_approve_by_boss": false,
"discount_approve_by_boss": false,
"past_date_sell": false,
"max_day_past_date_sell": 0,
"on_revision": "error",
"on_black_list_customer": "allow",
"trade_state": "new",
"discount.is_enabled": false,
"discount.limit_by_percent": 0,
"is_customer_required": false,
"book_by_open_ticket": false,
"multi_currency_receipt": false
}
JSON;
$ch = curl_init('https://api.bito.uz/integration-api/integration/api/v2/sale-settings/set');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => ['api-key: ' . getenv('BITO_API_KEY'), 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => $body,
CURLOPT_RETURNTRANSFER => true,
]);
$response = json_decode(curl_exec($ch), true);Тело запроса
| Поле | Тип | Обязательно | Описание |
|---|---|---|---|
booking_product_in_order | boolean | Нет | |
sell_product_in_negative | boolean | Нет | |
calc_tax_after_discount | boolean | Нет | |
is_tax_active | boolean | Нет | |
is_cashback_active | boolean | Нет | |
show_gross_weight | boolean | Нет | |
show_netto_weight | boolean | Нет | |
debt_approve_by_boss | boolean | Нет | |
discount_approve_by_boss | boolean | Нет | |
past_date_sell | boolean | Нет | |
max_day_past_date_sell | number | Нет | |
on_revision | string | Нет | Допустимые значения: error, warning |
on_black_list_customer | string | Нет | Допустимые значения: allow, warning, error |
trade_state | string | Нет | Допустимые значения: new, in_progress, canceled, done |
discount.is_enabled | boolean | Нет | Send this dotted key as is, not inside a nested discount object. |
discount.limit_by_percent | number | Нет | Send this dotted key as is, not inside a nested discount object. |
is_customer_required | boolean | Нет | |
book_by_open_ticket | boolean | Нет | |
multi_currency_receipt | boolean | Нет |
json
{
"booking_product_in_order": false,
"sell_product_in_negative": false,
"calc_tax_after_discount": false,
"is_tax_active": false,
"is_cashback_active": false,
"show_gross_weight": false,
"show_netto_weight": false,
"debt_approve_by_boss": false,
"discount_approve_by_boss": false,
"past_date_sell": false,
"max_day_past_date_sell": 0,
"on_revision": "error",
"on_black_list_customer": "allow",
"trade_state": "new",
"discount.is_enabled": false,
"discount.limit_by_percent": 0,
"is_customer_required": false,
"book_by_open_ticket": false,
"multi_currency_receipt": false
}Ответ
Структура ответа совпадает с GET /sale-settings/get.
Эта страница сгенерирована из спецификации OpenAPI.