{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/salesforce-commerce-cloud/json-schema/salesforce-commerce-cloud-customer-group-result-schema.json",
  "title": "CustomerGroupResult",
  "description": "Document representing an unfiltered list of customer groups.",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/salesforce-commerce-cloud-customers-api-openapi.yml#/components/schemas/CustomerGroupResult",
  "type": "object",
  "required": [
    "data"
  ],
  "allOf": [
    {
      "$ref": "#/$defs/PaginatedResultBase"
    }
  ],
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/CustomerGroup"
      },
      "description": "The list of customer groups."
    }
  },
  "$defs": {
    "CustomerGroup": {
      "required": [
        "id"
      ],
      "type": "object",
      "additionalProperties": {
        "title": "Additional Property Support",
        "description": "This type supports additional properties passed along with the defined properties of this API.\nTo indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`.\nThe type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix."
      },
      "properties": {
        "creationDate": {
          "type": "string",
          "format": "date-time",
          "description": "The date the customer group was created."
        },
        "description": {
          "maxLength": 4000,
          "type": "string",
          "description": "Customer Group description."
        },
        "id": {
          "minLength": 1,
          "maxLength": 256,
          "type": "string",
          "description": "Customer Group id."
        },
        "inDeletion": {
          "type": "boolean",
          "description": "Boolean to indicate if the customer group is marked for deletion."
        },
        "lastModified": {
          "type": "string",
          "format": "date-time",
          "description": "The date the customer group was last modified."
        },
        "memberCount": {
          "type": "integer",
          "format": "int32",
          "description": "Number of members in the customer group"
        },
        "rule": {
          "$ref": "#/$defs/CustomerGroupRule"
        },
        "type": {
          "type": "string",
          "description": "Customer Group Type.",
          "enum": [
            "system",
            "dynamic",
            "static"
          ]
        }
      },
      "description": "Document representing a customer group."
    },
    "CustomerGroupRule": {
      "required": [
        "description"
      ],
      "type": "object",
      "properties": {
        "description": {
          "type": "string",
          "description": "Customer Group Rule description. Describing its conditions in natural language."
        }
      },
      "description": "Customer Group Rule"
    },
    "Offset": {
      "default": 0,
      "minimum": 0,
      "format": "int32",
      "description": "The zero-based index of the first hit/data to include in the result.",
      "type": "integer"
    },
    "PaginatedResultBase": {
      "description": "Schema defining generic pageable result. Each response schema of a resource requiring pagination should extend this schema. \nIf you use this extend this schema directly, it needs to be defined what data is returned. Allowed names for the data field is `data`.",
      "type": "object",
      "allOf": [
        {
          "$ref": "#/$defs/ResultBase"
        }
      ],
      "properties": {
        "offset": {
          "$ref": "#/$defs/Offset"
        }
      },
      "required": [
        "limit",
        "offset",
        "total"
      ]
    },
    "ResultBase": {
      "description": "Schema defining generic list result. Each response schema of a resource requiring a list response should extend this schema. \nAdditionally it needs to be defined what data is returned.",
      "type": "object",
      "required": [
        "limit",
        "total"
      ],
      "properties": {
        "limit": {
          "format": "int32",
          "description": "Maximum records to retrieve per request. The limit with its constraints (minimum, maximum, default) is defined by the request parameter `limit` of the endpoint returning this schema.",
          "type": "integer"
        },
        "total": {
          "$ref": "#/$defs/Total"
        }
      }
    },
    "Total": {
      "default": 0,
      "minimum": 0,
      "format": "int32",
      "description": "The total number of hits that match the search's criteria. This can be greater than the number of results returned as search results are pagenated.",
      "type": "integer"
    }
  }
}