WooCommerce · Schema

Address

Billing or shipping address associated with a customer or order.

eCommerceOpen SourceOrdersProductsWordPress

Properties

Name Type Description
first_name string First name.
last_name string Last name.
company string Company name.
address_1 string Address line 1.
address_2 string Address line 2.
city string City name.
state string ISO code or name of the state, province, or district.
postcode string Postal code.
country string ISO 3166-1 alpha-2 country code.
email string Email address (billing only).
phone string Phone number (billing only).
View JSON Schema on GitHub

JSON Schema

woocommerce-rest-api-address-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-address-schema.json",
  "title": "Address",
  "description": "Billing or shipping address associated with a customer or order.",
  "type": "object",
  "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": "[email protected]"
    },
    "phone": {
      "type": "string",
      "description": "Phone number (billing only).",
      "example": "string-value"
    }
  }
}