{
  "openapi": "3.1.0",
  "info": {
    "title": "Responsible AI Australia Verification API",
    "description": "Free, public API for verifying Responsible AI Australia certification. Built for AI agents, search engines and procurement systems. Certifications are assessed against the Australian AI Ethics Principles and carry a machine-verifiable Australian AI Trust Credential (AATC).",
    "version": "1.0.0",
    "contact": {
      "name": "Responsible AI Australia",
      "url": "https://www.responsibleaiaustralia.com.au/contact"
    }
  },
  "servers": [
    {
      "url": "https://www.responsibleaiaustralia.com.au"
    }
  ],
  "paths": {
    "/api/v1/verify": {
      "get": {
        "operationId": "verifyCertification",
        "summary": "Verify a business's responsible AI certification",
        "description": "Query by ABN, website domain, certification ID or business name. Returns certification status, tier and validity. No authentication required.",
        "parameters": [
          {
            "name": "abn",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Australian Business Number, digits only or formatted"
          },
          {
            "name": "domain",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Business website domain, e.g. example.com.au"
          },
          {
            "name": "certId",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Certification ID, e.g. RAIA-2026-0009"
          },
          {
            "name": "name",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Business name, partial match"
          }
        ],
        "responses": {
          "200": {
            "description": "Verification result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VerificationResult"
                }
              }
            }
          },
          "400": {
            "description": "No query parameter provided"
          }
        }
      }
    },
    "/api/v1/businesses": {
      "get": {
        "operationId": "listCertifiedBusinesses",
        "summary": "List every certified business on the public register",
        "responses": {
          "200": {
            "description": "The full register",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "count": {
                      "type": "integer"
                    },
                    "businesses": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/VerificationResult"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/credentials/{certId}": {
      "get": {
        "operationId": "getCredential",
        "summary": "Fetch the signed Australian AI Trust Credential (AATC) for a certification",
        "description": "Returns a W3C Verifiable Credential as a VC-JWT signed with Ed25519 by did:web:www.responsibleaiaustralia.com.au, plus its decoded payload and current status.",
        "parameters": [
          {
            "name": "certId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The signed credential"
          },
          "404": {
            "description": "Unknown certification ID"
          }
        }
      }
    },
    "/api/v1/businesses/{id}/transparency": {
      "get": {
        "operationId": "getTransparencyStatement",
        "summary": "Fetch a certified business's self-declared AI transparency statement",
        "description": "Returns the business's published AI transparency statement and one disclosure entry per AI system (purpose, who it affects, model or provider, personal information used, whether it makes or shapes decisions about people, human review, limitations). Self-declared by the business and not part of the certification assessment; only certification status and tier are verified by Responsible AI Australia. 404 when nothing is published.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The business's register ID (the id in /businesses/{id})",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The published statement, systems and business certification summary"
          },
          "404": {
            "description": "No published statement for this business"
          }
        }
      }
    },
    "/api/v1/verify/batch": {
      "post": {
        "summary": "Verify up to 100 suppliers in one call",
        "description": "Each query is an ABN, a domain or a business name. Returns one row per query with certified, status, tier, certId, expiresAt and registerUrl. Absence of certification is not a judgement.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "queries"
                ],
                "properties": {
                  "queries": {
                    "type": "array",
                    "maxItems": 100,
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Batch result"
          }
        }
      }
    },
    "/api/v1/assurance/{certId}": {
      "get": {
        "summary": "Supplier assurance pack",
        "description": "PDF by default: the one-page certification summary plus the procurement crosswalk (eleven standard supplier-questionnaire questions answered from the certification record, each marked assessed, declared or not covered). Add ?format=json for the crosswalk as JSON.",
        "parameters": [
          {
            "name": "certId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "format",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "json"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "PDF or JSON"
          },
          "404": {
            "description": "No active certification"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "VerificationResult": {
        "type": "object",
        "properties": {
          "certified": {
            "type": "boolean"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "expired",
              "revoked",
              "not_found"
            ]
          },
          "certId": {
            "type": "string"
          },
          "businessName": {
            "type": "string"
          },
          "abn": {
            "type": "string"
          },
          "domain": {
            "type": "string",
            "nullable": true
          },
          "tier": {
            "type": "string",
            "enum": [
              "Commit",
              "Embed",
              "Govern"
            ],
            "nullable": true
          },
          "tierDescription": {
            "type": "string",
            "nullable": true
          },
          "issuedAt": {
            "type": "string",
            "format": "date-time"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "registerUrl": {
            "type": "string",
            "format": "uri"
          },
          "credentialUrl": {
            "type": "string",
            "format": "uri"
          },
          "issuer": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "did": {
                "type": "string"
              },
              "register": {
                "type": "string",
                "format": "uri"
              }
            }
          }
        }
      }
    }
  }
}
