Создание кандидата со структурированным резюме
При создании кандидата можно передать структурированное резюме в поле structuredResume.
В отличие от customResumes (резюме в свободной форме), структурированное резюме содержит типизированные данные: опыт работы, образование, навыки и другую информацию о соискателе.
Пример запроса
- graphql
- cURL
mutation CreatePersonWithStructuredResume {
createPerson(
personCreate: {firstName: "Иван", middleName: "Иванович", lastName: "Иванов", gender: male, areaId: "61", citizenshipIds: ["113", "94"], birthDay: 966052512000, contacts: [{type: cell, value: "+79999999999"}, {type: email, value: "email@email.ru"}], sourceId: 1, structuredResume: {title: "Желаемая должность", link: "https://example.com/resume/123", skills: "Описание навыков в свободной форме", salary: {amount: 100000, currency: RUR}, keySkills: ["Навык 1", "Навык 2"], employments: [{id: "id из справочника employments"}], schedules: [{id: "id из справочника schedules"}], businessTripReadiness: {id: "id из справочника businessTripReadinesses"}, travelTime: {id: "id из справочника travelTimes"}, languages: [{languageId: "id из справочника languages", level: {id: "id из справочника languageLevels"}}], relocation: {relocationTypeId: "id из справочника relocationTypes", areas: {items: [{id: "id из справочника areas"}]}}, driverLicenses: [B], workTickets: [{id: "id из справочника areas"}], education: {level: {id: "id из справочника educationLevels"}, primaries: [{name: "Название учебного заведения", organization: "Факультет", result: "Специальность", year: 2020}]}, experiences: [{company: {name: "Название компании", url: "https://example.com"}, area: {id: "id из справочника areas"}, industries: [{id: "id из справочника industries"}], position: "Должность", period: {start: 1609459200000, end: 1704067200000}, description: "Описание опыта работы"}], recommendations: [{name: "Имя рекомендателя", position: "Должность рекомендателя", organization: "Организация"}]}}
) {
... on PersonItem {
id
}
... on PersonSaveError {
errorType
errors {
field
violatedConstraints
}
}
}
}
curl https://api.talantix.ru/graphql \
-X POST \
-H "Content-Type: application/json" \
-H "User-Agent: api-doc-agent" \
-H "Authorization: Bearer <your access token>" \
-d "{\"query\":\"mutation CreatePersonWithStructuredResume {\\n createPerson(\\n personCreate: {firstName: \\\"Иван\\\", middleName: \\\"Иванович\\\", lastName: \\\"Иванов\\\", gender: male, areaId: \\\"61\\\", citizenshipIds: [\\\"113\\\", \\\"94\\\"], birthDay: 966052512000, contacts: [{type: cell, value: \\\"+79999999999\\\"}, {type: email, value: \\\"email@email.ru\\\"}], sourceId: 1, structuredResume: {title: \\\"Желаемая должность\\\", link: \\\"https://example.com/resume/123\\\", skills: \\\"Описание навыков в свободной форме\\\", salary: {amount: 100000, currency: RUR}, keySkills: [\\\"Навык 1\\\", \\\"Навык 2\\\"], employments: [{id: \\\"id из справочника employments\\\"}], schedules: [{id: \\\"id из справочника schedules\\\"}], businessTripReadiness: {id: \\\"id из справочника businessTripReadinesses\\\"}, travelTime: {id: \\\"id из справочника travelTimes\\\"}, languages: [{languageId: \\\"id из справочника languages\\\", level: {id: \\\"id из справочника languageLevels\\\"}}], relocation: {relocationTypeId: \\\"id из справочника relocationTypes\\\", areas: {items: [{id: \\\"id из справочника areas\\\"}]}}, driverLicenses: [B], workTickets: [{id: \\\"id из справочника areas\\\"}], education: {level: {id: \\\"id из справочника educationLevels\\\"}, primaries: [{name: \\\"Название учебного заведения\\\", organization: \\\"Факультет\\\", result: \\\"Специальность\\\", year: 2020}]}, experiences: [{company: {name: \\\"Название компании\\\", url: \\\"https://example.com\\\"}, area: {id: \\\"id из справочника areas\\\"}, industries: [{id: \\\"id из справочника industries\\\"}], position: \\\"Должность\\\", period: {start: 1609459200000, end: 1704067200000}, description: \\\"Описание опыта работы\\\"}], recommendations: [{name: \\\"Имя рекомендателя\\\", position: \\\"Должность рекомендателя\\\", organization: \\\"Организация\\\"}]}}\\n ) {\\n ... on PersonItem {\\n id\\n }\\n ... on PersonSaveError {\\n errorType\\n errors {\\n field\\n violatedConstraints\\n }\\n }\\n }\\n}\"}"
примечание
Поле birthDay принимает временную метку unix в миллисекундах.
Поля period.start и period.end в опыте работы также принимают временную метку unix в миллисекундах.
Результат запроса
При успешном выполнении:
{
"data": {
"createPerson": {
"id": 2937741
}
}
}
В случае ошибки валидации:
{
"data": {
"createPerson": {
"errorType": "VALIDATION",
"errors": [
{
"field": "structuredResume.employments[0].id",
"violatedConstraints": ["AllowedValues"]
}
]
}
}
}
подсказка
Идентификаторы для полей-справочников (employments, schedules, languages и др.) можно получить из справочников:
- graphql
- cURL
query Dictionaries {
dictionaries {
areas {
items {
id
name
parentId
}
}
employments {
items {
id
name
}
}
schedules {
items {
id
name
}
}
languages {
items {
id
name
parentId
level {
id
name
}
}
}
industries {
items {
id
name
parentId
}
}
businessTripReadinesses {
items {
id
name
}
}
travelTimes {
items {
id
name
}
}
relocationTypes {
items {
id
name
}
}
educationLevels {
items {
id
name
}
}
languageLevels {
items {
id
name
}
}
}
}
curl https://api.talantix.ru/graphql \
-X POST \
-H "Content-Type: application/json" \
-H "User-Agent: api-doc-agent" \
-H "Authorization: Bearer <your access token>" \
-d "{\"query\":\"query Dictionaries {\\n dictionaries {\\n areas {\\n items {\\n id\\n name\\n parentId\\n }\\n }\\n employments {\\n items {\\n id\\n name\\n }\\n }\\n schedules {\\n items {\\n id\\n name\\n }\\n }\\n languages {\\n items {\\n id\\n name\\n parentId\\n level {\\n id\\n name\\n }\\n }\\n }\\n industries {\\n items {\\n id\\n name\\n parentId\\n }\\n }\\n businessTripReadinesses {\\n items {\\n id\\n name\\n }\\n }\\n travelTimes {\\n items {\\n id\\n name\\n }\\n }\\n relocationTypes {\\n items {\\n id\\n name\\n }\\n }\\n educationLevels {\\n items {\\n id\\n name\\n }\\n }\\n languageLevels {\\n items {\\n id\\n name\\n }\\n }\\n }\\n}\"}"