接口文档 / 商品接口

创建入库单

POST/api/v2/open-agency/products/in-orders在线调试

请求参数

名称说明类型
Body 参数
supplierId必填

供应商Id

string
outOrderNo可选

随货单号

示例:20241112001

string
pharmacyNo可选

药房号,默认0号药房

示例:0

integer
toClinicId可选

入库门店ID,仅总部支持给其他子店入库,其他场景为当前门店ID

示例:ffffffff000000000000000000000001

string
comment可选

单据备注,不能超过 500 个字符

示例:备注

string

请求示例

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
id可选

出/入库单ID

integer
inOrderId可选

退货的入库单ID

integer
orderNo可选

入库单号

示例:RK20220526000001

string
status可选

入库单状态 0:待审核 1:待确认 2:已完成 9:已拒绝 31:撤回

integer
organName可选

门店

示例:高新大源店

string
organId可选

门店ID

示例:ffffffff00000000264a75300d752999

string
amount可选

含税金额

示例:6033.23

number
count可选

数量

示例:12

number
kindCount可选

品种数量

示例:5

integer
operator可选

操作人(入库人)

string
operatorId可选

操作人ID

string
supplier可选

供应商

string
supplierId可选

供应商ID

string
effectiveDate可选

生效时间

示例:2022-04-07 15:12:53

格式:date-time

string
lastModified可选

最后修改时间

示例:2022-05-13 12:22:56

格式:date-time

string
type可选

类型 0:采购入库 10:退货出库

integer

响应示例

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 状态与业务码排查

ABC 开放平台 · 诊所管家

如有疑问,请扫码加入企业微信群咨询。

企业微信群二维码
没有匹配结果

诊所管家