WooCommerce · Schema

LineItem

A product line item within an order.

E-CommerceOpen-SourceOrderProductWordPress

Properties

Name Type Description
id integer Line item unique identifier.
name string Product name at time of purchase.
product_id integer Product ID.
variation_id integer Variation ID (0 if not a variation).
quantity integer Quantity ordered.
tax_class string Tax class used for this line item.
subtotal string Line subtotal (before discounts) as a decimal string.
subtotal_tax string Line subtotal tax as a decimal string.
total string Line total (after discounts) as a decimal string.
total_tax string Line total tax as a decimal string.
sku string Product SKU.
price number Product price at time of purchase.
meta_data array Metadata for the line item (e.g. variation attributes).
View JSON Schema on GitHub

JSON Schema

woocommerce-rest-api-line-item-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-rest-api-line-item-schema.json",
  "title": "LineItem",
  "description": "A product line item within an order.",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "description": "Line item unique identifier.",
      "example": 1
    },
    "name": {
      "type": "string",
      "description": "Product name at time of purchase.",
      "example": "Example Name"
    },
    "product_id": {
      "type": "integer",
      "description": "Product ID.",
      "example": 1
    },
    "variation_id": {
      "type": "integer",
      "description": "Variation ID (0 if not a variation).",
      "example": 1
    },
    "quantity": {
      "type": "integer",
      "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": "number",
      "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": {
        "type": "object",
        "description": "Custom metadata key-value entry.",
        "properties": {
          "id": {
            "type": "integer",
            "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"
      ]
    }
  }
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/woocommerce-rest-api-line-item"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.