WooCommerce · JSON Structure
Woocommerce Rest Api Customer Structure
A WooCommerce customer account.
Type: object
Properties: 15
eCommerceOpen SourceOrdersProductsWordPress
Customer is a JSON Structure definition published by WooCommerce, describing 15 properties. It conforms to the https://json-structure.org/meta/core/v0/# meta-schema.
Properties
id
date_created
date_modified
email
first_name
last_name
role
username
billing
shipping
is_paying_customer
orders_count
total_spent
avatar_url
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-customer-structure.json",
"name": "Customer",
"description": "A WooCommerce customer account.",
"type": "object",
"properties": {
"id": {
"type": "int32",
"description": "Customer unique identifier.",
"example": 1
},
"date_created": {
"type": "datetime",
"description": "Date the customer was created.",
"example": "2026-05-03T14:30:00Z"
},
"date_modified": {
"type": "datetime",
"description": "Date the customer was last modified.",
"example": "2026-05-03T14:30:00Z"
},
"email": {
"type": "string",
"format": "email",
"description": "Customer email address.",
"example": "user@example.com"
},
"first_name": {
"type": "string",
"description": "Customer first name.",
"example": "Example Name"
},
"last_name": {
"type": "string",
"description": "Customer last name.",
"example": "Example Name"
},
"role": {
"type": "string",
"description": "Customer WordPress user role.",
"example": "string-value"
},
"username": {
"type": "string",
"description": "Customer login username.",
"example": "Example Name"
},
"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"
}
}
},
"is_paying_customer": {
"type": "boolean",
"description": "Whether the customer has placed at least one order.",
"example": true
},
"orders_count": {
"type": "int32",
"description": "Total number of orders placed by the customer.",
"example": 1
},
"total_spent": {
"type": "string",
"description": "Total amount spent by the customer as a decimal string.",
"example": "string-value"
},
"avatar_url": {
"type": "uri",
"description": "URL of the customer's Gravatar image.",
"example": "https://example.com/path"
},
"meta_data": {
"type": "array",
"description": "Custom metadata attached to the customer.",
"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"
]
}
}
}