Skip to content

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.

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.measure_idstringYo‘q
products[].used_measure.rationumberYo‘q
additional_costsobject[]Yo‘qAdditional costs applied to the whole transfer (defaults to [])
attachmentsobject[]Yo‘qFile attachments (optional)
attachments[].namestringYo‘q
attachments[].urlstringYo‘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": {
        "measure_id": null,
        "ratio": null
      }
    }
  ],
  "additional_costs": [
    {}
  ],
  "attachments": [
    {
      "name": "string",
      "url": "string"
    }
  ]
}

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.

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.

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
json
{
  "page": 1,
  "limit": 20,
  "source_organization_id": "string",
  "sender_warehouse_id": "string",
  "receiver_warehouse_id": "string",
  "states": [
    "draft"
  ],
  "reason_id": "string"
}

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.

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.measure_idstringYo‘q
products[].used_measure.rationumberYo‘q
additional_costsobject[]Yo‘qAdditional costs applied to the whole transfer (defaults to [])
attachmentsobject[]Yo‘qFile attachments (optional)
attachments[].namestringYo‘q
attachments[].urlstringYo‘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": {
        "measure_id": null,
        "ratio": null
      }
    }
  ],
  "additional_costs": [
    {}
  ],
  "attachments": [
    {
      "name": "string",
      "url": "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.

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
reasonstringYo‘qOptional human-readable reason for the transition (informational only, not persisted)
json
{
  "status": "draft",
  "reason": "string"
}

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.

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