{
  "openapi": "3.1.0",
  "info": {
    "title": "Blynckr publieke vacature-API",
    "version": "1.0.0",
    "description": "Read-only vacaturegegevens uit Blynckr OS. Persoonsgegevens en schrijfacties vallen buiten deze API.",
    "contact": {
      "name": "Blynckr",
      "url": "https://blynckr.nl/contact/",
      "email": "info@blynckr.nl"
    }
  },
  "servers": [
    {
      "url": "https://blynckr.nl"
    }
  ],
  "paths": {
    "/api/public/v1/vacatures.json": {
      "get": {
        "operationId": "listVacatures",
        "summary": "Geef alle openstaande vacatures",
        "responses": {
          "200": {
            "description": "Actuele lijst met openstaande vacatures",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "schema_version",
                    "generated_at",
                    "source",
                    "count",
                    "vacancies"
                  ],
                  "properties": {
                    "schema_version": {
                      "type": "string",
                      "const": "1.0"
                    },
                    "generated_at": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "source": {
                      "type": "string"
                    },
                    "count": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "vacancies": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/VacatureSamenvatting"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/v1/vacatures/{slug}.json": {
      "get": {
        "operationId": "getVacature",
        "summary": "Geef één openstaande vacature",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9-]+$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Vacature met volledige publieke inhoud",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VacatureDetail"
                }
              }
            }
          },
          "404": {
            "description": "Vacature bestaat niet of staat niet meer open"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "VacatureSamenvatting": {
        "type": "object",
        "required": [
          "id",
          "slug",
          "url",
          "api_url",
          "title",
          "employer",
          "status",
          "salary",
          "employment",
          "apply_url"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-z0-9-]+$",
            "description": "Publieke sleutel van de vacature, gelijk aan de slug. Geen record-ID uit Blynckr OS.",
            "examples": [
              "operator-productie-goes"
            ]
          },
          "slug": {
            "type": "string",
            "pattern": "^[a-z0-9-]+$",
            "examples": [
              "operator-productie-goes"
            ]
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "api_url": {
            "type": "string",
            "format": "uri"
          },
          "title": {
            "type": "string"
          },
          "employer": {
            "description": "Opdrachtgever van de vacature; null als die niet gepubliceerd is",
            "oneOf": [
              {
                "type": "null"
              },
              {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string"
                  }
                }
              }
            ]
          },
          "status": {
            "type": "string",
            "const": "open"
          },
          "date_posted": {
            "type": [
              "string",
              "null"
            ]
          },
          "valid_through": {
            "type": [
              "string",
              "null"
            ]
          },
          "location": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "type": "object",
                "required": [
                  "address_locality",
                  "country_code"
                ],
                "properties": {
                  "address_locality": {
                    "type": "string"
                  },
                  "country_code": {
                    "type": "string",
                    "const": "NL"
                  }
                }
              }
            ]
          },
          "salary": {
            "type": "object",
            "required": [
              "currency",
              "min",
              "max",
              "unit",
              "note"
            ],
            "properties": {
              "currency": {
                "type": "string",
                "const": "EUR"
              },
              "min": {
                "type": "number"
              },
              "max": {
                "type": "number"
              },
              "unit": {
                "type": "string",
                "const": "MONTH"
              },
              "note": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "employment": {
            "type": "object",
            "required": [
              "types",
              "label",
              "hours_per_week",
              "shift_pattern"
            ],
            "properties": {
              "types": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "label": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "hours_per_week": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "Urenbasis van het salaris"
              },
              "hours_min": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "Expliciete ondergrens van de werkweek"
              },
              "hours_max": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "Expliciete bovengrens van de werkweek"
              },
              "shift_pattern": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "function_group": {
            "type": [
              "string",
              "null"
            ]
          },
          "apply_url": {
            "type": "string",
            "format": "uri"
          }
        }
      },
      "VacatureDetail": {
        "allOf": [
          {
            "$ref": "#/components/schemas/VacatureSamenvatting"
          },
          {
            "type": "object",
            "required": [
              "content"
            ],
            "properties": {
              "content": {
                "type": "object",
                "required": [
                  "intro",
                  "tasks",
                  "offer",
                  "requirements",
                  "workplace",
                  "about_company"
                ],
                "properties": {
                  "intro": {
                    "type": "string"
                  },
                  "tasks": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "offer": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "requirements": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "workplace": {
                    "type": "string"
                  },
                  "about_company": {
                    "type": "string"
                  }
                }
              }
            }
          }
        ]
      }
    }
  }
}