{
  "openapi": "3.1.0",
  "info": {
    "title": "Emet Capital Public Service Directory",
    "version": "1.0.0",
    "description": "Read-only access to published Australian commercial finance service information. No authentication required. No enquiries, quotes, eligibility assessments, approvals or customer data. General information only. Major URL versioning: /api/v1. Breaking changes require a new major URL. Compatible additions may be made within v1. At least 90 days notice before retiring a supported major version or legacy alias, with Deprecation and Sunset headers and a migration guide at /docs#api-versioning. No retirement is currently scheduled. /api/services and /api/services/{slug} remain supported aliases."
  },
  "servers": [
    {
      "url": "https://emetcapital.com.au"
    }
  ],
  "security": [],
  "externalDocs": {
    "description": "API and agent documentation",
    "url": "https://emetcapital.com.au/docs"
  },
  "paths": {
    "/api/v1/services": {
      "get": {
        "operationId": "listServices",
        "summary": "List published commercial finance services",
        "description": "Find public service titles, descriptions and canonical website URLs. Use the returned slug to retrieve one service. No authentication is required. This operation takes no input arguments: use an empty object when adapting it to a function call.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Published canonical service directory.",
            "headers": {
              "Link": {
                "description": "API versioning and deprecation policy. No retirement is currently scheduled.",
                "schema": {
                  "type": "string"
                },
                "example": "<https://emetcapital.com.au/docs#api-versioning>; rel=\"deprecation\"; type=\"text/html\""
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceDirectory"
                }
              }
            }
          },
          "404": {
            "description": "Unknown API route or service. Consult /docs or list services for a valid slug.",
            "headers": {
              "Link": {
                "description": "API versioning and deprecation policy. No retirement is currently scheduled.",
                "schema": {
                  "type": "string"
                },
                "example": "<https://emetcapital.com.au/docs#api-versioning>; rel=\"deprecation\"; type=\"text/html\""
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "405": {
            "description": "Unsupported method. This API is read-only.",
            "headers": {
              "Link": {
                "description": "API versioning and deprecation policy. No retirement is currently scheduled.",
                "schema": {
                  "type": "string"
                },
                "example": "<https://emetcapital.com.au/docs#api-versioning>; rel=\"deprecation\"; type=\"text/html\""
              },
              "Allow": {
                "description": "Supported methods",
                "schema": {
                  "type": "string",
                  "enum": [
                    "GET, HEAD"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "406": {
            "description": "Unsupported response format. Send Accept: application/json.",
            "headers": {
              "Link": {
                "description": "API versioning and deprecation policy. No retirement is currently scheduled.",
                "schema": {
                  "type": "string"
                },
                "example": "<https://emetcapital.com.au/docs#api-versioning>; rel=\"deprecation\"; type=\"text/html\""
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Temporary internal failure. Retry later or use the website.",
            "headers": {
              "Link": {
                "description": "API versioning and deprecation policy. No retirement is currently scheduled.",
                "schema": {
                  "type": "string"
                },
                "example": "<https://emetcapital.com.au/docs#api-versioning>; rel=\"deprecation\"; type=\"text/html\""
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/services/{slug}": {
      "get": {
        "operationId": "getService",
        "summary": "Read a published commercial finance service",
        "description": "Retrieve public information for a service slug returned by listServices. Read the canonical website page for context; this endpoint cannot assess or approve finance.",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "description": "Canonical service slug from GET /api/v1/services.",
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            },
            "example": "commercial-property-finance"
          }
        ],
        "responses": {
          "200": {
            "description": "Published service information.",
            "headers": {
              "Link": {
                "description": "API versioning and deprecation policy. No retirement is currently scheduled.",
                "schema": {
                  "type": "string"
                },
                "example": "<https://emetcapital.com.au/docs#api-versioning>; rel=\"deprecation\"; type=\"text/html\""
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Service"
                }
              }
            }
          },
          "404": {
            "description": "Unknown API route or service. Consult /docs or list services for a valid slug.",
            "headers": {
              "Link": {
                "description": "API versioning and deprecation policy. No retirement is currently scheduled.",
                "schema": {
                  "type": "string"
                },
                "example": "<https://emetcapital.com.au/docs#api-versioning>; rel=\"deprecation\"; type=\"text/html\""
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "405": {
            "description": "Unsupported method. This API is read-only.",
            "headers": {
              "Link": {
                "description": "API versioning and deprecation policy. No retirement is currently scheduled.",
                "schema": {
                  "type": "string"
                },
                "example": "<https://emetcapital.com.au/docs#api-versioning>; rel=\"deprecation\"; type=\"text/html\""
              },
              "Allow": {
                "description": "Supported methods",
                "schema": {
                  "type": "string",
                  "enum": [
                    "GET, HEAD"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "406": {
            "description": "Unsupported response format. Send Accept: application/json.",
            "headers": {
              "Link": {
                "description": "API versioning and deprecation policy. No retirement is currently scheduled.",
                "schema": {
                  "type": "string"
                },
                "example": "<https://emetcapital.com.au/docs#api-versioning>; rel=\"deprecation\"; type=\"text/html\""
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Temporary internal failure. Retry later or use the website.",
            "headers": {
              "Link": {
                "description": "API versioning and deprecation policy. No retirement is currently scheduled.",
                "schema": {
                  "type": "string"
                },
                "example": "<https://emetcapital.com.au/docs#api-versioning>; rel=\"deprecation\"; type=\"text/html\""
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Service": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "slug",
          "title",
          "description",
          "url"
        ],
        "properties": {
          "slug": {
            "type": "string",
            "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
            "description": "Canonical service identifier."
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "description": "Published page heading."
          },
          "description": {
            "type": "string",
            "minLength": 1,
            "description": "Published page meta description."
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "Canonical public service page URL."
          }
        }
      },
      "ServiceDirectory": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "services"
        ],
        "properties": {
          "services": {
            "type": "array",
            "minItems": 1,
            "description": "Published service records, sorted by slug.",
            "items": {
              "$ref": "#/components/schemas/Service"
            }
          }
        }
      },
      "ApiError": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "code",
              "message",
              "hint"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "NOT_FOUND",
                  "SERVICE_NOT_FOUND",
                  "METHOD_NOT_ALLOWED",
                  "NOT_ACCEPTABLE",
                  "INTERNAL_ERROR"
                ],
                "description": "Machine-readable error code."
              },
              "message": {
                "type": "string",
                "minLength": 1,
                "description": "Human-readable explanation."
              },
              "hint": {
                "type": "string",
                "minLength": 1,
                "description": "Suggested resolution or documentation link."
              }
            }
          }
        },
        "example": {
          "error": {
            "code": "SERVICE_NOT_FOUND",
            "message": "The requested service was not found.",
            "hint": "Use GET /api/v1/services to find a valid slug. See /docs."
          }
        }
      }
    }
  }
}
