我是woocommerce的新手,为电子商务网站创建了REST API。 我正在使用创建订单Rest API链接,但未显示金额,也未显示运送和帐单地址 我正在使用此链接 与POST请求 https://example.com/ecommerce/wp-json/wc/v3/orders?product_id=615,630&customer_id=10&quantity=1&status=completed
如何通过REST API添加地址_1,地址_2的运输和账单 我不知道用于创建订单的送货和账单地址REST API的参数
我正在给邮递员REST API回复。
{
"id": 947,
"parent_id": 0,
"number": "947",
"order_key": "wc_order_vXLMekyrTbJUX",
"created_via": "rest-api",
"version": "4.5.2",
"status": "completed",
"currency": "INR",
"date_created": "2020-10-27T05:43:24",
"date_created_gmt": "2020-10-27T05:43:24",
"date_modified": "2020-10-27T05:43:24",
"date_modified_gmt": "2020-10-27T05:43:24",
"discount_total": "0.00",
"discount_tax": "0.00",
"shipping_total": "0.00",
"shipping_tax": "0.00",
"cart_tax": "0.00",
"total": "0.00",
"total_tax": "0.00",
"prices_include_tax": false,
"customer_id": 10,
"customer_ip_address": "",
"customer_user_agent": "",
"customer_note": "",
"billing": {
"first_name": "",
"last_name": "",
"company": "",
"address_1": "",
"address_2": "",
"city": "",
"state": "",
"postcode": "",
"country": "",
"email": "mehimanshuswami@gmail.com",
"phone": ""
},
"shipping": {
"first_name": "",
"last_name": "",
"company": "",
"address_1": "",
"address_2": "",
"city": "",
"state": "",
"postcode": "",
"country": ""
},
"payment_method": "",
"payment_method_title": "",
"transaction_id": "",
"date_paid": "2020-10-27T05:43:24",
"date_paid_gmt": "2020-10-27T05:43:24",
"date_completed": "2020-10-27T05:43:24",
"date_completed_gmt": "2020-10-27T05:43:24",
"cart_hash": "",
"meta_data": [
{
"id": 7659,
"key": "_wcfm_new_order_notified",
"value": "yes"
},
{
"id": 7660,
"key": "_wcfm_membership_order_processed",
"value": "yes"
}
],
"line_items": [],
"tax_lines": [],
"shipping_lines": [],
"fee_lines": [],
"coupon_lines": [],
"refunds": [],
"currency_symbol": "₹",
"_links": {
"self": [
{
"href": "https://itechs.co.in/ecommerce4/wp-json/wc/v3/orders/947"
}
],
"collection": [
{
"href": "https://itechs.co.in/ecommerce4/wp-json/wc/v3/orders"
}
],
"customer": [
{
"href": "https://itechs.co.in/ecommerce4/wp-json/wc/v3/customers/10"
}
]
}
}
我已经看到woocommerce的文档,但是没有找到任何针对金额,发货和账单地址的解决方案
我正在尝试每次使用零产品数量创建其创建的订单,但我的购物车中有产品,但是为此运行了创建订单API时,产品数量没有显示,以及如何添加送货地址和账单地址作为回应
我试图通过cart_key ='fa1787cc2d920c23b0749342582a93ec4b64832e79aafb7acb0514416eb79d26'和product = 58d4d1e7b1e97b258c9ed0b37e02d087作为参数来获取用户产品,但API却不显示我的产品订购量。
所以我希望用户使用API的产品数量和参数来添加送货地址和帐单地址_1和地址_2