Polyv Help Center

Help Center

Query Product Order Details

Updated: 2026-07-13 11:28:48

API Description

1、查询商品订单详情
2、接口支持https协议

API URL

http://api.polyv.net/live/v4/user/product/order/get

Online API Call

Request Method

GET

API Constraints

  1. The API supports both HTTP and HTTPS. HTTPS is recommended to ensure interface security. API calls have frequency limits. See details
  2. If parameters are incorrect, a 400 exception will be returned.

Request Parameter Description

Parameter Required Type Description
appId true String Account appId See details on obtaining keys
timestamp true Long Current 13-digit millisecond timestamp, valid for 3 minutes
sign true String Signature, a 32-character uppercase MD5 value. The appSecret key used to generate the signature is critical for communication data security. It must not be saved or used directly on the client side. All APIs must be called through the customer's own server to relay requests to the POLYV server for response data. See signature generation rules
orderNo true String Order ID

Example

http://api.polyv.net/live/v4/user/product/order/get?appId=frlr1zazn3&timestamp=1665629374000&sign=6CFA3141718E1AF0155889EEA2988206&pageNumber=1

Response Description

Parameter Type Description
code Integer Status code, same as HTTP status code, used to determine the basic response status
status String Response result, determined by the business. Returns success on success, error on failure
success Boolean Whether the response was successful
requestId String Request ID, a unique UUID generated for each request. Only used for troubleshooting and debugging, should not be tied to business logic
error Object Error information when status code is not 200 See Error field description
data Object Detailed response information See ProductOrder field description

Error Response Description

Parameter Type Description
code Integer Error code, used to determine the specific error reason
desc String Error description, corresponding to error.code

ProductOrder Response Description

Parameter Type Description
orderNo String Order ID
channelId Integer Channel ID
viewerId String Ordering user ID
viewerNickName String Ordering user nickname
transactionId String WeChat order number, only available after successful payment
amount BigDecimal Order amount
expressEnabled String Whether logistics is enabled, Y for Yes, N for No
status String Order status: pending payment: wait_pay, pending shipment: wait_delivery, in transit: delivering, completed: finish, closed: close
createTime Long Creation time, 13-digit millisecond timestamp
payTime Long Payment time, 13-digit millisecond timestamp
deliveryTime Long Shipment time, 13-digit millisecond timestamp
finishTime Long Completion time, 13-digit millisecond timestamp
addressExt Object Shipping address information See AddressExt field description
products Array Order product information See Products field description

AddressExt Response Description

Parameter Type Description
mobile String Phone number
name String Recipient name
area String Province and city information of the shipping address
address String Detailed shipping address

Products Response Description

Parameter Type Description
productSnapshotId Long Product snapshot ID
amount BigDecimal Product unit price
quantity Integer Product quantity
totalAmount BigDecimal Total product amount
productName String Product name
productCover String Product cover image

Java Request Example

For quick integration of basic code, please download the relevant dependency source code. Click here to download the source code. After downloading, add it to your own source code project. The test cases include HttpUtil.java and LiveSignUtil.java in the downloaded file.

It is strongly recommended to use the Live Java SDK for API functionality integration. The Live Java SDK provides unified encapsulation and optimization for API call logic, exception handling, data signing, and HTTP request thread pools.

private static final Logger log = LoggerFactory.getLogger(ProductOrderTest.class);
/**
 * 查询商品订单
 * @throws IOException
 */
@Test
public void testGetProductOrder() throws IOException, NoSuchAlgorithmException {
    //公共参数,填写自己的实际参数
    String appId=super.appId;
    String appSecret=super.appSecret;
    String timestamp=String.valueOf(System.currentTimeMillis());
    //业务参数
    String url = "http://api.polyv.net/live/v4/user/product/order/get";
    String orderNo = "";
    //http 调用逻辑
    Map<String,String> requestMap = new HashMap<>();
    requestMap.put("appId", appId);
    requestMap.put("timestamp",timestamp);
    requestMap.put("orderNo",orderNo);
    requestMap.put("sign",LiveSignUtil.getSign(requestMap, appSecret));
    String response = HttpUtil.get(url, requestMap);
    log.info("测试查询商品订单:{}",response);
    //do somethings

}

Response Example

For global system error descriptions, see Global Error Description

Success Example

{
    "code": 200,
    "status": "success",
    "requestId": "ffec4cf4227c42d09f780ed0d9aa19e7.71.17210379136070035",
    "data": {
        "orderNo": "product202405221129011833ad",
        "channelId": 4872391,
        "viewerId": "c_4nv36e832udqged0g7t565t4zoasuo9y",
        "viewerNickName": "斌",
        "transactionId": "4200002204202405229969120950",
        "amount": 0.01,
        "status": "finish",
        "expireTime": 1716349441000,
        "payTime": 1716348582000,
        "deliveryTime": 1717746827000,
        "finishTime": 1717747300000,
        "createTime": 1716348541000,
        "addressExt": {
            "mobile": "15812345678",
            "name": "小明",
            "area": "广东省/广州市/天河区",
            "address": "详细地址01"
        },
        "products": [
            {
                "productSnapshotId": 1,
                "amount": 0.01,
                "quantity": 1,
                "totalAmount": 0.01,
                "productCover": "//liveimages.videocc.net/uploaded/images/2024/05/gwc3u3jkh0.jpg",
                "productName": "键盘",
                "deliveryType": "express",
                "customerServiceType": null,
                "customerServiceContact": null
            }
        ],
        "expressEnabled": "Y"
    },
    "success": true
}

Error Example

{
    "code": 400,
    "status": "error",
    "requestId": "d310b70bc329403f87f77f9203d50f89.128.16360831552223589",
    "error": {
        "code": 20001,
        "desc": "application not found."
    },
    "success": false
}
联系客服,在线咨询
在线咨询