接口文档 / 商品接口
创建入库单
POST/api/v2/open-agency/products/in-orders在线调试 请求参数
| 名称 | 说明 | 类型 |
|---|
| Body 参数 |
|---|
supplierId必填
| | string |
outOrderNo可选
| | string |
pharmacyNo可选
| | integer |
toClinicId可选
| | string |
comment可选
| | string |
▸inOrderItemList必填 | | array<object> |
请求示例
json
{
"supplierId": "string",
"outOrderNo": 20241112001,
"pharmacyNo": 0,
"toClinicId": "ffffffff000000000000000000000001",
"comment": "备注",
"inOrderItemList": [
{
"goodsId": "ffffffff000000000000000000000001",
"goodsShortId": 12345,
"unit": "瓶",
"unitCount": 0,
"unitCostPrice": 0,
"totalCostPrice": 0,
"batchNo": "string",
"expireDate": "2026-01-01",
"productionDate": "2026-01-01",
"outDetailId": "string",
"traceableCodeList": [
{
"no": 86975041000000000000,
"hisPieceCount": 10,
"hisPackageCount": 1
}
]
}
]
}
响应参数
| 名称 | 说明 | 类型 |
|---|
| Body 参数 |
|---|
▾data可选 | | object |
▸comment可选 | | object |
id可选
| | integer |
▸inOrderItemList可选 | | array<object> |
inOrderId可选
| | integer |
orderNo可选
| | string |
status可选
| | integer |
organName可选
| | string |
organId可选
| | string |
amount可选
| | number |
count可选
| | number |
kindCount可选
| | integer |
operator可选
| | string |
operatorId可选
| | string |
supplier可选
| | string |
supplierId可选
| | string |
effectiveDate可选
| | string |
lastModified可选
| | string |
▸pharmacy可选 | | object |
type可选
| | integer |
▸error可选可为空 | | object |
响应示例
json
{
"data": {
"comment": {
"time": "2026-01-01T00:00:00Z",
"content": "string",
"employeeId": "string",
"employeeName": "string"
},
"id": 0,
"inOrderItemList": [
{
"id": 123456,
"inId": 3123456,
"originalItemId": 123456,
"productId": "ffffffff0000000034966c3a883ec000",
"productShortId": 1000001,
"productName": "阿莫西林",
"specification": "string",
"expiryDate": "2022-05-10",
"productionDate": "2024-05-10",
"pieceNum": 5,
"pieceUnit": "片",
"packageUnit": "盒",
"packageCostPrice": 12.5,
"packageCount": 2,
"pieceCount": 10,
"unqualifiedPackageCount": 2,
"unqualifiedPieceCount": 10,
"purchaseOrderId": "string",
"purchaseOrderItemId": "string",
"amount": 6033.23,
"totalCost": 6033.23,
"batchId": 100026529,
"batchNo": 20220526000001,
"outDetailId": 12312,
"stockInOutDetailId": 12312,
"created": "2022-05-10 12:22:56",
"lastModified": "2022-05-13 12:22:56",
"traceableCodeList": [
{
"no": 86975041000000000000,
"type": 0,
"hisPieceCount": 10,
"hisPackageCount": 1,
"count": 1
}
]
}
],
"inOrderId": 0,
"orderNo": "RK20220526000001",
"status": 0,
"organName": "高新大源店",
"organId": "ffffffff00000000264a75300d752999",
"amount": 6033.23,
"count": 12,
"kindCount": 5,
"operator": "string",
"operatorId": "string",
"supplier": "string",
"supplierId": "string",
"effectiveDate": "2022-04-07 15:12:53",
"lastModified": "2022-05-13 12:22:56",
"pharmacy": {
"no": 0
},
"type": 0
},
"error": null
}
业务失败包装示意
json
{
"data": null,
"error": {
"code": 11003,
"message": "不支持的授权类型{grantType}"
}
}
查看 HTTP 状态与业务码排查