{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/lightspeed/main/json-schema/lightspeed-customer-collection-schema.json", "title": "Customer Collection", "x-generated": "2026-10-12", "x-method": "derived", "x-generator": "derive-json-schema.py", "x-source": "openapi/lightspeed-customer-groups-api-openapi.yml#/components/schemas/CustomerCollection", "properties": { "data": { "description": "An array of Customer objects.", "items": { "$ref": "#/$defs/Customer" }, "type": "array" }, "version": { "$ref": "#/$defs/Version" } }, "type": "object", "$defs": { "Customer": { "properties": { "balance": { "description": "Customer's unpaid balance.", "format": "double", "type": "number" }, "company_name": { "description": "Company name.", "type": [ "string", "null" ] }, "created_at": { "description": "Creation timestamp in UTC.", "type": "string" }, "custom_field_1": { "description": "Custom field 1. Can be used to store random data.", "type": [ "string", "null" ] }, "custom_field_2": { "description": "Custom field 2.", "type": [ "string", "null" ] }, "custom_field_3": { "description": "Custom field 3.", "type": [ "string", "null" ] }, "custom_field_4": { "description": "Custom field 4.", "type": [ "string", "null" ] }, "customer_code": { "description": "Customer code used for claiming loyalty.", "type": "string" }, "customer_group_id": { "description": "Customer group ID.", "type": "string" }, "date_of_birth": { "description": "Birthday.", "type": [ "string", "null" ] }, "deleted_at": { "description": "Deletion timestamp in UTC.", "type": [ "string", "null" ] }, "do_not_email": { "default": false, "description": "Indicates whether the customer opted out of email communications.", "type": "boolean" }, "email": { "description": "Customer's email address.", "type": [ "string", "null" ] }, "enable_loyalty": { "type": "boolean" }, "enable_promotional_sms": { "default": false, "description": "Indicates whether the customer opted in to SMS communications.", "type": "boolean" }, "fax": { "description": "Fax no.", "type": [ "string", "null" ] }, "first_name": { "description": "Customer's first name.", "type": [ "string", "null" ] }, "gender": { "description": "Customer's gender. Can be `M`, `F` or null.", "type": [ "string", "null" ] }, "id": { "description": "Auto-generated object ID.", "type": "string" }, "last_name": { "description": "Customer 's last name.", "type": [ "string", "null" ] }, "loyalty_balance": { "description": "Customer's loyalty balance.", "format": "double", "type": "number" }, "mobile": { "description": "Mobile phone no.", "type": [ "string", "null" ] }, "name": { "deprecated": true, "description": "Customers full name. **deprecated**", "type": [ "string", "null" ] }, "note": { "description": "Customer note.", "type": [ "string", "null" ] }, "on_account_limit": { "description": "Customer's OnAccount Limit.", "format": "double", "type": [ "number", "null" ] }, "phone": { "description": "Phone no.", "type": [ "string", "null" ] }, "physical_address_1": { "description": "Physical address, line 1.", "type": [ "string", "null" ] }, "physical_address_2": { "description": "Physical address, line 2.", "type": [ "string", "null" ] }, "physical_city": { "description": "Physical address, city.", "type": [ "string", "null" ] }, "physical_country_id": { "description": "Physical address, country code.", "type": [ "string", "null" ] }, "physical_postcode": { "description": "Physical address, post code.", "type": [ "string", "null" ] }, "physical_state": { "description": "Physical address, state.", "type": [ "string", "null" ] }, "physical_suburb": { "description": "Physical address, suburb.", "type": [ "string", "null" ] }, "postal_address_1": { "description": "Postal address, line 1.", "type": [ "string", "null" ] }, "postal_address_2": { "description": "Postal address, line 2.", "type": [ "string", "null" ] }, "postal_city": { "description": "Postal address, city.", "type": [ "string", "null" ] }, "postal_country_id": { "description": "Postal address, country code.", "type": [ "string", "null" ] }, "postal_postcode": { "description": "Postal address, post code.", "type": [ "string", "null" ] }, "postal_state": { "description": "Postal address, state.", "type": [ "string", "null" ] }, "postal_suburb": { "description": "Postal address, suburb.", "type": [ "string", "null" ] }, "tax_id": { "description": "Customer's tax ID.", "type": [ "string", "null" ] }, "twitter": { "description": "Twitter handle.", "type": [ "string", "null" ] }, "updated_at": { "description": "Last update timestamp in UTC.", "type": "string" }, "version": { "description": "Auto-incrementing object version number.", "format": "int64", "type": "integer" }, "website": { "description": "Website URL.", "type": [ "string", "null" ] }, "year_to_date": { "description": "Customer's spending this year.", "format": "double", "type": "number" } }, "required": [ "first_name", "last_name" ], "title": "Customer", "type": "object" }, "Version": { "description": "An object containing the highest and lowest version numbers for all items of the returned collection.", "properties": { "max": { "description": "Highest version number of the payload, or `null` when the result set is empty.", "format": "int64", "type": [ "integer", "null" ] }, "min": { "description": "Lowest version number of the payload, or `null` when the result set is empty.", "format": "int64", "type": [ "integer", "null" ] } }, "required": [ "max", "min" ], "type": "object" } } }