{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/markmesh-com/json-schema/markmesh-com-office-schema.json",
  "title": "office",
  "x-generated": "2026-11-18",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/markmesh-com-openapi.json#/components/schemas/office",
  "additionalProperties": false,
  "properties": {
    "attributes": {
      "additionalProperties": false,
      "description": "An attributes object for a office.",
      "properties": {
        "country_code": {
          "description": "ISO 3166-1 alpha-2, e.g. 'US'. Use 'EU' for EUIPO, 'WO' for WIPO.",
          "type": "string"
        },
        "data_freshness_note": {
          "anyOf": [
            {
              "type": [
                "string",
                "null"
              ]
            },
            {
              "type": "null"
            }
          ],
          "description": "Optional caveat about data freshness shown next to this office's results in the UI (e.g. 'Data refreshed monthly, may not include filings from the last ~30 days.'). Nil = no caveat shown."
        },
        "detail_url": {
          "anyOf": [
            {
              "type": [
                "string",
                "null"
              ]
            },
            {
              "type": "null"
            }
          ],
          "description": "Deep link URL template for trademark search. Placeholders: {{application_number}} or {{registration_number}}. Each office picks the placeholder its public search expects (most use application; IPI's swissreg routes via registration)."
        },
        "has_bulk": {
          "anyOf": [
            {
              "type": [
                "boolean",
                "null"
              ]
            },
            {
              "type": "null"
            }
          ],
          "description": "True when at least one :bulk source_type OfficeIntegration is :active."
        },
        "has_bulletin": {
          "anyOf": [
            {
              "type": [
                "boolean",
                "null"
              ]
            },
            {
              "type": "null"
            }
          ],
          "description": "True when at least one :bulletin source_type OfficeIntegration is :active."
        },
        "has_live_api": {
          "anyOf": [
            {
              "type": [
                "boolean",
                "null"
              ]
            },
            {
              "type": "null"
            }
          ],
          "description": "True when at least one :api source_type OfficeIntegration is :active."
        },
        "logo_url": {
          "anyOf": [
            {
              "type": [
                "string",
                "null"
              ]
            },
            {
              "type": "null"
            }
          ],
          "description": "Logo image URL (for future use)."
        },
        "name": {
          "description": "Full name, e.g. 'United States Patent and Trademark Office'.",
          "type": "string"
        },
        "short_name": {
          "description": "Abbreviation, e.g. 'USPTO'.",
          "type": "string"
        },
        "status": {
          "anyOf": [
            {
              "enum": [
                "active",
                "inactive"
              ],
              "type": [
                "string",
                "null"
              ]
            },
            {
              "type": "null"
            }
          ],
          "description": "Whether MarkMesh currently routes filings/searches to this office. `inactive` offices may be temporarily disabled (outage, credential rotation) or permanently retired."
        },
        "website_url": {
          "anyOf": [
            {
              "type": [
                "string",
                "null"
              ]
            },
            {
              "type": "null"
            }
          ],
          "description": "Official website URL."
        }
      },
      "required": [
        "name",
        "short_name",
        "country_code"
      ],
      "type": "object"
    },
    "id": {
      "description": "Resource UUID.",
      "format": "uuid",
      "type": "string"
    },
    "type": {
      "description": "JSON:API resource type. Always `\"office\"`.",
      "enum": [
        "office"
      ],
      "type": "string"
    }
  },
  "required": [
    "type",
    "id"
  ],
  "type": "object"
}