curl --request PATCH \
--url https://api.gospott.com/candidates/{id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"firstName": "John",
"middleName": "William",
"lastName": "Doe",
"secondLastName": "Garcia",
"compensation": {
"id": "<string>",
"totalCompensation": 123,
"baseCompensation": 123
},
"mainContact": {
"userId": "<string>"
},
"languages": [
{
"id": "<string>"
}
],
"nationality": [],
"status": [],
"locations": [
{
"street1": "<string>",
"street2": "<string>",
"postalCode": "<string>",
"city": "<string>",
"region": "<string>",
"state": "<string>",
"country": "<string>",
"latitude": 0,
"longitude": 0
}
],
"socialMedia": [
{
"url": "<string>",
"isPrimary": true
}
],
"emails": [
{
"email": "jsmith@example.com",
"isPrimary": true
}
],
"phoneNumbers": [
{
"phoneNumber": "<string>",
"isPrimary": true
}
],
"visibleIfClientContact": true,
"dateOfBirth": "1990-05-15T00:00:00.000Z",
"lastInteractionAt": "2024-01-15T14:30:00.000Z",
"lastInteractionWithId": "user-uuid-here"
}
'import requests
url = "https://api.gospott.com/candidates/{id}"
payload = {
"firstName": "John",
"middleName": "William",
"lastName": "Doe",
"secondLastName": "Garcia",
"compensation": {
"id": "<string>",
"totalCompensation": 123,
"baseCompensation": 123
},
"mainContact": { "userId": "<string>" },
"languages": [{ "id": "<string>" }],
"nationality": [],
"status": [],
"locations": [
{
"street1": "<string>",
"street2": "<string>",
"postalCode": "<string>",
"city": "<string>",
"region": "<string>",
"state": "<string>",
"country": "<string>",
"latitude": 0,
"longitude": 0
}
],
"socialMedia": [
{
"url": "<string>",
"isPrimary": True
}
],
"emails": [
{
"email": "jsmith@example.com",
"isPrimary": True
}
],
"phoneNumbers": [
{
"phoneNumber": "<string>",
"isPrimary": True
}
],
"visibleIfClientContact": True,
"dateOfBirth": "1990-05-15T00:00:00.000Z",
"lastInteractionAt": "2024-01-15T14:30:00.000Z",
"lastInteractionWithId": "user-uuid-here"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
firstName: 'John',
middleName: 'William',
lastName: 'Doe',
secondLastName: 'Garcia',
compensation: {id: '<string>', totalCompensation: 123, baseCompensation: 123},
mainContact: {userId: '<string>'},
languages: [{id: '<string>'}],
nationality: [],
status: [],
locations: [
{
street1: '<string>',
street2: '<string>',
postalCode: '<string>',
city: '<string>',
region: '<string>',
state: '<string>',
country: '<string>',
latitude: 0,
longitude: 0
}
],
socialMedia: [{url: '<string>', isPrimary: true}],
emails: [{email: 'jsmith@example.com', isPrimary: true}],
phoneNumbers: [{phoneNumber: '<string>', isPrimary: true}],
visibleIfClientContact: true,
dateOfBirth: '1990-05-15T00:00:00.000Z',
lastInteractionAt: '2024-01-15T14:30:00.000Z',
lastInteractionWithId: 'user-uuid-here'
})
};
fetch('https://api.gospott.com/candidates/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.gospott.com/candidates/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'firstName' => 'John',
'middleName' => 'William',
'lastName' => 'Doe',
'secondLastName' => 'Garcia',
'compensation' => [
'id' => '<string>',
'totalCompensation' => 123,
'baseCompensation' => 123
],
'mainContact' => [
'userId' => '<string>'
],
'languages' => [
[
'id' => '<string>'
]
],
'nationality' => [
],
'status' => [
],
'locations' => [
[
'street1' => '<string>',
'street2' => '<string>',
'postalCode' => '<string>',
'city' => '<string>',
'region' => '<string>',
'state' => '<string>',
'country' => '<string>',
'latitude' => 0,
'longitude' => 0
]
],
'socialMedia' => [
[
'url' => '<string>',
'isPrimary' => true
]
],
'emails' => [
[
'email' => 'jsmith@example.com',
'isPrimary' => true
]
],
'phoneNumbers' => [
[
'phoneNumber' => '<string>',
'isPrimary' => true
]
],
'visibleIfClientContact' => true,
'dateOfBirth' => '1990-05-15T00:00:00.000Z',
'lastInteractionAt' => '2024-01-15T14:30:00.000Z',
'lastInteractionWithId' => 'user-uuid-here'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.gospott.com/candidates/{id}"
payload := strings.NewReader("{\n \"firstName\": \"John\",\n \"middleName\": \"William\",\n \"lastName\": \"Doe\",\n \"secondLastName\": \"Garcia\",\n \"compensation\": {\n \"id\": \"<string>\",\n \"totalCompensation\": 123,\n \"baseCompensation\": 123\n },\n \"mainContact\": {\n \"userId\": \"<string>\"\n },\n \"languages\": [\n {\n \"id\": \"<string>\"\n }\n ],\n \"nationality\": [],\n \"status\": [],\n \"locations\": [\n {\n \"street1\": \"<string>\",\n \"street2\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"city\": \"<string>\",\n \"region\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"latitude\": 0,\n \"longitude\": 0\n }\n ],\n \"socialMedia\": [\n {\n \"url\": \"<string>\",\n \"isPrimary\": true\n }\n ],\n \"emails\": [\n {\n \"email\": \"jsmith@example.com\",\n \"isPrimary\": true\n }\n ],\n \"phoneNumbers\": [\n {\n \"phoneNumber\": \"<string>\",\n \"isPrimary\": true\n }\n ],\n \"visibleIfClientContact\": true,\n \"dateOfBirth\": \"1990-05-15T00:00:00.000Z\",\n \"lastInteractionAt\": \"2024-01-15T14:30:00.000Z\",\n \"lastInteractionWithId\": \"user-uuid-here\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.gospott.com/candidates/{id}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"firstName\": \"John\",\n \"middleName\": \"William\",\n \"lastName\": \"Doe\",\n \"secondLastName\": \"Garcia\",\n \"compensation\": {\n \"id\": \"<string>\",\n \"totalCompensation\": 123,\n \"baseCompensation\": 123\n },\n \"mainContact\": {\n \"userId\": \"<string>\"\n },\n \"languages\": [\n {\n \"id\": \"<string>\"\n }\n ],\n \"nationality\": [],\n \"status\": [],\n \"locations\": [\n {\n \"street1\": \"<string>\",\n \"street2\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"city\": \"<string>\",\n \"region\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"latitude\": 0,\n \"longitude\": 0\n }\n ],\n \"socialMedia\": [\n {\n \"url\": \"<string>\",\n \"isPrimary\": true\n }\n ],\n \"emails\": [\n {\n \"email\": \"jsmith@example.com\",\n \"isPrimary\": true\n }\n ],\n \"phoneNumbers\": [\n {\n \"phoneNumber\": \"<string>\",\n \"isPrimary\": true\n }\n ],\n \"visibleIfClientContact\": true,\n \"dateOfBirth\": \"1990-05-15T00:00:00.000Z\",\n \"lastInteractionAt\": \"2024-01-15T14:30:00.000Z\",\n \"lastInteractionWithId\": \"user-uuid-here\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gospott.com/candidates/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"firstName\": \"John\",\n \"middleName\": \"William\",\n \"lastName\": \"Doe\",\n \"secondLastName\": \"Garcia\",\n \"compensation\": {\n \"id\": \"<string>\",\n \"totalCompensation\": 123,\n \"baseCompensation\": 123\n },\n \"mainContact\": {\n \"userId\": \"<string>\"\n },\n \"languages\": [\n {\n \"id\": \"<string>\"\n }\n ],\n \"nationality\": [],\n \"status\": [],\n \"locations\": [\n {\n \"street1\": \"<string>\",\n \"street2\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"city\": \"<string>\",\n \"region\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"latitude\": 0,\n \"longitude\": 0\n }\n ],\n \"socialMedia\": [\n {\n \"url\": \"<string>\",\n \"isPrimary\": true\n }\n ],\n \"emails\": [\n {\n \"email\": \"jsmith@example.com\",\n \"isPrimary\": true\n }\n ],\n \"phoneNumbers\": [\n {\n \"phoneNumber\": \"<string>\",\n \"isPrimary\": true\n }\n ],\n \"visibleIfClientContact\": true,\n \"dateOfBirth\": \"1990-05-15T00:00:00.000Z\",\n \"lastInteractionAt\": \"2024-01-15T14:30:00.000Z\",\n \"lastInteractionWithId\": \"user-uuid-here\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": {
"viewType": "candidateName",
"avatarUrl": "<string>",
"firstName": "<string>",
"lastName": "<string>"
},
"gender": {
"viewType": "candidateGender",
"gender": "male"
},
"nationality": {
"viewType": "candidateNationality",
"nationality": [
"Afghan"
]
},
"status": {
"viewType": "candidateStatus",
"status": [
"actively_looking"
]
},
"emails": {
"viewType": "candidateEmails",
"emails": [
{
"email": "<string>",
"purpose": "personal",
"isPrimary": true
}
]
},
"phoneNumbers": {
"viewType": "candidatePhoneNumbers",
"phoneNumbers": [
{
"phoneNumber": "<string>",
"purpose": "personal",
"isPrimary": true
}
]
},
"locations": {
"viewType": "candidateLocation",
"locations": [
{
"street1": "<string>",
"street2": "<string>",
"postalCode": "<string>",
"city": "<string>",
"region": "<string>",
"state": "<string>",
"country": "<string>",
"countryCode": "AF",
"rawCityCountry": "<string>",
"latitude": 123,
"longitude": 123,
"formattedAddress": "<string>",
"type": "primary_home"
}
]
},
"dateOfBirth": {
"viewType": "candidateDateOfBirth",
"dateOfBirth": "2023-11-07T05:31:56Z"
},
"socialMedia": {
"viewType": "candidateSocialMedia",
"socialMedia": [
{
"url": "<string>",
"type": "LINKEDIN",
"isPrimary": true
}
]
},
"lastInteractionDate": {
"viewType": "candidateLastInteractionDate",
"lastInteractionDate": "2023-11-07T05:31:56Z"
},
"lastInteractionWith": {
"viewType": "candidateLastInteractionWith",
"user": {
"userId": "<string>",
"name": "<string>",
"email": "jsmith@example.com",
"avatarUrl": "<string>",
"deactivatedAt": "2023-11-07T05:31:56Z"
}
},
"nextInteractionDate": {
"viewType": "candidateNextInteractionDate",
"nextInteractionDate": "2023-11-07T05:31:56Z"
},
"nextInteractionWith": {
"viewType": "candidateNextInteractionWith",
"user": {
"userId": "<string>",
"name": "<string>",
"email": "jsmith@example.com",
"avatarUrl": "<string>",
"deactivatedAt": "2023-11-07T05:31:56Z"
}
},
"mainContact": {
"viewType": "candidateMainContact",
"user": {
"userId": "<string>",
"name": "<string>",
"email": "jsmith@example.com",
"avatarUrl": "<string>",
"deactivatedAt": "2023-11-07T05:31:56Z"
}
},
"team": {
"id": "<string>",
"name": "<string>",
"avatarUrl": "<string>"
},
"languages": {
"viewType": "candidateLanguages",
"languages": [
{
"language": "Afrikaans",
"id": "<string>",
"fluency": "Elementary proficiency"
}
]
},
"compensation": {
"viewType": "candidateCompensation",
"compensation": {
"currency": "AED",
"id": "<string>",
"totalCompensation": 123,
"baseCompensation": 123
}
},
"currentPlacements": {
"viewType": "candidateCurrentPlacements",
"hasCurrentPlacement": true,
"placements": [
{
"id": "<string>",
"company": {
"id": "<string>",
"name": "<string>",
"logoUrl": "<string>"
},
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z"
}
]
},
"nextTaskDue": {
"viewType": "candidateNextTaskDue",
"nextTaskDue": {
"id": "<string>",
"content": "<string>",
"dueDate": "2023-11-07T05:31:56Z"
}
},
"createdAt": "2023-11-07T05:31:56Z",
"modifiedAt": "2023-11-07T05:31:56Z",
"lastActivityDate": "2023-11-07T05:31:56Z",
"acquisitionSource": {
"viewType": "candidateAcquisitionSource",
"acquisitionSource": "manual"
},
"latestWorkExperience": {
"title": "<string>",
"company": {
"id": "<string>",
"name": "<string>",
"logoUrl": "<string>"
}
},
"customAttributes": [
{
"attributeDefinitionId": "<string>",
"label": "<string>",
"aiFillOngoing": true,
"aiOverridden": true,
"isFilledByAI": true,
"value": {
"viewType": "customText",
"text": "<string>"
}
}
],
"aiSummary": "<string>",
"isVisibleIfClientContact": true,
"clientContacts": {
"viewType": "candidateClientContacts",
"clientContacts": [
{
"id": "<string>",
"company": {
"id": "<string>",
"name": "<string>",
"logoUrl": "<string>"
},
"role": "<string>",
"department": "<string>",
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z",
"active": true,
"emailAddresses": [
{
"email": "<string>",
"purpose": "personal",
"isPrimary": true
}
],
"phoneNumbers": [
{
"phoneNumber": "<string>",
"purpose": "personal",
"isPrimary": true
}
],
"stage": {
"id": "<string>",
"order": 123,
"name": "<string>",
"colorHex": "<string>"
},
"customAttributes": [
{
"attributeDefinitionId": "<string>",
"label": "<string>",
"aiFillOngoing": true,
"aiOverridden": true,
"isFilledByAI": true,
"value": {
"viewType": "customText",
"text": "<string>"
}
}
]
}
]
},
"hasClientContacts": true,
"hasActiveClientContacts": true,
"skills": [
{
"id": "<string>",
"name": "<string>"
}
]
}{
"status": 0,
"message": "<string>",
"requestId": "<string>"
}{
"status": 0,
"message": "<string>",
"requestId": "<string>"
}{
"status": 0,
"message": "<string>",
"requestId": "<string>"
}{
"status": 0,
"message": "<string>",
"requestId": "<string>"
}{
"status": 0,
"message": "<string>",
"requestId": "<string>"
}Update a candidate
Updates the candidate with the specified ID. Only provided fields are updated. You can update personal details, contact information, and other candidate attributes.
curl --request PATCH \
--url https://api.gospott.com/candidates/{id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"firstName": "John",
"middleName": "William",
"lastName": "Doe",
"secondLastName": "Garcia",
"compensation": {
"id": "<string>",
"totalCompensation": 123,
"baseCompensation": 123
},
"mainContact": {
"userId": "<string>"
},
"languages": [
{
"id": "<string>"
}
],
"nationality": [],
"status": [],
"locations": [
{
"street1": "<string>",
"street2": "<string>",
"postalCode": "<string>",
"city": "<string>",
"region": "<string>",
"state": "<string>",
"country": "<string>",
"latitude": 0,
"longitude": 0
}
],
"socialMedia": [
{
"url": "<string>",
"isPrimary": true
}
],
"emails": [
{
"email": "jsmith@example.com",
"isPrimary": true
}
],
"phoneNumbers": [
{
"phoneNumber": "<string>",
"isPrimary": true
}
],
"visibleIfClientContact": true,
"dateOfBirth": "1990-05-15T00:00:00.000Z",
"lastInteractionAt": "2024-01-15T14:30:00.000Z",
"lastInteractionWithId": "user-uuid-here"
}
'import requests
url = "https://api.gospott.com/candidates/{id}"
payload = {
"firstName": "John",
"middleName": "William",
"lastName": "Doe",
"secondLastName": "Garcia",
"compensation": {
"id": "<string>",
"totalCompensation": 123,
"baseCompensation": 123
},
"mainContact": { "userId": "<string>" },
"languages": [{ "id": "<string>" }],
"nationality": [],
"status": [],
"locations": [
{
"street1": "<string>",
"street2": "<string>",
"postalCode": "<string>",
"city": "<string>",
"region": "<string>",
"state": "<string>",
"country": "<string>",
"latitude": 0,
"longitude": 0
}
],
"socialMedia": [
{
"url": "<string>",
"isPrimary": True
}
],
"emails": [
{
"email": "jsmith@example.com",
"isPrimary": True
}
],
"phoneNumbers": [
{
"phoneNumber": "<string>",
"isPrimary": True
}
],
"visibleIfClientContact": True,
"dateOfBirth": "1990-05-15T00:00:00.000Z",
"lastInteractionAt": "2024-01-15T14:30:00.000Z",
"lastInteractionWithId": "user-uuid-here"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
firstName: 'John',
middleName: 'William',
lastName: 'Doe',
secondLastName: 'Garcia',
compensation: {id: '<string>', totalCompensation: 123, baseCompensation: 123},
mainContact: {userId: '<string>'},
languages: [{id: '<string>'}],
nationality: [],
status: [],
locations: [
{
street1: '<string>',
street2: '<string>',
postalCode: '<string>',
city: '<string>',
region: '<string>',
state: '<string>',
country: '<string>',
latitude: 0,
longitude: 0
}
],
socialMedia: [{url: '<string>', isPrimary: true}],
emails: [{email: 'jsmith@example.com', isPrimary: true}],
phoneNumbers: [{phoneNumber: '<string>', isPrimary: true}],
visibleIfClientContact: true,
dateOfBirth: '1990-05-15T00:00:00.000Z',
lastInteractionAt: '2024-01-15T14:30:00.000Z',
lastInteractionWithId: 'user-uuid-here'
})
};
fetch('https://api.gospott.com/candidates/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.gospott.com/candidates/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'firstName' => 'John',
'middleName' => 'William',
'lastName' => 'Doe',
'secondLastName' => 'Garcia',
'compensation' => [
'id' => '<string>',
'totalCompensation' => 123,
'baseCompensation' => 123
],
'mainContact' => [
'userId' => '<string>'
],
'languages' => [
[
'id' => '<string>'
]
],
'nationality' => [
],
'status' => [
],
'locations' => [
[
'street1' => '<string>',
'street2' => '<string>',
'postalCode' => '<string>',
'city' => '<string>',
'region' => '<string>',
'state' => '<string>',
'country' => '<string>',
'latitude' => 0,
'longitude' => 0
]
],
'socialMedia' => [
[
'url' => '<string>',
'isPrimary' => true
]
],
'emails' => [
[
'email' => 'jsmith@example.com',
'isPrimary' => true
]
],
'phoneNumbers' => [
[
'phoneNumber' => '<string>',
'isPrimary' => true
]
],
'visibleIfClientContact' => true,
'dateOfBirth' => '1990-05-15T00:00:00.000Z',
'lastInteractionAt' => '2024-01-15T14:30:00.000Z',
'lastInteractionWithId' => 'user-uuid-here'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.gospott.com/candidates/{id}"
payload := strings.NewReader("{\n \"firstName\": \"John\",\n \"middleName\": \"William\",\n \"lastName\": \"Doe\",\n \"secondLastName\": \"Garcia\",\n \"compensation\": {\n \"id\": \"<string>\",\n \"totalCompensation\": 123,\n \"baseCompensation\": 123\n },\n \"mainContact\": {\n \"userId\": \"<string>\"\n },\n \"languages\": [\n {\n \"id\": \"<string>\"\n }\n ],\n \"nationality\": [],\n \"status\": [],\n \"locations\": [\n {\n \"street1\": \"<string>\",\n \"street2\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"city\": \"<string>\",\n \"region\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"latitude\": 0,\n \"longitude\": 0\n }\n ],\n \"socialMedia\": [\n {\n \"url\": \"<string>\",\n \"isPrimary\": true\n }\n ],\n \"emails\": [\n {\n \"email\": \"jsmith@example.com\",\n \"isPrimary\": true\n }\n ],\n \"phoneNumbers\": [\n {\n \"phoneNumber\": \"<string>\",\n \"isPrimary\": true\n }\n ],\n \"visibleIfClientContact\": true,\n \"dateOfBirth\": \"1990-05-15T00:00:00.000Z\",\n \"lastInteractionAt\": \"2024-01-15T14:30:00.000Z\",\n \"lastInteractionWithId\": \"user-uuid-here\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.gospott.com/candidates/{id}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"firstName\": \"John\",\n \"middleName\": \"William\",\n \"lastName\": \"Doe\",\n \"secondLastName\": \"Garcia\",\n \"compensation\": {\n \"id\": \"<string>\",\n \"totalCompensation\": 123,\n \"baseCompensation\": 123\n },\n \"mainContact\": {\n \"userId\": \"<string>\"\n },\n \"languages\": [\n {\n \"id\": \"<string>\"\n }\n ],\n \"nationality\": [],\n \"status\": [],\n \"locations\": [\n {\n \"street1\": \"<string>\",\n \"street2\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"city\": \"<string>\",\n \"region\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"latitude\": 0,\n \"longitude\": 0\n }\n ],\n \"socialMedia\": [\n {\n \"url\": \"<string>\",\n \"isPrimary\": true\n }\n ],\n \"emails\": [\n {\n \"email\": \"jsmith@example.com\",\n \"isPrimary\": true\n }\n ],\n \"phoneNumbers\": [\n {\n \"phoneNumber\": \"<string>\",\n \"isPrimary\": true\n }\n ],\n \"visibleIfClientContact\": true,\n \"dateOfBirth\": \"1990-05-15T00:00:00.000Z\",\n \"lastInteractionAt\": \"2024-01-15T14:30:00.000Z\",\n \"lastInteractionWithId\": \"user-uuid-here\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gospott.com/candidates/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"firstName\": \"John\",\n \"middleName\": \"William\",\n \"lastName\": \"Doe\",\n \"secondLastName\": \"Garcia\",\n \"compensation\": {\n \"id\": \"<string>\",\n \"totalCompensation\": 123,\n \"baseCompensation\": 123\n },\n \"mainContact\": {\n \"userId\": \"<string>\"\n },\n \"languages\": [\n {\n \"id\": \"<string>\"\n }\n ],\n \"nationality\": [],\n \"status\": [],\n \"locations\": [\n {\n \"street1\": \"<string>\",\n \"street2\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"city\": \"<string>\",\n \"region\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"latitude\": 0,\n \"longitude\": 0\n }\n ],\n \"socialMedia\": [\n {\n \"url\": \"<string>\",\n \"isPrimary\": true\n }\n ],\n \"emails\": [\n {\n \"email\": \"jsmith@example.com\",\n \"isPrimary\": true\n }\n ],\n \"phoneNumbers\": [\n {\n \"phoneNumber\": \"<string>\",\n \"isPrimary\": true\n }\n ],\n \"visibleIfClientContact\": true,\n \"dateOfBirth\": \"1990-05-15T00:00:00.000Z\",\n \"lastInteractionAt\": \"2024-01-15T14:30:00.000Z\",\n \"lastInteractionWithId\": \"user-uuid-here\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": {
"viewType": "candidateName",
"avatarUrl": "<string>",
"firstName": "<string>",
"lastName": "<string>"
},
"gender": {
"viewType": "candidateGender",
"gender": "male"
},
"nationality": {
"viewType": "candidateNationality",
"nationality": [
"Afghan"
]
},
"status": {
"viewType": "candidateStatus",
"status": [
"actively_looking"
]
},
"emails": {
"viewType": "candidateEmails",
"emails": [
{
"email": "<string>",
"purpose": "personal",
"isPrimary": true
}
]
},
"phoneNumbers": {
"viewType": "candidatePhoneNumbers",
"phoneNumbers": [
{
"phoneNumber": "<string>",
"purpose": "personal",
"isPrimary": true
}
]
},
"locations": {
"viewType": "candidateLocation",
"locations": [
{
"street1": "<string>",
"street2": "<string>",
"postalCode": "<string>",
"city": "<string>",
"region": "<string>",
"state": "<string>",
"country": "<string>",
"countryCode": "AF",
"rawCityCountry": "<string>",
"latitude": 123,
"longitude": 123,
"formattedAddress": "<string>",
"type": "primary_home"
}
]
},
"dateOfBirth": {
"viewType": "candidateDateOfBirth",
"dateOfBirth": "2023-11-07T05:31:56Z"
},
"socialMedia": {
"viewType": "candidateSocialMedia",
"socialMedia": [
{
"url": "<string>",
"type": "LINKEDIN",
"isPrimary": true
}
]
},
"lastInteractionDate": {
"viewType": "candidateLastInteractionDate",
"lastInteractionDate": "2023-11-07T05:31:56Z"
},
"lastInteractionWith": {
"viewType": "candidateLastInteractionWith",
"user": {
"userId": "<string>",
"name": "<string>",
"email": "jsmith@example.com",
"avatarUrl": "<string>",
"deactivatedAt": "2023-11-07T05:31:56Z"
}
},
"nextInteractionDate": {
"viewType": "candidateNextInteractionDate",
"nextInteractionDate": "2023-11-07T05:31:56Z"
},
"nextInteractionWith": {
"viewType": "candidateNextInteractionWith",
"user": {
"userId": "<string>",
"name": "<string>",
"email": "jsmith@example.com",
"avatarUrl": "<string>",
"deactivatedAt": "2023-11-07T05:31:56Z"
}
},
"mainContact": {
"viewType": "candidateMainContact",
"user": {
"userId": "<string>",
"name": "<string>",
"email": "jsmith@example.com",
"avatarUrl": "<string>",
"deactivatedAt": "2023-11-07T05:31:56Z"
}
},
"team": {
"id": "<string>",
"name": "<string>",
"avatarUrl": "<string>"
},
"languages": {
"viewType": "candidateLanguages",
"languages": [
{
"language": "Afrikaans",
"id": "<string>",
"fluency": "Elementary proficiency"
}
]
},
"compensation": {
"viewType": "candidateCompensation",
"compensation": {
"currency": "AED",
"id": "<string>",
"totalCompensation": 123,
"baseCompensation": 123
}
},
"currentPlacements": {
"viewType": "candidateCurrentPlacements",
"hasCurrentPlacement": true,
"placements": [
{
"id": "<string>",
"company": {
"id": "<string>",
"name": "<string>",
"logoUrl": "<string>"
},
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z"
}
]
},
"nextTaskDue": {
"viewType": "candidateNextTaskDue",
"nextTaskDue": {
"id": "<string>",
"content": "<string>",
"dueDate": "2023-11-07T05:31:56Z"
}
},
"createdAt": "2023-11-07T05:31:56Z",
"modifiedAt": "2023-11-07T05:31:56Z",
"lastActivityDate": "2023-11-07T05:31:56Z",
"acquisitionSource": {
"viewType": "candidateAcquisitionSource",
"acquisitionSource": "manual"
},
"latestWorkExperience": {
"title": "<string>",
"company": {
"id": "<string>",
"name": "<string>",
"logoUrl": "<string>"
}
},
"customAttributes": [
{
"attributeDefinitionId": "<string>",
"label": "<string>",
"aiFillOngoing": true,
"aiOverridden": true,
"isFilledByAI": true,
"value": {
"viewType": "customText",
"text": "<string>"
}
}
],
"aiSummary": "<string>",
"isVisibleIfClientContact": true,
"clientContacts": {
"viewType": "candidateClientContacts",
"clientContacts": [
{
"id": "<string>",
"company": {
"id": "<string>",
"name": "<string>",
"logoUrl": "<string>"
},
"role": "<string>",
"department": "<string>",
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z",
"active": true,
"emailAddresses": [
{
"email": "<string>",
"purpose": "personal",
"isPrimary": true
}
],
"phoneNumbers": [
{
"phoneNumber": "<string>",
"purpose": "personal",
"isPrimary": true
}
],
"stage": {
"id": "<string>",
"order": 123,
"name": "<string>",
"colorHex": "<string>"
},
"customAttributes": [
{
"attributeDefinitionId": "<string>",
"label": "<string>",
"aiFillOngoing": true,
"aiOverridden": true,
"isFilledByAI": true,
"value": {
"viewType": "customText",
"text": "<string>"
}
}
]
}
]
},
"hasClientContacts": true,
"hasActiveClientContacts": true,
"skills": [
{
"id": "<string>",
"name": "<string>"
}
]
}{
"status": 0,
"message": "<string>",
"requestId": "<string>"
}{
"status": 0,
"message": "<string>",
"requestId": "<string>"
}{
"status": 0,
"message": "<string>",
"requestId": "<string>"
}{
"status": 0,
"message": "<string>",
"requestId": "<string>"
}{
"status": 0,
"message": "<string>",
"requestId": "<string>"
}Authorizations
API key for authentication. Get your API key from Settings → API Keys in your Spott dashboard.
Path Parameters
Body
The first name of the candidate
1 - 100^(?=.*\p{L})[\p{L}\p{M} '’.-]+$"John"
The middle name of the candidate
"William"
The last name of the candidate
1 - 100^(?=.*\p{L})[\p{L}\p{M} '’.-]+$"Doe"
The second last name of the candidate (common in Spanish-speaking countries)
"Garcia"
Compensation expectations for the candidate
Show child attributes
Show child attributes
The main contact (recruiter) assigned to this candidate
Show child attributes
Show child attributes
Languages spoken by the candidate
Show child attributes
Show child attributes
The gender of the candidate
male, female, x The nationalities of the candidate
Afghan, Albanian, Algerian, American, Andorran, Angolan, Antiguan, Argentinean, Armenian, Australian, Austrian, Azerbaijani, Bahamian, Bahraini, Bangladeshi, Barbadian, Barbudan, Batswana, Belarusian, Belgian, Belizean, Beninese, Bhutanese, Bolivian, Bosnian, Brazilian, British, Bruneian, Bulgarian, Burkinabe, Burmese, Burundian, Cambodian, Cameroonian, Canadian, Cape Verdean, Central African, Chadian, Chilean, Chinese, Colombian, Comoran, Congolese, Costa Rican, Croatian, Cuban, Cypriot, Czech, Danish, Djibouti, Dominican, Dutch, East Timorese, Ecuadorean, Egyptian, Emirian, Equatorial Guinean, Eritrean, Estonian, Ethiopian, Fijian, Filipino, Finnish, French, Gabonese, Gambian, Georgian, German, Ghanaian, Greek, Grenadian, Guatemalan, Guinea-Bissauan, Guinean, Guyanese, Haitian, Herzegovinian, Honduran, Hungarian, I-Kiribati, Icelander, Indian, Indonesian, Iranian, Iraqi, Irish, Israeli, Italian, Ivorian, Jamaican, Japanese, Jordanian, Kazakhstani, Kenyan, Kittian and Nevisian, Kuwaiti, Kyrgyz, Laotian, Latvian, Lebanese, Liberian, Libyan, Liechtensteiner, Lithuanian, Luxembourger, Macedonian, Malagasy, Malawian, Malaysian, Maldivian, Malian, Maltese, Marshallese, Mauritanian, Mauritian, Mexican, Micronesian, Moldovan, Monacan, Mongolian, Moroccan, Mosotho, Motswana, Mozambican, Namibian, Nauruan, Nepalese, New Zealander, Ni-Vanuatu, Nicaraguan, Nigerian, Nigerien, North Korean, Northern Irish, Norwegian, Omani, Pakistani, Palauan, Panamanian, Papua New Guinean, Paraguayan, Peruvian, Polish, Portuguese, Qatari, Romanian, Russian, Rwandan, Saint Lucian, Salvadoran, Samoan, San Marinese, Sao Tomean, Saudi, Scottish, Senegalese, Serbian, Seychellois, Sierra Leonean, Singaporean, Slovakian, Slovenian, Solomon Islander, Somali, South African, South Korean, Spanish, Sri Lankan, Sudanese, Surinamer, Swazi, Swedish, Swiss, Syrian, Taiwanese, Tajik, Tanzanian, Thai, Togolese, Tongan, Trinidadian or Tobagonian, Tunisian, Turkish, Tuvaluan, Ugandan, Ukrainian, Uruguayan, Uzbekistani, Venezuelan, Vietnamese, Welsh, Yemenite, Zambian, Zimbabwean The current status(es) of the candidate in the recruitment process
actively_looking, approachable_but_not_actively_looking, do_not_contact, do_not_poach, not_actively_looking How the candidate was acquired (e.g., referral, job board, LinkedIn)
manual, cv_parse, inbound_vacancy_portal, inbound_spontaneous_application, chrome_extension_linkedin, inbound_from_linkedin_jobboard_email, inbound_from_external_jobboard, juicebox, pin, maildrop, csv_import, vdab, advertsdata Physical locations associated with the candidate
Show child attributes
Show child attributes
Social media profiles of the candidate (e.g., LinkedIn URL)
Show child attributes
Show child attributes
Email addresses of the candidate
Show child attributes
Show child attributes
Phone numbers of the candidate
Show child attributes
Show child attributes
Whether this candidate should be visible when they are also a client contact
The date of birth of the candidate
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$"1990-05-15T00:00:00.000Z"
The date and time of the last interaction with the candidate
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$"2024-01-15T14:30:00.000Z"
The user ID of the person who last interacted with the candidate
"user-uuid-here"
Response
Candidate updated successfully
1Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?