API to create order for SNS partner OK.ru
名称 | 类型 | 是否必须 | 示例值 | 更多限制 | 描述 |
---|---|---|---|---|---|
address_id | Number | 可选 | 123456 |
|
AE user addressID to deliver |
buyer_country_code | String | 可选 | RU | Buyer country code to deliver | |
currency_code | String | 可选 | RUB | Currency | |
data_tracking_type | String | 可选 | AE_OK_SERVICE | Order source label | |
product_json_string | String | 可选 | [{"productId":"32869466483","productUniqueKey":"32869466483","skuAttr":"200007763:201336100","quantity":"1","serviceName":"OTHER_CITY_RUB"}] | Place order info | |
promocode_hash | String | 可选 | Z4YncHgBE+kMha0okGA= | Hashed promocode | |
device_id | String | 可选 | _ | deviceId of user, need for security | |
ip | String | 可选 | _ | user's ip, need for security |
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
result | OpenApiResult | {} | Result |
|
1 2 3 4 5 6 7 8 9 10 11 12 | TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret); AliexpressSocialShoppingOrderPlaceQueryRequest req = new AliexpressSocialShoppingOrderPlaceQueryRequest(); req.setAddressId(123456L); req.setBuyerCountryCode( "RU" ); req.setCurrencyCode( "RUB" ); req.setDataTrackingType( "AE_OK_SERVICE" ); req.setProductJsonString( "[{\"productId\":\"32869466483\",\"productUniqueKey\":\"32869466483\",\"skuAttr\":\"200007763:201336100\",\"quantity\":\"1\",\"serviceName\":\"OTHER_CITY_RUB\"}]" ); req.setPromocodeHash( "Z4YncHgBE+kMha0okGA=" ); req.setDeviceId( "_" ); req.setIp( "_" ); AliexpressSocialShoppingOrderPlaceQueryResponse rsp = client.execute(req, sessionKey); System.out.println(rsp.getBody()); |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | < aliexpress_social_shopping_order_place_query_response > < result > < error_code >error</ error_code > < error_message >Failed to place order</ error_message > < result > < biz_type >AE_COMMON</ biz_type > < cashier_token >3%4020990391103200519</ cashier_token > < order_ids > < number >[ 500410459057075 ]</ number > </ order_ids > < payment_gateway >ALIPAY</ payment_gateway > < order_amount > < amount >12.99</ amount > < amount_cents >1299</ amount_cents > < currency_code >RUB</ currency_code > </ order_amount > < placed_orders > < sns_order_dto > < item_ids > < number >products of the order</ number > </ item_ids > < order_amount > < amount >10.0</ amount > < amount_cents >1000</ amount_cents > < currency_code >RUB</ currency_code > </ order_amount > < order_id >123456</ order_id > </ sns_order_dto > </ placed_orders > </ result > < success >true</ success > </ result > </ aliexpress_social_shopping_order_place_query_response > |
1 2 3 4 5 6 | < error_response > < code >50</ code > < msg >Remote service error</ msg > < sub_code >isv.invalid-parameter</ sub_code > < sub_msg >非法参数</ sub_msg > </ error_response > |
错误码 | 错误描述 | 解决方案 |
---|