接口文档 / 收费接口

设置或修改收费单快递信息

支持收费完成后修改快递信息

PUT/api/v2/open-agency/charge/{chargeSheetId}/delivery在线调试

请求参数

名称说明类型
Path 参数
chargeSheetId必填

收费单ID

string
Body 参数
addressProvinceId必填

省编码

示例:510000

string
addressProvinceName可选

省名称

示例:四川

string
addressCityId必填

市编码

示例:510100

string
addressCityName可选

市名称

示例:成都市

string
addressDistrictId必填

区编码

示例:510109

string
addressDistrictName可选

区名称

示例:高新区

string
addressDetail必填

详细地址

示例:交子大道180号

string
deliveryName必填

收件人名称

示例:张三

string
deliveryMobile必填

收件人手机号

示例:18012312312

string
deliveryCompanyName必填

快递公司名称,需要预先在系统中配置好

示例:顺丰快递

string
deliveryFee可选

快递费,寄付时不传自动计算出费用

示例:12

number
deliveryOrderNo可选

快递单号

string
deliveryPayType必填

快递费支付方式 0:到付 1:寄付

示例:0

范围:0 ~ 9223372036854776000

integer
operatorId必填

操作人ID

示例:00000000000000000000000000000000

string

请求示例

json
{
  "addressProvinceId": 510000,
  "addressProvinceName": "四川",
  "addressCityId": 510100,
  "addressCityName": "成都市",
  "addressDistrictId": 510109,
  "addressDistrictName": "高新区",
  "addressDetail": "交子大道180号",
  "deliveryName": "张三",
  "deliveryMobile": 18012312312,
  "deliveryCompanyName": "顺丰快递",
  "deliveryFee": 12,
  "deliveryOrderNo": "string",
  "deliveryPayType": 0,
  "operatorId": "00000000000000000000000000000000"
}

响应参数

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

数据

object
id必填

收费单唯一标识

示例:ffffffff00000000220e67a8116d8000

string
status可选

收费单状态 0:未收费 1:部分收费 2:收费完成 3:部分退费 4:退费完成

示例:0

integer
type可选

收费单类型 1:挂号 2:门诊 3:零售收费 5:会员卡充值\退费 6:执行站开单 7:咨询单 8:自主续方 9:家庭医生签约 10:营销卡开卡\销卡 11:营销卡项充值\退费

示例:1

integer
created可选

创建时间

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

格式:date-time

string
receivableFee可选

应收金额

示例:0.01

number
receivedFee可选

实收金额

示例:0

number
refundFee可选

退费金额

示例:0.01

number
discountFee必填

优惠金额(负值)

示例:-10

number
refundTime可选

退费时间

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

格式:date-time

string
sellerId可选

销售员id

示例:ffffff000000xxxxx

string
sellerName可选

销售员名字

示例:张三

string
registrationSheetId可选

挂号单ID,注意:零售收费、在线咨询等与挂号不相关的途径产生的收退费事件,该字段返回的值为空

示例:ffffffff0000000025b0df48001ae013

string
patientOrderId可选

就诊单ID

示例:ffffffff00000000220e67a8116d8000

string
patientOrderNo可选

诊号

示例:00019691

string
isDraft可选

是否是草稿 0:不是草稿 1:是草稿

示例:0

integer
isClosed可选

是否关闭 0:未关闭 1:已关闭

示例:0

integer
chargedTime可选

收费完成时间

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

格式:date-time

string
fromSource可选

来源 0:正常收费单 1:openApi创建的零售收费单

示例:1

integer

响应示例

json
{
  "data": {
    "id": "ffffffff00000000220e67a8116d8000",
    "status": 0,
    "type": 1,
    "created": "2022-04-06 15:12:53",
    "receivableFee": 0.01,
    "receivedFee": 0,
    "refundFee": 0.01,
    "discountFee": -10,
    "refundTime": "2022-04-07 15:12:53",
    "charger": {
      "id": "string",
      "name": "张三"
    },
    "deliveryInfo": {
      "addressProvinceName": "四川省",
      "addressCityName": "成都市",
      "addressDistrictName": "高新区",
      "addressDetail": "四川省成都市高新区xxx街道xxx",
      "deliveryName": "张三",
      "deliveryMobile": 18088888888,
      "deliveryCompany": {
        "id": 127203805890060290,
        "name": "string"
      },
      "deliveryOrderNo": 20827634879930370,
      "deliveryPayType": 1,
      "deliveryFee": 10
    },
    "doctor": {
      "id": "string",
      "mobile": 18088888888,
      "name": "张三",
      "sex": "男",
      "headImgUrl": "http://dev-img.abcyun.cn/avatar/1634032865347-986128.jpg",
      "introduction": "毕业于陆军军医大学临床医学七年制",
      "practiceImgUrl": "string",
      "doctorPageUrl": "string",
      "doctorTags": "省级名中医、市级名中医"
    },
    "patient": {
      "id": "000000fc446f4dbd989857e305b00d6s",
      "name": "张三",
      "mobile": 18080000000,
      "sex": "男",
      "birthday": "1970-08-14",
      "age": "60岁2月1天",
      "idCard": 630101200010075800,
      "idCardType": "身份证",
      "visitReason": "string"
    },
    "medicalRecord": {
      "id": "string",
      "outpatientSheetId": "ffffffff00000000094c2a500293c000",
      "chiefComplaint": "咽痛,干咳,咳痰",
      "pastHistory": "既往体健,既往有高血压",
      "familyHistory": "string",
      "presentHistory": "string",
      "physicalExamination": "string",
      "diagnosisInfos": "JX.001.001,急性上呼吸道感染,医保ICD10",
      "diagnosis": "急性上呼吸道感染",
      "doctorAdvice": "string",
      "syndrome": "string",
      "therapy": "string",
      "chineseExamination": "string",
      "wearGlassesHistory": "近视",
      "epidemiologicalHistory": "无",
      "obstetricalHistory": "string",
      "eyeExamination": {
        "items": [
          {
            "key": "string",
            "name": "string",
            "rightEyeValue": "string",
            "leftEyeValue": "string"
          }
        ]
      },
      "allergicHistory": "青霉素过敏",
      "auxiliaryExamination": "无",
      "attachments": [
        {
          "url": "https://cd-cis-static-assets-dev.oss-cn-chengdu.aliyuncs.com/123.jpg",
          "fileName": "NatGeo09.jpg",
          "fileSize": 4771201
        }
      ]
    },
    "chargeFormItems": [
      {
        "id": "0002b62eaf9c461f85ff3fedc4583a79",
        "chargeFormId": "0002b62eaf9c461f85ff3fedc4583a80",
        "productId": "e8aa6074f8c44dfe9f49e076e30265a9",
        "productName": "注射用青霉素钠",
        "status": 0,
        "unit": "支",
        "receivedFee": 40,
        "unitPrice": 10,
        "displayUnitPrice": 10,
        "displayTotalPrice": 40,
        "unitCount": 4,
        "doseCount": 1,
        "totalCount": 4,
        "productType": 1,
        "productSubType": 3,
        "sourceItemType": 0,
        "productInfo": {
          "children": [
            null
          ],
          "id": "string",
          "name": "阿莫西林",
          "shebao": {
            "nationalCode": "T001700643",
            "insuranceTypes": [
              {
                "insuranceType": null,
                "reimbursementRatio": null
              }
            ]
          },
          "disableSell": 0,
          "typeId": 1,
          "dismounting": 0,
          "typeName": "药品",
          "customTypeId": 213,
          "isSell": 1,
          "customTypeName": "抗生素",
          "inTaxRat": 13,
          "manufacturer": "拜耳",
          "outTaxRat": 13,
          "medicineNmpn": "H20000001",
          "barCode": "string",
          "pieceUnit": "支",
          "pieceNum": 10,
          "piecePrice": 10.5,
          "packageUnit": "盒",
          "packagePrice": 105,
          "shortId": "K1001",
          "specification": "1ml:0.5mg*10支/盒",
          "otcType": 1,
          "status": 1,
          "lastModified": "2022-05-13 12:22:56",
          "goodsSpu": {
            "id": "string",
            "name": "string",
            "brandName": "string",
            "material": "string"
          },
          "goodsSpec": {
            "color": "string",
            "spec": "string"
          },
          "remark": "abc",
          "dosageFormType": 0,
          "dosageFormTypeName": "string",
          "priceType": 0,
          "priceMakeupPercent": 0
        },
        "composeChildren": [
          null
        ],
        "extraInfo": "string",
        "giftFlag": 1,
        "deductDiscountInfos": [
          {
            "deductedCount": 1,
            "id": "string",
            "name": "string",
            "unitPrice": 54,
            "discountPrice": -4.5,
            "type": 0,
            "subType": 0
          }
        ],
        "discountPromotionInfos": [
          {
            "id": "string",
            "name": "string",
            "discountPrice": -4.5,
            "type": 0,
            "subType": 0
          }
        ]
      }
    ],
    "chargeTransactions": [
      {
        "id": "ffffffff00000000220e67a8116d8001",
        "payMode": 1,
        "paySubMode": 1,
        "payModeName": "ABC支付",
        "payModeDisplayName": "ABC支付-微信",
        "amount": 0,
        "created": "2022-04-06 15:12:53",
        "isRefunded": 0,
        "thirdTransactionId": 123456789,
        "thirdPartyPayInfo": {
          "transactionId": "string",
          "thirdPartyTransactionId": "string",
          "channelTransactionId": "string"
        },
        "chargeTransactionRecords": [
          {
            "id": "ffffffff00000000265ff80811ab200x",
            "transactionId": "ffffffff00000000265ff80811ab2004",
            "chargeType": 1,
            "productId": "00000000000000000000000000000001",
            "productName": "白术",
            "productType": 5,
            "productSubType": 0,
            "composeType": 0,
            "productUnit": "string",
            "productUnitCount": 1,
            "doseCount": 1,
            "totalPrice": 0,
            "discountPrice": 0,
            "created": "2022-04-06 15:12:53",
            "sceneType": 0,
            "composeChildren": [
              null
            ]
          }
        ],
        "comment": "string",
        "thirdCardId": 3836996472035590000
      }
    ],
    "chargeTransactionPaidRecords": [
      {
        "productId": "00000000000000000000000000000001",
        "productName": "白术",
        "productType": 5,
        "productSubType": 0,
        "composeType": 0,
        "productUnit": "string",
        "productUnitCount": 1,
        "doseCount": 1,
        "totalPrice": 0,
        "discountPrice": 0,
        "records": 0
      }
    ],
    "sellerId": "ffffff000000xxxxx",
    "sellerName": "张三",
    "registrationSheetId": "ffffffff0000000025b0df48001ae013",
    "patientOrderId": "ffffffff00000000220e67a8116d8000",
    "patientOrderNo": "00019691",
    "isDraft": 0,
    "isClosed": 0,
    "chargedTime": "2022-04-06 15:12:53",
    "fromSource": 1
  },
  "error": null
}

业务失败包装示意

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

查看 HTTP 状态与业务码排查

ABC 开放平台 · 诊所管家

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

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

诊所管家