文档中心 > API类目 > 本地生活API

alibaba.alsc.crm.recharge.dedut.update (储值消费)

增加储值消费接口

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
param_dedut_open_req DedutOpenReq 可选 入参
  • └ biz_date
  • Date
  • 可选
  • 2019-07-04 15:32:17
  • 时间
  • └ brand_id
  • String
  • 可选
  • 3742863742
  • SaaS品牌ID(不能和outbrandid同时为空)
  • └ card_id
  • String
  • 可选
  • 7328763784623
  • 卡Id,礼品卡或会员卡Id
  • └ customer_id
  • String
  • 可选
  • 76328764276476256
  • 会员
  • └ operator_id
  • String
  • 必须
  • 65673527
  • 操作人ID(SaaS Id)
  • └ outer_order_id
  • String
  • 必须
  • 766348726342638
  • 外部核销交易单号id(外部调用方保证在isv内部是唯一,可以是paymentItemId)
  • └ remark
  • String
  • 可选
  • 撒娇好的
  • 备注
  • └ request_id
  • String
  • 必须
  • 78sd786a78d678as
  • 请求id,用来做幂等
  • └ shop_id
  • String
  • 可选
  • 73527452
  • SaaS门店ID(不能和outshopid同时为空)
  • └ value
  • Number
  • 必须
  • 2000
  • 核销总资产
  • └ biz_channel
  • String
  • 必须
  • CS
  • CS是辰森,KRY是客如云
  • └ out_brand_id
  • String
  • 可选
  • 12313
  • 外部品牌ID(不能和brandid同时为空)
  • └ out_shop_id
  • String
  • 可选
  • 3234
  • 外部门店ID,和门店ID必传一
  • └ ext_info
  • String
  • 可选
  • {"payModeId":"WX", "payModeName":"微信"}
  • 自定义参数按照json格式传入

响应参数

名称 类型 示例值 描述
result CommonResult 接口结果
  • └ biz_success
  • Boolean
  • true
  • 成功状态
  • result
  • RechargeAccountFlowDetailOpenInfo
  • 业务参数
  • └ account_id
  • String
  • 7627347265
  • 储值账户id
  • affected_property_list
  • RechargeAccountPropertyOpenInfo []
  • null
  • 操作储值资产信息列表
  • └ type
  • String
  • GIFT
  • 账户类型
  • └ value
  • Number
  • 300
  • 账户值
  • after_property_list
  • RechargeAccountPropertyOpenInfo []
  • null
  • 操作后储值资产信息列表
  • └ type
  • String
  • PRE
  • 账户类型
  • └ value
  • Number
  • 200
  • 账户值
  • before_property_list
  • RechargeAccountPropertyOpenInfo []
  • null
  • 操作前储值资产信息列表
  • └ type
  • String
  • TOTAL
  • 账户类型
  • └ value
  • Number
  • 3000
  • 账户值
  • └ brand_id
  • String
  • 767526576123
  • 品牌Id
  • └ current_value
  • Number
  • 4000
  • 交易后剩余总金额
  • ext_info
  • Extinfo
  • null
  • 扩展信息
  • └ empty
  • Boolean
  • null
  • null
  • └ flow_id
  • String
  • 7862783618
  • 储值账户流水id
  • └ flow_type
  • String
  • DEDUT
  • 储值相关的交易类型
  • └ operator
  • String
  • 76127653175
  • 操作人ID
  • └ operator_name
  • String
  • 小明
  • 操作人
  • └ order_src
  • Number
  • 2
  • 外部订单来源
  • └ order_time
  • Date
  • 2019-08-08 15:15:41
  • 交易时间
  • └ order_value
  • Number
  • -65
  • 交易总金额
  • └ outer_order_id
  • String
  • 8768237162876387236472
  • 外部交易单号id
  • └ remark
  • String
  • 机会均等
  • 理由
  • └ shop_id
  • String
  • 736182678
  • 交易门店ID
  • └ shop_name
  • String
  • 小王面馆
  • 交易门店名称
  • └ result_code
  • String
  • 200
  • 结果码
  • └ result_desc
  • String
  • 成功
  • 结果描述
  • └ result_view
  • String
  • ""
  • 错误结果显示

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaAlscCrmRechargeDedutUpdateRequest req = new AlibabaAlscCrmRechargeDedutUpdateRequest();
AlibabaAlscCrmRechargeDedutUpdateRequest.DedutOpenReq obj1 = new AlibabaAlscCrmRechargeDedutUpdateRequest.DedutOpenReq();
obj1.setBizDate(StringUtils.parseDateTime("2019-07-04 15:32:17"));
obj1.setBrandId("3742863742");
obj1.setCardId("7328763784623");
obj1.setCustomerId("76328764276476256");
obj1.setOperatorId("65673527");
obj1.setOuterOrderId("766348726342638");
obj1.setRemark("撒娇好的");
obj1.setRequestId("78sd786a78d678as");
obj1.setShopId("73527452");
obj1.setValue(2000L);
obj1.setBizChannel("CS");
obj1.setOutBrandId("12313");
obj1.setOutShopId("3234");
obj1.setExtInfo("{\"payModeId\":\"WX\", \"payModeName\":\"微信\"}");
req.setParamDedutOpenReq(obj1);
AlibabaAlscCrmRechargeDedutUpdateResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_alsc_crm_recharge_dedut_update_response>
    <result>
        <biz_success>true</biz_success>
        <result>
            <account_id>7627347265</account_id>
            <affected_property_list>
                <recharge_account_property_open_info>
                    <type>GIFT</type>
                    <value>300</value>
                </recharge_account_property_open_info>
            </affected_property_list>
            <after_property_list>
                <recharge_account_property_open_info>
                    <type>PRE</type>
                    <value>200</value>
                </recharge_account_property_open_info>
            </after_property_list>
            <before_property_list>
                <recharge_account_property_open_info>
                    <type>TOTAL</type>
                    <value>3000</value>
                </recharge_account_property_open_info>
            </before_property_list>
            <brand_id>767526576123</brand_id>
            <current_value>4000</current_value>
            <ext_info>
                <empty>null</empty>
            </ext_info>
            <flow_id>7862783618</flow_id>
            <flow_type>DEDUT</flow_type>
            <operator>76127653175</operator>
            <operator_name>小明</operator_name>
            <order_src>2</order_src>
            <order_time>2019-08-08 15:15:41</order_time>
            <order_value>-65</order_value>
            <outer_order_id>8768237162876387236472</outer_order_id>
            <remark>机会均等</remark>
            <shop_id>736182678</shop_id>
            <shop_name>小王面馆</shop_name>
        </result>
        <result_code>200</result_code>
        <result_desc>成功</result_desc>
        <result_view>&quot;&quot;</result_view>
    </result>
</alibaba_alsc_crm_recharge_dedut_update_response>

异常示例

  • XML示例
  • JSON示例
<error_response>
    <code>50</code>
    <msg>Remote service error</msg>
    <sub_code>isv.invalid-parameter</sub_code>
    <sub_msg>非法参数</sub_msg>
</error_response>

错误码解释

错误码 错误描述 解决方案

API工具

如何获得此API

FAQ

返回
顶部