aliexpress.social.shopping.order.place.query (速卖通社交购物订单位置查询)

API to create order for SNS partner OK.ru

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
address_id Number 可选 123456
  • 默认值:0
  • 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
    • └ error_code
    • String
    • error
    • error code
    • └ error_message
    • String
    • Failed to place order
    • error message
    • result
    • SnsPlaceOrderResp
    • { "result": { "bizType": "AE_COMMON", "cashierToken": "3%4020990391103200519885600", "orderIds": [ 5004104590157075 ], "class": "com.aliexpress.global.social.shopping.order.dto.SNSPlaceOrderResp", "paymentGateway": "ALIPAY" }, "success": true, "errorMessage": null, "errorCode": null, "class": "com.aliexpress.global.social.shopping.logistics.service.OpenApiResult" }
    • Result body
    • └ biz_type
    • String
    • AE_COMMON
    • Biz type
    • └ cashier_token
    • String
    • 3%4020990391103200519
    • cashier token
    • └ order_ids
    • Number []
    • [ 500410459057075 ]
    • created order ids list
    • └ payment_gateway
    • String
    • ALIPAY
    • Payment gateway
    • order_amount
    • OrderAmount
    • {}
    • {}
    • └ amount
    • String
    • 12.99
    • Amount (decimal)
    • └ amount_cents
    • String
    • 1299
    • Amount in sub-currency
    • └ currency_code
    • String
    • RUB
    • Currency
    • placed_orders
    • SnsOrderDto []
    • []
    • Description of placed orders
    • └ item_ids
    • Number []
    • products of the order
    • [12345]
    • order_amount
    • OrderAmount
    • {}
    • Amount of the order
    • └ amount
    • String
    • 10.0
    • Amount of the order
    • └ amount_cents
    • String
    • 1000
    • Amount in sub-currency
    • └ currency_code
    • String
    • RUB
    • currency
    • └ order_id
    • Number
    • 123456
    • OrderId
    • └ success
    • Boolean
    • true
    • Result

    请求示例

    • JAVA
    • .NET
    • PHP
    • CURL
    • Python
    • C/C++
    • NodeJS
    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());

    响应示例

    • XML示例
    • JSON示例
    <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>

    异常示例

    • 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

    返回
    顶部