{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/crevio-co/json-schema/crevio-co-customer-schema.json",
  "title": "Customer",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/crevio-co-customers-api-openapi.yml#/components/schemas/Customer",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "object": {
      "type": "string"
    },
    "email": {
      "type": "string"
    },
    "name": {
      "type": [
        "string",
        "null"
      ]
    },
    "first_name": {
      "type": [
        "string",
        "null"
      ]
    },
    "last_name": {
      "type": [
        "string",
        "null"
      ]
    },
    "phone_number": {
      "type": [
        "string",
        "null"
      ]
    },
    "customer_type": {
      "type": "string",
      "enum": [
        "paid",
        "free",
        "lead"
      ]
    },
    "notes": {
      "type": [
        "string",
        "null"
      ]
    },
    "confirmed_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    },
    "deleted_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "purge_at": {
      "type": [
        "string",
        "null"
      ]
    },
    "anonymized": {
      "type": "boolean"
    },
    "metadata": {
      "type": "object"
    },
    "orders_count": {
      "type": "integer"
    },
    "total_spend": {
      "type": "number"
    },
    "tags": {
      "type": "array"
    }
  },
  "required": [
    "id",
    "object",
    "email",
    "name",
    "first_name",
    "last_name",
    "phone_number",
    "customer_type",
    "notes",
    "confirmed_at",
    "created_at",
    "updated_at",
    "deleted_at",
    "purge_at",
    "anonymized",
    "metadata",
    "orders_count",
    "total_spend",
    "tags"
  ]
}