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

alibaba.alsc.right.decisionsend (权益决策发放)

开放本地生活的权益发放给外部使用,常见场景如:凭证

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
req DecisionSendTicketTopReq 必须 请求参数
  • └ right_act_list
  • String []
  • 可选
  • [{ "actCode": "xxx", "rightId": 123 },{ "actCode": "yyy", "rightId": 456 }]
  • 权益活动列表
  • └ scene_code
  • String
  • 必须
  • mTawvU4GJV3fCwIW30QIiw ==
  • 加密场景码
  • └ act_codes
  • String []
  • 可选
  • ["uxqbd0w1wZ/q8MKKBXDTSB0b3QEoleSUBuGGu5eW","uxqbd0w1wZ/q8MKKBXDTSB0b3QEoleSUBuGGu5eW"]
  • 加密活动码
  • └ request_id
  • String
  • 必须
  • uuid
  • 请求id(幂等)
  • └ biz_code
  • String
  • 必须
  • ISV-XXX
  • 业务码
  • └ alipay_id
  • String
  • 必须
  • 2088111111111111
  • 支付宝id

响应参数

名称 类型 示例值 描述
result BaseResponse 响应结果
  • └ trace_id
  • String
  • 0bba816316284896650043363e24dc
  • traceId
  • result_obj
  • DecisionSendTicketTopResp
  • 发放结果
  • right_ticket_list
  • RightSendTicketDTO []
  • 权益发放实例列表
  • └ right_name
  • String
  • xx电子凭证
  • 权益名称
  • └ out_biz_instance_id
  • String
  • 43545234673489
  • 外部权益实例id(凭证任务id)
  • └ right_instance_id
  • String
  • 7000246010032578xx
  • 权益实例id
  • └ status
  • String
  • SUCCESS,FAIL,SENDING,NO_DECISION_ITEM
  • 发放状态
  • └ can_retry
  • Boolean
  • true
  • 是否可重试
  • └ success
  • Boolean
  • true
  • 结果
  • └ result_code
  • String
  • 结果码
  • └ result_msg
  • String
  • 结果信息

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaAlscRightDecisionsendRequest req = new AlibabaAlscRightDecisionsendRequest();
AlibabaAlscRightDecisionsendRequest.DecisionSendTicketTopReq obj1 = new AlibabaAlscRightDecisionsendRequest.DecisionSendTicketTopReq();
obj1.setRightActList("{   "actCode": "xxx",   "rightId": 123 },{   "actCode": "yyy",   "rightId": 456 }");
obj1.setSceneCode("mTawvU4GJV3fCwIW30QIiw ==");
obj1.setActCodes(""uxqbd0w1wZ/q8MKKBXDTSB0b3QEoleSUBuGGu5eW","uxqbd0w1wZ/q8MKKBXDTSB0b3QEoleSUBuGGu5eW"");
obj1.setRequestId("uuid");
obj1.setBizCode("ISV-XXX");
obj1.setAlipayId("2088111111111111");
req.setReq(obj1);
AlibabaAlscRightDecisionsendResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_alsc_right_decisionsend_response>
    <result>
        <trace_id>0bba816316284896650043363e24dc</trace_id>
        <result_obj>
            <right_ticket_list>
                <right_send_ticket_d_t_o>
                    <right_name>xx电子凭证</right_name>
                    <out_biz_instance_id>43545234673489</out_biz_instance_id>
                    <right_instance_id>7000246010032578xx</right_instance_id>
                </right_send_ticket_d_t_o>
            </right_ticket_list>
            <status>SUCCESS,FAIL,SENDING,NO_DECISION_ITEM</status>
        </result_obj>
        <can_retry>true</can_retry>
        <success>true</success>
        <result_code>无</result_code>
        <result_msg>无</result_msg>
    </result>
</alibaba_alsc_right_decisionsend_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

返回
顶部