{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/marketsdk/json-schema/marketsdk-buyer-list-schema.json",
  "title": "BuyerList",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/marketsdk-buyers-api-openapi.yml#/components/schemas/BuyerList",
  "type": "object",
  "properties": {
    "object": {
      "type": "string",
      "enum": [
        "list"
      ]
    },
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/BuyerObject"
      }
    },
    "has_more": {
      "type": "boolean",
      "description": "Whether another page follows."
    },
    "next_cursor": {
      "type": [
        "string",
        "null"
      ],
      "description": "Pass as `starting_after` (or `cursor` for search) to get the next page."
    }
  },
  "required": [
    "object",
    "data",
    "has_more",
    "next_cursor"
  ],
  "$defs": {
    "BuyerObject": {
      "type": "object",
      "properties": {
        "object": {
          "type": "string",
          "enum": [
            "buyer"
          ]
        },
        "id": {
          "type": "string"
        },
        "external_id": {
          "type": "string"
        },
        "display_name": {
          "type": [
            "string",
            "null"
          ]
        },
        "reputation": {
          "$ref": "#/$defs/ReputationObject"
        },
        "metadata": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "erased": {
          "type": "boolean"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "updated_at": {
          "type": "string",
          "format": "date-time"
        }
      },
      "required": [
        "object",
        "id",
        "external_id",
        "display_name",
        "reputation",
        "metadata",
        "erased",
        "created_at",
        "updated_at"
      ]
    },
    "ReputationObject": {
      "type": "object",
      "properties": {
        "completed_orders": {
          "type": "number",
          "description": "order_completed events in the rolling window."
        },
        "backed_out": {
          "type": "number",
          "description": "backed_out events in the rolling window."
        },
        "disputes_lost": {
          "type": "number",
          "description": "dispute_lost events in the rolling window."
        },
        "review_count": {
          "type": "number",
          "description": "Visible reviews in the rolling window."
        },
        "average_rating": {
          "type": [
            "number",
            "null"
          ],
          "description": "Plain mean of those ratings, or null."
        },
        "score": {
          "type": [
            "number",
            "null"
          ],
          "minimum": 0,
          "maximum": 100,
          "description": "Null until the minimum number of events."
        },
        "level": {
          "type": "string",
          "enum": [
            "new",
            "low",
            "fair",
            "good",
            "excellent"
          ]
        }
      },
      "required": [
        "completed_orders",
        "backed_out",
        "disputes_lost",
        "review_count",
        "average_rating",
        "score",
        "level"
      ]
    }
  }
}