{
  "openapi": "3.1.0",
  "info": {
    "title": "Saol Assurance Public Product Catalogue",
    "version": "1.0.0",
    "description": "Read-only public product-directory information. This API does not provide advice, quotations, applications, eligibility decisions, policy servicing or customer data.",
    "contact": {
      "name": "Saol Assurance",
      "url": "https://saol.sandbox.codebridge.io/contact-us"
    }
  },
  "servers": [
    {
      "url": "https://saol.sandbox.codebridge.io"
    }
  ],
  "paths": {
    "/data/products.v1.json": {
      "get": {
        "operationId": "getPublicProductCatalogue",
        "summary": "Get the version 1 public product catalogue",
        "responses": {
          "200": {
            "description": "Current public catalogue",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Catalogue"
                }
              }
            }
          }
        }
      }
    },
    "/data/documents.v1.json": {
      "get": {
        "operationId": "getPublicDocumentRegister",
        "summary": "Get the version 1 public document register",
        "responses": {
          "200": {
            "description": "Current public document register",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentRegister"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Product": {
        "type": "object",
        "required": [
          "id",
          "slug",
          "name",
          "category",
          "summary",
          "canonical_url",
          "last_reviewed"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "market": {
            "type": "string"
          },
          "available_through": {
            "type": "string"
          },
          "canonical_url": {
            "type": "string",
            "format": "uri"
          },
          "current_information_url": {
            "type": "string",
            "format": "uri"
          },
          "last_reviewed": {
            "type": "string",
            "format": "date"
          }
        }
      },
      "Catalogue": {
        "type": "object",
        "required": [
          "schema_version",
          "generated_at",
          "publisher",
          "scope",
          "products"
        ],
        "properties": {
          "schema_version": {
            "type": "string"
          },
          "generated_at": {
            "type": "string",
            "format": "date"
          },
          "publisher": {
            "type": "object"
          },
          "scope": {
            "type": "string"
          },
          "products": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Product"
            }
          }
        }
      },
      "Document": {
        "type": "object",
        "required": [
          "id",
          "title",
          "category",
          "summary",
          "media_type",
          "url",
          "last_reviewed"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "publication_year": {
            "type": [
              "integer",
              "null"
            ]
          },
          "summary": {
            "type": "string"
          },
          "media_type": {
            "type": "string"
          },
          "language": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "last_reviewed": {
            "type": "string",
            "format": "date"
          }
        }
      },
      "DocumentRegister": {
        "type": "object",
        "required": [
          "schema_version",
          "generated_at",
          "publisher",
          "scope",
          "documents"
        ],
        "properties": {
          "schema_version": {
            "type": "string"
          },
          "generated_at": {
            "type": "string",
            "format": "date"
          },
          "publisher": {
            "type": "string"
          },
          "scope": {
            "type": "string"
          },
          "documents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Document"
            }
          }
        }
      }
    }
  }
}
