Skip to content
Markdown

Sale settings ​

INFO

Har bir javob umumiy konvertda qaytadi — code, message, messages, status_code, time — foydali yuk esa data ichida. Quyidagi jadvallar faqat data ichini tavsiflaydi.

GET /sale-settings/get ​

Get all sale-settings

Kerakli ruxsat: yo‘q — ruxsat e’lon qilgan ilova uchun yopiq · ruxsatlar qanday ishlaydi

So‘rov namunasi

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);

So‘rov tanasi

So‘rov tanasi talab qilinmaydi.

Javob

MaydonTurTavsif
booking_product_in_orderbooleanStandart: false
sell_product_in_negativebooleanStandart: false
calc_tax_after_discountbooleanStandart: false
past_date_sellbooleanStandart: true
max_day_past_date_sellnumber
calc_sale_discount_after_productbooleanStandart: true
is_tax_activebooleanStandart: false
is_cashback_activebooleanStandart: false
trade_statestringMumkin qiymatlar: new, draft, done, cancelled, in_progress. Standart: "new"
show_gross_weightbooleanStandart: false
show_netto_weightbooleanStandart: false
debt_approve_by_bossbooleanStandart: false
discount_approve_by_bossbooleanStandart: false
on_revisionstringMumkin qiymatlar: warning, error. Standart: "warning"
discountobject
discount.is_enabledbooleanStandart: false
discount.limit_by_percentnumberStandart: 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.

Kerakli ruxsat: yo‘q — ruxsat e’lon qilgan ilova uchun yopiq · ruxsatlar qanday ishlaydi

So‘rov namunasi

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);

So‘rov tanasi

MaydonTurMajburiyTavsif
booking_product_in_orderbooleanYo‘q
sell_product_in_negativebooleanYo‘q
calc_tax_after_discountbooleanYo‘q
is_tax_activebooleanYo‘q
is_cashback_activebooleanYo‘q
show_gross_weightbooleanYo‘q
show_netto_weightbooleanYo‘q
debt_approve_by_bossbooleanYo‘q
discount_approve_by_bossbooleanYo‘q
past_date_sellbooleanYo‘q
max_day_past_date_sellnumberYo‘q
on_revisionstringYo‘qMumkin qiymatlar: error, warning
on_black_list_customerstringYo‘qMumkin qiymatlar: allow, warning, error
trade_statestringYo‘qMumkin qiymatlar: new, in_progress, canceled, done
discount.is_enabledbooleanYo‘qSend this dotted key as is, not inside a nested discount object.
discount.limit_by_percentnumberYo‘qSend this dotted key as is, not inside a nested discount object.
is_customer_requiredbooleanYo‘q
book_by_open_ticketbooleanYo‘q
multi_currency_receiptbooleanYo‘q
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
}

Javob

Javob tuzilishi quyidagi bilan bir xil: GET /sale-settings/get.


Bu sahifa OpenAPI spetsifikatsiyasidan yaratilgan.

Bito 2.0 Integration API