接口文档 / 商品接口

获取进销存明细

支持以下查询方式:
1. 查询指定日期的进销存明细:传 date、offset、limit。
2. 查询出入库单、盘点单、发药单、调拨单进销存明细:传 orderIdList。
3. 查询收费单进销存明细:传 chargeSheetList。

POST/api/v2/open-agency/products/inout-stock-details在线调试

请求参数

名称说明类型
Body 参数
date可选

日期(格式yyyy-MM-dd)

示例:2020-03-05

格式:date

string
type必填

进销存单据类型 1:出库 2:盘点 3:发退药 4:调拨 5:入库 6:领用

示例:1

integer
offset可选

页偏移,如果按照日期拉取,则必填,默认值为0

示例:0

最小:0

integer
limit可选

每页大小,如果按照日期拉取,则必填,默认值为 10,最大值为 100

示例:10

范围:1 ~ 100

integer

请求示例

json
{
  "date": "2020-03-05",
  "orderIdList": [
    "12334234",
    "456667"
  ],
  "chargeSheetList": [
    {
      "patientOrderId": "string",
      "chargeSheetId": "string"
    }
  ],
  "type": 1,
  "offset": 0,
  "limit": 10
}

响应参数

名称说明类型
Body 参数
data可选

数据

object
total可选

总数

示例:10

integer

响应示例

json
{
  "data": {
    "detailsList": [
      {
        "stockLogId": 123456,
        "date": "2020-03-05 12:00:00",
        "productId": "ffffffff00000000347730f37eb54000",
        "productShortId": "H12334",
        "productName": "阿莫西林",
        "pieceCount": 10,
        "packageCount": 1,
        "action": "发药",
        "orderId": 123456,
        "orderItemId": 123456789,
        "patientOrderId": "ffffffff00000000347ce07462de0001",
        "sourceOrderId": "ffffffff00000000347ce07462de0001",
        "sourceOrderItemId": "ffffffff00000000347ce07462de0001",
        "packageCostPrice": 10,
        "batchId": 123456,
        "batchNo": 20200305,
        "productionDate": "2020-03-05",
        "expireDate": "2020-03-05",
        "inOrderId": 123456,
        "inOrderItemId": 12345678,
        "inOrderItemOutDetailId": "X12345678",
        "costPrice": -10,
        "salePrice": 10,
        "pieceNum": 7,
        "traceableCodeList": [
          {
            "no": 86975041000000000000,
            "type": 0,
            "hisPieceCount": 10,
            "hisPackageCount": 1,
            "count": 1
          }
        ]
      }
    ],
    "total": 10
  },
  "error": null
}

业务失败包装示意

json
{
  "data": null,
  "error": {
    "code": 11003,
    "message": "不支持的授权类型{grantType}"
  }
}

查看 HTTP 状态与业务码排查

ABC 开放平台 · 诊所管家

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

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

诊所管家