Whitelister plusieurs recruteurs en une seule requete
curl --request POST \
--url https://client-p.pylote.io/partners/whitelist/batch \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"recruiters": [
{
"recruiterEmail": "marie.gilles@lutessa.com",
"firstname": "Marie",
"lastname": "Gilles",
"company": "Lutessa"
}
]
}
'import requests
url = "https://client-p.pylote.io/partners/whitelist/batch"
payload = { "recruiters": [
{
"recruiterEmail": "marie.gilles@lutessa.com",
"firstname": "Marie",
"lastname": "Gilles",
"company": "Lutessa"
}
] }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
recruiters: [
{
recruiterEmail: 'marie.gilles@lutessa.com',
firstname: 'Marie',
lastname: 'Gilles',
company: 'Lutessa'
}
]
})
};
fetch('https://client-p.pylote.io/partners/whitelist/batch', 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://client-p.pylote.io/partners/whitelist/batch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'recruiters' => [
[
'recruiterEmail' => 'marie.gilles@lutessa.com',
'firstname' => 'Marie',
'lastname' => 'Gilles',
'company' => 'Lutessa'
]
]
]),
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://client-p.pylote.io/partners/whitelist/batch"
payload := strings.NewReader("{\n \"recruiters\": [\n {\n \"recruiterEmail\": \"marie.gilles@lutessa.com\",\n \"firstname\": \"Marie\",\n \"lastname\": \"Gilles\",\n \"company\": \"Lutessa\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://client-p.pylote.io/partners/whitelist/batch")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"recruiters\": [\n {\n \"recruiterEmail\": \"marie.gilles@lutessa.com\",\n \"firstname\": \"Marie\",\n \"lastname\": \"Gilles\",\n \"company\": \"Lutessa\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://client-p.pylote.io/partners/whitelist/batch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"recruiters\": [\n {\n \"recruiterEmail\": \"marie.gilles@lutessa.com\",\n \"firstname\": \"Marie\",\n \"lastname\": \"Gilles\",\n \"company\": \"Lutessa\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"results": [
{
"recruiterEmail": "marie.gilles@lutessa.com",
"whitelistedEmail": "lutessa.marieg@recruiter.pylote.io",
"error": "<string>"
}
]
}Partners
Whitelister plusieurs recruteurs en une seule requete
A utiliser pour l’onboarding initial : whitelister tous vos recruteurs existants
d’un coup, plutot que de faire N appels a POST /partners/whitelist.
Pour les nouveaux recruteurs ajoutes par la suite, utilisez l’endpoint unitaire POST /partners/whitelist.
Le traitement est partiel : un recruteur en erreur ne fait pas echouer les autres.
Le tableau results contient une entree par recruteur soumis, avec whitelistedEmail
en cas de succes (ou si deja whiteliste) ou error en cas d’echec.
Limite : 500 recruteurs par appel.
POST
/
partners
/
whitelist
/
batch
Whitelister plusieurs recruteurs en une seule requete
curl --request POST \
--url https://client-p.pylote.io/partners/whitelist/batch \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"recruiters": [
{
"recruiterEmail": "marie.gilles@lutessa.com",
"firstname": "Marie",
"lastname": "Gilles",
"company": "Lutessa"
}
]
}
'import requests
url = "https://client-p.pylote.io/partners/whitelist/batch"
payload = { "recruiters": [
{
"recruiterEmail": "marie.gilles@lutessa.com",
"firstname": "Marie",
"lastname": "Gilles",
"company": "Lutessa"
}
] }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
recruiters: [
{
recruiterEmail: 'marie.gilles@lutessa.com',
firstname: 'Marie',
lastname: 'Gilles',
company: 'Lutessa'
}
]
})
};
fetch('https://client-p.pylote.io/partners/whitelist/batch', 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://client-p.pylote.io/partners/whitelist/batch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'recruiters' => [
[
'recruiterEmail' => 'marie.gilles@lutessa.com',
'firstname' => 'Marie',
'lastname' => 'Gilles',
'company' => 'Lutessa'
]
]
]),
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://client-p.pylote.io/partners/whitelist/batch"
payload := strings.NewReader("{\n \"recruiters\": [\n {\n \"recruiterEmail\": \"marie.gilles@lutessa.com\",\n \"firstname\": \"Marie\",\n \"lastname\": \"Gilles\",\n \"company\": \"Lutessa\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://client-p.pylote.io/partners/whitelist/batch")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"recruiters\": [\n {\n \"recruiterEmail\": \"marie.gilles@lutessa.com\",\n \"firstname\": \"Marie\",\n \"lastname\": \"Gilles\",\n \"company\": \"Lutessa\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://client-p.pylote.io/partners/whitelist/batch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"recruiters\": [\n {\n \"recruiterEmail\": \"marie.gilles@lutessa.com\",\n \"firstname\": \"Marie\",\n \"lastname\": \"Gilles\",\n \"company\": \"Lutessa\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"results": [
{
"recruiterEmail": "marie.gilles@lutessa.com",
"whitelistedEmail": "lutessa.marieg@recruiter.pylote.io",
"error": "<string>"
}
]
}Autorisations
Cle API fournie par Pylote. Inclure dans le header x-api-key de chaque requete.
Exemple : x-api-key: votre-cle-api
Corps
application/json
Maximum array length:
500Show child attributes
Show child attributes
Réponse
Resultat par recruteur (succes partiel possible)
Show child attributes
Show child attributes
⌘I