{
  "openapi": "3.0.3",
  "info": {
    "title": "PolitiData - Canadian Political Financing & Lobbying API",
    "description": "Canadian political financing and lobbying API. Elections Canada contributions, lobbying registrations, and communications with public office holders.",
    "version": "0.1.0"
  },
  "paths": {
    "/health": {
      "get": {
        "summary": "Health",
        "operationId": "/health",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "/contributor/{name}": {
      "get": {
        "summary": "Political contributor profile",
        "operationId": "/contributor/{name}",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Name"
            }
          },
          {
            "name": "party",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            }
          },
          {
            "name": "issued_after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by date >= YYYY-MM-DD (contribution_date, effective_date, or comm_date)"
          },
          {
            "name": "issued_before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by date <= YYYY-MM-DD"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 500,
              "minimum": 1,
              "default": 100,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Offset"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {},
                "example": {
                  "contributor": "Trudeau, Justin",
                  "total_records": 15,
                  "total_monetary": 7500.0,
                  "by_party": [
                    {
                      "party": "Liberal Party of Canada",
                      "count": 15,
                      "total_monetary": 7500.0
                    }
                  ],
                  "by_year": [
                    {
                      "year": "2024",
                      "count": 5,
                      "total_monetary": 2500.0
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/client-org/{name}": {
      "get": {
        "summary": "Lobbying client organization profile",
        "operationId": "/client-org/{name}",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Name"
            }
          },
          {
            "name": "subject_matter",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            }
          },
          {
            "name": "issued_after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by date >= YYYY-MM-DD (contribution_date, effective_date, or comm_date)"
          },
          {
            "name": "issued_before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by date <= YYYY-MM-DD"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 500,
              "minimum": 1,
              "default": 100,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Offset"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {},
                "example": {
                  "client_org": "Bell Canada",
                  "total_records": 42,
                  "by_entity_type": {
                    "registration": 12,
                    "communication": 30
                  },
                  "top_government_institutions": [
                    {
                      "institution": "Industry Canada; CRTC",
                      "count": 8
                    }
                  ],
                  "top_subject_matters": [
                    {
                      "subject": "SMT-3; SMT-12",
                      "count": 6
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/contribution": {
      "get": {
        "summary": "Search political contributions",
        "operationId": "/contribution",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Full-text search across data fields"
          },
          {
            "name": "party",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Political party filter (contribution)"
          },
          {
            "name": "contributor_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Contributor type: Individuals, Corporations, Businesses, Associations, Governments, Trade"
          },
          {
            "name": "contributor_province",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Contributor province (contribution)"
          },
          {
            "name": "program_exact",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Program name (exact match, grant). Faster than program= for known names."
          },
          {
            "name": "government_level",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Level of government: federal, provincial, municipal"
          },
          {
            "name": "status_canonical",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Normalized permit status: issued, in_review, completed, expired, cancelled, unknown"
          },
          {
            "name": "value_min",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "nullable": true
            },
            "description": "Minimum contract value (numeric)"
          },
          {
            "name": "value_max",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "nullable": true
            },
            "description": "Maximum contract value (numeric)"
          },
          {
            "name": "issued_after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by date >= YYYY-MM-DD (contribution_date, effective_date, or comm_date)"
          },
          {
            "name": "issued_before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by date <= YYYY-MM-DD"
          },
          {
            "name": "closing_after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter tenders by closing_date >= YYYY-MM-DD."
          },
          {
            "name": "closing_before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter tenders by closing_date <= YYYY-MM-DD."
          },
          {
            "name": "sort_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Sort field: published (publication_date for tenders, award_date for contracts), date (event date), value (contract/agreement value), closing (closing_date for tenders)"
          },
          {
            "name": "sort_order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Sort order: asc or desc",
              "default": "desc",
              "title": "Sort Order"
            },
            "description": "Sort order: asc or desc"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 500,
              "minimum": 1,
              "default": 100,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Offset"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Pagination cursor from next_cursor in a previous response. Use instead of offset for deep pagination."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {},
                "example": {
                  "entity_type": "contribution",
                  "count": 1,
                  "offset": 0,
                  "results": [
                    {
                      "record_id": "abc123def456",
                      "municipality": null,
                      "party": "Liberal Party of Canada",
                      "contributor_name": "Smith, John",
                      "contributor_province": "ON",
                      "monetary_amount": 500.0,
                      "contribution_date": "2024-06-15",
                      "recipient": "Trudeau, Justin",
                      "electoral_district": "Papineau"
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/registration": {
      "get": {
        "summary": "Search lobbying registrations",
        "operationId": "/registration",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Full-text search across data fields"
          },
          {
            "name": "client_org",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Client organization (registration/communication)"
          },
          {
            "name": "lobbyist",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Lobbyist name (registration)"
          },
          {
            "name": "subject_matter",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Subject matter (registration/communication)"
          },
          {
            "name": "program_exact",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Program name (exact match, grant). Faster than program= for known names."
          },
          {
            "name": "government_level",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Level of government: federal, provincial, municipal"
          },
          {
            "name": "status_canonical",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Normalized permit status: issued, in_review, completed, expired, cancelled, unknown"
          },
          {
            "name": "issued_after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by date >= YYYY-MM-DD (contribution_date, effective_date, or comm_date)"
          },
          {
            "name": "issued_before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by date <= YYYY-MM-DD"
          },
          {
            "name": "closing_after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter tenders by closing_date >= YYYY-MM-DD."
          },
          {
            "name": "closing_before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter tenders by closing_date <= YYYY-MM-DD."
          },
          {
            "name": "sort_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Sort field: published (publication_date for tenders, award_date for contracts), date (event date), value (contract/agreement value), closing (closing_date for tenders)"
          },
          {
            "name": "sort_order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Sort order: asc or desc",
              "default": "desc",
              "title": "Sort Order"
            },
            "description": "Sort order: asc or desc"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 500,
              "minimum": 1,
              "default": 100,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Offset"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Pagination cursor from next_cursor in a previous response. Use instead of offset for deep pagination."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {},
                "example": {
                  "entity_type": "contribution",
                  "count": 1,
                  "offset": 0,
                  "results": [
                    {
                      "record_id": "abc123def456",
                      "municipality": null,
                      "party": "Liberal Party of Canada",
                      "contributor_name": "Smith, John",
                      "contributor_province": "ON",
                      "monetary_amount": 500.0,
                      "contribution_date": "2024-06-15",
                      "recipient": "Trudeau, Justin",
                      "electoral_district": "Papineau"
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/communication": {
      "get": {
        "summary": "Search lobbying communications",
        "operationId": "/communication",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Full-text search across data fields"
          },
          {
            "name": "client_org",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Client organization (registration/communication)"
          },
          {
            "name": "lobbyist",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Lobbyist name (registration)"
          },
          {
            "name": "subject_matter",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Subject matter (registration/communication)"
          },
          {
            "name": "program_exact",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Program name (exact match, grant). Faster than program= for known names."
          },
          {
            "name": "government_level",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Level of government: federal, provincial, municipal"
          },
          {
            "name": "status_canonical",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Normalized permit status: issued, in_review, completed, expired, cancelled, unknown"
          },
          {
            "name": "issued_after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by date >= YYYY-MM-DD (contribution_date, effective_date, or comm_date)"
          },
          {
            "name": "issued_before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by date <= YYYY-MM-DD"
          },
          {
            "name": "closing_after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter tenders by closing_date >= YYYY-MM-DD."
          },
          {
            "name": "closing_before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter tenders by closing_date <= YYYY-MM-DD."
          },
          {
            "name": "sort_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Sort field: published (publication_date for tenders, award_date for contracts), date (event date), value (contract/agreement value), closing (closing_date for tenders)"
          },
          {
            "name": "sort_order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Sort order: asc or desc",
              "default": "desc",
              "title": "Sort Order"
            },
            "description": "Sort order: asc or desc"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 500,
              "minimum": 1,
              "default": 100,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Offset"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Pagination cursor from next_cursor in a previous response. Use instead of offset for deep pagination."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {},
                "example": {
                  "entity_type": "contribution",
                  "count": 1,
                  "offset": 0,
                  "results": [
                    {
                      "record_id": "abc123def456",
                      "municipality": null,
                      "party": "Liberal Party of Canada",
                      "contributor_name": "Smith, John",
                      "contributor_province": "ON",
                      "monetary_amount": 500.0,
                      "contribution_date": "2024-06-15",
                      "recipient": "Trudeau, Justin",
                      "electoral_district": "Papineau"
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/contribution/stats": {
      "get": {
        "summary": "Contribution statistics",
        "operationId": "/contribution/stats",
        "parameters": [
          {
            "name": "group_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Data field to group by"
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "30d, 90d, 1y, all",
              "default": "30d",
              "title": "Period"
            },
            "description": "30d, 90d, 1y, all"
          },
          {
            "name": "sum_field",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Data field to sum (e.g. contract_value)"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {},
                "example": {
                  "entity_type": "contribution",
                  "period_days": 365,
                  "total_in_db": 6200000,
                  "by_party": [
                    {
                      "value": "Liberal Party of Canada",
                      "count": 1800000,
                      "total_value": 45000000.0
                    },
                    {
                      "value": "Conservative Party of Canada",
                      "count": 1500000,
                      "total_value": 38000000.0
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/registration/stats": {
      "get": {
        "summary": "Registration statistics",
        "operationId": "/registration/stats",
        "parameters": [
          {
            "name": "group_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Data field to group by"
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "30d, 90d, 1y, all",
              "default": "30d",
              "title": "Period"
            },
            "description": "30d, 90d, 1y, all"
          },
          {
            "name": "sum_field",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Data field to sum (e.g. contract_value)"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {},
                "example": {
                  "entity_type": "contribution",
                  "period_days": 365,
                  "total_in_db": 6200000,
                  "by_party": [
                    {
                      "value": "Liberal Party of Canada",
                      "count": 1800000,
                      "total_value": 45000000.0
                    },
                    {
                      "value": "Conservative Party of Canada",
                      "count": 1500000,
                      "total_value": 38000000.0
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/communication/stats": {
      "get": {
        "summary": "Communication statistics",
        "operationId": "/communication/stats",
        "parameters": [
          {
            "name": "group_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Data field to group by"
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "30d, 90d, 1y, all",
              "default": "30d",
              "title": "Period"
            },
            "description": "30d, 90d, 1y, all"
          },
          {
            "name": "sum_field",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Data field to sum (e.g. contract_value)"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {},
                "example": {
                  "entity_type": "contribution",
                  "period_days": 365,
                  "total_in_db": 6200000,
                  "by_party": [
                    {
                      "value": "Liberal Party of Canada",
                      "count": 1800000,
                      "total_value": 45000000.0
                    },
                    {
                      "value": "Conservative Party of Canada",
                      "count": 1500000,
                      "total_value": 38000000.0
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/contribution/coverage": {
      "get": {
        "summary": "Record count per city for an entity type",
        "operationId": "/contribution/coverage",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/registration/coverage": {
      "get": {
        "summary": "Record count per city for an entity type",
        "operationId": "/registration/coverage",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/communication/coverage": {
      "get": {
        "summary": "Record count per city for an entity type",
        "operationId": "/communication/coverage",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/contribution/{record_id}": {
      "get": {
        "summary": "Get contribution by ID",
        "operationId": "/contribution/{record_id}",
        "parameters": [
          {
            "name": "record_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Record Id"
            },
            "example": "fe6342ab32960b10a0161a9f8c8adbf0"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {},
                "example": {
                  "record_id": "abc123def456",
                  "party": "Liberal Party of Canada",
                  "contributor_name": "Smith, John",
                  "monetary_amount": 500.0,
                  "contribution_date": "2024-06-15"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/registration/{record_id}": {
      "get": {
        "summary": "Get registration by ID",
        "operationId": "/registration/{record_id}",
        "parameters": [
          {
            "name": "record_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Record Id"
            },
            "example": "990500"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {},
                "example": {
                  "record_id": "abc123def456",
                  "party": "Liberal Party of Canada",
                  "contributor_name": "Smith, John",
                  "monetary_amount": 500.0,
                  "contribution_date": "2024-06-15"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/communication/{record_id}": {
      "get": {
        "summary": "Get communication by ID",
        "operationId": "/communication/{record_id}",
        "parameters": [
          {
            "name": "record_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Record Id"
            },
            "example": "687024"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {},
                "example": {
                  "record_id": "abc123def456",
                  "party": "Liberal Party of Canada",
                  "contributor_name": "Smith, John",
                  "monetary_amount": 500.0,
                  "contribution_date": "2024-06-15"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          },
          "input": {
            "title": "Input"
          },
          "ctx": {
            "type": "object",
            "title": "Context"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      }
    }
  },
  "servers": [
    {
      "url": "https://hv1nforwhi.execute-api.ca-central-1.amazonaws.com"
    }
  ]
}