Skip to content
View as Markdown

Sale settings ​

INFO

Every response arrives in the shared envelope — code, message, messages, status_code, time — with the payload in data. The tables below describe what is inside data.

GET /sale-settings/get ​

Get all sale-settings

Required permission: none — closed to an app that declares permissions · how permissions work

Example request

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

Request body

No request body.

Response

FieldTypeDescription
booking_product_in_orderbooleanDefault: false
sell_product_in_negativebooleanDefault: false
calc_tax_after_discountbooleanDefault: false
past_date_sellbooleanDefault: true
max_day_past_date_sellnumber
calc_sale_discount_after_productbooleanDefault: true
is_tax_activebooleanDefault: false
is_cashback_activebooleanDefault: false
trade_statestringOne of: new, draft, done, cancelled, in_progress. Default: "new"
show_gross_weightbooleanDefault: false
show_netto_weightbooleanDefault: false
debt_approve_by_bossbooleanDefault: false
discount_approve_by_bossbooleanDefault: false
on_revisionstringOne of: warning, error. Default: "warning"
discountobject
discount.is_enabledbooleanDefault: false
discount.limit_by_percentnumberDefault: 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.

Required permission: none — closed to an app that declares permissions · how permissions work

Example request

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

Request body

FieldTypeRequiredDescription
booking_product_in_orderbooleanNo
sell_product_in_negativebooleanNo
calc_tax_after_discountbooleanNo
is_tax_activebooleanNo
is_cashback_activebooleanNo
show_gross_weightbooleanNo
show_netto_weightbooleanNo
debt_approve_by_bossbooleanNo
discount_approve_by_bossbooleanNo
past_date_sellbooleanNo
max_day_past_date_sellnumberNo
on_revisionstringNoOne of: error, warning
on_black_list_customerstringNoOne of: allow, warning, error
trade_statestringNoOne of: new, in_progress, canceled, done
discount.is_enabledbooleanNoSend this dotted key as is, not inside a nested discount object.
discount.limit_by_percentnumberNoSend this dotted key as is, not inside a nested discount object.
is_customer_requiredbooleanNo
book_by_open_ticketbooleanNo
multi_currency_receiptbooleanNo
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
}

Response

Same response shape as GET /sale-settings/get.


This page is generated from the OpenAPI spec.

Bito 2.0 Integration API