{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://logos.neptune.ly/v1/schema.json",
  "title": "Neptune merchant logo registry index, schema 1",
  "description": "The shape of https://logos-cdn.neptune.ly/v1/index.json. Within schema 1 changes are additive only: new optional fields may appear, existing ones keep their meaning and type. A breaking change ships as schema 2 under /v2/. Ignore fields you do not know.",
  "type": "object",
  "required": ["schema", "version", "logoPath", "logoSizes", "merchants"],
  "properties": {
    "schema": { "const": 1, "description": "Bumps only on a breaking change." },
    "version": { "type": "string", "pattern": "^[0-9]{14}$", "description": "UTC yyyyMMddHHmmss of the last publish; it changes with every approval, edit or take-down." },
    "generatedAt": { "type": "string", "format": "date-time" },
    "logoPath": { "type": "string", "const": "logo/{logo}-{size}.webp", "description": "Relative to the index URL. Logo files are named by content hash and never change." },
    "logoSizes": { "type": "array", "items": { "type": "integer", "minimum": 1 }, "description": "Square sizes in pixels, currently [96, 256]." },
    "merchants": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["id", "names", "aliases", "tags", "category", "accounts", "merchantIds", "logo"],
        "properties": {
          "id": { "type": "string", "pattern": "^[a-z0-9-]{1,64}$", "description": "Stable public identifier." },
          "names": { "type": "array", "minItems": 1, "items": { "type": "string" }, "description": "Arabic name first when there is one, then English." },
          "aliases": { "type": "array", "items": { "type": "string" }, "description": "Other names a statement may carry: short forms, spellings, card-statement descriptors (AMZN Mktp, PAYPAL *)." },
          "tags": { "type": "array", "items": { "type": "string" }, "description": "Keywords; never used alone to match." },
          "category": { "type": "string", "description": "A label such as telecom, ecommerce, airline, payments, restaurant; empty when unknown. New categories may be added." },
          "accounts": { "type": "array", "items": { "type": "string", "pattern": "^[0-9]{3}:[0-9]{15}$" }, "description": "Libyan accounts as bankCode:15-digit account." },
          "merchantIds": { "type": "array", "items": { "type": "string", "pattern": "^[a-z]+:.+$" }, "description": "network:id, for example moamalat:123456789." },
          "logo": { "type": "string", "pattern": "^[a-f0-9]+$", "description": "Content hash; substitute into logoPath." },
          "updatedAt": { "type": "string", "format": "date-time" }
        }
      }
    }
  }
}
