订单

订单属性

属性名

说明

必含

类型

值可能性

限制

ID

订单ID

[integer]

order_tax

订单商品税费

[float]

order_shipping_tax

订单物流税费

[float]

post_date

创建时间(local)

[datetime]

Y-m-d H:i:s

post_date_gmt

创建时间(GMT)

[datetime]

Y-m-d H:i:s

post_status

状态

[string]

wc-completed:已完成

wc-on-hold:等待

wc-processing: 进行中

wc-cancelled:已取消

post_password

订单密钥

[string]

post_modified

更新时间(local)

[datetime]

Y-m-d H:i:s

post_modified_gmt

更新时间(GMT)

[datetime]

Y-m-d H:i:s

number

订单编码

[string]

payment_method

支付方式代码

[string]

payment_method_title

支付方式名称

[string]

trackname

物流名称

[string]

trackno

物流单号

[string]

track_source

物流来源

[string]

track_date

发货时间(local)

[datetime]

Y-m-d H:i:s

track_date_gmt

发货时间(GMT)

[datetime]

Y-m-d H:i:s

financial_status

交易状态

[string]

paid:已支付

partial-refund:部分退款

refund:全部退款

unpaid:未支付

fulfillment_status

物流状态

[string]

unfulfilled:未发货

fulfilled:已发货

billing_user_name

账单主体姓名

[string]

order_shipping

物流费用

[number]

order_total

订单总金额

[number]

transaction_id

交易号

[string]

paid_date

付款时间(local)

[datetime]

Y-m-d H:i:s

paid_date_gmt

付款时间(GMT)

[datetime]

Y-m-d H:i:s

note

订单备注

[string]

domain

生成订单时的绑定域名

[string]

billing_address

账单地址

[object]

billing_address>>first_name

[string]

billing_address>>last_name

[string]

billing_address>>company

[string]

billing_address>>address_1

地址1

[string]

billing_address>>address_2

地址2

[string]

billing_address>>city

城市

[string]

billing_address>>state

省份缩写

[string]

billing_address>>postcode

邮编

[string]

billing_address>>country

国家

[string]

billing_address>>email

邮件

[string]

billing_address>>phone

联系电话

[string]

billing_address>>address_index

地址信息串联

[string]

billing_address>>subscribed

是否已订阅

[string]

billing_address>>state_name

省份名称

[string]

shipping_address

收件地址

[object]

shipping_address>>first_name

[string]

shipping_address>>last_name

[string]

shipping_address>>company

[string]

shipping_address>>address_1

地址1

[string]

shipping_address>>address_2

地址2

[string]

shipping_address>>city

城市

[string]

shipping_address>>state

省份缩写

[string]

shipping_address>>postcode

邮编

[string]

shipping_address>>country

国家

[string]

shipping_address>>address_index

地址信息串联

[string]

shipping_address>>phone

联系电话

[string]

shipping_address>>address_note

稅号

[string]

state_name

public_url

公开链接

[string]

order_currency

币种

[string]

date_updated

发货时间

[datetime]

Y-m-d H:i:s

paypal_email

贝宝邮箱

[string]

path

订单查看路径

[string]

current_time

当前时间

[datetime]

Y-m-d H:i:s

number_of_products

订单所含商品数量

[integer]

ip

下单时的IP

[string]

country_or_region

国家地区

[string]

user_agent

下单时的UA

[string]

refund_amount

退款总金额

[number]

sales_channel_category

销售渠道分类

[string]

refunds

退款纪录列表

[object]

sales_channel

销售渠道

[string]

date_updated

发货时间

[datatime]

processing_at_gmt

[datatime]

completed_at_gmt

完成时间 GMT

[datatime]

processing_at

[datatime]

completed_at

完成时间

[datatime]

cart_hash

购物车 hash

[string]

custom_attributes

自定义属性

[array]

refunds>>refund_date

退款时间(local)

[datetime]

Y-m-d H:i:s

refunds>>refund_date_gmt

退款时间(GMT)

[datetime]

Y-m-d H:i:s

refunds>>refund_amount

退款金额

[number]

refunds>>refund_reason

退款理由

[string]

refunds>>refund_source

退款来源

[string]

manual:后台手动标记退款

auto:支付方式回调自动处理

is_manual_refund

是否是手动退款,手动退款的订单不可被自动退款覆盖

[boolean]

true:手动退款

false:自动退款

shippings

物流信息

[array]

shippings>>order_item_id

费用项ID

[integer]

shippings>>order_item_name

费用项名称

[string]

shippings>>order_item_type

费用类型

[string]

shipping

shippings>>order_id

订单ID

[integer]

shippings>>cost

费用

[number]

shippings>>total_tax

税费

[string]

shippings>>instance_id

实例 id

[string]

shippings>>method_id

物流 id

[string]

fees

其它费用信息

[array]

fees>>order_item_id

费用项ID

[integer]

fees>>order_item_name

费用项名称

[string]

Shipping Insurance: 运费险

fees>>order_item_type

费用类型

[string]

fee

fees>>order_id

订单ID

[integer]

fees>>line_total

费用总额

[number]

fees>>fee_amount

费用小计

[number]

fees>>tax_class

费用类别

[string]

fees>>line_tax

税费总计

[number]

fees>>rate

费率

[number]

最大1

fee>>tax_status

税费状态

[string]

line_items

商品信息

[integer]

line_items>>order_item_id

订单项ID

[integer]

line_items>>order_item_name

订单项名称

[string]

line_items>>order_item_type

订单项目类型

[string]

line_items>>order_id

订单ID

[integer]

line_items>>price

商品售价

[number]

line_items>>qty

数量

[string]

line_items>>line_total

商品最终价格

[number]

line_items>>product_id

商品 ID

[integer]

line_items>>variation_id

变种 ID

[integer]

line_items>>public_url

商品路径

[string]

line_items>>line_subtotal

商品总价

[string]

line_items>>regular_price

原价

[string]

line_items>>sku

sku

[string]

line_items>>properties

商品属性

[array]

attrs

变种规格

[array]

feature_image

图片信息

[object]

discount_record

优惠券记录

[object]

discount_record>>id

优惠券使用记录ID

[integer]

discount_record>>order_id

订单ID

[integer]

discount_record>>code

优惠码

[string]

discount_record>>discount_type

优惠类型

[string]

discount_recor>>rule_id

优惠ID

[integer]

discount_record>>description

优惠描述

[string]

discount_record>>amount

优惠总额

[string]

discount_record>>auto_coupon

是否自动优惠

[string]

discount_record>>free_shipping

免运费

[number]

discount_record>>product_ids

应用优惠商品 id集合

[string]

discount_record>>rule_data

优惠数据

[string]

seller_notes

订单备注

[array]

seller_notes>>id

备注ID

[int]

seller_notes>>order_id

订单ID

[int]

seller_notes>>note

备注

[string]

seller_notes>>created_at_gmt

创建时间GMT

[string]

seller_notes>>updated_at_gmt

更新时间 GMT

[string]

conversion_summary

订单摘要

[object]

conversion_summary>>order_id

订单 id

[int]

conversion_summary>>order_index

订单排序

[int]

conversion_summary>>interact_times

交互次数

[int]

conversion_summary>>page_visits_count

浏览量

[int]

conversion_summary>>sessions_count

会话数

[int]

conversion_summary>>days_to_conversion

转化天数

[int]

conversion_summary>>device

设备

[string]

conversion_summary>>ip

顾客 ip

[string]

conversion_summary>>first_visit

首次交互

[object]

conversion_summary>>first_visit>>landing_page

落地页信息

[string]

conversion_summary>>first_visit>>utm_parameters

utm 参数

[object]

conversion_summary>>first_visit>>utm_parameters>>utm_source

utm 来源

[string]

conversion_summary>>first_visit>>utm_parameters>>utm_medium

utm 媒介

[string]

conversion_summary>>first_visit>>utm_parameters>>utm_campaign

[string]

conversion_summary>>first_visit>>utm_parameters>>utm_term

[string]

conversion_summary>>first_visit>>utm_parameters>>utm_content

[string]

conversion_summary>>first_visit>>referrer_url

来源地址

[string]

conversion_summary>>first_visit>>interact_source

交互来源

[string]

conversion_summary>>first_visit>>created_at

创建时间

[string]

conversion_summary>>first_visit>>created_at_gmt

创建时间 gmt

[string]

conversion_summary>>last_visit

末次交互

[object]

conversion_summary>>last_visit>>landing_page

落地页信息

[string]

conversion_summary>>last_visit>>utm_parameters

utm 参数

[object]

conversion_summary>>last_visit>>utm_parameters>>utm_source

utm 来源

[string]

conversion_summary>>last_visit>>utm_parameters>>utm_medium

utm 媒介

[string]

conversion_summary>>last_visit>>utm_parameters>>utm_campaign

[string]

conversion_summary>>last_visit>>utm_parameters>>utm_term

[string]

conversion_summary>>last_visit>>utm_parameters>>utm_content

[string]

conversion_summary>>last_visit>>referrer_url

来源地址

[string]

conversion_summary>>last_visit>>interact_source

交互来源

[string]

conversion_summary>>last_visit>>created_at

创建时间

[string]

conversion_summary>>last_visit>>created_at_gmt

创建时间 gmt

[string]

API

使用提示:

点击 API 展开信息;

字段带有 * 表示必填与响应中一定会携带;

展开每个 Responses 可以查看响应示例。

获取订单列表

GET /openapi/2021-08/orders

权限要求:read_orders

Query Parameters

NameTypeDescription

page

int

页码

filter[search]

string

模糊匹配订单编号、商品名称、SKU、支付编号、顾客邮箱

filter[fulfillment_status]

string

发货状态

unfulfilled:未发货状态

fulfilled:已发货状态

filter[financial_status]

string

交易状态

paid:已付款

refund:已退款

partial-refund :部分退款

unpaid:未付款

page_size

int

每页数量

sort

string

排序, 可选:

date:创建时间

modified_date:修改时间 paid_date:支付时间

total_sales:销售总额

示例:-paid_date

filter[status]

string

订单状态

wc-completed:已完成

wc-pending:待付款

wc-processing:已付款

wc-cancelled:已取消

filter[date]

string

按支付时间匹配

filter[modified_date]

string

按更新时间匹配

{
    "data": [
     {
            "ID": 24561,
            "note": "",
            "post_date": "2024-06-07 07:24:01",
            "post_date_gmt": "2024-06-07 15:24:01",
            "post_status": "wc-processing",
            "post_password": "wc_order_dggtH5FnqPPSV",
            "post_modified": "2024-06-07 07:24:05",
            "post_modified_gmt": "2024-06-07 15:24:05",
            "number": "5570S24561",
            "payment_method": "cod",
            "payment_method_title": "货到付款",
            "mode_of_payment": "cod",
            "payment_channel": "COD",
            "trackname": "",
            "trackno": null,
            "trackno_source": null,
            "track_date": null,
            "track_date_gmt": null,
            "financial_status": "waiting",
            "fulfillment_status": "unfulfilled",
            "billing_user_name": "Harry111 Potter",
            "order_shipping": 22.1,
            "order_total": 54.7,
            "transaction_id": "",
            "paid_date": "",
            "paid_date_gmt": "",
            "domain": "shop.com",
            "billing_address": {
                "first_name": "Harry111",
                "last_name": "Potter",
                "address_1": "32323",
                "city": "Lanark Village",
                "state": "FL",
                "postcode": "32323",
                "country": "US",
                "email": "fanyan154@gmail.com",
                "phone": "+1 (322) 222-2222",
                "address_index": "Harry111 Potter  32323  Lanark Village FL 32323 US fanyan154@gmail.com +1 (322) 222-2222",
                "subscribed": "no",
                "state_name": "Florida"
            },
            "shipping_address": {
                "first_name": "Harry111",
                "last_name": "Potter",
                "address_1": "32323",
                "city": "Lanark Village",
                "state": "FL",
                "postcode": "32323",
                "country": "US",
                "address_index": "Harry111 Potter  32323  Lanark Village FL 32323 US",
                "phone": "+1 (322) 222-2222",
                "address_note": "",
                "state_name": "Florida"
            },
            "public_url": "https://shop.com/checkout/order-received/24561?key=wc_order_dggtH5FnqPPSV&abt=sale",
            "order_detail_url": "https://shop.com/orders/24561?key=wc_order_dggtH5FnqPPSV",
            "order_detail_path": "/orders/24561?key=wc_order_dggtH5FnqPPSV",
            "order_currency": "USD",
            "date_updated": "2024-06-07 07:24:05",
            "paypal_email": null,
            "path": "/checkout/order-received/24561?key=wc_order_dggtH5FnqPPSV&abt=sale",
            "current_time": "2024-06-13T19:39:04-08:00",
            "number_of_products": 1,
            "ip": "54.219.251.239",
            "country_or_region": "US",
            "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36",
            "refund_amount": 0,
            "is_manual_refund": false,
            "key": "wc_order_dggtH5FnqPPSV",
            "sales_channel_category": "online_store",
            "sales_channel": "default",
            "order_tax": 10,
            "order_shipping_tax": 2.21,
            "processing_at_gmt": "2024-06-07 15:24:02",
            "completed_at_gmt": "0000-00-00 00:00:00",
            "processing_at": "2024-06-07 07:24:02",
            "completed_at": "0000-00-00 00:00:00",
            "cart_hash": "89b724ffd06e3d7191c3df82dc5c8791",
            "custom_attributes": [],
            "line_items": [
                {
                    "order_id": 24561,
                    "order_item_id": 11359,
                    "order_item_name": "主商品C",
                    "order_item_type": "line_item"
                }
            ],
            "refunds": []
        }
    ],
    "links": {
        "first": "https://shop.com/openapi/2021-08/orders?page=1",
        "last": "https://shop.com/openapi/2021-08/orders?page=6",
        "prev": null,
        "next": "https://shop.com/openapi/2021-08/orders?page=2"
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 6,
        "path": "https://shop.com/openapi/2021-08/orders",
        "per_page": 25,
        "to": 25,
        "total": 148
    }
}

获取订单详情

GET /openapi/2021-08/orders/{id}

权限:read_orders

Path Parameters

NameTypeDescription

id*

int

订单ID

{
    "ID": 24561,
    "note": "",
    "post_date": "2024-06-07 07:24:01",
    "post_date_gmt": "2024-06-07 15:24:01",
    "post_status": "wc-processing",
    "post_password": "wc_order_dggtH5FnqPPSV",
    "post_modified": "2024-06-07 07:24:05",
    "post_modified_gmt": "2024-06-07 15:24:05",
    "number": "5570S24561",
    "payment_method": "cod",
    "payment_method_title": "货到付款",
    "mode_of_payment": "cod",
    "payment_channel": "COD",
    "trackname": "",
    "trackno": null,
    "trackno_source": null,
    "track_date": null,
    "track_date_gmt": null,
    "financial_status": "waiting",
    "fulfillment_status": "unfulfilled",
    "billing_user_name": "Harry111 Potter",
    "order_shipping": 22.1,
    "order_total": 54.7,
    "transaction_id": "",
    "paid_date": "",
    "paid_date_gmt": "",
    "domain": "sdgewrgerg.kelukeshan.xyz",
    "billing_address": {
        "first_name": "Harry111",
        "last_name": "Potter",
        "address_1": "32323",
        "city": "Lanark Village",
        "state": "FL",
        "postcode": "32323",
        "country": "US",
        "email": "fanyan154@gmail.com",
        "phone": "+1 (322) 222-2222",
        "address_index": "Harry111 Potter  32323  Lanark Village FL 32323 US fanyan154@gmail.com +1 (322) 222-2222",
        "subscribed": "no",
        "state_name": "Florida"
    },
    "shipping_address": {
        "first_name": "Harry111",
        "last_name": "Potter",
        "address_1": "32323",
        "city": "Lanark Village",
        "state": "FL",
        "postcode": "32323",
        "country": "US",
        "address_index": "Harry111 Potter  32323  Lanark Village FL 32323 US",
        "phone": "+1 (322) 222-2222",
        "address_note": "",
        "state_name": "Florida"
    },
    "public_url": "https://shop.com/checkout/order-received/24561?key=wc_order_dggtH5FnqPPSV&abt=sale",
    "order_detail_url": "https://shop.com/orders/24561?key=wc_order_dggtH5FnqPPSV",
    "order_detail_path": "/orders/24561?key=wc_order_dggtH5FnqPPSV",
    "order_currency": "USD",
    "date_updated": "2024-06-07 07:24:05",
    "paypal_email": null,
    "path": "/checkout/order-received/24561?key=wc_order_dggtH5FnqPPSV&abt=sale",
    "current_time": "2024-06-13T19:35:03-08:00",
    "number_of_products": 1,
    "ip": "54.219.251.239",
    "country_or_region": "US",
    "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36",
    "refund_amount": 0,
    "is_manual_refund": false,
    "key": "wc_order_dggtH5FnqPPSV",
    "sales_channel_category": "online_store",
    "sales_channel": "default",
    "order_tax": 10,
    "order_shipping_tax": 2.21,
    "processing_at_gmt": "2024-06-07 15:24:02",
    "completed_at_gmt": "0000-00-00 00:00:00",
    "processing_at": "2024-06-07 07:24:02",
    "completed_at": "0000-00-00 00:00:00",
    "cart_hash": "89b724ffd06e3d7191c3df82dc5c8791",
    "custom_attributes": [],
    "line_items": [
        {
            "attrs": {
                "power": "0.00/Plano"
            },
            "feature_image": {
                "ID": 9585,
                "url": "https://cdn.com/image/2022/10/ee70bc6923db0dbde6e22585253fe9e4bcd2d9016b68976c994c5bfc1cf9a6e4.jpeg",
                "thumbnail": "https://cdn.com/image/2022/10/ee70bc6923db0dbde6e22585253fe9e4bcd2d9016b68976c994c5bfc1cf9a6e4.jpeg",
                "media_content_type": "image",
                "alt": "",
                "width": null,
                "height": null,
                "aspect_ratio": null,
                "slug": "ee70bc6923db0dbde6e22585253fe9e4bcd2d9016b68976c994c5bfc1cf9a6e4jpeg",
                "file_id": 1816
            },
            "line_subtotal": "19.99",
            "line_total": "19.99",
            "order_id": 24561,
            "order_item_id": 11359,
            "order_item_name": "主商品C",
            "order_item_type": "line_item",
            "price": 19.99,
            "product_id": "9590",
            "public_url": "https://shop.com/products/choco-brown-1",
            "qty": "1",
            "regular_price": 29.99,
            "variation_id": "9591",
            "sku": "+-*.姜汁汽水_0.00#ac",
            "properties": []
        }
    ],
    "shippings": [
        {
            "cost": "22.10",
            "instance_id": "0",
            "method_id": "advanced_flat_rate_shipping",
            "order_id": 24561,
            "order_item_name": "tax",
            "order_item_id": 11361,
            "order_item_type": "shipping",
            "total_tax": "2.21"
        }
    ],
    "customer": {
        "ID": 518,
        "user_login": "fanyan154@gmail.com",
        "user_nicename": "Harry PotterHarry Potter",
        "user_email": "fanyan154@gmail.com",
        "user_registered": "2024-04-16 00:44:34",
        "user_status": 2,
        "display_name": "Harry Potter Harry Potter",
        "updated_at_gmt": "2024-06-14 03:21:13",
        "country": "US",
        "subscribed": true,
        "order_count": 91,
        "order_total": 10010.74,
        "phone": "(322) 222-2222",
        "type": "registered",
        "first_name": "Harry Potter",
        "last_name": "Harry Potter",
        "address_book": null,
        "billing_address": [],
        "shipping_address": [],
        "billing_country": null,
        "nickname": "Harry PotterHarry Potter",
        "created_at": "2024-04-16 00:44:34",
        "updated_at": "2024-06-13 19:21:13"
    },
    "fees": [
        {
            "fee_amount": "0.40",
            "line_tax": "0.00",
            "line_total": "0.40",
            "order_id": 24561,
            "order_item_id": 11360,
            "order_item_name": "Shipping Insurance",
            "order_item_type": "fee",
            "rate": "0.02",
            "tax_class": "0",
            "tax_status": "taxable"
        }
    ],
    "discount_record": [],
    "seller_notes": [],
    "conversion_summary": {
        "order_id": 24561,
        "order_index": 91,
        "interact_times": 1,
        "session_count": 6,
        "page_visit_count": 266,
        "days_to_conversion": 22,
        "device": "Computer",
        "ip": "54.219.251.239",
        "first_visit": {
            "landing_page": "https://shop.com/?utm_source=fb&utm_medium=Facebook_Right_Column&utm_campaign=23843343363350716&utm_term=23843343379110716&utm_content=23843343379100716&fbclid=IwAR2gdodchsKE6AbjL2TfW41s3N2D80-Kd4Iy6nDWdnJjjNYXQTR7lhcCJtU",
            "utm_parameters": {
                "utm_source": "fb",
                "utm_medium": "Facebook_Right_Column",
                "utm_campaign": "23843343363350716",
                "utm_term": "23843343379110716",
                "utm_content": "23843343379100716"
            },
            "referrer_url": "",
            "interact_source": "Facebook",
            "created_at": "2024-05-16 05:05:27",
            "created_at_gmt": "2024-05-16 13:05:27"
        },
        "last_visit": {
            "landing_page": "https://shop.com/?utm_source=fb&utm_medium=Facebook_Right_Column&utm_campaign=23843343363350716&utm_term=23843343379110716&utm_content=23843343379100716&fbclid=IwAR2gdodchsKE6AbjL2TfW41s3N2D80-Kd4Iy6nDWdnJjjNYXQTR7lhcCJtU",
            "utm_parameters": {
                "utm_source": "fb",
                "utm_medium": "Facebook_Right_Column",
                "utm_campaign": "23843343363350716",
                "utm_term": "23843343379110716",
                "utm_content": "23843343379100716"
            },
            "referrer_url": "",
            "interact_source": "Facebook",
            "created_at": "2024-05-16 05:05:27",
            "created_at_gmt": "2024-05-16 13:05:27"
        }
    }
}

更新订单收货地址

POST /openapi/2021-08/orders/{id}/shipping

权限:write_orders

Path Parameters

NameTypeDescription

id*

int

订单ID

Request Body

NameTypeDescription

shipping*

object

收货地址

shipping.country*

string

国家代码

shipping.address_2

string

地址2

shipping.city*

string

城市

shipping.first_name*

string

shipping.last_name*

string

shipping.address_1*

string

地址1

shipping.phone*

string

电话

shipping.state*

string

省份代码

shipping.postcode*

string

邮政编码

{
    "ID": 300484,
    "post_date": "2021-06-29 04:01:37",
    "post_date_gmt": "2021-06-29 07:01:37",
    "post_status": "wc-completed",
    "post_password": "wc_order_dOA8y2KC09sbI",
    "post_name": "order-jun-29-2021-0701-am",
    "post_modified": "2021-06-29 04:01:37",
    "post_modified_gmt": "2021-06-30 06:46:07",
    "comment_count": 1,
    "number": "A-13220210629040137300484Q",
    "payment_method": "free_order",
    "payment_method_title": "free_order",
    "trackname": null,
    "trackno": null,
    "trackno_source": null,
    "track_date": null,
    "track_date_gmt": null,
    "financial_status": "paid",
    "fulfillment_status": "unfulfilled",
    "billing_user_name": "yexivi",
    "order_shipping": "0.00",
    "order_total": "0.00",
    "transaction_id": null,
    "paid_date": "2021-06-29 04:01:38",
    "paid_date_gmt": "2021-06-29T07:01:38+00:00",
    "note": "",
    "domain": "example.com",
    "billing_address": {
        "first_name": "ye",
        "last_name": "xivi",
        "address_1": "some street no.1",
        "address_2": "great building",
        "city": "city",
        "country": "TD",
        "email": "test@test.com",
        "phone": "1234567910",
        "address_index": "ye xivi great building some street no.1 city TD test@test.com 1234567910",
        "subscribed": "no",
        "state_name": ""
    },
    "shipping_address": {
        "first_name": "ye",
        "last_name": "xivi",
        "address_1": "some street no.1",
        "address_2": "great building",
        "city": "city",
        "country": "TD",
        "address_index": "ye xivi great building some street no.1 city TD",
        "phone": "1234567910",
        "state_name": ""
    },
    "public_url": "https://example.com/checkout/order-received/300484?key=wc_order_dOKEvN98QPC3O",
    "order_currency": "GBP",
    "date_updated": "2021-06-30 03:46:07",
    "paypal_email": null,
    "path": "/checkout/order-received/300484?key=wc_order_dOKEvN98QPC3O",
    "current_time": "2021-06-30T08:55:25-03:00",
    "number_of_products": 1,
    "ip": "61.241.197.163",
    "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36",
    "refund_amount": null,
    "refunds": null,
    "is_manual_refund": false
}

更新发货状态

POST /openapi/2021-08/orders/{id}/track

权限:write_orders

Path Parameters

NameTypeDescription

id*

int

订单ID

Request Body

NameTypeDescription

trackno*

string

物流编号

sendemail*

boolean

是否发送邮件,true:是,false:否

logistics_company

string

物流服务商

{
    "ID": 300484,
    "post_date": "2021-06-29 04:01:37",
    "post_date_gmt": "2021-06-29 07:01:37",
    "post_status": "wc-completed",
    "post_password": "wc_order_dOA8y2KC09sbI",
    "post_name": "order-jun-29-2021-0701-am",
    "post_modified": "2021-06-29 04:01:37",
    "post_modified_gmt": "2021-06-30 06:46:07",
    "comment_count": 1,
    "number": "A-13220210629040137300484Q",
    "payment_method": "free_order",
    "payment_method_title": "free_order",
    "trackname": null,
    "trackno": null,
    "trackno_source": null,
    "track_date": null,
    "track_date_gmt": null,
    "financial_status": "paid",
    "fulfillment_status": "unfulfilled",
    "billing_user_name": "yexivi",
    "order_shipping": "0.00",
    "order_total": "0.00",
    "transaction_id": null,
    "paid_date": "2021-06-29 04:01:38",
    "paid_date_gmt": "2021-06-29T07:01:38+00:00",
    "note": "",
    "domain": "example.com",
    "billing_address": {
        "first_name": "ye",
        "last_name": "xivi",
        "address_1": "some street no.1",
        "address_2": "great building",
        "city": "city",
        "country": "TD",
        "email": "test@test.com",
        "phone": "1234567910",
        "address_index": "ye xivi great building some street no.1 city TD test@test.com 1234567910",
        "subscribed": "no",
        "state_name": ""
    },
    "shipping_address": {
        "first_name": "ye",
        "last_name": "xivi",
        "address_1": "some street no.1",
        "address_2": "great building",
        "city": "city",
        "country": "TD",
        "address_index": "ye xivi great building some street no.1 city TD",
        "phone": "1234567910",
        "state_name": ""
    },
    "public_url": "https://example.com/checkout/order-received/300484?key=wc_order_dOKEvN98QPC3O",
    "order_currency": "GBP",
    "date_updated": "2021-06-30 03:46:07",
    "paypal_email": null,
    "path": "/checkout/order-received/300484?key=wc_order_dOKEvN98QPC3O",
    "current_time": "2021-06-30T08:55:25-03:00",
    "number_of_products": 1,
    "ip": "61.241.197.163",
    "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36",
    "refund_amount": null,
    "refunds": null,
    "is_manual_refund": false
}

Last updated