{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/lightspeed/main/json-schema/lightspeed-price-book-collection-schema.json",
  "title": "Price Book Collection",
  "x-generated": "2026-10-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/lightspeed-price-books-api-openapi.yml#/components/schemas/PriceBookCollection",
  "properties": {
    "data": {
      "description": "An array of Price Book objects wrapped in a top level `data` object.",
      "items": {
        "$ref": "#/$defs/PriceBook"
      },
      "type": "array"
    }
  },
  "type": "object",
  "$defs": {
    "Attribute": {
      "properties": {
        "key": {
          "description": "The key for the attribute.",
          "type": "string"
        },
        "value": {
          "description": "The value for the attribute.",
          "type": "string"
        }
      },
      "required": [
        "key",
        "value"
      ],
      "title": "Attribute",
      "type": "object"
    },
    "CustomerGroup": {
      "properties": {
        "created_at": {
          "description": "Creation timestamp in UTC.",
          "type": "string"
        },
        "deleted_at": {
          "description": "Deletion timestamp in UTC.",
          "type": [
            "string",
            "null"
          ]
        },
        "group_id": {
          "description": "The customer group identifier.",
          "type": "string"
        },
        "id": {
          "description": "Auto-generated object ID.",
          "type": "string"
        },
        "name": {
          "description": "The customer group name.",
          "type": "string"
        },
        "retailer_id": {
          "description": "The retailer identifier",
          "type": "string"
        },
        "updated_at": {
          "description": "Last update timestamp in UTC.",
          "type": "string"
        },
        "version": {
          "description": "Auto-incrementing object version number.",
          "format": "int64",
          "type": "integer"
        }
      },
      "required": [
        "name"
      ],
      "title": "Customer Group",
      "type": "object"
    },
    "Outlet": {
      "properties": {
        "attributes": {
          "description": "The outlet attributes such as `low_stock_warning`, `order_reference`, `order_reference_prefix`, `return_reference`, `return_reference_prefix`.",
          "items": {
            "$ref": "#/$defs/Attribute"
          },
          "type": "array"
        },
        "currency": {
          "description": "Currency name.",
          "type": "string"
        },
        "currency_symbol": {
          "description": "Currency symbol.",
          "type": "string"
        },
        "default_tax_id": {
          "deprecated": true,
          "description": "Default tax id used for sales in this outlet. **deprecated**",
          "type": "string"
        },
        "deleted_at": {
          "description": "Deletion timestamp in UTC.",
          "type": [
            "string",
            "null"
          ]
        },
        "display_prices": {
          "description": "Indicates whether prices in this outlet should be displayed as tax-inclusive.",
          "enum": [
            "inclusive",
            "exclusive"
          ],
          "type": "string"
        },
        "email": {
          "description": "Specified email for the outlet.",
          "type": "string"
        },
        "id": {
          "description": "Auto-generated object ID.",
          "type": "string"
        },
        "latitude": {
          "description": "Geographical latitude of the outlet.",
          "type": [
            "string",
            "null"
          ]
        },
        "longitude": {
          "description": "Geographical longitude of the outlet.",
          "type": [
            "string",
            "null"
          ]
        },
        "name": {
          "description": "The outlet name.",
          "type": "string"
        },
        "phone": {
          "description": "Contact phone number for the outlet.",
          "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"
          ]
        },
        "time_zone": {
          "description": "Outlet timezone. **read only**",
          "type": [
            "string",
            "null"
          ]
        },
        "version": {
          "description": "Auto-incrementing object version number.",
          "format": "int64",
          "type": "integer"
        }
      },
      "required": [
        "id",
        "name",
        "default_tax_id",
        "currency",
        "display_prices",
        "time_zone",
        "currency_symbol",
        "attributes",
        "version"
      ],
      "title": "Outlet",
      "type": "object"
    },
    "PriceBook": {
      "properties": {
        "created_at": {
          "description": "Created timestamp in UTC.",
          "type": "string"
        },
        "customer_group_ids": {
          "description": "The IDs of the customer groups associated with this price book.",
          "items": {
            "format": "uuid",
            "type": "string"
          },
          "type": [
            "array",
            "null"
          ]
        },
        "customer_groups": {
          "items": {
            "$ref": "#/$defs/CustomerGroup"
          },
          "type": [
            "array",
            "null"
          ]
        },
        "deleted_at": {
          "description": "Deletion timestamp in UTC.",
          "type": [
            "string",
            "null"
          ]
        },
        "id": {
          "description": "Auto-generated object ID.",
          "type": "string"
        },
        "name": {
          "description": "Price Book name.",
          "type": "string"
        },
        "outlets": {
          "items": {
            "$ref": "#/$defs/Outlet"
          },
          "type": [
            "array",
            "null"
          ]
        },
        "restrict_to_platform_key": {
          "description": "`\"0\"` - all platforms, `\"1\"` - in store, `\"2\"` - ecommerce.",
          "type": [
            "string",
            "null"
          ]
        },
        "restrict_to_platform_label": {
          "description": "One of `In Store`, `Ecommerce`, `All Platforms`.",
          "type": [
            "string",
            "null"
          ]
        },
        "type": {
          "description": "Type of price book",
          "type": "string"
        },
        "updated_at": {
          "description": "Updated timestamp in UTC.",
          "type": "string"
        },
        "valid_from": {
          "description": "The date when the Price Book becomes valid (active).",
          "type": [
            "string",
            "null"
          ]
        },
        "valid_to": {
          "description": "The date when the Price Book becomes invalid (inactive).",
          "type": [
            "string",
            "null"
          ]
        },
        "version": {
          "description": "Auto-incrementing object version number.",
          "format": "int64",
          "type": "integer"
        }
      },
      "required": [
        "name"
      ],
      "title": "Price Book",
      "type": "object"
    }
  }
}