{
  "swagger": "2.0",
  "info": {
    "title": "HireLayer",
    "version": "1.0.0",
    "description": "Parse resumes and CVs, extract job criteria, match and rank candidates, and normalize skills with the HireLayer API.",
    "contact": {
      "name": "HireLayer",
      "url": "https://hirelayer.co/integrations/power-automate",
      "email": "contact@hirelayer.co"
    }
  },
  "host": "hirelayer.co",
  "basePath": "/",
  "schemes": [
    "https"
  ],
  "securityDefinitions": {
    "api_key": {
      "type": "apiKey",
      "in": "header",
      "name": "X-API-Key"
    }
  },
  "security": [
    {
      "api_key": []
    }
  ],
  "paths": {
    "/api/v1/me": {
      "get": {
        "operationId": "GetAccount",
        "summary": "Get account",
        "description": "Check the API key and get the account email, plan and credits left. Free.",
        "produces": [
          "application/json"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "object",
              "properties": {
                "authenticated": {
                  "type": "boolean"
                },
                "account": {
                  "type": "object",
                  "properties": {
                    "email": {
                      "type": "string",
                      "x-ms-summary": "Email"
                    },
                    "plan": {
                      "type": "string",
                      "x-ms-summary": "Plan"
                    }
                  }
                },
                "credits": {
                  "type": "object",
                  "properties": {
                    "available": {
                      "type": "integer",
                      "x-ms-summary": "Credits available"
                    },
                    "unlimited": {
                      "type": "boolean",
                      "x-ms-summary": "Unlimited"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      }
    },
    "/api/v3/parser": {
      "post": {
        "operationId": "ParseResume",
        "summary": "Parse a resume",
        "description": "Turn a resume or CV file (PDF, DOC, DOCX, ODT, RTF, TXT, PPT, PPTX, ODP, XLS, JPG, PNG or BMP, under 4.5 MB) into structured data. Takes about 35 seconds. Costs 1 credit.",
        "consumes": [
          "multipart/form-data"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "file",
            "in": "formData",
            "type": "file",
            "required": true,
            "x-ms-summary": "Resume file",
            "description": "File content, for example from Get file content or an email attachment."
          },
          {
            "name": "application_id",
            "in": "formData",
            "type": "string",
            "required": false,
            "x-ms-summary": "Application ID",
            "description": "Your own reference, returned with the result."
          },
          {
            "name": "do_not_store_data",
            "in": "formData",
            "type": "string",
            "enum": [
              "true",
              "false"
            ],
            "required": false,
            "x-ms-summary": "Do not store the file",
            "description": "true: HireLayer keeps no copy of the file."
          }
        ],
        "responses": {
          "200": {
            "description": "Parsed resume",
            "schema": {
              "$ref": "#/definitions/ParsedResume"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      }
    },
    "/api/v1/jobs/extract-criteria": {
      "post": {
        "operationId": "ExtractJobCriteria",
        "summary": "Extract job criteria",
        "description": "Turn a job description into weighted matching criteria (written in French). Costs 1 credit.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object",
              "properties": {
                "job_text": {
                  "type": "string",
                  "x-ms-summary": "Job description",
                  "description": "Full job description, in any language, up to 50,000 characters."
                }
              },
              "required": [
                "job_text"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "object",
              "properties": {
                "matching_criteria": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "x-ms-summary": "ID"
                      },
                      "label": {
                        "type": "string",
                        "x-ms-summary": "Label"
                      },
                      "weight": {
                        "type": "integer",
                        "x-ms-summary": "Weight (1 to 3)"
                      },
                      "is_mandatory": {
                        "type": "boolean",
                        "x-ms-summary": "Mandatory"
                      },
                      "rationale": {
                        "type": "string",
                        "x-ms-summary": "Rationale"
                      }
                    }
                  },
                  "x-ms-summary": "Matching criteria"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      }
    },
    "/api/v1/matching/job-candidate": {
      "post": {
        "operationId": "MatchCandidate",
        "summary": "Match a candidate to a job",
        "description": "Score a resume text against a job from 0 to 1, with an explanation per criterion (written in French). Costs 1 credit.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object",
              "properties": {
                "job_text": {
                  "type": "string",
                  "x-ms-summary": "Job description",
                  "description": "Full job description, in any language, up to 50,000 characters."
                },
                "candidate_text": {
                  "type": "string",
                  "x-ms-summary": "Resume text",
                  "description": "Resume as plain text, for example Full text from Parse a resume."
                },
                "matching_criteria": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "x-ms-summary": "ID"
                      },
                      "label": {
                        "type": "string",
                        "x-ms-summary": "Label"
                      },
                      "weight": {
                        "type": "integer",
                        "x-ms-summary": "Weight (1 to 3)"
                      },
                      "is_mandatory": {
                        "type": "boolean",
                        "x-ms-summary": "Mandatory"
                      },
                      "rationale": {
                        "type": "string",
                        "x-ms-summary": "Rationale"
                      }
                    }
                  },
                  "x-ms-summary": "Matching criteria",
                  "description": "Criteria from Extract job criteria."
                }
              },
              "required": [
                "job_text",
                "candidate_text",
                "matching_criteria"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "object",
              "properties": {
                "score": {
                  "type": "number",
                  "x-ms-summary": "Score (0 to 1)"
                },
                "summary": {
                  "type": "string",
                  "x-ms-summary": "Summary"
                },
                "evaluated_criteria": {
                  "type": "array",
                  "x-ms-summary": "Evaluated criteria",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "label": {
                        "type": "string",
                        "x-ms-summary": "Label"
                      },
                      "match_status": {
                        "type": "string",
                        "x-ms-summary": "Status"
                      },
                      "match_explanation": {
                        "type": "string",
                        "x-ms-summary": "Explanation"
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      }
    },
    "/api/v1/matching/job-candidates/rank": {
      "post": {
        "operationId": "RankCandidates",
        "summary": "Rank candidates",
        "description": "Rank up to 10 resume texts against one job in a single call (rationales in French). Costs 1 credit.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object",
              "properties": {
                "job_text": {
                  "type": "string",
                  "x-ms-summary": "Job description",
                  "description": "Full job description, in any language, up to 50,000 characters."
                },
                "candidates": {
                  "type": "array",
                  "maxItems": 10,
                  "x-ms-summary": "Candidates",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "x-ms-summary": "Candidate ID"
                      },
                      "candidate_text": {
                        "type": "string",
                        "x-ms-summary": "Resume text"
                      }
                    },
                    "required": [
                      "id",
                      "candidate_text"
                    ]
                  }
                }
              },
              "required": [
                "job_text",
                "candidates"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "object",
              "properties": {
                "rankings": {
                  "type": "array",
                  "x-ms-summary": "Rankings",
                  "items": {
                    "type": "object",
                    "properties": {
                      "rank": {
                        "type": "integer",
                        "x-ms-summary": "Rank"
                      },
                      "candidate_id": {
                        "type": "string",
                        "x-ms-summary": "Candidate ID"
                      },
                      "score": {
                        "type": "number",
                        "x-ms-summary": "Score"
                      },
                      "rationale": {
                        "type": "string",
                        "x-ms-summary": "Rationale"
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      }
    },
    "/api/v1/skills/resolve": {
      "post": {
        "operationId": "NormalizeSkills",
        "summary": "Normalize skills",
        "description": "Map free-text skills in English or French to standard skills of the HireLayer taxonomy. Costs 1 credit.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object",
              "properties": {
                "text": {
                  "type": "string",
                  "x-ms-summary": "Skills text",
                  "description": "One skill, a list or a skills section, up to 5,000 characters."
                },
                "language": {
                  "type": "string",
                  "enum": [
                    "en",
                    "fr"
                  ],
                  "default": "en",
                  "x-ms-summary": "Language of the results"
                }
              },
              "required": [
                "text"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "object",
              "properties": {
                "skills": {
                  "type": "array",
                  "x-ms-summary": "Skills",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "x-ms-summary": "Skill ID"
                      },
                      "name": {
                        "type": "string",
                        "x-ms-summary": "Skill name"
                      },
                      "type": {
                        "type": "string",
                        "x-ms-summary": "Skill type"
                      },
                      "mention": {
                        "type": "string",
                        "x-ms-summary": "Mention in the text"
                      }
                    }
                  }
                },
                "unresolved": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "x-ms-summary": "Unresolved"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      }
    }
  },
  "definitions": {
    "Error": {
      "type": "object",
      "properties": {
        "error": {
          "type": "string",
          "x-ms-summary": "Error"
        },
        "code": {
          "type": "string",
          "x-ms-summary": "Error code"
        }
      }
    },
    "ParsedResume": {
      "type": "object",
      "properties": {
        "request_id": {
          "type": "string",
          "x-ms-summary": "Request ID"
        },
        "info_candidate": {
          "type": "object",
          "properties": {
            "full_name": {
              "type": "string",
              "x-ms-summary": "Full name"
            },
            "first_name": {
              "type": "string",
              "x-ms-summary": "First name"
            },
            "last_name": {
              "type": "string",
              "x-ms-summary": "Last name"
            },
            "email": {
              "type": "string",
              "x-ms-summary": "Email"
            },
            "phone_number": {
              "type": "string",
              "x-ms-summary": "Phone number"
            },
            "job_title": {
              "type": "string",
              "x-ms-summary": "Job title"
            },
            "education_name": {
              "type": "string",
              "x-ms-summary": "Highest qualification"
            },
            "education_level": {
              "type": "string",
              "x-ms-summary": "Education level"
            },
            "experience_level": {
              "type": "string",
              "x-ms-summary": "Experience level"
            },
            "linkedin_url": {
              "type": "string",
              "x-ms-summary": "LinkedIn URL"
            }
          }
        },
        "work_experiences": {
          "type": "array",
          "x-ms-summary": "Work experiences",
          "items": {
            "type": "object",
            "properties": {
              "company_name": {
                "type": "string",
                "x-ms-summary": "Company"
              },
              "job_title": {
                "type": "string",
                "x-ms-summary": "Position"
              },
              "start_date": {
                "type": "string",
                "x-ms-summary": "Start date"
              },
              "end_date": {
                "type": "string",
                "x-ms-summary": "End date"
              },
              "description": {
                "type": "string",
                "x-ms-summary": "Description"
              }
            }
          }
        },
        "educations": {
          "type": "array",
          "x-ms-summary": "Education",
          "items": {
            "type": "object",
            "properties": {
              "degree_title": {
                "type": "string",
                "x-ms-summary": "Degree"
              },
              "school_name": {
                "type": "string",
                "x-ms-summary": "School"
              },
              "end_date": {
                "type": "string",
                "x-ms-summary": "End date"
              }
            }
          }
        },
        "languages": {
          "type": "array",
          "x-ms-summary": "Languages",
          "items": {
            "type": "object",
            "properties": {
              "language": {
                "type": "string",
                "x-ms-summary": "Language"
              },
              "level": {
                "type": "string",
                "x-ms-summary": "Level"
              }
            }
          }
        },
        "skills": {
          "type": "array",
          "x-ms-summary": "Skills",
          "items": {
            "type": "object",
            "properties": {
              "skill_title": {
                "type": "string",
                "x-ms-summary": "Skill"
              },
              "skill_type": {
                "type": "string",
                "x-ms-summary": "Skill type"
              }
            }
          }
        },
        "info_resume": {
          "type": "object",
          "properties": {
            "application_id": {
              "type": "string",
              "x-ms-summary": "Application ID"
            },
            "language": {
              "type": "string",
              "x-ms-summary": "Resume language"
            },
            "text": {
              "type": "string",
              "x-ms-summary": "Full text"
            }
          }
        }
      }
    }
  }
}