訂單API / 獲得一個訂單的詳細數據
訂單API / 獲得一個訂單的詳細數據
發布日期:2018-10-27
瀏覽次數:2188
1.1 說明
路徑 | //www.your_website_domain.com/FeiEditor/api_v1/shop/orders/{id} |
方法 | GET/POST |
說明 | 直接在URL中最后使用訂單ID即可。例🔴如:您需要獲得一個訂🎃單ID為12345的訂單的細節數據。您只需要發送請求到 //www.your_website_domain.com/FeiEditor/api_v1/shop/orders/12345 即可🍸。 |
1.2 參數
無。直接在URL中最后使用訂單ID即可。例如:您需要獲得一個訂單ID為12345的訂單的細節數據。您只需要發送請求到 //www.your_website_domain.com/FeiEditor/api_v1/shop/orders/12345 即可。 特別需要提醒的是://www.your_website_domain.com/FeiEditor/api_v1/shop/orders?id=12345 是不合法的哦。
1.3 返回結果
正確結果 |
返回格式:JSON |
{ "order" : { "completed_at" : "2014-12-10T18:59:30Z", "tax_lines" : [], "status" : "processing", "total" : "100.00", "cart_discount" : "0.00", "customer_ip" : "127.0.0.1", "total_discount" : "0.00", "updated_at" : "2017-10-10T18:00:00Z", "currency" : "RMB", "total_shipping" : "0.00", "customer_user_agent" : "Chrome/31.0.1650.63 Safari/537.36", "line_items" : [ { "product_id" : 101, "quantity" : 1, "id" : 1, "subtotal" : "100.00", "tax_class" : null, "sku" : "", "total" : "100.00", "name" : "DEMO PRODUCT", "total_tax" : "0.00" } ], "customer_id" : "1", "total_tax" : "0.00", "order_number" : "#113", "shipping_methods" : "Free Shipping", "shipping_address" : { "city" : "Suzhou", "country" : "CN", "address_1" : "一條小街", "last_name" : "先生", "company" : "卡達", "postcode" : "12345", "address_2" : "", "state" : "Jiangsu", "first_name" : "董" }, "payment_details" : { "method_title" : "Cheque Payment", "method_id" : "cheque", "paid" : false }, "id" : 188, "shipping_tax" : "0.00", "cart_tax" : "0.00", "fee_lines" : [], "total_line_items_quantity" : 1, "shipping_lines" : [ { "method_title" : "Free Shipping", "id" : 8, "method_id" : "free_shipping", "total" : "0.00" } ], "customer" : { "id" : 4, "last_order_date" : "2018-10-01T18:00:00Z", "avatar_url" : "", "total_spent" : "0.00", "created_at" : "2018-10-01T18:00:00Z", "orders_count" : 0, "billing_address" : { "phone" : "123456789", "city" : "Suzhou", "country" : "CN", "address_1" : "大馬路", "last_name" : "先生", "company" : "卡達", "postcode" : "12345", "email" : "[email protected]", "address_2" : "", "state" : "Jiangsu", "first_name" : "董" }, "shipping_address" : { "city" : "Suzhou", "country" : "CN", "address_1" : "大馬路", "last_name" : "先生", "company" : "卡達", "postcode" : "12345", "email" : "[email protected]", "address_2" : "", "state" : "Jiangsu", "first_name" : "董" }, "first_name" : "董", "username" : "demouser", "last_name" : "先生", "last_order_id" : "1", "email" : "[email protected]" }, "note" : "", "coupon_lines" : [], "order_discount" : "0.00", "created_at" : "2018-10-01T18:00:00Z", "view_order_url" : "//www.example.com/my-account/view-order/188", "billing_address" : { "phone" : "123456789", "city" : "Suzhou", "country" : "CN", "address_1" : "大馬路", "last_name" : "先生", "company" : "卡達", "postcode" : "12345", "email" : "[email protected]", "address_2" : "", "state" : "Jiangsu", "first_name" : "董" } } } |