curl --request POST \
--url https://pro.resocom.com/api/v1/batches \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"externalRef": "<string>",
"webhookUrl": "<string>"
}
'import requests
url = "https://pro.resocom.com/api/v1/batches"
payload = {
"externalRef": "<string>",
"webhookUrl": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({externalRef: '<string>', webhookUrl: '<string>'})
};
fetch('https://pro.resocom.com/api/v1/batches', 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://pro.resocom.com/api/v1/batches",
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([
'externalRef' => '<string>',
'webhookUrl' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://pro.resocom.com/api/v1/batches"
payload := strings.NewReader("{\n \"externalRef\": \"<string>\",\n \"webhookUrl\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://pro.resocom.com/api/v1/batches")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"externalRef\": \"<string>\",\n \"webhookUrl\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pro.resocom.com/api/v1/batches")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"externalRef\": \"<string>\",\n \"webhookUrl\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "BAT-1CBEA150-E475",
"status": "open",
"externalRef": "<string>",
"counts": {
"total": 123,
"pending": 123,
"succeeded": 123,
"errored": 123,
"canceled": 123,
"expired": 123
},
"submittedAt": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z",
"endedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z"
}{
"error": "invalid_api_key"
}{
"error": "invalid_api_key"
}Créer un lot
Ouvre pour 24 heures un lot d’analyses différées : contrôle de stock, reprise d’archives, campagne périodique. Trois lots peuvent rester ouverts simultanément par entreprise. Déposez ensuite les documents un par un, puis clôturez — les analyses sont rendues sous 24 heures, traitées quand la charge le permet.
curl --request POST \
--url https://pro.resocom.com/api/v1/batches \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"externalRef": "<string>",
"webhookUrl": "<string>"
}
'import requests
url = "https://pro.resocom.com/api/v1/batches"
payload = {
"externalRef": "<string>",
"webhookUrl": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({externalRef: '<string>', webhookUrl: '<string>'})
};
fetch('https://pro.resocom.com/api/v1/batches', 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://pro.resocom.com/api/v1/batches",
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([
'externalRef' => '<string>',
'webhookUrl' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://pro.resocom.com/api/v1/batches"
payload := strings.NewReader("{\n \"externalRef\": \"<string>\",\n \"webhookUrl\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://pro.resocom.com/api/v1/batches")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"externalRef\": \"<string>\",\n \"webhookUrl\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pro.resocom.com/api/v1/batches")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"externalRef\": \"<string>\",\n \"webhookUrl\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "BAT-1CBEA150-E475",
"status": "open",
"externalRef": "<string>",
"counts": {
"total": 123,
"pending": 123,
"succeeded": 123,
"errored": 123,
"canceled": 123,
"expired": 123
},
"submittedAt": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z",
"endedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z"
}{
"error": "invalid_api_key"
}{
"error": "invalid_api_key"
}Authorizations
Clé API créée dans Administration → Développeurs → Clés API (licence Groupe). Une clé en lecture seule ne peut appeler que les opérations GET.
Body
Response
Lot créé, ouvert au dépôt.
Lot d'analyses différées.
"BAT-1CBEA150-E475"
open : en cours de remplissage · in_progress : clôturé, en traitement · ended : terminé · canceled : annulé · expired : fenêtre dépassée.
open, in_progress, ended, canceled, expired Votre référence de lot.
Compteurs par état de document.
Show child attributes
Show child attributes
Échéance du lot : 24 h après sa création tant qu'il est ouvert, puis 24 h après sa clôture pour rendre les résultats.

