{
  "openapi": "3.1.1",
  "info": {
    "title": "CV Parsing API",
    "description": "Client-neutral candidate profiles. Upload one CV and receive structured data and a candidate photo when detected.",
    "version": "v1"
  },
  "servers": [
    {
      "url": "/"
    }
  ],
  "paths": {
    "/api/v1/usage": {
      "get": {
        "tags": [
          "CvParsing.Api"
        ],
        "summary": "Read your quota and request totals with X-Api-Key, for either parse format",
        "operationId": "GetOwnUsage",
        "parameters": [
          {
            "name": "days",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerUsageResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "GeneralApiKey": [ ]
          }
        ]
      }
    },
    "/api/v1/cv/parse": {
      "post": {
        "tags": [
          "CV parsing"
        ],
        "summary": "Parse a CV into a client-neutral candidate profile",
        "description": "Send one multipart file part named 'file'. Supports PDF, DOCX, PNG and JPEG. Returns an atomic candidate profile with ISO language codes, standardized classifications, and a candidate photo when detected. BirthDate is null unless a full date is known. Requires X-Api-Key.",
        "operationId": "ParseCvProfile",
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/CvFileUpload"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CvProfileResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CvApiError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "413": {
            "description": "Payload Too Large",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported Media Type",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CvApiError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "504": {
            "description": "Gateway Timeout",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "GeneralApiKey": [ ]
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "CustomerUsageResponse": {
        "type": "object",
        "properties": {
          "days": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "keyId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "requestLimit": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "usedRequests": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "remaining": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "expiresUtc": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "requests": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "completed": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "partial": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "failed": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "cancelled": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "rejected": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "CvApiError": {
        "required": [
          "error"
        ],
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          }
        }
      },
      "CvFileUpload": {
        "required": [
          "file"
        ],
        "type": "object",
        "properties": {
          "file": {
            "$ref": "#/components/schemas/IFormFile"
          }
        }
      },
      "CvProfileAddress": {
        "required": [
          "street",
          "houseNumber",
          "postalCode",
          "city",
          "region",
          "country"
        ],
        "type": "object",
        "properties": {
          "street": {
            "type": [
              "null",
              "string"
            ]
          },
          "houseNumber": {
            "type": [
              "null",
              "string"
            ]
          },
          "postalCode": {
            "type": [
              "null",
              "string"
            ]
          },
          "city": {
            "type": [
              "null",
              "string"
            ]
          },
          "region": {
            "$ref": "#/components/schemas/CvProfileCode"
          },
          "country": {
            "$ref": "#/components/schemas/CvProfileCode"
          }
        }
      },
      "CvProfileAvailability": {
        "required": [
          "type",
          "date",
          "text"
        ],
        "type": "object",
        "properties": {
          "type": {
            "type": [
              "null",
              "string"
            ]
          },
          "date": {
            "type": [
              "null",
              "string"
            ]
          },
          "text": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "CvProfileCode": {
        "required": [
          "name",
          "code",
          "codeSystem"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": [
              "null",
              "string"
            ]
          },
          "code": {
            "type": [
              "null",
              "string"
            ]
          },
          "codeSystem": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "CvProfileContacts": {
        "required": [
          "email",
          "phones",
          "links"
        ],
        "type": "object",
        "properties": {
          "email": {
            "type": [
              "null",
              "string"
            ]
          },
          "phones": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CvProfilePhone"
            }
          },
          "links": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CvProfileLink"
            }
          }
        }
      },
      "CvProfileDistance": {
        "required": [
          "value",
          "unit"
        ],
        "type": "object",
        "properties": {
          "value": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "unit": {
            "$ref": "#/components/schemas/CvProfileUnit"
          }
        }
      },
      "CvProfileEducation": {
        "required": [
          "country",
          "nationalCategory",
          "qualificationLevel",
          "internationalLevel",
          "sourceText"
        ],
        "type": "object",
        "properties": {
          "country": {
            "$ref": "#/components/schemas/CvProfileCode"
          },
          "nationalCategory": {
            "$ref": "#/components/schemas/CvProfileCode"
          },
          "qualificationLevel": {
            "$ref": "#/components/schemas/CvProfileCode"
          },
          "internationalLevel": {
            "$ref": "#/components/schemas/CvProfileCode"
          },
          "sourceText": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "CvProfileEmploymentPreferences": {
        "required": [
          "availability",
          "noticePeriod",
          "hoursPerWeek",
          "salary",
          "maximumTravelDistance"
        ],
        "type": "object",
        "properties": {
          "availability": {
            "$ref": "#/components/schemas/CvProfileAvailability"
          },
          "noticePeriod": {
            "$ref": "#/components/schemas/CvProfileNoticePeriod"
          },
          "hoursPerWeek": {
            "$ref": "#/components/schemas/CvProfileHoursPerWeek"
          },
          "salary": {
            "$ref": "#/components/schemas/CvProfileSalary"
          },
          "maximumTravelDistance": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/CvProfileDistance"
              }
            ]
          }
        }
      },
      "CvProfileHoursPerWeek": {
        "required": [
          "minimum",
          "maximum",
          "text"
        ],
        "type": "object",
        "properties": {
          "minimum": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "maximum": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "text": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "CvProfileIdentity": {
        "required": [
          "firstName",
          "lastName",
          "birthDate",
          "birthPlace",
          "birthCountry",
          "citizenships",
          "sex",
          "maritalStatus"
        ],
        "type": "object",
        "properties": {
          "firstName": {
            "type": [
              "null",
              "string"
            ]
          },
          "lastName": {
            "type": [
              "null",
              "string"
            ]
          },
          "birthDate": {
            "type": [
              "null",
              "string"
            ]
          },
          "birthPlace": {
            "type": [
              "null",
              "string"
            ]
          },
          "birthCountry": {
            "$ref": "#/components/schemas/CvProfileCode"
          },
          "citizenships": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CvProfileCode"
            }
          },
          "sex": {
            "$ref": "#/components/schemas/CvProfileCode"
          },
          "maritalStatus": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "CvProfileLanguage": {
        "required": [
          "language",
          "level"
        ],
        "type": "object",
        "properties": {
          "language": {
            "$ref": "#/components/schemas/CvProfileLanguageName"
          },
          "level": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/CvProfileCode"
              }
            ]
          }
        }
      },
      "CvProfileLanguageCode": {
        "required": [
          "code",
          "codeSystem"
        ],
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "codeSystem": {
            "type": "string"
          }
        }
      },
      "CvProfileLanguageName": {
        "required": [
          "name",
          "codes"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": [
              "null",
              "string"
            ]
          },
          "codes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CvProfileLanguageCode"
            }
          }
        }
      },
      "CvProfileLink": {
        "required": [
          "type",
          "url"
        ],
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        }
      },
      "CvProfileNoticePeriod": {
        "required": [
          "value",
          "unit",
          "text"
        ],
        "type": "object",
        "properties": {
          "value": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "unit": {
            "type": [
              "null",
              "string"
            ]
          },
          "text": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "CvProfilePhone": {
        "required": [
          "type",
          "value",
          "format"
        ],
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "value": {
            "type": "string"
          },
          "format": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "CvProfilePhoto": {
        "required": [
          "dataUrl"
        ],
        "type": "object",
        "properties": {
          "dataUrl": {
            "type": "string"
          }
        }
      },
      "CvProfileResponse": {
        "required": [
          "schemaVersion",
          "identity",
          "contacts",
          "address",
          "languages",
          "education",
          "employmentPreferences",
          "candidatePhoto"
        ],
        "type": "object",
        "properties": {
          "schemaVersion": {
            "type": "string"
          },
          "identity": {
            "$ref": "#/components/schemas/CvProfileIdentity"
          },
          "contacts": {
            "$ref": "#/components/schemas/CvProfileContacts"
          },
          "address": {
            "$ref": "#/components/schemas/CvProfileAddress"
          },
          "languages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CvProfileLanguage"
            }
          },
          "education": {
            "$ref": "#/components/schemas/CvProfileEducation"
          },
          "employmentPreferences": {
            "$ref": "#/components/schemas/CvProfileEmploymentPreferences"
          },
          "candidatePhoto": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/CvProfilePhoto"
              }
            ]
          }
        }
      },
      "CvProfileSalary": {
        "required": [
          "minimum",
          "maximum",
          "currency",
          "period",
          "basis",
          "text"
        ],
        "type": "object",
        "properties": {
          "minimum": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "maximum": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "currency": {
            "$ref": "#/components/schemas/CvProfileCode"
          },
          "period": {
            "type": [
              "null",
              "string"
            ]
          },
          "basis": {
            "type": [
              "null",
              "string"
            ]
          },
          "text": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "CvProfileUnit": {
        "required": [
          "code",
          "codeSystem"
        ],
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "codeSystem": {
            "type": "string"
          }
        }
      },
      "IFormFile": {
        "type": "string",
        "format": "binary"
      },
      "ProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": [
              "null",
              "string"
            ]
          },
          "title": {
            "type": [
              "null",
              "string"
            ]
          },
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "detail": {
            "type": [
              "null",
              "string"
            ]
          },
          "instance": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      }
    },
    "securitySchemes": {
      "GeneralApiKey": {
        "type": "apiKey",
        "name": "X-Api-Key",
        "in": "header"
      }
    }
  },
  "tags": [
    {
      "name": "CvParsing.Api"
    },
    {
      "name": "CV parsing"
    }
  ]
}