SmartLogisticsReport

Updated at:

You can subscribe to SmartLogisticsReport messages using HTTP batch push for detailed logistics status updates.

Prerequisites

To enable the SmartLogisticsReport message feature, contact your business manager.

Protocol specifications

Parameter

Description

Protocol

HTTP + JSON

Encoding

UTF-8

Request format

The request body is a JSON array. A request can contain multiple records.

Request example

[{
    "cpCode": "YTO",
    "mailNo": "YTO3243643****",
    "logisticsGmtModified": "2021-12-10 10:00:00",
    "city": "Chengdu",
    "bizKey": "3243643****",
    "logisticsStatusDesc": "Signed",
    "lastLogisticDetail": "Package has been signed for.",
    "aliyunprice": "6",
    "logisticsStatus": "SIGN",
    "outerOrderCode": "LP2891241****"
}]

Parameters

Parameter

Type

Required

Example

Description

cpCode

String

Yes

YTO

The code of the logistics company.

logisticsStatus

String

Yes

SIGN

The type of the logistics detail node.

  • WAIT: The order is waiting to be accepted.

  • ACCEPT: The order is accepted.

  • GOT: The package is collected.

  • MODIFY_WEIGHT: The weight is updated.

  • TRANSPORT: The package is in transit.

  • DELIVERING: The package is out for delivery.

  • SIGN: The package is signed for.

mailNo

String

Yes

YTO3243643****

The tracking number.

logisticsStatusDesc

String

Yes

Signed for

The description of the package status.

lastLogisticDetail

String

Yes

Package has been signed for

The latest logistics detail.

logisticsGmtModified

String

Yes

2021-12-10 10:00:00

The time when the latest logistics detail was updated.

packageDyn

String

No

{}

A JSON string for extension fields. When logisticsStatus is set to GOT, this field contains the weight information in grams (g). Example: {"weight": 1223.3}.

aliyunprice

String

No

6

The Alibaba Cloud billing price, in CNY. The price is valid for T+3 days from the time of collection and supports updates.

city

String

Yes

Chengdu

The city where the package is currently located.

bizKey

String

Yes

3243643****

The log key.

outerOrderCode

String

Yes

LP2891241****

The order number that is passed in when the logistics order is placed.

Response format

Response example

{
  "code" : 0,
  "msg" : "Received successfully"
}

Parameters

Parameter

Type

Required

Example

Description

code

Number

Yes

0

The response code.

msg

String

No

Received successfully

A descriptive message.

Note
  • An HTTP status code of 200 indicates a successful delivery. The service only validates that the code field in the response body is a number and does not parse its content. If the endpoint returns a non-200 HTTP status code or the request times out, the service retries the push.

  • Return an HTTP 5xx status code for temporary failures, such as system exceptions or processing errors at your endpoint.

Push retries

If an initial push fails, the service performs up to three retries at 1, 5, and 10 minutes after the initial failure. If all retries are unsuccessful, the service stops trying to deliver the message.