Skip to content
Markdown

Open ticket ​

INFO

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

POST /open-ticket/create ​

Create an open ticket (a held order / table bill) with its draft receipt and products.

Kerakli ruxsat: open_ticket_create · ruxsatlar qanday ishlaydi

So‘rov namunasi

bash
curl -X POST 'https://api.bito.uz/integration-api/integration/api/v2/open-ticket/create' \
  -H "api-key: $BITO_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "string",
  "organization_id": "string",
  "receipt": {
    "organization_id": "string",
    "warehouse_id": "string",
    "customer_id": "string",
    "responsible_id": "string",
    "currency_id": "string",
    "price_id": "string",
    "note": "string",
    "products": [
      {
        "product_id": null,
        "warehouse_id": null,
        "amount": null,
        "price": null,
        "box_count": null,
        "note": null,
        "price_id": null,
        "box_amount": null,
        "real_price": null,
        "total_price": null,
        "taxes": null,
        "discounts": null,
        "is_marked": null,
        "marks": null,
        "expiration_date": null,
        "total_to_pay": null,
        "materials": null,
        "used_measure": null
      }
    ],
    "uuid": "string",
    "contract_id": "64b7f4d9e2b3b6a0b7c5d7ff",
    "customer_assistant_id": "64b7f4d9e2b3b6a0b7c5d7ff",
    "delivery_date": "2025-05-01T12:00:00Z",
    "delivery_address": {
      "long": 0,
      "lat": 0,
      "human_address": {
        "address": null,
        "city": null,
        "state": null,
        "zip": null
      },
      "bearing": 0
    },
    "discounts": [
      {
        "is_custom": null,
        "_id": null,
        "value": null,
        "name": null,
        "apply_type": null
      }
    ],
    "calc_tax_after_discount": false,
    "calc_sale_discount_after_product": true,
    "total_to_pay": 0,
    "sold_at": "2025-05-01T12:00:00Z",
    "mediator_id": "64b7f4d9e2b3b6a0b7c5d7ff"
  }
}'
js
const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/open-ticket/create', {
  method: 'POST',
  headers: { 'api-key': process.env.BITO_API_KEY, 'Content-Type': 'application/json' },
  body: JSON.stringify({
    "name": "string",
    "organization_id": "string",
    "receipt": {
      "organization_id": "string",
      "warehouse_id": "string",
      "customer_id": "string",
      "responsible_id": "string",
      "currency_id": "string",
      "price_id": "string",
      "note": "string",
      "products": [
        {
          "product_id": null,
          "warehouse_id": null,
          "amount": null,
          "price": null,
          "box_count": null,
          "note": null,
          "price_id": null,
          "box_amount": null,
          "real_price": null,
          "total_price": null,
          "taxes": null,
          "discounts": null,
          "is_marked": null,
          "marks": null,
          "expiration_date": null,
          "total_to_pay": null,
          "materials": null,
          "used_measure": null
        }
      ],
      "uuid": "string",
      "contract_id": "64b7f4d9e2b3b6a0b7c5d7ff",
      "customer_assistant_id": "64b7f4d9e2b3b6a0b7c5d7ff",
      "delivery_date": "2025-05-01T12:00:00Z",
      "delivery_address": {
        "long": 0,
        "lat": 0,
        "human_address": {
          "address": null,
          "city": null,
          "state": null,
          "zip": null
        },
        "bearing": 0
      },
      "discounts": [
        {
          "is_custom": null,
          "_id": null,
          "value": null,
          "name": null,
          "apply_type": null
        }
      ],
      "calc_tax_after_discount": false,
      "calc_sale_discount_after_product": true,
      "total_to_pay": 0,
      "sold_at": "2025-05-01T12:00:00Z",
      "mediator_id": "64b7f4d9e2b3b6a0b7c5d7ff"
    }
  }),
})
const { code, data } = await res.json()
python
import os
import requests

res = requests.request(
    "POST",
    "https://api.bito.uz/integration-api/integration/api/v2/open-ticket/create",
    headers={"api-key": os.environ["BITO_API_KEY"]},
    json={
        "name": "string",
        "organization_id": "string",
        "receipt": {
            "organization_id": "string",
            "warehouse_id": "string",
            "customer_id": "string",
            "responsible_id": "string",
            "currency_id": "string",
            "price_id": "string",
            "note": "string",
            "products": [
                {
                    "product_id": None,
                    "warehouse_id": None,
                    "amount": None,
                    "price": None,
                    "box_count": None,
                    "note": None,
                    "price_id": None,
                    "box_amount": None,
                    "real_price": None,
                    "total_price": None,
                    "taxes": None,
                    "discounts": None,
                    "is_marked": None,
                    "marks": None,
                    "expiration_date": None,
                    "total_to_pay": None,
                    "materials": None,
                    "used_measure": None,
                },
            ],
            "uuid": "string",
            "contract_id": "64b7f4d9e2b3b6a0b7c5d7ff",
            "customer_assistant_id": "64b7f4d9e2b3b6a0b7c5d7ff",
            "delivery_date": "2025-05-01T12:00:00Z",
            "delivery_address": {
                "long": 0,
                "lat": 0,
                "human_address": {
                    "address": None,
                    "city": None,
                    "state": None,
                    "zip": None,
                },
                "bearing": 0,
            },
            "discounts": [
                {
                    "is_custom": None,
                    "_id": None,
                    "value": None,
                    "name": None,
                    "apply_type": None,
                },
            ],
            "calc_tax_after_discount": False,
            "calc_sale_discount_after_product": True,
            "total_to_pay": 0,
            "sold_at": "2025-05-01T12:00:00Z",
            "mediator_id": "64b7f4d9e2b3b6a0b7c5d7ff",
        },
    },
)
print(res.json())
php
<?php
$body = <<<'JSON'
{
  "name": "string",
  "organization_id": "string",
  "receipt": {
    "organization_id": "string",
    "warehouse_id": "string",
    "customer_id": "string",
    "responsible_id": "string",
    "currency_id": "string",
    "price_id": "string",
    "note": "string",
    "products": [
      {
        "product_id": null,
        "warehouse_id": null,
        "amount": null,
        "price": null,
        "box_count": null,
        "note": null,
        "price_id": null,
        "box_amount": null,
        "real_price": null,
        "total_price": null,
        "taxes": null,
        "discounts": null,
        "is_marked": null,
        "marks": null,
        "expiration_date": null,
        "total_to_pay": null,
        "materials": null,
        "used_measure": null
      }
    ],
    "uuid": "string",
    "contract_id": "64b7f4d9e2b3b6a0b7c5d7ff",
    "customer_assistant_id": "64b7f4d9e2b3b6a0b7c5d7ff",
    "delivery_date": "2025-05-01T12:00:00Z",
    "delivery_address": {
      "long": 0,
      "lat": 0,
      "human_address": {
        "address": null,
        "city": null,
        "state": null,
        "zip": null
      },
      "bearing": 0
    },
    "discounts": [
      {
        "is_custom": null,
        "_id": null,
        "value": null,
        "name": null,
        "apply_type": null
      }
    ],
    "calc_tax_after_discount": false,
    "calc_sale_discount_after_product": true,
    "total_to_pay": 0,
    "sold_at": "2025-05-01T12:00:00Z",
    "mediator_id": "64b7f4d9e2b3b6a0b7c5d7ff"
  }
}
JSON;

$ch = curl_init('https://api.bito.uz/integration-api/integration/api/v2/open-ticket/create');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    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
namestringHaDisplay name of the open ticket
organization_idstringHaOrganization ObjectId the ticket belongs to
booking_table_idstringYo‘qBooking table (seat/table) ObjectId, if the ticket is tied to a table
commentstringYo‘qOptional free-text comment
receiptobjectHa
receipt.organization_idstringHa
receipt.warehouse_idstringHa
receipt.customer_idstringYo‘q
receipt.responsible_idstringYo‘q
receipt.currency_idstringHa
receipt.price_idstringYo‘q
receipt.notestringYo‘q
receipt.productsobject[]Ha
receipt.products[].product_idstringHa
receipt.products[].warehouse_idstringHa
receipt.products[].amountnumberHa
receipt.products[].pricenumberYo‘q
receipt.products[].box_countnumberYo‘q
receipt.products[].notestringYo‘q
receipt.products[].price_idstringYo‘q
receipt.products[].box_amountnumberYo‘q
receipt.products[].real_pricenumberHa
receipt.products[].total_pricenumberYo‘q
receipt.products[].taxesobject[]Yo‘q
receipt.products[].discountsobject[]Yo‘q
receipt.products[].is_markedbooleanYo‘qStandart: false
receipt.products[].marksstring[]Yo‘q
receipt.products[].expiration_datestring (date-time)Yo‘q
receipt.products[].total_to_paynumberYo‘q
receipt.products[].materialsobject[]Yo‘q
receipt.products[].used_measureobjectYo‘q
receipt.uuidstringYo‘q
receipt.contract_idstringYo‘q
receipt.customer_assistant_idstringYo‘q
receipt.delivery_datestring (date-time)Yo‘q
receipt.delivery_addressobjectYo‘q
receipt.delivery_address.longnumberYo‘q
receipt.delivery_address.latnumberYo‘q
receipt.delivery_address.human_addressobjectYo‘q
receipt.delivery_address.bearingnumberYo‘q
receipt.discountsobject[]Yo‘q
receipt.discounts[].is_custombooleanHa
receipt.discounts[]._idstringYo‘q
receipt.discounts[].valuenumberHa
receipt.discounts[].namestringYo‘q
receipt.discounts[].apply_typestringHaMumkin qiymatlar: percent, cash
receipt.calc_tax_after_discountbooleanYo‘qStandart: false
receipt.calc_sale_discount_after_productbooleanYo‘qStandart: true
receipt.total_to_paynumberYo‘q
receipt.sold_atstring (date-time)Yo‘q
receipt.mediator_idstringYo‘q
json
{
  "name": "string",
  "organization_id": "string",
  "booking_table_id": "string",
  "comment": "string",
  "receipt": {
    "organization_id": "string",
    "warehouse_id": "string",
    "customer_id": "string",
    "responsible_id": "string",
    "currency_id": "string",
    "price_id": "string",
    "note": "string",
    "products": [
      {
        "product_id": null,
        "warehouse_id": null,
        "amount": null,
        "price": null,
        "box_count": null,
        "note": null,
        "price_id": null,
        "box_amount": null,
        "real_price": null,
        "total_price": null,
        "taxes": null,
        "discounts": null,
        "is_marked": null,
        "marks": null,
        "expiration_date": null,
        "total_to_pay": null,
        "materials": null,
        "used_measure": null
      }
    ],
    "uuid": "string",
    "contract_id": "64b7f4d9e2b3b6a0b7c5d7ff",
    "customer_assistant_id": "64b7f4d9e2b3b6a0b7c5d7ff",
    "delivery_date": "2025-05-01T12:00:00Z",
    "delivery_address": {
      "long": 0,
      "lat": 0,
      "human_address": {
        "address": null,
        "city": null,
        "state": null,
        "zip": null
      },
      "bearing": 0
    },
    "discounts": [
      {
        "is_custom": null,
        "_id": null,
        "value": null,
        "name": null,
        "apply_type": null
      }
    ],
    "calc_tax_after_discount": false,
    "calc_sale_discount_after_product": true,
    "total_to_pay": 0,
    "sold_at": "2025-05-01T12:00:00Z",
    "mediator_id": "64b7f4d9e2b3b6a0b7c5d7ff"
  }
}

Javob

MaydonTurTavsif
_idstring
namestring
organization_idstring
uuidstring
booking_table_idstring
receiptobject
json
{
  "code": 0,
  "message": "Success",
  "status_code": 200,
  "data": {
    "_id": "string",
    "name": "string",
    "organization_id": "string",
    "uuid": "string",
    "booking_table_id": "string",
    "receipt": {}
  },
  "time": "2025-05-01T12:00:00Z"
}

PUT /open-ticket/update ​

Update an existing open ticket and its draft receipt.

Kerakli ruxsat: open_ticket · ruxsatlar qanday ishlaydi

So‘rov namunasi

bash
curl -X PUT 'https://api.bito.uz/integration-api/integration/api/v2/open-ticket/update' \
  -H "api-key: $BITO_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "organization_id": "string",
  "receipt": {
    "organization_id": "string",
    "warehouse_id": "string",
    "customer_id": "string",
    "responsible_id": "string",
    "currency_id": "string",
    "price_id": "string",
    "note": "string",
    "products": [
      {
        "product_id": null,
        "warehouse_id": null,
        "amount": null,
        "price": null,
        "box_count": null,
        "note": null,
        "price_id": null,
        "box_amount": null,
        "real_price": null,
        "total_price": null,
        "taxes": null,
        "discounts": null,
        "is_marked": null,
        "marks": null,
        "expiration_date": null,
        "total_to_pay": null,
        "materials": null,
        "used_measure": null
      }
    ],
    "uuid": "string",
    "contract_id": "64b7f4d9e2b3b6a0b7c5d7ff",
    "customer_assistant_id": "64b7f4d9e2b3b6a0b7c5d7ff",
    "delivery_date": "2025-05-01T12:00:00Z",
    "delivery_address": {
      "long": 0,
      "lat": 0,
      "human_address": {
        "address": null,
        "city": null,
        "state": null,
        "zip": null
      },
      "bearing": 0
    },
    "discounts": [
      {
        "is_custom": null,
        "_id": null,
        "value": null,
        "name": null,
        "apply_type": null
      }
    ],
    "calc_tax_after_discount": false,
    "calc_sale_discount_after_product": true,
    "total_to_pay": 0,
    "sold_at": "2025-05-01T12:00:00Z",
    "mediator_id": "64b7f4d9e2b3b6a0b7c5d7ff"
  },
  "_id": "string"
}'
js
const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/open-ticket/update', {
  method: 'PUT',
  headers: { 'api-key': process.env.BITO_API_KEY, 'Content-Type': 'application/json' },
  body: JSON.stringify({
    "organization_id": "string",
    "receipt": {
      "organization_id": "string",
      "warehouse_id": "string",
      "customer_id": "string",
      "responsible_id": "string",
      "currency_id": "string",
      "price_id": "string",
      "note": "string",
      "products": [
        {
          "product_id": null,
          "warehouse_id": null,
          "amount": null,
          "price": null,
          "box_count": null,
          "note": null,
          "price_id": null,
          "box_amount": null,
          "real_price": null,
          "total_price": null,
          "taxes": null,
          "discounts": null,
          "is_marked": null,
          "marks": null,
          "expiration_date": null,
          "total_to_pay": null,
          "materials": null,
          "used_measure": null
        }
      ],
      "uuid": "string",
      "contract_id": "64b7f4d9e2b3b6a0b7c5d7ff",
      "customer_assistant_id": "64b7f4d9e2b3b6a0b7c5d7ff",
      "delivery_date": "2025-05-01T12:00:00Z",
      "delivery_address": {
        "long": 0,
        "lat": 0,
        "human_address": {
          "address": null,
          "city": null,
          "state": null,
          "zip": null
        },
        "bearing": 0
      },
      "discounts": [
        {
          "is_custom": null,
          "_id": null,
          "value": null,
          "name": null,
          "apply_type": null
        }
      ],
      "calc_tax_after_discount": false,
      "calc_sale_discount_after_product": true,
      "total_to_pay": 0,
      "sold_at": "2025-05-01T12:00:00Z",
      "mediator_id": "64b7f4d9e2b3b6a0b7c5d7ff"
    },
    "_id": "string"
  }),
})
const { code, data } = await res.json()
python
import os
import requests

res = requests.request(
    "PUT",
    "https://api.bito.uz/integration-api/integration/api/v2/open-ticket/update",
    headers={"api-key": os.environ["BITO_API_KEY"]},
    json={
        "organization_id": "string",
        "receipt": {
            "organization_id": "string",
            "warehouse_id": "string",
            "customer_id": "string",
            "responsible_id": "string",
            "currency_id": "string",
            "price_id": "string",
            "note": "string",
            "products": [
                {
                    "product_id": None,
                    "warehouse_id": None,
                    "amount": None,
                    "price": None,
                    "box_count": None,
                    "note": None,
                    "price_id": None,
                    "box_amount": None,
                    "real_price": None,
                    "total_price": None,
                    "taxes": None,
                    "discounts": None,
                    "is_marked": None,
                    "marks": None,
                    "expiration_date": None,
                    "total_to_pay": None,
                    "materials": None,
                    "used_measure": None,
                },
            ],
            "uuid": "string",
            "contract_id": "64b7f4d9e2b3b6a0b7c5d7ff",
            "customer_assistant_id": "64b7f4d9e2b3b6a0b7c5d7ff",
            "delivery_date": "2025-05-01T12:00:00Z",
            "delivery_address": {
                "long": 0,
                "lat": 0,
                "human_address": {
                    "address": None,
                    "city": None,
                    "state": None,
                    "zip": None,
                },
                "bearing": 0,
            },
            "discounts": [
                {
                    "is_custom": None,
                    "_id": None,
                    "value": None,
                    "name": None,
                    "apply_type": None,
                },
            ],
            "calc_tax_after_discount": False,
            "calc_sale_discount_after_product": True,
            "total_to_pay": 0,
            "sold_at": "2025-05-01T12:00:00Z",
            "mediator_id": "64b7f4d9e2b3b6a0b7c5d7ff",
        },
        "_id": "string",
    },
)
print(res.json())
php
<?php
$body = <<<'JSON'
{
  "organization_id": "string",
  "receipt": {
    "organization_id": "string",
    "warehouse_id": "string",
    "customer_id": "string",
    "responsible_id": "string",
    "currency_id": "string",
    "price_id": "string",
    "note": "string",
    "products": [
      {
        "product_id": null,
        "warehouse_id": null,
        "amount": null,
        "price": null,
        "box_count": null,
        "note": null,
        "price_id": null,
        "box_amount": null,
        "real_price": null,
        "total_price": null,
        "taxes": null,
        "discounts": null,
        "is_marked": null,
        "marks": null,
        "expiration_date": null,
        "total_to_pay": null,
        "materials": null,
        "used_measure": null
      }
    ],
    "uuid": "string",
    "contract_id": "64b7f4d9e2b3b6a0b7c5d7ff",
    "customer_assistant_id": "64b7f4d9e2b3b6a0b7c5d7ff",
    "delivery_date": "2025-05-01T12:00:00Z",
    "delivery_address": {
      "long": 0,
      "lat": 0,
      "human_address": {
        "address": null,
        "city": null,
        "state": null,
        "zip": null
      },
      "bearing": 0
    },
    "discounts": [
      {
        "is_custom": null,
        "_id": null,
        "value": null,
        "name": null,
        "apply_type": null
      }
    ],
    "calc_tax_after_discount": false,
    "calc_sale_discount_after_product": true,
    "total_to_pay": 0,
    "sold_at": "2025-05-01T12:00:00Z",
    "mediator_id": "64b7f4d9e2b3b6a0b7c5d7ff"
  },
  "_id": "string"
}
JSON;

$ch = curl_init('https://api.bito.uz/integration-api/integration/api/v2/open-ticket/update');
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
namestringYo‘qDisplay name of the open ticket
organization_idstringHaOrganization ObjectId the ticket belongs to
booking_table_idstringYo‘qBooking table (seat/table) ObjectId, if the ticket is tied to a table
commentstringYo‘qOptional free-text comment
receiptobjectHa
receipt.organization_idstringHa
receipt.warehouse_idstringHa
receipt.customer_idstringYo‘q
receipt.responsible_idstringYo‘q
receipt.currency_idstringHa
receipt.price_idstringYo‘q
receipt.notestringYo‘q
receipt.productsobject[]Ha
receipt.products[].product_idstringHa
receipt.products[].warehouse_idstringHa
receipt.products[].amountnumberHa
receipt.products[].pricenumberYo‘q
receipt.products[].box_countnumberYo‘q
receipt.products[].notestringYo‘q
receipt.products[].price_idstringYo‘q
receipt.products[].box_amountnumberYo‘q
receipt.products[].real_pricenumberHa
receipt.products[].total_pricenumberYo‘q
receipt.products[].taxesobject[]Yo‘q
receipt.products[].discountsobject[]Yo‘q
receipt.products[].is_markedbooleanYo‘qStandart: false
receipt.products[].marksstring[]Yo‘q
receipt.products[].expiration_datestring (date-time)Yo‘q
receipt.products[].total_to_paynumberYo‘q
receipt.products[].materialsobject[]Yo‘q
receipt.products[].used_measureobjectYo‘q
receipt.uuidstringYo‘q
receipt.contract_idstringYo‘q
receipt.customer_assistant_idstringYo‘q
receipt.delivery_datestring (date-time)Yo‘q
receipt.delivery_addressobjectYo‘q
receipt.delivery_address.longnumberYo‘q
receipt.delivery_address.latnumberYo‘q
receipt.delivery_address.human_addressobjectYo‘q
receipt.delivery_address.bearingnumberYo‘q
receipt.discountsobject[]Yo‘q
receipt.discounts[].is_custombooleanHa
receipt.discounts[]._idstringYo‘q
receipt.discounts[].valuenumberHa
receipt.discounts[].namestringYo‘q
receipt.discounts[].apply_typestringHaMumkin qiymatlar: percent, cash
receipt.calc_tax_after_discountbooleanYo‘qStandart: false
receipt.calc_sale_discount_after_productbooleanYo‘qStandart: true
receipt.total_to_paynumberYo‘q
receipt.sold_atstring (date-time)Yo‘q
receipt.mediator_idstringYo‘q
_idstringHa
uuidstringYo‘q
json
{
  "name": "string",
  "organization_id": "string",
  "booking_table_id": "string",
  "comment": "string",
  "receipt": {
    "organization_id": "string",
    "warehouse_id": "string",
    "customer_id": "string",
    "responsible_id": "string",
    "currency_id": "string",
    "price_id": "string",
    "note": "string",
    "products": [
      {
        "product_id": null,
        "warehouse_id": null,
        "amount": null,
        "price": null,
        "box_count": null,
        "note": null,
        "price_id": null,
        "box_amount": null,
        "real_price": null,
        "total_price": null,
        "taxes": null,
        "discounts": null,
        "is_marked": null,
        "marks": null,
        "expiration_date": null,
        "total_to_pay": null,
        "materials": null,
        "used_measure": null
      }
    ],
    "uuid": "string",
    "contract_id": "64b7f4d9e2b3b6a0b7c5d7ff",
    "customer_assistant_id": "64b7f4d9e2b3b6a0b7c5d7ff",
    "delivery_date": "2025-05-01T12:00:00Z",
    "delivery_address": {
      "long": 0,
      "lat": 0,
      "human_address": {
        "address": null,
        "city": null,
        "state": null,
        "zip": null
      },
      "bearing": 0
    },
    "discounts": [
      {
        "is_custom": null,
        "_id": null,
        "value": null,
        "name": null,
        "apply_type": null
      }
    ],
    "calc_tax_after_discount": false,
    "calc_sale_discount_after_product": true,
    "total_to_pay": 0,
    "sold_at": "2025-05-01T12:00:00Z",
    "mediator_id": "64b7f4d9e2b3b6a0b7c5d7ff"
  },
  "_id": "string",
  "uuid": "string"
}

Javob

Javob tuzilishi quyidagi bilan bir xil: POST /open-ticket/create.

POST /open-ticket/get-paging ​

Paginated list of open tickets, filterable by organization.

Kerakli ruxsat: open_ticket · ruxsatlar qanday ishlaydi

So‘rov namunasi

bash
curl -X POST 'https://api.bito.uz/integration-api/integration/api/v2/open-ticket/get-paging' \
  -H "api-key: $BITO_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "page": 1,
  "limit": 20
}'
js
const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/open-ticket/get-paging', {
  method: 'POST',
  headers: { 'api-key': process.env.BITO_API_KEY, 'Content-Type': 'application/json' },
  body: JSON.stringify({
    "page": 1,
    "limit": 20
  }),
})
const { code, data } = await res.json()
python
import os
import requests

res = requests.request(
    "POST",
    "https://api.bito.uz/integration-api/integration/api/v2/open-ticket/get-paging",
    headers={"api-key": os.environ["BITO_API_KEY"]},
    json={
        "page": 1,
        "limit": 20,
    },
)
print(res.json())
php
<?php
$body = <<<'JSON'
{
  "page": 1,
  "limit": 20
}
JSON;

$ch = curl_init('https://api.bito.uz/integration-api/integration/api/v2/open-ticket/get-paging');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    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
pagenumberHaStandart: 1
limitnumberHaStandart: 20
organization_idstringYo‘qFilter by organization ObjectId
responsible_idstringYo‘q
customer_idstringYo‘q
date_fromstring (date-time)Yo‘qStart of the date range.
date_tostring (date-time)Yo‘qEnd of the date range.
searchstringYo‘qFree-text search.
json
{
  "page": 1,
  "limit": 20,
  "organization_id": "string",
  "responsible_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "customer_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "date_from": "2025-05-01T12:00:00Z",
  "date_to": "2025-05-01T12:00:00Z",
  "search": "string"
}

Javob

MaydonTurTavsif
totalnumber
listobject[]
list[]._idstring
list[].namestring
list[].organization_idstring
list[].uuidstring
list[].booking_table_idstring
list[].receiptobject
json
{
  "code": 0,
  "message": "Success",
  "status_code": 200,
  "data": {
    "total": 0,
    "list": [
      {
        "_id": "string",
        "name": "string",
        "organization_id": "string",
        "uuid": "string",
        "booking_table_id": "string",
        "receipt": {}
      }
    ]
  },
  "time": "2025-05-01T12:00:00Z"
}

GET /open-ticket/get-by-id/{id} ​

Fetch a single open ticket by ObjectId.

Kerakli ruxsat: open_ticket · ruxsatlar qanday ishlaydi

So‘rov namunasi

bash
curl -X GET 'https://api.bito.uz/integration-api/integration/api/v2/open-ticket/get-by-id/6712f0a9c4d1e87b3a0f9911' \
  -H "api-key: $BITO_API_KEY"
js
const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/open-ticket/get-by-id/6712f0a9c4d1e87b3a0f9911', {
  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/open-ticket/get-by-id/6712f0a9c4d1e87b3a0f9911",
    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/open-ticket/get-by-id/6712f0a9c4d1e87b3a0f9911');
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);

Yo‘l parametrlari

ParametrTurMajburiyTavsif
idstringHaOpen-ticket ObjectId

So‘rov tanasi

So‘rov tanasi talab qilinmaydi.

Javob

Javob tuzilishi quyidagi bilan bir xil: POST /open-ticket/create.

POST /open-ticket/delete-many ​

Soft-delete multiple open tickets by their ObjectIds.

Kerakli ruxsat: open_ticket · ruxsatlar qanday ishlaydi

So‘rov namunasi

bash
curl -X POST 'https://api.bito.uz/integration-api/integration/api/v2/open-ticket/delete-many' \
  -H "api-key: $BITO_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "ids": [
    "string"
  ]
}'
js
const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/open-ticket/delete-many', {
  method: 'POST',
  headers: { 'api-key': process.env.BITO_API_KEY, 'Content-Type': 'application/json' },
  body: JSON.stringify({
    "ids": [
      "string"
    ]
  }),
})
const { code, data } = await res.json()
python
import os
import requests

res = requests.request(
    "POST",
    "https://api.bito.uz/integration-api/integration/api/v2/open-ticket/delete-many",
    headers={"api-key": os.environ["BITO_API_KEY"]},
    json={
        "ids": [
            "string",
        ],
    },
)
print(res.json())
php
<?php
$body = <<<'JSON'
{
  "ids": [
    "string"
  ]
}
JSON;

$ch = curl_init('https://api.bito.uz/integration-api/integration/api/v2/open-ticket/delete-many');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    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
idsstring[]HaOpen-ticket ObjectIds to delete
json
{
  "ids": [
    "string"
  ]
}

Javob

json
{
  "code": 0,
  "message": "Success",
  "status_code": 200,
  "data": "ok",
  "time": "2025-05-01T12:00:00Z"
}

Bu sahifa OpenAPI spetsifikatsiyasidan yaratilgan.

Bito 2.0 Integration API