注意:以下文档只适用于TOP接口,请谨慎使用!

文档中心 > API类目 > ICBU-DropShipping

alibaba.buynow.order.create (阿里巴巴买家buynow下单接口)

阿里巴巴买家下单接口

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
param_order_create_request OrderCreateRequest 必须 Order creation parameter
  • └ channel_refer_id
  • String
  • 必须
  • 124232
  • Provide the order number corresponding to the 3rd party ISV
  • logistics_detail
  • LogisticsDetail
  • 必须
  • Logistics details
  • └ carrier_code
  • String
  • 必须
  • EX_ASP_JYC_FEDEX
  • For BuyNow orders, use the value shown in the vendorCode field from the shipping cost template API; non-BuyNow orders don’t need to provide this information. alibaba.shipping.freight.calculate 's vender_code
  • shipment_address
  • Address
  • 必须
  • shipment address
  • └ address
  • String
  • 必须
  • 1000 Fifth Avenue at 82nd Street,New York, NY
  • Specific address
  • └ alternate_address
  • String
  • 可选
  • 1000 Fifth Avenue at 82nd Street,New York, NY
  • Secondary address
  • └ city
  • String
  • 可选
  • New York
  • Name of the city where the order is completed
  • └ city_code
  • String
  • 可选
  • NYC
  • City abbreviation
  • └ contact_person
  • String
  • 必须
  • jack wu
  • Name of contact person
  • └ country
  • String
  • 必须
  • United States of America
  • Country name
  • └ country_code
  • String
  • 必须
  • US
  • Country code,ISO3166 standard and has two letters.
  • fax
  • Phone
  • 可选
  • Fax
  • └ area
  • String
  • 可选
  • 86
  • fax area
  • └ country
  • String
  • 可选
  • 0571
  • fax country
  • └ number
  • String
  • 可选
  • 67824793472
  • fax number
  • └ port
  • String
  • 可选
  • NewYork
  • Port name
  • └ port_code
  • String
  • 可选
  • NYC
  • Port code
  • └ province
  • String
  • 可选
  • California
  • Name of state/province
  • └ province_code
  • String
  • 可选
  • CA
  • Province/state abbreviation
  • telephone
  • Phone
  • 可选
  • telephone
  • └ area
  • String
  • 可选
  • 86
  • telephone area
  • └ country
  • String
  • 可选
  • 0751
  • telephone country
  • └ number
  • String
  • 可选
  • 35354244223
  • telephone number
  • └ zip
  • String
  • 可选
  • 314007
  • zip
  • └ dispatch_location
  • String
  • 可选
  • CN或US,默认CN
  • 发货地
  • payment_detail
  • PaymentDetail
  • 必须
  • Payment details
  • └ shipment_fee
  • String
  • 必须
  • 10
  • shipment fee
  • └ total_amount
  • String
  • 必须
  • 130
  • total amount
  • product_list
  • TradeEcologyOrderCreateProduct []
  • 必须
  • {}
  • Product list
  • └ product_id
  • Number
  • 必须
  • 2233333
  • product id
  • └ quantity
  • String
  • 必须
  • 10
  • quantity
  • └ sku_id
  • String
  • 可选
  • 5678
  • sku id
  • └ unit_price_str
  • String
  • 必须
  • 10
  • unit price
  • └ properties
  • String
  • 可选
  • "{\"platform\":\"Shopify\", \"orderId\": \"1111111111111\"}"
  • Put the order number provided by the 3rd party platform and the name of the 3rd party platform. For example, if the order number is for a transaction made on Shopify, put “Shopify” and the order number.
    Platform Names can be case ignored:
    Shopify,CommerceHQ,WooCommerce,GrooveKart,BigCommerce
  • └ remark
  • String
  • 可选
  • xxx
  • order remark

响应参数

名称 类型 示例值 描述
value OrderCreateResponse {} Response
  • └ pay_url
  • String
  • https://biz.alibaba.com/ta/detail.htm?orderId=1234
  • pay url
  • └ trade_id
  • String
  • 1234
  • order number

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaBuynowOrderCreateRequest req = new AlibabaBuynowOrderCreateRequest();
AlibabaBuynowOrderCreateRequest.OrderCreateRequest obj1 = new AlibabaBuynowOrderCreateRequest.OrderCreateRequest();
obj1.setChannelReferId("124232");
AlibabaBuynowOrderCreateRequest.LogisticsDetail obj2 = new AlibabaBuynowOrderCreateRequest.LogisticsDetail();
obj2.setCarrierCode("EX_ASP_JYC_FEDEX");
AlibabaBuynowOrderCreateRequest.Address obj3 = new AlibabaBuynowOrderCreateRequest.Address();
obj3.setAddress("1000 Fifth Avenue at 82nd Street,New York, NY");
obj3.setAlternateAddress("1000 Fifth Avenue at 82nd Street,New York, NY");
obj3.setCity("New York");
obj3.setCityCode("NYC");
obj3.setContactPerson("jack wu");
obj3.setCountry("United States of America");
obj3.setCountryCode("US");
AlibabaBuynowOrderCreateRequest.Phone obj4 = new AlibabaBuynowOrderCreateRequest.Phone();
obj4.setArea("86");
obj4.setCountry("0571");
obj4.setNumber("67824793472");
obj3.setFax(obj4);
obj3.setPort("NewYork");
obj3.setPortCode("NYC");
obj3.setProvince("California");
obj3.setProvinceCode("CA");
AlibabaBuynowOrderCreateRequest.Phone obj5 = new AlibabaBuynowOrderCreateRequest.Phone();
obj5.setArea("86");
obj5.setCountry("0751");
obj5.setNumber("35354244223");
obj3.setTelephone(obj5);
obj3.setZip("314007");
obj2.setShipmentAddress(obj3);
obj2.setDispatchLocation("CN或US,默认CN");
obj1.setLogisticsDetail(obj2);
AlibabaBuynowOrderCreateRequest.PaymentDetail obj6 = new AlibabaBuynowOrderCreateRequest.PaymentDetail();
obj6.setShipmentFee("10");
obj6.setTotalAmount("130");
obj1.setPaymentDetail(obj6);
List<AlibabaBuynowOrderCreateRequest.TradeEcologyOrderCreateProduct> list8 = new ArrayList<AlibabaBuynowOrderCreateRequest.TradeEcologyOrderCreateProduct>();
AlibabaBuynowOrderCreateRequest.TradeEcologyOrderCreateProduct obj9 = new AlibabaBuynowOrderCreateRequest.TradeEcologyOrderCreateProduct();
list8.add(obj9);
obj9.setProductId(2233333L);
obj9.setQuantity("10");
obj9.setSkuId("5678");
obj9.setUnitPriceStr("10");
obj1.setProductList(list8);
obj1.setProperties("\"{\\"platform\\":\\"Shopify\\", \\"orderId\\": \\"1111111111111\\"}\"");
obj1.setRemark("xxx");
req.setParamOrderCreateRequest(obj1);
AlibabaBuynowOrderCreateResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_buynow_order_create_response>
    <value>
        <pay_url>https://biz.alibaba.com/ta/detail.htm?orderId=1234</pay_url>
        <trade_id>1234</trade_id>
    </value>
</alibaba_buynow_order_create_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>

错误码解释

错误码 错误描述 解决方案
430005 Payment total amount is wrong ? The reason may be that shipment_fee is not the latest cost, which causes the product price plus the actual shipping cost to be inconsistent with the total price of the incoming order。 So please make sure shipment_fee is the latest see https://www.yuque.com/docs/share/5bd0917b-399e-4d81-9d1c-6f66672294d4?#nFoVJ
130602 shipping fee is Incorrect see https://www.yuque.com/docs/share/5bd0917b-399e-4d81-9d1c-6f66672294d4?#nFoVJ
410010 product price is invalid ? The reason is that the unit_price_str passed in is not the latest see https://www.yuque.com/docs/share/5bd0917b-399e-4d81-9d1c-6f66672294d4?#nFoVJ

API工具

如何获得此API

FAQ

返回
顶部