# 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](https://docs.bito.uz/en/api/permissions.md)

**Example request**

::: code-group

```bash [curl]
curl -X GET 'https://api.bito.uz/integration-api/integration/api/v2/sale-settings/get' \
  -H "api-key: $BITO_API_KEY"
```

```js [JavaScript]
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 [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]
<?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**

| Field | Type | Description |
|---|---|---|
| `booking_product_in_order` | `boolean` | Default: `false` |
| `sell_product_in_negative` | `boolean` | Default: `false` |
| `calc_tax_after_discount` | `boolean` | Default: `false` |
| `past_date_sell` | `boolean` | Default: `true` |
| `max_day_past_date_sell` | `number` |  |
| `calc_sale_discount_after_product` | `boolean` | Default: `true` |
| `is_tax_active` | `boolean` | Default: `false` |
| `is_cashback_active` | `boolean` | Default: `false` |
| `trade_state` | `string` | One of: `new`, `draft`, `done`, `cancelled`, `in_progress`. Default: `"new"` |
| `show_gross_weight` | `boolean` | Default: `false` |
| `show_netto_weight` | `boolean` | Default: `false` |
| `debt_approve_by_boss` | `boolean` | Default: `false` |
| `discount_approve_by_boss` | `boolean` | Default: `false` |
| `on_revision` | `string` | One of: `warning`, `error`. Default: `"warning"` |
| `discount` | `object` |  |
| `discount.is_enabled` | `boolean` | Default: `false` |
| `discount.limit_by_percent` | `number` | Default: `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](https://docs.bito.uz/en/api/permissions.md)

**Example request**

::: code-group

```bash [curl]
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 [JavaScript]
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 [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]
<?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**

| Field | Type | Required | Description |
|---|---|---|---|
| `booking_product_in_order` | `boolean` | No |  |
| `sell_product_in_negative` | `boolean` | No |  |
| `calc_tax_after_discount` | `boolean` | No |  |
| `is_tax_active` | `boolean` | No |  |
| `is_cashback_active` | `boolean` | No |  |
| `show_gross_weight` | `boolean` | No |  |
| `show_netto_weight` | `boolean` | No |  |
| `debt_approve_by_boss` | `boolean` | No |  |
| `discount_approve_by_boss` | `boolean` | No |  |
| `past_date_sell` | `boolean` | No |  |
| `max_day_past_date_sell` | `number` | No |  |
| `on_revision` | `string` | No | One of: `error`, `warning` |
| `on_black_list_customer` | `string` | No | One of: `allow`, `warning`, `error` |
| `trade_state` | `string` | No | One of: `new`, `in_progress`, `canceled`, `done` |
| `discount.is_enabled` | `boolean` | No | Send this dotted key as is, not inside a nested `discount` object. |
| `discount.limit_by_percent` | `number` | No | Send this dotted key as is, not inside a nested `discount` object. |
| `is_customer_required` | `boolean` | No |  |
| `book_by_open_ticket` | `boolean` | No |  |
| `multi_currency_receipt` | `boolean` | No |  |

```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](#get-sale-settings-get).

---

*This page is generated from the OpenAPI spec.*
