文档中心 > API类目 > 天猫供应链

alibaba.dchain.aoxiang.consignorder.gift.binding (赠品绑赠计算占用)

赠品绑赠计算占用

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
binding_consignorder_gift_request BindingConsignOrderGiftRequest 可选 赠品绑赠计算占用入参
  • └ distribution_type
  • String
  • 可选
  • 1
  • 分销类型(不传代表非分销场景) 枚举值: (1, "直营和分销全参与"), (2, "仅直营参与"), (3, "仅分销参与"), (4, "指定分销店铺");
  • └ source_platform_code
  • String
  • 必须
  • TB
  • 订单来源平台编码,TB= 淘宝 、TM=天猫 、JD=京东、DD=当当、PP=拍拍、YX=易讯、EBAY=ebay、QQ=QQ网购、AMAZON=亚马逊、SN=苏宁、GM=国美、WPH=唯品会、JM=聚美、LF=乐蜂、MGJ=蘑菇街、JS=聚尚、PX=拍鞋、YT=银泰、YHD=1号店、VANCL=凡客、YL=邮乐、YG=优购、1688=阿里巴巴、POS=POS门店、MIA=蜜芽、GW=商家官网、CT=村淘、YJWD=云集微店、PDD=拼多多、 DYXD=抖音小店、KS=快手、OTHERS=其他
  • └ trade_id
  • String
  • 必须
  • 123456
  • 交易主单
  • └ trade_create_time
  • Number
  • 必须
  • 1639041360000
  • 交易下单时间(毫秒)
  • └ trade_pay_time
  • Number
  • 必须
  • 1639041360000
  • 交易支付时间(毫秒)
  • └ order_amount
  • Number
  • 必须
  • 20007
  • 订单金额:支付金额-退款金额,单位:分,如:20007,表示:20元7分
  • └ payment
  • Number
  • 必须
  • 20007
  • 支付金额,单位:分,如:20007,表示:20元7分
  • └ consign_order_code
  • String
  • 必须
  • 123456
  • 翱象发货单号
  • └ buyer_nick
  • String
  • 必须
  • 用户昵称
  • 买家昵称
  • └ product_type
  • String
  • 可选
  • 1
  • 订单产品类型,必填,不传默认0,枚举值: (0, "全量产品类型"), (1,"普通产品类型(代表除预售下沉提前发货产品类型以外的类型)"), (2, "预售下沉提前发货产品类型"), (3, "普通预售产品类型");
  • └ warehouse_code
  • String
  • 必须
  • 123456
  • 仓库编码
  • └ seller_message
  • String
  • 可选
  • xxxxxxx
  • 卖家留言
  • └ buyer_message
  • String
  • 可选
  • xxxxxxx
  • 买家留言
  • receiver_info
  • ReceiverInfo
  • 可选
  • 收件人结构体
  • └ country
  • String
  • 可选
  • CN
  • 收件人国家(地区)二字码。https://www.ufsoo.com/news/detail-59307681-b5e1-4328-a6e6-20fddd6c5ec6.html
  • └ province
  • String
  • 可选
  • 浙江
  • 收件人所在省份
  • └ city
  • String
  • 可选
  • 杭州
  • 收件人所在城市
  • └ area
  • String
  • 可选
  • 余杭区
  • 收件人所在地区
  • └ town
  • String
  • 可选
  • 五常街道
  • 收件人所在村镇/街道
  • sub_trade_orders
  • SubTradeOrder []
  • 必须
  • 主单包含的子单
  • └ trade_id
  • String
  • 必须
  • 123456
  • 子交易单号
  • └ item_name
  • String
  • 必须
  • 羽绒服
  • 商品名称
  • └ item_id
  • String
  • 必须
  • 123456
  • 商品ID
  • └ sku_id
  • String
  • 可选
  • 123456
  • 商品SkuID
  • └ sc_item_name
  • String
  • 必须
  • 羽绒服
  • 货品名称
  • └ sc_item_code
  • String
  • 必须
  • 123456
  • 货品编码
  • └ payment
  • Number
  • 必须
  • 20007
  • 支付金额,单位:分,如:20007,表示:200元7分
  • └ owner_code
  • String
  • 必须
  • 123456
  • 货主ID
  • └ quantity
  • Number
  • 必须
  • 100
  • 发货数量
  • └ combine_type
  • String
  • 必须
  • 1
  • 枚举值: 1 = 组合货品 2 = 非组合货品
  • └ combine_sc_item_code
  • String
  • 可选
  • 123456
  • 组合货品商家编码
  • └ currency
  • String
  • 必须
  • CNY
  • 币种,USD-美元,CNY-人民币,RUB-卢布,JPY-日元,EUR-欧元,GBP-英镑,HKD-港币,NZD-新西兰元,SGD-新加坡元,AUD-澳元,KRW-韩元,THB-泰铢
  • └ request_time
  • Number
  • 必须
  • 1639123068000
  • 业务请求时间
  • └ request_id
  • String
  • 必须
  • xxx
  • 业务请求ID
  • └ currency
  • String
  • 必须
  • CNY
  • 币种,USD-美元,CNY-人民币,RUB-卢布,JPY-日元,EUR-欧元,GBP-英镑,HKD-港币,NZD-新西兰元,SGD-新加坡元,AUD-澳元,KRW-韩元,THB-泰铢

响应参数

名称 类型 示例值 描述
binding_consignorder_gift_response BindingConsignOrderGiftRequest 返回结构体
  • data
  • BindingConsignOrderGiftResult
  • 绑赠结果
  • └ trade_id
  • String
  • 123456
  • 交易主单号
  • └ consign_order_code
  • String
  • 123456
  • 翱象发货单号
  • gift_orders
  • GiftOrder []
  • 绑赠列表
  • └ gift_order_id
  • String
  • X123456
  • 赠品绑赠单号,回滚时需要传递
  • └ sc_item_code
  • String
  • 123456
  • 货品商家编码
  • └ sc_item_name
  • String
  • 羽绒服
  • 货品名称
  • └ item_id
  • String
  • 123456
  • 商品ID
  • └ item_name
  • String
  • 羽绒服
  • 商品名称
  • └ activity_id
  • String
  • 123456
  • 活动ID
  • └ gift_id
  • String
  • 123456
  • 赠品ID
  • └ quantity
  • Number
  • 10
  • 赠品数量
  • └ seller_nick
  • String
  • xxx
  • 卖家昵称
  • └ activity_name
  • String
  • xxx
  • 活动名称
  • └ success
  • Boolean
  • true
  • 成功或者失败
  • └ message
  • String
  • xxx
  • 返回信息
  • └ code
  • String
  • xxx
  • 返回信息码

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaDchainAoxiangConsignorderGiftBindingRequest req = new AlibabaDchainAoxiangConsignorderGiftBindingRequest();
AlibabaDchainAoxiangConsignorderGiftBindingRequest.BindingConsignOrderGiftRequest obj1 = new AlibabaDchainAoxiangConsignorderGiftBindingRequest.BindingConsignOrderGiftRequest();
obj1.setDistributionType("1");
obj1.setSourcePlatformCode("TB");
obj1.setTradeId("123456");
obj1.setTradeCreateTime(1639041360000L);
obj1.setTradePayTime(1639041360000L);
obj1.setOrderAmount(20007L);
obj1.setPayment(20007L);
obj1.setConsignOrderCode("123456");
obj1.setBuyerNick("用户昵称");
obj1.setProductType("1");
obj1.setWarehouseCode("123456");
obj1.setSellerMessage("xxxxxxx");
obj1.setBuyerMessage("xxxxxxx");
AlibabaDchainAoxiangConsignorderGiftBindingRequest.ReceiverInfo obj2 = new AlibabaDchainAoxiangConsignorderGiftBindingRequest.ReceiverInfo();
obj2.setCountry("CN");
obj2.setProvince("浙江");
obj2.setCity("杭州");
obj2.setArea("余杭区");
obj2.setTown("五常街道");
obj1.setReceiverInfo(obj2);
List<AlibabaDchainAoxiangConsignorderGiftBindingRequest.SubTradeOrder> list4 = new ArrayList<AlibabaDchainAoxiangConsignorderGiftBindingRequest.SubTradeOrder>();
AlibabaDchainAoxiangConsignorderGiftBindingRequest.SubTradeOrder obj5 = new AlibabaDchainAoxiangConsignorderGiftBindingRequest.SubTradeOrder();
list4.add(obj5);
obj5.setTradeId("123456");
obj5.setItemName("羽绒服");
obj5.setItemId("123456");
obj5.setSkuId("123456");
obj5.setScItemName("羽绒服");
obj5.setScItemCode("123456");
obj5.setPayment(20007L);
obj5.setOwnerCode("123456");
obj5.setQuantity(100L);
obj5.setCombineType("1");
obj5.setCombineScItemCode("123456");
obj5.setCurrency("CNY");
obj1.setSubTradeOrders(list4);
obj1.setRequestTime(1639123068000L);
obj1.setRequestId("xxx");
obj1.setCurrency("CNY");
req.setBindingConsignorderGiftRequest(obj1);
AlibabaDchainAoxiangConsignorderGiftBindingResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_dchain_aoxiang_consignorder_gift_binding_response>
    <binding_consignorder_gift_response>
        <data>
            <trade_id>123456</trade_id>
            <consign_order_code>123456</consign_order_code>
            <gift_orders>
                <gift_order>
                    <gift_order_id>X123456</gift_order_id>
                    <sc_item_code>123456</sc_item_code>
                    <sc_item_name>羽绒服</sc_item_name>
                    <item_id>123456</item_id>
                    <item_name>羽绒服</item_name>
                    <activity_id>123456</activity_id>
                    <gift_id>123456</gift_id>
                    <quantity>10</quantity>
                    <seller_nick>xxx</seller_nick>
                    <activity_name>xxx</activity_name>
                </gift_order>
            </gift_orders>
        </data>
        <success>true</success>
        <message>xxx</message>
        <code>xxx</code>
    </binding_consignorder_gift_response>
</alibaba_dchain_aoxiang_consignorder_gift_binding_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

返回
顶部