{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/gunspec-io/json-schema/gunspec-io-public-offer-schema.json",
  "title": "PublicOffer",
  "description": "One seller's public listing for a firearm or an attachment, as the offers endpoints return it.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/gunspec-io-compatibility-api-openapi.yml#/components/schemas/PublicOffer",
  "type": "object",
  "properties": {
    "vendor": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Slug of the shop."
        },
        "name": {
          "type": "string",
          "description": "Display name, as the maker writes it."
        },
        "website": {
          "type": [
            "string",
            "null"
          ],
          "description": "Official website, where one is known."
        },
        "logoUrl": {
          "type": [
            "string",
            "null"
          ],
          "description": "Absolute URL of the logo, or null where none is on file."
        },
        "verifiedDomain": {
          "type": [
            "string",
            "null"
          ],
          "description": "The domain the shop has proved it controls, by a DNS record or a file on the site, re-checked daily. Null when it has not, which is not a sign the shop is untrustworthy: most have simply not done it yet."
        }
      },
      "description": "The shop stocking the part."
    },
    "sku": {
      "type": "string",
      "description": "The shop's own catalogue key for the listing. A seller's identifier, not ours: it is what `PATCH /v1/vendor/offers/{sku}` addresses."
    },
    "priceCents": {
      "type": "integer",
      "description": "Price in integer minor units of `currency`, so cents for AUD. Never a float. Format with `Intl.NumberFormat` at render rather than dividing first."
    },
    "currency": {
      "type": "string",
      "description": "ISO 4217 code the price is in, e.g. `AUD`. Prices are integer minor units; format with `Intl.NumberFormat` at render rather than dividing first."
    },
    "url": {
      "type": "string",
      "description": "Absolute, directly fetchable URL."
    },
    "inStock": {
      "type": "boolean",
      "description": "Whether the shop reports it in stock. Derived from `stockQty` where the shop tracks a count."
    },
    "clickId": {
      "type": [
        "string",
        "null"
      ],
      "description": "Opaque token for the outbound link: send readers to `/v1/out/{clickId}` so the visit is counted for the seller. Null on a listing that cannot currently be followed."
    },
    "region": {
      "type": [
        "string",
        "null"
      ],
      "description": "ISO 3166-1 alpha-2 code the seller ships to. Null means they state no restriction."
    },
    "updatedAt": {
      "type": "string",
      "description": "When the seller last refreshed this listing. A listing not refreshed inside its freshness window is hidden rather than shown stale."
    }
  }
}