Smart Batch에 행 추가
기존 행이나 저장된 결과를 덮어쓰지 않고 기존 SmartBatch에 새 입력 행을 추가합니다. 래핑된 행({ rowIndex?, inputData })과 평면 행({ rowIndex?, ...inputFields })이 모두 허용되며, 서버는 maxExisting + 1부터 시작하는 순차적 행 인덱스를 할당합니다.
배치가 "processing" 상태인 동안에는 행을 추가할 수 없습니다(400 batch_append_not_allowed_while_processing). 배치가 이전에 "completed" 또는 "failed" 상태였던 경우, 행을 추가하면 새 행을 실행할 수 있도록 status가 "pending"으로 재설정되고 completedAt이 지워집니다.
엔드포인트
POST https://api.verifik.co/v2/smart-batches/{id}/rows/append
클라이언트별 Authorization: Bearer <VERIFIK_JWT>를 사용하여 Smart-Agent 프록시(https://ai.verifik.co/v2/smart-batches/{id}/rows/append)를 통해서도 호출할 수 있습니다. 공유 x402 실행은 403 Forbidden으로 차단됩니다.
헤더
| 이름 | 값 | 설명 |
|---|---|---|
Content-Type | application/json | 요청 페이로드 형식. |
Authorization | Bearer <VERIFIK_JWT> | 클라이언트 범위 JWT (authUser.clientId). |
매개변수
| 이름 | 타입 | 필수 | 설명 |
|---|---|---|---|
id | string | 예 | 행을 추가할 SmartBatch ObjectId. |
본문
| 이름 | 타입 | 필수 | 설명 |
|---|---|---|---|
rows | object[] | 예 | 래핑된({ rowIndex?, inputData }) 또는 평면({ rowIndex?, ...inputFields }) 입력 행의 비어 있지 않은 배열(min 1). 서버가 순차적인 rowIndex = maxExisting + 1을 할당합니다. |
알 수 없는 본문 키 또는 빈 rows 배열은 Joi 검증에 의해 409 MissingParameter로 거부됩니다.
요청
- Node.js
- PHP
- Python
- Go
- cURL
import axios from "axios";
const run = async () => {
const batchId = "6801a2b3c4d5e6f7a8b9c0d3";
const { data } = await axios.post(
`https://api.verifik.co/v2/smart-batches/${batchId}/rows/append`,
{
rows: [
{
inputData: {
documentType: "CC",
documentNumber: "1020304050",
},
},
{
documentType: "CC",
documentNumber: "1098765432",
},
],
},
{
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${process.env.VERIFIK_JWT}`,
},
}
);
console.log(data);
};
run();
<?php
$batchId = "6801a2b3c4d5e6f7a8b9c0d3";
$payload = [
"rows" => [
[
"inputData" => [
"documentType" => "CC",
"documentNumber" => "1020304050",
],
],
[
"documentType" => "CC",
"documentNumber" => "1098765432",
],
],
];
$ch = curl_init("https://api.verifik.co/v2/smart-batches/" . $batchId . "/rows/append");
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Content-Type: application/json",
"Authorization: Bearer " . getenv("VERIFIK_JWT"),
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
import os
import requests
batch_id = "6801a2b3c4d5e6f7a8b9c0d3"
url = f"https://api.verifik.co/v2/smart-batches/{batch_id}/rows/append"
headers = {
"Content-Type": "application/json",
"Authorization": f"Bearer {os.getenv('VERIFIK_JWT')}",
}
payload = {
"rows": [
{
"inputData": {
"documentType": "CC",
"documentNumber": "1020304050",
}
},
{
"documentType": "CC",
"documentNumber": "1098765432",
},
]
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
package main
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
"os"
)
func main() {
batchID := "6801a2b3c4d5e6f7a8b9c0d3"
body, _ := json.Marshal(map[string]interface{}{
"rows": []map[string]interface{}{
{
"inputData": map[string]string{
"documentType": "CC",
"documentNumber": "1020304050",
},
},
{
"documentType": "CC",
"documentNumber": "1098765432",
},
},
})
req, _ := http.NewRequest("POST", "https://api.verifik.co/v2/smart-batches/"+batchID+"/rows/append", bytes.NewReader(body))
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer "+os.Getenv("VERIFIK_JWT"))
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
var out map[string]interface{}
json.NewDecoder(resp.Body).Decode(&out)
fmt.Println(out)
}
curl -X POST "https://api.verifik.co/v2/smart-batches/6801a2b3c4d5e6f7a8b9c0d3/rows/append" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $VERIFIK_JWT" \
-d '{
"rows": [
{
"inputData": {
"documentType": "CC",
"documentNumber": "1020304050"
}
},
{
"documentType": "CC",
"documentNumber": "1098765432"
}
]
}'
응답
- 200 OK
- 400
- 401
- 403
- 404
- 409
- 422
{
"data": {
"_id": "6801a2b3c4d5e6f7a8b9c0d3",
"batchConfiguration": "6801a2b3c4d5e6f7a8b9c0d4",
"client": "507f1f77bcf86cd799439013",
"name": "Colombia Onboarding — November",
"status": "pending",
"executor": "browser",
"source": "smart_batch",
"headlessRun": false,
"creditsSpent": 0.04,
"rows": [
{
"rowIndex": 0,
"inputData": {
"documentType": "CC",
"documentNumber": "1032386359"
},
"status": "completed",
"results": {
"1": {
"fullName": "JANE DOE"
}
},
"errors": []
},
{
"rowIndex": 1,
"inputData": {
"documentType": "CC",
"documentNumber": "1020304050"
},
"status": "pending",
"results": {},
"errors": []
},
{
"rowIndex": 2,
"inputData": {
"documentType": "CC",
"documentNumber": "1098765432"
},
"status": "pending",
"results": {},
"errors": []
}
],
"totalRows": 3,
"completedRows": 1,
"failedRows": 0,
"partialRows": 0,
"createdAt": "2026-11-24T20:00:00.000Z",
"updatedAt": "2026-11-24T20:28:00.000Z"
}
}
{
"message": "batch_append_not_allowed_while_processing",
"code": "BadRequest"
}
{
"message": "Unauthorized",
"code": "Unauthorized"
}
{
"message": "Shared x402 execution is forbidden on this endpoint",
"code": "Forbidden"
}
{
"message": "batch_not_found",
"code": "NotFound"
}
{
"message": "\"rows\" must contain at least 1 items",
"code": "MissingParameter"
}
{
"message": "UnprocessableEntity",
"code": "UnprocessableEntity"
}
참고
- 행을 추가해도 검사가 실행되거나 크레딧이 소비되지 않습니다. 이후 Smart Batch 시작으로 배치를 시작하세요.
- 클라이언트가 제공한
rowIndex는 무시되며,maxExisting + 1부터 시작하는 서버 할당 순차 번호가 사용됩니다. - 배치가
"completed"또는"failed"상태였던 경우status가"pending"으로 재설정되고completedAt이 지워집니다.