Documentation is still being updated. Some content maybe unfinished.
curl --request GET \
--url {protocol}://{host}/wp-json/cocart/preview/order-received/{order_id} \
--header 'Authorization: Basic <encoded-value>'{
"order_id": 789,
"order_number": "789",
"order_key": "wc_order_abc123xyz",
"status": "processing",
"status_name": "Processing",
"date_created": "December 15, 2024, 2:20 pm",
"date_paid": "December 15, 2024, 2:21 pm",
"currency": "USD",
"total": "44.98",
"subtotal": "39.98",
"tax_total": "0.00",
"shipping_total": "5.00",
"discount_total": "0.00",
"payment_method": "stripe",
"payment_method_title": "Credit Card (Stripe)",
"customer_id": 123,
"customer_note": "Please leave at the door",
"billing_address": {
"first_name": "John",
"last_name": "Doe",
"email": "john@example.com",
"phone": "+1234567890",
"address_1": "123 Main St",
"address_2": "Apt 4B",
"city": "Anytown",
"state": "CA",
"postcode": "12345",
"country": "US",
"company": ""
},
"shipping_address": {
"first_name": "John",
"last_name": "Doe",
"address_1": "123 Main St",
"address_2": "Apt 4B",
"city": "Anytown",
"state": "CA",
"postcode": "12345",
"country": "US",
"company": ""
},
"items": [
{
"item_id": 1,
"product_id": 456,
"variation_id": 0,
"product_name": "Premium T-Shirt",
"product_image": "https://example.com/wp-content/uploads/product.jpg",
"quantity": 2,
"subtotal": "39.98",
"total": "39.98",
"meta_data": []
}
],
"totals": [
{
"key": "subtotal",
"label": "Subtotal",
"value": "$39.98"
},
{
"key": "shipping",
"label": "Shipping",
"value": "$5.00"
},
{
"key": "total",
"label": "Total",
"value": "$44.98"
}
],
"needs_payment": false,
"needs_shipping": true,
"has_downloads": false,
"download_url": null
}Retrieve order details for the thank you page after checkout completion
curl --request GET \
--url {protocol}://{host}/wp-json/cocart/preview/order-received/{order_id} \
--header 'Authorization: Basic <encoded-value>'{
"order_id": 789,
"order_number": "789",
"order_key": "wc_order_abc123xyz",
"status": "processing",
"status_name": "Processing",
"date_created": "December 15, 2024, 2:20 pm",
"date_paid": "December 15, 2024, 2:21 pm",
"currency": "USD",
"total": "44.98",
"subtotal": "39.98",
"tax_total": "0.00",
"shipping_total": "5.00",
"discount_total": "0.00",
"payment_method": "stripe",
"payment_method_title": "Credit Card (Stripe)",
"customer_id": 123,
"customer_note": "Please leave at the door",
"billing_address": {
"first_name": "John",
"last_name": "Doe",
"email": "john@example.com",
"phone": "+1234567890",
"address_1": "123 Main St",
"address_2": "Apt 4B",
"city": "Anytown",
"state": "CA",
"postcode": "12345",
"country": "US",
"company": ""
},
"shipping_address": {
"first_name": "John",
"last_name": "Doe",
"address_1": "123 Main St",
"address_2": "Apt 4B",
"city": "Anytown",
"state": "CA",
"postcode": "12345",
"country": "US",
"company": ""
},
"items": [
{
"item_id": 1,
"product_id": 456,
"variation_id": 0,
"product_name": "Premium T-Shirt",
"product_image": "https://example.com/wp-content/uploads/product.jpg",
"quantity": 2,
"subtotal": "39.98",
"total": "39.98",
"meta_data": []
}
],
"totals": [
{
"key": "subtotal",
"label": "Subtotal",
"value": "$39.98"
},
{
"key": "shipping",
"label": "Shipping",
"value": "$5.00"
},
{
"key": "total",
"label": "Total",
"value": "$44.98"
}
],
"needs_payment": false,
"needs_shipping": true,
"has_downloads": false,
"download_url": null
}WordPress username and password
Unique identifier for the order
Order key for verification
Order received details retrieved successfully
Order ID
Order number
Order key
Order status
Human-readable order status
Order creation date
Order payment date
Order currency
Order total
Order subtotal
Tax total
Shipping total
Discount total
Payment method ID
Payment method title
Customer ID
Customer note
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Whether order requires payment
Whether order needs shipping
Whether order has downloadable items
URL to download items
Show child attributes
Was this page helpful?