Fallos batch de entidades
curl --request GET \
--url http://api.gu1.ai/batch-import/entity-jobs/{jobId}/failures \
--header 'Authorization: Bearer <token>'import requests
url = "http://api.gu1.ai/batch-import/entity-jobs/{jobId}/failures"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://api.gu1.ai/batch-import/entity-jobs/{jobId}/failures', 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 => "http://api.gu1.ai/batch-import/entity-jobs/{jobId}/failures",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://api.gu1.ai/batch-import/entity-jobs/{jobId}/failures"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://api.gu1.ai/batch-import/entity-jobs/{jobId}/failures")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://api.gu1.ai/batch-import/entity-jobs/{jobId}/failures")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyReferencia API
Fallos batch de entidades
Descarga en CSV o JSON las filas fallidas y omitidas (skips) de un job bulk de entidades, con motivos de error por fila para reprocesar en la API batch gu1.
GET
/
batch-import
/
entity-jobs
/
{jobId}
/
failures
Fallos batch de entidades
curl --request GET \
--url http://api.gu1.ai/batch-import/entity-jobs/{jobId}/failures \
--header 'Authorization: Bearer <token>'import requests
url = "http://api.gu1.ai/batch-import/entity-jobs/{jobId}/failures"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://api.gu1.ai/batch-import/entity-jobs/{jobId}/failures', 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 => "http://api.gu1.ai/batch-import/entity-jobs/{jobId}/failures",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://api.gu1.ai/batch-import/entity-jobs/{jobId}/failures"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://api.gu1.ai/batch-import/entity-jobs/{jobId}/failures")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://api.gu1.ai/batch-import/entity-jobs/{jobId}/failures")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyEndpoints
GET https://api.gu1.ai/batch-import/entity-jobs/{jobId}/failures.csv
GET https://api.gu1.ai/batch-import/entity-jobs/{jobId}/failures
GET https://api.gu1.ai/entities/automatic/bulk/imports/{jobId}/failures.csv
…/failures.csv→ descarga CSV (solo filasfailed)…/failures→ JSON (failures[]+skips[]si aplica)
Este endpoint también devuelve status del job y contadores cuando no hay fallos por fila (
failures: []). Para polling genérico en todos los tipos de import, preferir Consultar estado de job batch.Autenticación y permisos
Authorization: Bearer TU_API_KEY
transactions:create, entities:bulk_import, events:create.
Respuestas HTTP
| Código | Cuándo |
|---|---|
200 | Job encontrado |
401 | Sin autenticación |
403 | Sin permiso |
404 | Job no encontrado |
Columnas CSV (failures.csv)
Solo filas con outcome=failed.
| Columna | Descripción |
|---|---|
tax_id | Tax id de la fila |
type | person o company |
outcome | Siempre failed en este export |
code | Código estable — catálogo |
error_message | Detalle legible |
Duplicado por taxId (bulk manual default): mismo taxId + mismo tipo →
skipped_existing, código SKIPPED_DUPLICATE_TAX_ID. No aparece en failures.csv. Consultá JSON skips[] o el reporte completo del job.Respuesta JSON
Incluyefailures[] (solo failed) y, si aplica, skips[] / skipsTotal (filas omitidas, no errores).
{
"success": true,
"jobId": "…",
"kind": "entity_batch",
"status": "completed",
"totalItems": 100,
"succeeded": 97,
"failed": 2,
"skipped": 1,
"failures": [
{
"taxId": "20123456789",
"type": "company",
"outcome": "failed",
"code": "DUPLICATE_EXTERNAL_ID",
"message": "An entity with external ID \"X\" already exists…"
}
],
"truncated": false,
"failuresTotal": 2,
"skips": [
{
"taxId": "30111222333",
"type": "person",
"outcome": "skipped_existing",
"code": "SKIPPED_DUPLICATE_TAX_ID"
}
],
"skipsTotal": 1
}
| Campo skip | Significado |
|---|---|
SKIPPED_DUPLICATE_TAX_ID | Bulk manual: taxId+tipo ya existía |
SKIPPED_ENTITY_ALREADY_EXISTS | Bulk automático: entidad ya existía |
Was this page helpful?