Get order
One order with line items, shipping, payment method, refunds and notes.
GET https://cotlet.dev/api/v1/woocommerce/orders/{order_id}
read
Returns one order in full: the line items with their IDs, the shipping and fee lines, the payment method, the refunds already made on it and its notes. Use the line_item_id values with create_refund. Customer name and address are included, which is personal data, so the call needs a role that can see orders.
Parameters
| Name | Type | Description |
|---|---|---|
| order_id integer required | integer | Order ID from list_orders. |
Request
curl https://cotlet.dev/api/v1/woocommerce/orders/1 \
-H "Authorization: Bearer $COTLET_API_KEY" result = client.call("woocommerce", "get_order", {"order_id":1}) const result = await cotlet.call('woocommerce', 'get_order', {"order_id":1}); cotlet call woocommerce get_order --data '{"order_id":1}' Example response
{
"order_id": 1042,
"status": "processing",
"currency": "USD",
"payment_method_title": "Credit card",
"line_items": [
{
"line_item_id": 7001,
"product_id": 311,
"name": "Linen tote bag",
"quantity": 2,
"total": "28.00"
},
{
"line_item_id": 7002,
"product_id": 318,
"name": "Ceramic mug",
"quantity": 1,
"total": "22.00"
}
],
"shipping_total": "8.00",
"total": "58.00",
"refunds": [],
"notes": [
{
"note_id": 9120,
"note": "Tracking number 1Z999AA10123456784",
"customer_note": false
}
]
}