{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/flipzi-io/json-schema/flipzi-io-auction-sale-schema.json",
  "title": "AuctionSale",
  "description": "One completed sale at an auction house or its marketplace (`/v1/cards/{card_id}/auction-sales`).",
  "x-generated": "2026-11-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/flipzi-io-openapi.yml#/components/schemas/AuctionSale",
  "type": "object",
  "properties": {
    "sale_id": {
      "type": "string",
      "description": "The marketplace's own id for the sale (unique within `source.code`)."
    },
    "source": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string",
          "enum": [
            "goldin",
            "fanatics_collect",
            "alt"
          ]
        },
        "name": {
          "type": "string"
        },
        "listing_url": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri"
        }
      }
    },
    "title": {
      "type": "string",
      "description": "The listing title as the marketplace published it."
    },
    "language": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "EN",
        "JA"
      ],
      "description": "Card language. Titles that name no language are English."
    },
    "finish": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "standard",
        "reverse_holo",
        "first_edition",
        "first_edition_reverse_holo"
      ],
      "description": "The finish the listing title states. A 1st Edition or reverse holo sale carries the same card id as the standard card, so compare prices within one finish. `null` when not recorded."
    },
    "shadowless": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "The title says Shadowless (vintage Base Set). `null` when not recorded."
    },
    "sold_on": {
      "type": "string",
      "format": "date"
    },
    "sold_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "Closing time in UTC, when the marketplace publishes one."
    },
    "sale_type": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "auction",
        "fixed_price",
        "best_offer"
      ]
    },
    "grader": {
      "type": [
        "string",
        "null"
      ],
      "description": "`null` for a raw card."
    },
    "grade": {
      "type": [
        "string",
        "null"
      ]
    },
    "cert_number": {
      "type": [
        "string",
        "null"
      ]
    },
    "price": {
      "type": "object",
      "properties": {
        "amount_cents": {
          "type": "integer",
          "description": "The sale price as published",
          "in `currency`.": null
        },
        "currency": {
          "type": "string"
        },
        "includes_buyer_premium": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "hammer_cents": {
          "type": [
            "integer",
            "null"
          ]
        },
        "buyer_premium_cents": {
          "type": [
            "integer",
            "null"
          ]
        }
      }
    },
    "price_eur_cents": {
      "type": [
        "integer",
        "null"
      ]
    },
    "price_usd_cents": {
      "type": [
        "integer",
        "null"
      ]
    },
    "match": {
      "type": "object",
      "description": "How the sale was matched to this card.",
      "properties": {
        "method": {
          "type": [
            "string",
            "null"
          ],
          "description": "The matching methods that agreed on this card, joined by \"+\": exact_title, name_set, set_number, title_parser. A sale is only matched when at least two agree."
        },
        "confidence": {
          "type": [
            "number",
            "null"
          ],
          "minimum": 0,
          "maximum": 1
        }
      }
    }
  }
}