Confirmar la carga de un documento
curl --request PUT \
--url https://api.gotrebol.com/verification-items/{id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"options": {
"uploaded_file": true
}
}
'import requests
url = "https://api.gotrebol.com/verification-items/{id}"
payload = { "options": { "uploaded_file": True } }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({options: {uploaded_file: true}})
};
fetch('https://api.gotrebol.com/verification-items/{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.gotrebol.com/verification-items/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'options' => [
'uploaded_file' => true
]
]),
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.gotrebol.com/verification-items/{id}"
payload := strings.NewReader("{\n \"options\": {\n \"uploaded_file\": true\n }\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.gotrebol.com/verification-items/{id}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"options\": {\n \"uploaded_file\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gotrebol.com/verification-items/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"options\": {\n \"uploaded_file\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"item": {
"id": 123,
"item_status": "<string>",
"item_order": 123,
"item_type": "<string>",
"item_value": {},
"item_error": "<string>",
"item_internal_status": "<string>",
"item_options": {
"upload_url": "<string>"
},
"item_ui_options": {},
"validation_result": {},
"user_event_completed_at": "<string>",
"user_event_name": "<string>",
"user_event_reason": "<string>",
"tag": "<string>",
"item_scope": "<string>",
"original_file_url": "<string>",
"citations": {
"url": "https://files.gotrebol.com/{verification_id}/citations/sources/{item_id}.json?Expires=…&Signature=…"
}
},
"triggeredSideEffects": true
}{
"message": "S3 object not found"
}Gestion de item Ids
Confirmar la carga de un documento
Después de subir el archivo mediante PUT a item_options.upload_url, confirma la carga
para iniciar el procesamiento del item. Aplica a generic, doc_validation,
tipos de extracción de documentos y doc_splitter, incluidos los tipos
personalizados habilitados para la cuenta. El procesamiento es asíncrono.
Ver Carga directa.
PUT
/
verification-items
/
{id}
Confirmar la carga de un documento
curl --request PUT \
--url https://api.gotrebol.com/verification-items/{id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"options": {
"uploaded_file": true
}
}
'import requests
url = "https://api.gotrebol.com/verification-items/{id}"
payload = { "options": { "uploaded_file": True } }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({options: {uploaded_file: true}})
};
fetch('https://api.gotrebol.com/verification-items/{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.gotrebol.com/verification-items/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'options' => [
'uploaded_file' => true
]
]),
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.gotrebol.com/verification-items/{id}"
payload := strings.NewReader("{\n \"options\": {\n \"uploaded_file\": true\n }\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.gotrebol.com/verification-items/{id}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"options\": {\n \"uploaded_file\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gotrebol.com/verification-items/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"options\": {\n \"uploaded_file\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"item": {
"id": 123,
"item_status": "<string>",
"item_order": 123,
"item_type": "<string>",
"item_value": {},
"item_error": "<string>",
"item_internal_status": "<string>",
"item_options": {
"upload_url": "<string>"
},
"item_ui_options": {},
"validation_result": {},
"user_event_completed_at": "<string>",
"user_event_name": "<string>",
"user_event_reason": "<string>",
"tag": "<string>",
"item_scope": "<string>",
"original_file_url": "<string>",
"citations": {
"url": "https://files.gotrebol.com/{verification_id}/citations/sources/{item_id}.json?Expires=…&Signature=…"
}
},
"triggeredSideEffects": true
}{
"message": "S3 object not found"
}Authorizations
Path Parameters
ID del item recibido al crear la verificación o agregar items.
Body
application/json
Show child attributes
Show child attributes
Response
Solicitud procesada. Con uploaded_file en true, confirma el archivo y solicita el procesamiento; con false, no confirma la carga ni solicita el procesamiento.
Was this page helpful?