WooCommerce · JSON Structure
Woocommerce Rest Api Order Structure
A WooCommerce customer order.
Type: object
Properties: 25
eCommerceOpen SourceOrdersProductsWordPress
Order is a JSON Structure definition published by WooCommerce, describing 25 properties. It conforms to the https://json-structure.org/meta/core/v0/# meta-schema.
Properties
id
parent_id
number
order_key
status
currency
date_created
date_modified
date_completed
discount_total
discount_tax
shipping_total
shipping_tax
cart_tax
total
total_tax
customer_id
customer_note
billing
shipping
payment_method
payment_method_title
transaction_id
line_items
meta_data
Meta-schema: https://json-structure.org/meta/core/v0/#
JSON Structure
{
"$schema": "https://json-structure.org/meta/core/v0/#",
"$id": "https://raw.githubusercontent.com/api-evangelist/woocommerce/refs/heads/main/json-structure/woocommerce-rest-api-order-structure.json",
"name": "Order",
"description": "A WooCommerce customer order.",
"type": "object",
"properties": {
"id": {
"type": "int32",
"description": "Order unique identifier.",
"example": 1
},
"parent_id": {
"type": "int32",
"description": "Parent order ID (for order refunds and child orders).",
"example": 1
},
"number": {
"type": "string",
"description": "Order number displayed to customers.",
"example": "string-value"
},
"order_key": {
"type": "string",
"description": "Order key used to verify order ownership.",
"example": "string-value"
},
"status": {
"type": "string",
"description": "Order status. Options: pending, processing, on-hold, completed, cancelled, refunded, failed, trash.",
"enum": [
"pending",
"processing",
"on-hold",
"completed",
"cancelled",
"refunded",
"failed",
"trash"
],
"example": "pending"
},
"currency": {
"type": "string",
"description": "ISO 4217 currency code used for the order.",
"example": "string-value"
},
"date_created": {
"type": "datetime",
"description": "Date the order was created.",
"example": "2026-05-03T14:30:00Z"
},
"date_modified": {
"type": "datetime",
"description": "Date the order was last modified.",
"example": "2026-05-03T14:30:00Z"
},
"date_completed": {
"type": "datetime",
"description": "Date the order was marked as completed.",
"nullable": true,
"example": "2026-05-03T14:30:00Z"
},
"discount_total": {
"type": "string",
"description": "Total discount applied to the order as a decimal string.",
"example": "string-value"
},
"discount_tax": {
"type": "string",
"description": "Total discount tax as a decimal string.",
"example": "string-value"
},
"shipping_total": {
"type": "string",
"description": "Total shipping cost as a decimal string.",
"example": "string-value"
},
"shipping_tax": {
"type": "string",
"description": "Total shipping tax as a decimal string.",
"example": "string-value"
},
"cart_tax": {
"type": "string",
"description": "Total cart item taxes as a decimal string.",
"example": "string-value"
},
"total": {
"type": "string",
"description": "Grand total as a decimal string.",
"example": "string-value"
},
"total_tax": {
"type": "string",
"description": "Total tax as a decimal string.",
"example": "string-value"
},
"customer_id": {
"type": "int32",
"description": "Customer ID (0 for guest orders).",
"example": 1
},
"customer_note": {
"type": "string",
"description": "Note left by the customer at checkout.",
"example": "string-value"
},
"billing": {
"type": "object",
"description": "Billing or shipping address associated with a customer or order.",
"properties": {
"first_name": {
"type": "string",
"description": "First name.",
"example": "Example Name"
},
"last_name": {
"type": "string",
"description": "Last name.",
"example": "Example Name"
},
"company": {
"type": "string",
"description": "Company name.",
"example": "string-value"
},
"address_1": {
"type": "string",
"description": "Address line 1.",
"example": "string-value"
},
"address_2": {
"type": "string",
"description": "Address line 2.",
"example": "string-value"
},
"city": {
"type": "string",
"description": "City name.",
"example": "string-value"
},
"state": {
"type": "string",
"description": "ISO code or name of the state, province, or district.",
"example": "string-value"
},
"postcode": {
"type": "string",
"description": "Postal code.",
"example": "string-value"
},
"country": {
"type": "string",
"description": "ISO 3166-1 alpha-2 country code.",
"example": "string-value"
},
"email": {
"type": "string",
"format": "email",
"description": "Email address (billing only).",
"example": "user@example.com"
},
"phone": {
"type": "string",
"description": "Phone number (billing only).",
"example": "string-value"
}
}
},
"shipping": {
"type": "object",
"description": "Billing or shipping address associated with a customer or order.",
"properties": {
"first_name": {
"type": "string",
"description": "First name.",
"example": "Example Name"
},
"last_name": {
"type": "string",
"description": "Last name.",
"example": "Example Name"
},
"company": {
"type": "string",
"description": "Company name.",
"example": "string-value"
},
"address_1": {
"type": "string",
"description": "Address line 1.",
"example": "string-value"
},
"address_2": {
"type": "string",
"description": "Address line 2.",
"example": "string-value"
},
"city": {
"type": "string",
"description": "City name.",
"example": "string-value"
},
"state": {
"type": "string",
"description": "ISO code or name of the state, province, or district.",
"example": "string-value"
},
"postcode": {
"type": "string",
"description": "Postal code.",
"example": "string-value"
},
"country": {
"type": "string",
"description": "ISO 3166-1 alpha-2 country code.",
"example": "string-value"
},
"email": {
"type": "string",
"format": "email",
"description": "Email address (billing only).",
"example": "user@example.com"
},
"phone": {
"type": "string",
"description": "Phone number (billing only).",
"example": "string-value"
}
}
},
"payment_method": {
"type": "string",
"description": "Payment method ID (e.g. stripe, paypal).",
"example": "string-value"
},
"payment_method_title": {
"type": "string",
"description": "Human-readable payment method name.",
"example": "Example Name"
},
"transaction_id": {
"type": "string",
"description": "Payment gateway transaction ID.",
"example": "500123"
},
"line_items": {
"type": "array",
"description": "Line items in the order.",
"items": {
"type": "object",
"description": "A product line item within an order.",
"properties": {
"id": {
"type": "int32",
"description": "Line item unique identifier.",
"example": 1
},
"name": {
"type": "string",
"description": "Product name at time of purchase.",
"example": "Example Name"
},
"product_id": {
"type": "int32",
"description": "Product ID.",
"example": 1
},
"variation_id": {
"type": "int32",
"description": "Variation ID (0 if not a variation).",
"example": 1
},
"quantity": {
"type": "int32",
"description": "Quantity ordered.",
"example": 1
},
"tax_class": {
"type": "string",
"description": "Tax class used for this line item.",
"example": "string-value"
},
"subtotal": {
"type": "string",
"description": "Line subtotal (before discounts) as a decimal string.",
"example": "string-value"
},
"subtotal_tax": {
"type": "string",
"description": "Line subtotal tax as a decimal string.",
"example": "string-value"
},
"total": {
"type": "string",
"description": "Line total (after discounts) as a decimal string.",
"example": "string-value"
},
"total_tax": {
"type": "string",
"description": "Line total tax as a decimal string.",
"example": "string-value"
},
"sku": {
"type": "string",
"description": "Product SKU.",
"example": "string-value"
},
"price": {
"type": "double",
"description": "Product price at time of purchase.",
"example": 10.5
},
"meta_data": {
"type": "array",
"description": "Metadata for the line item (e.g. variation attributes).",
"items": {
"$ref": "#/components/schemas/MetaData"
},
"example": [
"string-value"
]
}
}
},
"example": [
"string-value"
]
},
"meta_data": {
"type": "array",
"description": "Custom metadata attached to the order.",
"items": {
"type": "object",
"description": "Custom metadata key-value entry.",
"properties": {
"id": {
"type": "int32",
"description": "Metadata unique identifier.",
"example": 1
},
"key": {
"type": "string",
"description": "Metadata key.",
"example": "string-value"
},
"value": {
"type": "string",
"description": "Metadata value.",
"example": "string-value"
}
}
},
"example": [
"string-value"
]
}
}
}