Skip to content
Markdown

Internal transfer ​

Stock transfers between warehouses of one organization

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 /internal-transfer/create ​

Create a new internal transfer between warehouses or production steps.

Kerakli ruxsat: internal_transfer_create · ruxsatlar qanday ishlaydi

So‘rov namunasi

bash
curl -X POST 'https://api.bito.uz/integration-api/integration/api/v2/internal-transfer/create' \
  -H "api-key: $BITO_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "source_organization_id": "string",
  "type": "w2w",
  "date": "2025-05-01T12:00:00Z",
  "shipping_date": "2025-05-01T12:00:00Z",
  "sender_employee_id": "string",
  "reason_id": "string",
  "products": [
    {
      "product_id": "string",
      "amount": 0,
      "box_count": 0,
      "box_item": 0,
      "marks": [],
      "expiration_date": "2025-05-01T12:00:00Z",
      "extra_costs": [],
      "used_measure": {
        "ratio": null,
        "_id": null,
        "amount": null
      }
    }
  ],
  "state": "new"
}'
js
const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/internal-transfer/create', {
  method: 'POST',
  headers: { 'api-key': process.env.BITO_API_KEY, 'Content-Type': 'application/json' },
  body: JSON.stringify({
    "source_organization_id": "string",
    "type": "w2w",
    "date": "2025-05-01T12:00:00Z",
    "shipping_date": "2025-05-01T12:00:00Z",
    "sender_employee_id": "string",
    "reason_id": "string",
    "products": [
      {
        "product_id": "string",
        "amount": 0,
        "box_count": 0,
        "box_item": 0,
        "marks": [],
        "expiration_date": "2025-05-01T12:00:00Z",
        "extra_costs": [],
        "used_measure": {
          "ratio": null,
          "_id": null,
          "amount": null
        }
      }
    ],
    "state": "new"
  }),
})
const { code, data } = await res.json()
python
import os
import requests

res = requests.request(
    "POST",
    "https://api.bito.uz/integration-api/integration/api/v2/internal-transfer/create",
    headers={"api-key": os.environ["BITO_API_KEY"]},
    json={
        "source_organization_id": "string",
        "type": "w2w",
        "date": "2025-05-01T12:00:00Z",
        "shipping_date": "2025-05-01T12:00:00Z",
        "sender_employee_id": "string",
        "reason_id": "string",
        "products": [
            {
                "product_id": "string",
                "amount": 0,
                "box_count": 0,
                "box_item": 0,
                "marks": [],
                "expiration_date": "2025-05-01T12:00:00Z",
                "extra_costs": [],
                "used_measure": {
                    "ratio": None,
                    "_id": None,
                    "amount": None,
                },
            },
        ],
        "state": "new",
    },
)
print(res.json())
php
<?php
$body = <<<'JSON'
{
  "source_organization_id": "string",
  "type": "w2w",
  "date": "2025-05-01T12:00:00Z",
  "shipping_date": "2025-05-01T12:00:00Z",
  "sender_employee_id": "string",
  "reason_id": "string",
  "products": [
    {
      "product_id": "string",
      "amount": 0,
      "box_count": 0,
      "box_item": 0,
      "marks": [],
      "expiration_date": "2025-05-01T12:00:00Z",
      "extra_costs": [],
      "used_measure": {
        "ratio": null,
        "_id": null,
        "amount": null
      }
    }
  ],
  "state": "new"
}
JSON;

$ch = curl_init('https://api.bito.uz/integration-api/integration/api/v2/internal-transfer/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
codestringYo‘qOptional human-readable reference code
request_idstringYo‘qLinked transfer-request ObjectId (optional)
source_organization_idstringHaOrganization ObjectId that owns this transfer
typestringHaTransfer type: w2w=warehouse-to-warehouse, w2p=warehouse-to-production, p2w=production-to-warehouse, p2p=production-to-production, o2o=organization-to-organization. Mumkin qiymatlar: w2w, w2p, p2w, p2p, o2o
datestring (date-time)HaTransfer document date (ISO 8601)
shipping_datestring (date-time)HaPlanned shipping date (ISO 8601)
sender_warehouse_idstringYo‘qSource warehouse ObjectId. Required when type is w2w or w2p.
receiver_warehouse_idstringYo‘qDestination warehouse ObjectId. Required when type is p2w or w2w.
sender_employee_idstringHaEmployee ObjectId responsible for sending
receiver_employee_idstringYo‘qEmployee ObjectId responsible for receiving (optional)
reason_idstringHaTransfer reason ObjectId
price_idstringYo‘qPrice list ObjectId (optional)
notestringYo‘qFree-text note (optional)
productsobject[]HaList of products to transfer (at least one required)
products[].product_idstringHaProduct ObjectId
products[].amountnumberHaTransfer quantity (must be positive)
products[].box_countnumberYo‘qNumber of boxes (integer, defaults to 0)
products[].box_itemnumberYo‘qItems per box (optional)
products[].marksstring[]Yo‘qSerial / excise mark codes for marked goods
products[].expiration_datestring (date-time)Yo‘qExpiration date (ISO 8601) for perishable items
products[].extra_costsobject[]Yo‘qPer-product extra cost allocations
products[].used_measureobjectYo‘qOverride measure ratio if different from the product default
products[].used_measure.rationumberHa
products[].used_measure._idstringHa
products[].used_measure.amountnumberHa
additional_costsobject[]Yo‘qAdditional costs applied to the whole transfer (defaults to [])
attachmentsobject[]Yo‘qFile attachments (optional)
attachments[].namestringYo‘q
attachments[].pathstringHa
attachments[].sizenumberYo‘q
attachments[].notestringYo‘q
statestringHaMumkin qiymatlar: new, accepted, in_progress, done, canceled
json
{
  "code": "string",
  "request_id": "string",
  "source_organization_id": "string",
  "type": "w2w",
  "date": "2025-05-01T12:00:00Z",
  "shipping_date": "2025-05-01T12:00:00Z",
  "sender_warehouse_id": "string",
  "receiver_warehouse_id": "string",
  "sender_employee_id": "string",
  "receiver_employee_id": "string",
  "reason_id": "string",
  "price_id": "string",
  "note": "string",
  "products": [
    {
      "product_id": "string",
      "amount": 0,
      "box_count": 0,
      "box_item": 0,
      "marks": [],
      "expiration_date": "2025-05-01T12:00:00Z",
      "extra_costs": [],
      "used_measure": {
        "ratio": null,
        "_id": null,
        "amount": null
      }
    }
  ],
  "additional_costs": [
    {}
  ],
  "attachments": [
    {
      "name": "string",
      "path": "string",
      "size": 0,
      "note": "string"
    }
  ],
  "state": "new"
}

Javob

MaydonTurTavsif
codestringOptional human-readable reference code
request_idstringLinked transfer-request ObjectId (optional)
source_organization_idstringOrganization ObjectId that owns this transfer
typestringTransfer type: w2w=warehouse-to-warehouse, w2p=warehouse-to-production, p2w=production-to-warehouse, p2p=production-to-production, o2o=organization-to-organization. Mumkin qiymatlar: w2w, w2p, p2w, p2p, o2o
datestring (date-time)Transfer document date (ISO 8601)
shipping_datestring (date-time)Planned shipping date (ISO 8601)
sender_warehouse_idstringSource warehouse ObjectId. Required when type is w2w or w2p.
receiver_warehouse_idstringDestination warehouse ObjectId. Required when type is p2w or w2w.
sender_employee_idstringEmployee ObjectId responsible for sending
receiver_employee_idstringEmployee ObjectId responsible for receiving (optional)
reason_idstringTransfer reason ObjectId
price_idstringPrice list ObjectId (optional)
notestringFree-text note (optional)
productsobject[]List of products to transfer (at least one required)
products[].product_idstringProduct ObjectId
products[].amountnumberTransfer quantity (must be positive)
products[].box_countnumberNumber of boxes (integer, defaults to 0)
products[].box_itemnumberItems per box (optional)
products[].marksstring[]Serial / excise mark codes for marked goods
products[].expiration_datestring (date-time)Expiration date (ISO 8601) for perishable items
products[].extra_costsobject[]Per-product extra cost allocations
products[].used_measureobjectOverride measure ratio if different from the product default
products[].used_measure.measure_idstring
products[].used_measure.rationumber
additional_costsobject[]Additional costs applied to the whole transfer (defaults to [])
attachmentsobject[]File attachments (optional)
attachments[].namestring
attachments[].urlstring
_idstringInternal transfer ObjectId
statusstringCurrent transfer state. Mumkin qiymatlar: draft, new, accepted, in_progress, done, canceled
state_idstringCustom kanban state ObjectId (when a custom pipeline column is used)
is_deletedbooleanSoft-delete flag
created_atstring (date-time)Creation timestamp (ISO 8601)
updated_atstring (date-time)Last update timestamp (ISO 8601)
json
{
  "code": 0,
  "message": "Success",
  "status_code": 200,
  "data": {
    "code": "string",
    "request_id": "string",
    "source_organization_id": "string",
    "type": "w2w",
    "date": "2025-05-01T12:00:00Z",
    "shipping_date": "2025-05-01T12:00:00Z",
    "sender_warehouse_id": "string",
    "receiver_warehouse_id": "string",
    "sender_employee_id": "string",
    "receiver_employee_id": "string",
    "reason_id": "string",
    "price_id": "string",
    "note": "string",
    "products": [
      {
        "product_id": "string",
        "amount": 0,
        "box_count": 0,
        "box_item": 0,
        "marks": [],
        "expiration_date": "2025-05-01T12:00:00Z",
        "extra_costs": [],
        "used_measure": {
          "measure_id": null,
          "ratio": null
        }
      }
    ],
    "additional_costs": [
      {}
    ],
    "attachments": [
      {
        "name": "string",
        "url": "string"
      }
    ],
    "_id": "string",
    "status": "draft",
    "state_id": "string",
    "is_deleted": false,
    "created_at": "2025-05-01T12:00:00Z",
    "updated_at": "2025-05-01T12:00:00Z"
  },
  "time": "2025-05-01T12:00:00Z"
}

GET /internal-transfer/get-by-id/{id} ​

Fetch a single internal transfer by ObjectId.

Kerakli ruxsat: internal_transfer · ruxsatlar qanday ishlaydi

So‘rov namunasi

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

So‘rov tanasi

So‘rov tanasi talab qilinmaydi.

Javob

Javob tuzilishi quyidagi bilan bir xil: POST /internal-transfer/create.

POST /internal-transfer/get-paging ​

Paginated list of internal transfers, filterable by organization, warehouse, state, and reason.

Kerakli ruxsat: internal_transfer · ruxsatlar qanday ishlaydi

So‘rov namunasi

bash
curl -X POST 'https://api.bito.uz/integration-api/integration/api/v2/internal-transfer/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/internal-transfer/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/internal-transfer/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/internal-transfer/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
source_organization_idstringYo‘qFilter by source organization ObjectId
sender_warehouse_idstringYo‘qFilter by sender warehouse ObjectId
receiver_warehouse_idstringYo‘qFilter by receiver warehouse ObjectId
statesstring[]Yo‘qFilter by one or more transfer states
reason_idstringYo‘qFilter by transfer reason ObjectId
searchstringYo‘qFree-text search.
date_fromstring (date-time)Yo‘qStart of the date range.
date_tostring (date-time)Yo‘qEnd of the date range.
state_idstringYo‘q
updated_atstring (date-time)Yo‘qOnly records updated at or after this time.
organization_idstringYo‘qOrganization ObjectId.
json
{
  "page": 1,
  "limit": 20,
  "source_organization_id": "string",
  "sender_warehouse_id": "string",
  "receiver_warehouse_id": "string",
  "states": [
    "draft"
  ],
  "reason_id": "string",
  "search": "string",
  "date_from": "2025-05-01T12:00:00Z",
  "date_to": "2025-05-01T12:00:00Z",
  "state_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "updated_at": "2025-05-01T12:00:00Z",
  "organization_id": "64b7f4d9e2b3b6a0b7c5d7ff"
}

Javob

MaydonTurTavsif
totalnumber
listobject[]
list[].codestringOptional human-readable reference code
list[].request_idstringLinked transfer-request ObjectId (optional)
list[].source_organization_idstringOrganization ObjectId that owns this transfer
list[].typestringTransfer type: w2w=warehouse-to-warehouse, w2p=warehouse-to-production, p2w=production-to-warehouse, p2p=production-to-production, o2o=organization-to-organization. Mumkin qiymatlar: w2w, w2p, p2w, p2p, o2o
list[].datestring (date-time)Transfer document date (ISO 8601)
list[].shipping_datestring (date-time)Planned shipping date (ISO 8601)
list[].sender_warehouse_idstringSource warehouse ObjectId. Required when type is w2w or w2p.
list[].receiver_warehouse_idstringDestination warehouse ObjectId. Required when type is p2w or w2w.
list[].sender_employee_idstringEmployee ObjectId responsible for sending
list[].receiver_employee_idstringEmployee ObjectId responsible for receiving (optional)
list[].reason_idstringTransfer reason ObjectId
list[].price_idstringPrice list ObjectId (optional)
list[].notestringFree-text note (optional)
list[].productsobject[]List of products to transfer (at least one required)
list[].products[].product_idstringProduct ObjectId
list[].products[].amountnumberTransfer quantity (must be positive)
list[].products[].box_countnumberNumber of boxes (integer, defaults to 0)
list[].products[].box_itemnumberItems per box (optional)
list[].products[].marksstring[]Serial / excise mark codes for marked goods
list[].products[].expiration_datestring (date-time)Expiration date (ISO 8601) for perishable items
list[].products[].extra_costsobject[]Per-product extra cost allocations
list[].products[].used_measureobjectOverride measure ratio if different from the product default
list[].additional_costsobject[]Additional costs applied to the whole transfer (defaults to [])
list[].attachmentsobject[]File attachments (optional)
list[].attachments[].namestring
list[].attachments[].urlstring
list[]._idstringInternal transfer ObjectId
list[].statusstringCurrent transfer state. Mumkin qiymatlar: draft, new, accepted, in_progress, done, canceled
list[].state_idstringCustom kanban state ObjectId (when a custom pipeline column is used)
list[].is_deletedbooleanSoft-delete flag
list[].created_atstring (date-time)Creation timestamp (ISO 8601)
list[].updated_atstring (date-time)Last update timestamp (ISO 8601)
json
{
  "code": 0,
  "message": "Success",
  "status_code": 200,
  "data": {
    "total": 0,
    "list": [
      {
        "code": "string",
        "request_id": "string",
        "source_organization_id": "string",
        "type": "w2w",
        "date": "2025-05-01T12:00:00Z",
        "shipping_date": "2025-05-01T12:00:00Z",
        "sender_warehouse_id": "string",
        "receiver_warehouse_id": "string",
        "sender_employee_id": "string",
        "receiver_employee_id": "string",
        "reason_id": "string",
        "price_id": "string",
        "note": "string",
        "products": [],
        "additional_costs": [],
        "attachments": [],
        "_id": "string",
        "status": "draft",
        "state_id": "string",
        "is_deleted": false,
        "created_at": "2025-05-01T12:00:00Z",
        "updated_at": "2025-05-01T12:00:00Z"
      }
    ]
  },
  "time": "2025-05-01T12:00:00Z"
}

PUT /internal-transfer/update/{id} ​

Update an existing internal transfer. Only transfers in NEW or DRAFT state may be updated.

Kerakli ruxsat: internal_transfer_update · ruxsatlar qanday ishlaydi

So‘rov namunasi

bash
curl -X PUT 'https://api.bito.uz/integration-api/integration/api/v2/internal-transfer/update/6712f0a9c4d1e87b3a0f9911' \
  -H "api-key: $BITO_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "source_organization_id": "string",
  "type": "w2w",
  "date": "2025-05-01T12:00:00Z",
  "shipping_date": "2025-05-01T12:00:00Z",
  "sender_employee_id": "string",
  "reason_id": "string",
  "products": [
    {
      "product_id": "string",
      "amount": 0,
      "box_count": 0,
      "box_item": 0,
      "marks": [],
      "expiration_date": "2025-05-01T12:00:00Z",
      "extra_costs": [],
      "used_measure": {
        "ratio": null,
        "_id": null,
        "amount": null
      }
    }
  ]
}'
js
const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/internal-transfer/update/6712f0a9c4d1e87b3a0f9911', {
  method: 'PUT',
  headers: { 'api-key': process.env.BITO_API_KEY, 'Content-Type': 'application/json' },
  body: JSON.stringify({
    "source_organization_id": "string",
    "type": "w2w",
    "date": "2025-05-01T12:00:00Z",
    "shipping_date": "2025-05-01T12:00:00Z",
    "sender_employee_id": "string",
    "reason_id": "string",
    "products": [
      {
        "product_id": "string",
        "amount": 0,
        "box_count": 0,
        "box_item": 0,
        "marks": [],
        "expiration_date": "2025-05-01T12:00:00Z",
        "extra_costs": [],
        "used_measure": {
          "ratio": null,
          "_id": null,
          "amount": null
        }
      }
    ]
  }),
})
const { code, data } = await res.json()
python
import os
import requests

res = requests.request(
    "PUT",
    "https://api.bito.uz/integration-api/integration/api/v2/internal-transfer/update/6712f0a9c4d1e87b3a0f9911",
    headers={"api-key": os.environ["BITO_API_KEY"]},
    json={
        "source_organization_id": "string",
        "type": "w2w",
        "date": "2025-05-01T12:00:00Z",
        "shipping_date": "2025-05-01T12:00:00Z",
        "sender_employee_id": "string",
        "reason_id": "string",
        "products": [
            {
                "product_id": "string",
                "amount": 0,
                "box_count": 0,
                "box_item": 0,
                "marks": [],
                "expiration_date": "2025-05-01T12:00:00Z",
                "extra_costs": [],
                "used_measure": {
                    "ratio": None,
                    "_id": None,
                    "amount": None,
                },
            },
        ],
    },
)
print(res.json())
php
<?php
$body = <<<'JSON'
{
  "source_organization_id": "string",
  "type": "w2w",
  "date": "2025-05-01T12:00:00Z",
  "shipping_date": "2025-05-01T12:00:00Z",
  "sender_employee_id": "string",
  "reason_id": "string",
  "products": [
    {
      "product_id": "string",
      "amount": 0,
      "box_count": 0,
      "box_item": 0,
      "marks": [],
      "expiration_date": "2025-05-01T12:00:00Z",
      "extra_costs": [],
      "used_measure": {
        "ratio": null,
        "_id": null,
        "amount": null
      }
    }
  ]
}
JSON;

$ch = curl_init('https://api.bito.uz/integration-api/integration/api/v2/internal-transfer/update/6712f0a9c4d1e87b3a0f9911');
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);

Yo‘l parametrlari

ParametrTurMajburiyTavsif
idstringHaInternal-transfer ObjectId

So‘rov tanasi

MaydonTurMajburiyTavsif
codestringYo‘qOptional human-readable reference code
request_idstringYo‘qLinked transfer-request ObjectId (optional)
source_organization_idstringHaOrganization ObjectId that owns this transfer
typestringHaTransfer type: w2w=warehouse-to-warehouse, w2p=warehouse-to-production, p2w=production-to-warehouse, p2p=production-to-production, o2o=organization-to-organization. Mumkin qiymatlar: w2w, w2p, p2w, p2p, o2o
datestring (date-time)HaTransfer document date (ISO 8601)
shipping_datestring (date-time)HaPlanned shipping date (ISO 8601)
sender_warehouse_idstringYo‘qSource warehouse ObjectId. Required when type is w2w or w2p.
receiver_warehouse_idstringYo‘qDestination warehouse ObjectId. Required when type is p2w or w2w.
sender_employee_idstringHaEmployee ObjectId responsible for sending
receiver_employee_idstringYo‘qEmployee ObjectId responsible for receiving (optional)
reason_idstringHaTransfer reason ObjectId
price_idstringYo‘qPrice list ObjectId (optional)
notestringYo‘qFree-text note (optional)
productsobject[]HaList of products to transfer (at least one required)
products[].product_idstringHaProduct ObjectId
products[].amountnumberHaTransfer quantity (must be positive)
products[].box_countnumberYo‘qNumber of boxes (integer, defaults to 0)
products[].box_itemnumberYo‘qItems per box (optional)
products[].marksstring[]Yo‘qSerial / excise mark codes for marked goods
products[].expiration_datestring (date-time)Yo‘qExpiration date (ISO 8601) for perishable items
products[].extra_costsobject[]Yo‘qPer-product extra cost allocations
products[].used_measureobjectYo‘qOverride measure ratio if different from the product default
products[].used_measure.rationumberHa
products[].used_measure._idstringHa
products[].used_measure.amountnumberHa
additional_costsobject[]Yo‘qAdditional costs applied to the whole transfer (defaults to [])
attachmentsobject[]Yo‘qFile attachments (optional)
attachments[].namestringYo‘q
attachments[].pathstringHa
attachments[].sizenumberYo‘q
attachments[].notestringYo‘q
json
{
  "code": "string",
  "request_id": "string",
  "source_organization_id": "string",
  "type": "w2w",
  "date": "2025-05-01T12:00:00Z",
  "shipping_date": "2025-05-01T12:00:00Z",
  "sender_warehouse_id": "string",
  "receiver_warehouse_id": "string",
  "sender_employee_id": "string",
  "receiver_employee_id": "string",
  "reason_id": "string",
  "price_id": "string",
  "note": "string",
  "products": [
    {
      "product_id": "string",
      "amount": 0,
      "box_count": 0,
      "box_item": 0,
      "marks": [],
      "expiration_date": "2025-05-01T12:00:00Z",
      "extra_costs": [],
      "used_measure": {
        "ratio": null,
        "_id": null,
        "amount": null
      }
    }
  ],
  "additional_costs": [
    {}
  ],
  "attachments": [
    {
      "name": "string",
      "path": "string",
      "size": 0,
      "note": "string"
    }
  ]
}

Javob

Javob tuzilishi quyidagi bilan bir xil: POST /internal-transfer/create.

PUT /internal-transfer/set-status/{id} ​

Drive a state transition on an internal transfer. Valid transitions: new→draft|canceled|accepted; draft→new; accepted→in_progress|canceled; in_progress→canceled; done→canceled.

Kerakli ruxsat: internal_transfer_update · ruxsatlar qanday ishlaydi

Hujjatni bekor qiladigan ilova internal_transfer_cancel ruxsatini ham so‘rasin.

So‘rov namunasi

bash
curl -X PUT 'https://api.bito.uz/integration-api/integration/api/v2/internal-transfer/set-status/6712f0a9c4d1e87b3a0f9911' \
  -H "api-key: $BITO_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "status": "draft"
}'
js
const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/internal-transfer/set-status/6712f0a9c4d1e87b3a0f9911', {
  method: 'PUT',
  headers: { 'api-key': process.env.BITO_API_KEY, 'Content-Type': 'application/json' },
  body: JSON.stringify({
    "status": "draft"
  }),
})
const { code, data } = await res.json()
python
import os
import requests

res = requests.request(
    "PUT",
    "https://api.bito.uz/integration-api/integration/api/v2/internal-transfer/set-status/6712f0a9c4d1e87b3a0f9911",
    headers={"api-key": os.environ["BITO_API_KEY"]},
    json={
        "status": "draft",
    },
)
print(res.json())
php
<?php
$body = <<<'JSON'
{
  "status": "draft"
}
JSON;

$ch = curl_init('https://api.bito.uz/integration-api/integration/api/v2/internal-transfer/set-status/6712f0a9c4d1e87b3a0f9911');
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);

Yo‘l parametrlari

ParametrTurMajburiyTavsif
idstringHaInternal-transfer ObjectId

So‘rov tanasi

MaydonTurMajburiyTavsif
statusstringHaTarget state. Valid transitions: new→draft|canceled|accepted; draft→new; accepted→in_progress|canceled; in_progress→canceled; done→canceled.. Mumkin qiymatlar: draft, new, accepted, in_progress, done, canceled
json
{
  "status": "draft"
}

Javob

Javob tuzilishi quyidagi bilan bir xil: POST /internal-transfer/create.

PUT /internal-transfer/receive/{id} ​

Post stock for an accepted transfer, marking it DONE. Transfer must be in ACCEPTED or IN_PROGRESS state.

Kerakli ruxsat: internal_transfer_update · ruxsatlar qanday ishlaydi

So‘rov namunasi

bash
curl -X PUT 'https://api.bito.uz/integration-api/integration/api/v2/internal-transfer/receive/6712f0a9c4d1e87b3a0f9911' \
  -H "api-key: $BITO_API_KEY"
js
const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/internal-transfer/receive/6712f0a9c4d1e87b3a0f9911', {
  method: 'PUT',
  headers: { 'api-key': process.env.BITO_API_KEY },
})
const { code, data } = await res.json()
python
import os
import requests

res = requests.request(
    "PUT",
    "https://api.bito.uz/integration-api/integration/api/v2/internal-transfer/receive/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/internal-transfer/receive/6712f0a9c4d1e87b3a0f9911');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'PUT',
    CURLOPT_HTTPHEADER => ['api-key: ' . getenv('BITO_API_KEY')],
    CURLOPT_RETURNTRANSFER => true,
]);
$response = json_decode(curl_exec($ch), true);

Yo‘l parametrlari

ParametrTurMajburiyTavsif
idstringHaInternal-transfer ObjectId

So‘rov tanasi

So‘rov tanasi talab qilinmaydi.

Javob

Javob tuzilishi quyidagi bilan bir xil: POST /internal-transfer/create.


Bu sahifa OpenAPI spetsifikatsiyasidan yaratilgan.

Bito 2.0 Integration API