{
  "openapi": "3.1.0",
  "info": {
    "title": "Flourish API",
    "description": "Organisation-scoped access to Flourish opportunity and labour-market data.",
    "version": "1.0.0"
  },
  "paths": {
    "/v1/opportunities": {
      "get": {
        "summary": "Opportunities",
        "operationId": "opportunities_v1_opportunities_get",
        "security": [
          {
            "AtlasCustomerKey": []
          }
        ],
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200,
              "default": "",
              "title": "Q"
            }
          },
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "fellowship",
                    "funding_call"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Kind"
            }
          },
          {
            "name": "topic",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 100
                },
                {
                  "type": "null"
                }
              ],
              "title": "Topic"
            }
          },
          {
            "name": "eligibility",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 100
                },
                {
                  "type": "null"
                }
              ],
              "title": "Eligibility"
            }
          },
          {
            "name": "location",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 120
                },
                {
                  "type": "null"
                }
              ],
              "title": "Location"
            }
          },
          {
            "name": "deadline_before",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Deadline Before"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 50,
              "minimum": 1,
              "default": 20,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 10000,
              "minimum": 0,
              "default": 0,
              "title": "Offset"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpportunitiesResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/labour-market/areas/{area_code}": {
      "get": {
        "summary": "Area Summary",
        "operationId": "area_summary_v1_labour_market_areas__area_code__get",
        "security": [
          {
            "AtlasCustomerKey": []
          }
        ],
        "parameters": [
          {
            "name": "area_code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Area Code"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AreaSummaryResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AreaSummary": {
        "properties": {
          "country": {
            "type": "string",
            "title": "Country"
          },
          "level": {
            "type": "string",
            "title": "Level"
          },
          "area_code": {
            "type": "string",
            "title": "Area Code"
          },
          "area_name": {
            "type": "string",
            "title": "Area Name"
          },
          "total_jobs": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Total Jobs"
          },
          "jobs_12m": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Jobs 12M"
          },
          "jobs_prior_12m": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Jobs Prior 12M"
          },
          "avg_salary": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Avg Salary"
          },
          "median_salary": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Median Salary"
          },
          "jobs_with_salary": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Jobs With Salary"
          },
          "green_share_pct": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Green Share Pct"
          },
          "yoy_growth_pct": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Yoy Growth Pct"
          },
          "computed_at": {
            "type": "string",
            "format": "date-time",
            "title": "Computed At"
          }
        },
        "type": "object",
        "required": [
          "country",
          "level",
          "area_code",
          "area_name",
          "computed_at"
        ],
        "title": "AreaSummary"
      },
      "AreaSummaryResponse": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/AreaSummary"
          },
          "source": {
            "type": "string",
            "const": "flourish_collected_adverts",
            "title": "Source",
            "default": "flourish_collected_adverts"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "AreaSummaryResponse"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "OpportunitiesResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/Opportunity"
            },
            "type": "array",
            "title": "Items"
          },
          "total_count": {
            "type": "integer",
            "title": "Total Count"
          },
          "next_offset": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Offset"
          }
        },
        "type": "object",
        "required": [
          "items",
          "total_count"
        ],
        "title": "OpportunitiesResponse"
      },
      "Opportunity": {
        "properties": {
          "opportunity_id": {
            "type": "string",
            "title": "Opportunity Id"
          },
          "kind": {
            "type": "string",
            "enum": [
              "fellowship",
              "funding_call"
            ],
            "title": "Kind"
          },
          "funding_instrument": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Funding Instrument"
          },
          "title": {
            "type": "string",
            "title": "Title"
          },
          "provider": {
            "type": "string",
            "title": "Provider"
          },
          "source_name": {
            "type": "string",
            "title": "Source Name"
          },
          "source_url": {
            "type": "string",
            "maxLength": 2083,
            "minLength": 1,
            "format": "uri",
            "title": "Source Url"
          },
          "application_url": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2083,
                "minLength": 1,
                "format": "uri"
              },
              {
                "type": "null"
              }
            ],
            "title": "Application Url"
          },
          "status": {
            "type": "string",
            "const": "open",
            "title": "Status"
          },
          "deadline_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Deadline At"
          },
          "observed_at": {
            "type": "string",
            "format": "date-time",
            "title": "Observed At"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "eligibility_text": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Eligibility Text"
          },
          "location": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Location"
          },
          "topics": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Topics"
          },
          "questions": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": "array",
            "title": "Questions"
          }
        },
        "type": "object",
        "required": [
          "opportunity_id",
          "kind",
          "title",
          "provider",
          "source_name",
          "source_url",
          "status",
          "observed_at"
        ],
        "title": "Opportunity"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      }
    },
    "securitySchemes": {
      "AtlasCustomerKey": {
        "type": "http",
        "description": "Organisation-scoped Atlas customer API key",
        "scheme": "bearer"
      }
    }
  },
  "servers": [
    {
      "url": "https://atlas-api.flourish.so",
      "description": "Flourish API"
    }
  ]
}
