Skip to content
Markdown

Organization ​

INFO

Каждый ответ приходит в общем конверте — code, message, messages, status_code, time — а полезная нагрузка лежит в data. Таблицы ниже описывают содержимое data.

GET /organization/get-all ​

Get all organization

Нужное разрешение: нет — открыто любому установленному приложению · как работают разрешения

Пример запроса

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

Тело запроса

Тело запроса не требуется.

Ответ

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

GET /organization/get-by-id/{id} ​

Get an organization by its _id.

Нужное разрешение: нет — открыто любому установленному приложению · как работают разрешения

Пример запроса

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

Параметры пути

ПараметрТипОбязательноОписание
idstringДа

Тело запроса

Тело запроса не требуется.

Ответ

ПолеТипОписание
idstringorganization ID
namestringorganization name
is_defaultbooleanIs this organization the default?
director_idstringDirector ID
phone_numberstringPhone number
addressstringorganization balance
typestringorganization type. Допустимые значения: main, ordinary, b2b
descriptionstringorganization description
json
{
  "code": 0,
  "message": "Success",
  "status_code": 200,
  "data": {
    "id": "string",
    "name": "string",
    "is_default": false,
    "director_id": "string",
    "phone_number": "string",
    "address": "string",
    "type": "main",
    "description": "string"
  },
  "time": "2025-05-01T12:00:00Z"
}

Эта страница сгенерирована из спецификации OpenAPI.

Bito 2.0 Integration API