# 物流信息查询

## 物流查询

<mark style="color:green;">`POST`</mark> `https://gateway.useepay.com/logistics`

#### Headers

| Name         | Type   | Description                       |
| ------------ | ------ | --------------------------------- |
| content-type | String | application/x-www-form-urlencoded |

#### Request Body

| Name                                              | Type   | Description                                         |
| ------------------------------------------------- | ------ | --------------------------------------------------- |
| version<mark style="color:red;">\*</mark>         | String | <p>max=5</p><p>调用的接口版本，固定为：1.0</p>                  |
| merchantNo<mark style="color:red;">\*</mark>      | String | <p>max=16</p><p>商户号，由USEEPAY 分配</p>                 |
| reference<mark style="color:red;">\*</mark>       | String | <p>max=64</p><p>useepay订单号。</p>                     |
| transactionType<mark style="color:red;">\*</mark> | String | <p>max=18</p><p>交易类型：query</p>                      |
| echoParam                                         | String | <p>max=256</p><p>预留字段，响应报文会原样返回</p>                 |
| signType<mark style="color:red;">\*</mark>        | String | <p>max=4</p><p>商户生成签名字符串所使用的签名算法类型，目前支持：RSA MD5</p> |
| sign<mark style="color:red;">\*</mark>            | String | max=256 商户请求参数的签名串                                  |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
    "echoParam": "echoParam",
    "reserved": "reserved",
    "resultCode": "succeed", el
    "sign": "2f98c029cc6b33d5a13525fd9b7aa0c6",
    "errorCode": "0000",
    "signType": "MD5",
    "merchantNo": "500000000007381",
    "errorMsg": "Approved or completed successfully",
    "transactionInfo": "{\"transactionType\":\"sale\",\"reference\":\"1012110141401650864\",\"amount\":\"2000\",\"originalTransactionId\":\"\",\"resultCode\":\"succeed\",\"errorCode\":\"0000\",\"currency\":\"USD\",\"transactionId\":\"202110140201428\",\"errorMsg\":\"Approved or completed successfully\"}"
}
```

{% endtab %}
{% endtabs %}

## Response  <a href="#response" id="response"></a>

返回结果说明

| 参数             | 说明                                      | 是否必须  |
| -------------- | --------------------------------------- | ----- |
| reference      | max=64 ，useepay订单号                      | true  |
| resultCode     | <p>max=32</p><p>本次查询的业务结果（详见 业务结果码）</p> | true  |
| errorCode      | <p>max=4</p><p>本次查询的错误码</p>             | false |
| merchantNo     | max=16 ，商户号                             | false |
| errorMsg       | <p>max=256</p><p>本次查询的错误码消息描述</p>       | false |
| deliveryStatus | <p>max=8</p><p>物流状态</p>                 | false |
| logisticsInfo  | 交易信息。resultCode=xxxx 的时候有返回             | false |
| deliveryDays   | max=8 物流总天数                             | true  |
| echoParam      | <p>max=256</p><p>预留字段，值同请求报文</p>        | false |
| sign           | <p>max=256</p><p>商户请求参数的签名串</p>         | true  |

logisticsInfo

| 参数               | 描述                                                                                                                                      | 是否必须  |
| ---------------- | --------------------------------------------------------------------------------------------------------------------------------------- | ----- |
| courierCode      | max=128物流订单号                                                                                                                            | true  |
| logisticsCompany | max=32 物流公司                                                                                                                             | true  |
| deliveryStatus   | <p>max=32</p><p>妥投状态 pending 查询中 notfound 查询不到 transit 运输途中 pickup 到达待取 delivered 成功签收 undelivered 投递失败 exception 可能异常 expired 运输过久</p> | false |
| deliveryDays     | max=8 物流天数                                                                                                                              | false |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://useepay.gitbook.io/developer/reference/wu-liu-jie-kou/query.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
