{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/algeriacertify-com/json-schema/algeriacertify-com-certificate-schema.json",
  "title": "Certificate",
  "x-generated": "2026-11-01",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/algeriacertify-com-openapi.json#/components/schemas/Certificate",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "description": "Unique certificate ID"
    },
    "certificate_code": {
      "type": "string",
      "description": "Human-readable code"
    },
    "token": {
      "type": "string",
      "description": "Verification token"
    },
    "verify_url": {
      "type": "string",
      "format": "uri",
      "description": "Public verification URL"
    },
    "course": {
      "type": "string",
      "description": "Course/training name"
    },
    "recipient_name": {
      "type": "string",
      "description": "Student full name"
    },
    "recipient_email": {
      "type": "string",
      "format": "email",
      "description": "Student email"
    },
    "status": {
      "type": "string",
      "enum": [
        "active",
        "revoked",
        "pending"
      ]
    },
    "issued_at": {
      "type": "string",
      "format": "date-time"
    },
    "balance_after": {
      "type": "number",
      "description": "Remaining balance after issuance"
    }
  }
}