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
| Maydon | Tur | Majburiy | Tavsif |
|---|---|---|---|
code | string | Yo‘q | Optional human-readable reference code |
request_id | string | Yo‘q | Linked transfer-request ObjectId (optional) |
source_organization_id | string | Ha | Organization ObjectId that owns this transfer |
type | string | Ha | Transfer 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 |
date | string (date-time) | Ha | Transfer document date (ISO 8601) |
shipping_date | string (date-time) | Ha | Planned shipping date (ISO 8601) |
sender_warehouse_id | string | Yo‘q | Source warehouse ObjectId. Required when type is w2w or w2p. |
receiver_warehouse_id | string | Yo‘q | Destination warehouse ObjectId. Required when type is p2w or w2w. |
sender_employee_id | string | Ha | Employee ObjectId responsible for sending |
receiver_employee_id | string | Yo‘q | Employee ObjectId responsible for receiving (optional) |
reason_id | string | Ha | Transfer reason ObjectId |
price_id | string | Yo‘q | Price list ObjectId (optional) |
note | string | Yo‘q | Free-text note (optional) |
products | object[] | Ha | List of products to transfer (at least one required) |
products[].product_id | string | Ha | Product ObjectId |
products[].amount | number | Ha | Transfer quantity (must be positive) |
products[].box_count | number | Yo‘q | Number of boxes (integer, defaults to 0) |
products[].box_item | number | Yo‘q | Items per box (optional) |
products[].marks | string[] | Yo‘q | Serial / excise mark codes for marked goods |
products[].expiration_date | string (date-time) | Yo‘q | Expiration date (ISO 8601) for perishable items |
products[].extra_costs | object[] | Yo‘q | Per-product extra cost allocations |
products[].used_measure | object | Yo‘q | Override measure ratio if different from the product default |
products[].used_measure.measure_id | string | Yo‘q | |
products[].used_measure.ratio | number | Yo‘q | |
additional_costs | object[] | Yo‘q | Additional costs applied to the whole transfer (defaults to []) |
attachments | object[] | Yo‘q | File attachments (optional) |
attachments[].name | string | Yo‘q | |
attachments[].url | string | Yo‘q |
{
"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
| Maydon | Tur | Tavsif |
|---|---|---|
code | string | Optional human-readable reference code |
request_id | string | Linked transfer-request ObjectId (optional) |
source_organization_id | string | Organization ObjectId that owns this transfer |
type | string | Transfer 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 |
date | string (date-time) | Transfer document date (ISO 8601) |
shipping_date | string (date-time) | Planned shipping date (ISO 8601) |
sender_warehouse_id | string | Source warehouse ObjectId. Required when type is w2w or w2p. |
receiver_warehouse_id | string | Destination warehouse ObjectId. Required when type is p2w or w2w. |
sender_employee_id | string | Employee ObjectId responsible for sending |
receiver_employee_id | string | Employee ObjectId responsible for receiving (optional) |
reason_id | string | Transfer reason ObjectId |
price_id | string | Price list ObjectId (optional) |
note | string | Free-text note (optional) |
products | object[] | List of products to transfer (at least one required) |
products[].product_id | string | Product ObjectId |
products[].amount | number | Transfer quantity (must be positive) |
products[].box_count | number | Number of boxes (integer, defaults to 0) |
products[].box_item | number | Items per box (optional) |
products[].marks | string[] | Serial / excise mark codes for marked goods |
products[].expiration_date | string (date-time) | Expiration date (ISO 8601) for perishable items |
products[].extra_costs | object[] | Per-product extra cost allocations |
products[].used_measure | object | Override measure ratio if different from the product default |
products[].used_measure.measure_id | string | |
products[].used_measure.ratio | number | |
additional_costs | object[] | Additional costs applied to the whole transfer (defaults to []) |
attachments | object[] | File attachments (optional) |
attachments[].name | string | |
attachments[].url | string | |
_id | string | Internal transfer ObjectId |
status | string | Current transfer state. Mumkin qiymatlar: draft, new, accepted, in_progress, done, canceled |
state_id | string | Custom kanban state ObjectId (when a custom pipeline column is used) |
is_deleted | boolean | Soft-delete flag |
created_at | string (date-time) | Creation timestamp (ISO 8601) |
updated_at | string (date-time) | Last update timestamp (ISO 8601) |
{
"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
| Parametr | Tur | Majburiy | Tavsif |
|---|---|---|---|
id | string | Ha | Internal-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
| Maydon | Tur | Majburiy | Tavsif |
|---|---|---|---|
page | number | Ha | Standart: 1 |
limit | number | Ha | Standart: 20 |
source_organization_id | string | Yo‘q | Filter by source organization ObjectId |
sender_warehouse_id | string | Yo‘q | Filter by sender warehouse ObjectId |
receiver_warehouse_id | string | Yo‘q | Filter by receiver warehouse ObjectId |
states | string[] | Yo‘q | Filter by one or more transfer states |
reason_id | string | Yo‘q | Filter by transfer reason ObjectId |
{
"page": 1,
"limit": 20,
"source_organization_id": "string",
"sender_warehouse_id": "string",
"receiver_warehouse_id": "string",
"states": [
"draft"
],
"reason_id": "string"
}Javob
| Maydon | Tur | Tavsif |
|---|---|---|
total | number | |
list | object[] | |
list[].code | string | Optional human-readable reference code |
list[].request_id | string | Linked transfer-request ObjectId (optional) |
list[].source_organization_id | string | Organization ObjectId that owns this transfer |
list[].type | string | Transfer 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[].date | string (date-time) | Transfer document date (ISO 8601) |
list[].shipping_date | string (date-time) | Planned shipping date (ISO 8601) |
list[].sender_warehouse_id | string | Source warehouse ObjectId. Required when type is w2w or w2p. |
list[].receiver_warehouse_id | string | Destination warehouse ObjectId. Required when type is p2w or w2w. |
list[].sender_employee_id | string | Employee ObjectId responsible for sending |
list[].receiver_employee_id | string | Employee ObjectId responsible for receiving (optional) |
list[].reason_id | string | Transfer reason ObjectId |
list[].price_id | string | Price list ObjectId (optional) |
list[].note | string | Free-text note (optional) |
list[].products | object[] | List of products to transfer (at least one required) |
list[].products[].product_id | string | Product ObjectId |
list[].products[].amount | number | Transfer quantity (must be positive) |
list[].products[].box_count | number | Number of boxes (integer, defaults to 0) |
list[].products[].box_item | number | Items per box (optional) |
list[].products[].marks | string[] | Serial / excise mark codes for marked goods |
list[].products[].expiration_date | string (date-time) | Expiration date (ISO 8601) for perishable items |
list[].products[].extra_costs | object[] | Per-product extra cost allocations |
list[].products[].used_measure | object | Override measure ratio if different from the product default |
list[].additional_costs | object[] | Additional costs applied to the whole transfer (defaults to []) |
list[].attachments | object[] | File attachments (optional) |
list[].attachments[].name | string | |
list[].attachments[].url | string | |
list[]._id | string | Internal transfer ObjectId |
list[].status | string | Current transfer state. Mumkin qiymatlar: draft, new, accepted, in_progress, done, canceled |
list[].state_id | string | Custom kanban state ObjectId (when a custom pipeline column is used) |
list[].is_deleted | boolean | Soft-delete flag |
list[].created_at | string (date-time) | Creation timestamp (ISO 8601) |
list[].updated_at | string (date-time) | Last update timestamp (ISO 8601) |
{
"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
| Parametr | Tur | Majburiy | Tavsif |
|---|---|---|---|
id | string | Ha | Internal-transfer ObjectId |
So‘rov tanasi
| Maydon | Tur | Majburiy | Tavsif |
|---|---|---|---|
code | string | Yo‘q | Optional human-readable reference code |
request_id | string | Yo‘q | Linked transfer-request ObjectId (optional) |
source_organization_id | string | Ha | Organization ObjectId that owns this transfer |
type | string | Ha | Transfer 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 |
date | string (date-time) | Ha | Transfer document date (ISO 8601) |
shipping_date | string (date-time) | Ha | Planned shipping date (ISO 8601) |
sender_warehouse_id | string | Yo‘q | Source warehouse ObjectId. Required when type is w2w or w2p. |
receiver_warehouse_id | string | Yo‘q | Destination warehouse ObjectId. Required when type is p2w or w2w. |
sender_employee_id | string | Ha | Employee ObjectId responsible for sending |
receiver_employee_id | string | Yo‘q | Employee ObjectId responsible for receiving (optional) |
reason_id | string | Ha | Transfer reason ObjectId |
price_id | string | Yo‘q | Price list ObjectId (optional) |
note | string | Yo‘q | Free-text note (optional) |
products | object[] | Ha | List of products to transfer (at least one required) |
products[].product_id | string | Ha | Product ObjectId |
products[].amount | number | Ha | Transfer quantity (must be positive) |
products[].box_count | number | Yo‘q | Number of boxes (integer, defaults to 0) |
products[].box_item | number | Yo‘q | Items per box (optional) |
products[].marks | string[] | Yo‘q | Serial / excise mark codes for marked goods |
products[].expiration_date | string (date-time) | Yo‘q | Expiration date (ISO 8601) for perishable items |
products[].extra_costs | object[] | Yo‘q | Per-product extra cost allocations |
products[].used_measure | object | Yo‘q | Override measure ratio if different from the product default |
products[].used_measure.measure_id | string | Yo‘q | |
products[].used_measure.ratio | number | Yo‘q | |
additional_costs | object[] | Yo‘q | Additional costs applied to the whole transfer (defaults to []) |
attachments | object[] | Yo‘q | File attachments (optional) |
attachments[].name | string | Yo‘q | |
attachments[].url | string | Yo‘q |
{
"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
| Parametr | Tur | Majburiy | Tavsif |
|---|---|---|---|
id | string | Ha | Internal-transfer ObjectId |
So‘rov tanasi
| Maydon | Tur | Majburiy | Tavsif |
|---|---|---|---|
status | string | Ha | Target 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 |
reason | string | Yo‘q | Optional human-readable reason for the transition (informational only, not persisted) |
{
"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
| Parametr | Tur | Majburiy | Tavsif |
|---|---|---|---|
id | string | Ha | Internal-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.