跳到主要内容

创建物流信息

为指定支付交易上传物流信息。此接口允许商户为已发货订单提供跟踪详情,实现更好的订单跟踪和客户沟通。

POSThttps://api.efundpay.com/v4/transactions/<transaction_id>/shipments
This endpoint requires the shipments.write scope.

Authorizations

Authorizationstringheaderrequired

认证请求头,格式为 `Bearer <token>`,`<token>` 为您的认证令牌。

Headers

x-merchant-account-idstring | null

此请求要使用的商户账户ID。

Examples:"default"
idempotency-keystring

幂等性键,用于确保请求的唯一性。如果提供,则相同请求不会被多次处理。

Examples:"unique-key-123"

Body

application/json
shipmentsarrayrequired

物流信息数组。

Response

application/json

Successful Response

return_codestringrequired

返回码,表示请求状态。

Examples:"SUCCESS""FAIL"
return_messagestringrequired

返回消息,提供请求状态的详细信息。

Examples:"Success""Invalid parameters"
trace_idstringrequired

唯一追踪ID,用于跟踪此请求。

Examples:"7c510562b5af41a7a6d4f996f72f2dd0"
curl --request POST \
--url https://api.efundpay.com/v4/transactions/<transaction_id>/shipments \
--header 'Authorization: Bearer <token>' \
--header 'x-merchant-account-id: <x-merchant-account-id>' \
--header 'Content-Type: application/json' \
--data '{
"shipments": [
{
"carrier_code": "CJPacket YW Ordinary",
"tracking_no": "UG3300003347YP",
"country": "CN"
}
]
}'
{
"return_code": "SUCCESS",
"return_message": "Success",
"trace_id": "7c510562b5af41a7a6d4f996f72f2dd0"
}
Powered by Docusaurus