WooCommerce · Schema

StoreOrder

A customer order retrieved via the Store API.

eCommerceOpen SourceOrdersProductsWordPress

Properties

Name Type Description
id integer Order unique identifier.
number string Human-readable order number.
status string Order status.
date_created string Date the order was created.
total string Order grand total.
billing object A customer billing or shipping address in the Store API context.
shipping object A customer billing or shipping address in the Store API context.
items array Items in the order.
View JSON Schema on GitHub

JSON Schema

woocommerce-store-api-store-order-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/woocommerce/refs/heads/main/json-schema/woocommerce-store-api-store-order-schema.json",
  "title": "StoreOrder",
  "description": "A customer order retrieved via the Store API.",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "description": "Order unique identifier.",
      "example": 1
    },
    "number": {
      "type": "string",
      "description": "Human-readable order number.",
      "example": "string-value"
    },
    "status": {
      "type": "string",
      "description": "Order status.",
      "example": "active"
    },
    "date_created": {
      "type": "string",
      "format": "date-time",
      "description": "Date the order was created.",
      "example": "2026-05-03T14:30:00Z"
    },
    "total": {
      "type": "string",
      "description": "Order grand total.",
      "example": "string-value"
    },
    "billing": {
      "type": "object",
      "description": "A customer billing or shipping address in the Store API context.",
      "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.",
          "example": "string-value"
        },
        "state": {
          "type": "string",
          "description": "State or province code.",
          "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": "[email protected]"
        },
        "phone": {
          "type": "string",
          "description": "Phone number.",
          "example": "string-value"
        }
      }
    },
    "shipping": {
      "type": "object",
      "description": "A customer billing or shipping address in the Store API context.",
      "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.",
          "example": "string-value"
        },
        "state": {
          "type": "string",
          "description": "State or province code.",
          "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": "[email protected]"
        },
        "phone": {
          "type": "string",
          "description": "Phone number.",
          "example": "string-value"
        }
      }
    },
    "items": {
      "type": "array",
      "description": "Items in the order.",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Line item ID."
          },
          "name": {
            "type": "string",
            "description": "Product name."
          },
          "quantity": {
            "type": "integer",
            "description": "Quantity ordered."
          },
          "total": {
            "type": "string",
            "description": "Line item total."
          }
        }
      },
      "example": [
        {
          "id": 1,
          "name": "Example Name",
          "quantity": 1,
          "total": "string-value"
        }
      ]
    }
  }
}