curl --request PATCH \
--url https://api.orion.file.ai/prod/v1/files/{fileId}/values \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"schemaValueId": "6a4bac981923768a61f47354",
"fieldPaths": [
{
"path": "/Supplier country",
"value": "Netherlands"
},
{
"path": "Line_items",
"cells": [
{
"rowIndex": 0,
"column": "gl_code",
"value": "1234"
},
{
"rowIndex": 1,
"column": "gl_code",
"value": "5678"
}
]
}
]
}
'import requests
url = "https://api.orion.file.ai/prod/v1/files/{fileId}/values"
payload = {
"schemaValueId": "6a4bac981923768a61f47354",
"fieldPaths": [
{
"path": "/Supplier country",
"value": "Netherlands"
},
{
"path": "Line_items",
"cells": [
{
"rowIndex": 0,
"column": "gl_code",
"value": "1234"
},
{
"rowIndex": 1,
"column": "gl_code",
"value": "5678"
}
]
}
]
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
schemaValueId: '6a4bac981923768a61f47354',
fieldPaths: [
{path: '/Supplier country', value: 'Netherlands'},
{
path: 'Line_items',
cells: [
{rowIndex: 0, column: 'gl_code', value: '1234'},
{rowIndex: 1, column: 'gl_code', value: '5678'}
]
}
]
})
};
fetch('https://api.orion.file.ai/prod/v1/files/{fileId}/values', 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.orion.file.ai/prod/v1/files/{fileId}/values",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'schemaValueId' => '6a4bac981923768a61f47354',
'fieldPaths' => [
[
'path' => '/Supplier country',
'value' => 'Netherlands'
],
[
'path' => 'Line_items',
'cells' => [
[
'rowIndex' => 0,
'column' => 'gl_code',
'value' => '1234'
],
[
'rowIndex' => 1,
'column' => 'gl_code',
'value' => '5678'
]
]
]
]
]),
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.orion.file.ai/prod/v1/files/{fileId}/values"
payload := strings.NewReader("{\n \"schemaValueId\": \"6a4bac981923768a61f47354\",\n \"fieldPaths\": [\n {\n \"path\": \"/Supplier country\",\n \"value\": \"Netherlands\"\n },\n {\n \"path\": \"Line_items\",\n \"cells\": [\n {\n \"rowIndex\": 0,\n \"column\": \"gl_code\",\n \"value\": \"1234\"\n },\n {\n \"rowIndex\": 1,\n \"column\": \"gl_code\",\n \"value\": \"5678\"\n }\n ]\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.orion.file.ai/prod/v1/files/{fileId}/values")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"schemaValueId\": \"6a4bac981923768a61f47354\",\n \"fieldPaths\": [\n {\n \"path\": \"/Supplier country\",\n \"value\": \"Netherlands\"\n },\n {\n \"path\": \"Line_items\",\n \"cells\": [\n {\n \"rowIndex\": 0,\n \"column\": \"gl_code\",\n \"value\": \"1234\"\n },\n {\n \"rowIndex\": 1,\n \"column\": \"gl_code\",\n \"value\": \"5678\"\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.orion.file.ai/prod/v1/files/{fileId}/values")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"schemaValueId\": \"6a4bac981923768a61f47354\",\n \"fieldPaths\": [\n {\n \"path\": \"/Supplier country\",\n \"value\": \"Netherlands\"\n },\n {\n \"path\": \"Line_items\",\n \"cells\": [\n {\n \"rowIndex\": 0,\n \"column\": \"gl_code\",\n \"value\": \"1234\"\n },\n {\n \"rowIndex\": 1,\n \"column\": \"gl_code\",\n \"value\": \"5678\"\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true
}{
"type": "https://errors.file.ai/validation-failed",
"title": "Validation failed",
"status": 422,
"detail": "One or more fields are invalid.",
"instance": "/v1/files/upload",
"code": "VALIDATION_FAILED",
"requestId": "0f1c8e03-978e-40d5-bc93-6894a57f9324",
"errors": [
{
"code": "REQUIRED",
"detail": "must not be empty",
"pointer": "#/fileName",
"parameter": "limit"
}
],
"message": "Validation failed",
"error": "Unprocessable Entity",
"statusCode": 422,
"retryAfter": 42
}{
"type": "https://errors.file.ai/validation-failed",
"title": "Validation failed",
"status": 422,
"detail": "One or more fields are invalid.",
"instance": "/v1/files/upload",
"code": "VALIDATION_FAILED",
"requestId": "0f1c8e03-978e-40d5-bc93-6894a57f9324",
"errors": [
{
"code": "REQUIRED",
"detail": "must not be empty",
"pointer": "#/fileName",
"parameter": "limit"
}
],
"message": "Validation failed",
"error": "Unprocessable Entity",
"statusCode": 422,
"retryAfter": 42
}{
"type": "https://errors.file.ai/validation-failed",
"title": "Validation failed",
"status": 422,
"detail": "One or more fields are invalid.",
"instance": "/v1/files/upload",
"code": "VALIDATION_FAILED",
"requestId": "0f1c8e03-978e-40d5-bc93-6894a57f9324",
"errors": [
{
"code": "REQUIRED",
"detail": "must not be empty",
"pointer": "#/fileName",
"parameter": "limit"
}
],
"message": "Validation failed",
"error": "Unprocessable Entity",
"statusCode": 422,
"retryAfter": 42
}{
"type": "https://errors.file.ai/validation-failed",
"title": "Validation failed",
"status": 422,
"detail": "Invalid schemaValueId.",
"instance": "/v1/{route}",
"code": "VALIDATION_FAILED",
"requestId": "0f1c8e03-978e-40d5-bc93-6894a57f9324",
"errors": [],
"message": "Invalid schemaValueId.",
"error": "Unprocessable Entity",
"statusCode": 422
}{
"type": "https://errors.file.ai/validation-failed",
"title": "Validation failed",
"status": 422,
"detail": "One or more fields are invalid.",
"instance": "/v1/files/upload",
"code": "VALIDATION_FAILED",
"requestId": "0f1c8e03-978e-40d5-bc93-6894a57f9324",
"errors": [
{
"code": "REQUIRED",
"detail": "must not be empty",
"pointer": "#/fileName",
"parameter": "limit"
}
],
"message": "Validation failed",
"error": "Unprocessable Entity",
"statusCode": 422,
"retryAfter": 42
}{
"type": "https://errors.file.ai/validation-failed",
"title": "Validation failed",
"status": 422,
"detail": "One or more fields are invalid.",
"instance": "/v1/files/upload",
"code": "VALIDATION_FAILED",
"requestId": "0f1c8e03-978e-40d5-bc93-6894a57f9324",
"errors": [
{
"code": "REQUIRED",
"detail": "must not be empty",
"pointer": "#/fileName",
"parameter": "limit"
}
],
"message": "Validation failed",
"error": "Unprocessable Entity",
"statusCode": 422,
"retryAfter": 42
}Update a file's extracted values (fields and table/list cells)
Update document form values for a file, for both scalar fields and table/list cells.
The schemaValueId field is the id returned by GET /files/:fileId/values (the form value id).
The fieldPaths field is an array of updates. Each entry must specify exactly one of:
-
value: the new value for a scalar field. Thepathis the field title (the leading slash is optional, e.g./Supplier country). -
cells: cell-level updates for a table/list field. Thepathis the table field title (e.g.Line_items). Each cell contains:-
rowIndex: the zero-based row index within the table. -
column: the column title (must match one of the table columns). -
value: the new cell value.
-
Table updates are a full read-modify-write: the complete CSV-backed rows are loaded, the specified cells are applied, and the table is re-persisted (updating the preview, document history, audit trail, and re-flattening the document).
curl --request PATCH \
--url https://api.orion.file.ai/prod/v1/files/{fileId}/values \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"schemaValueId": "6a4bac981923768a61f47354",
"fieldPaths": [
{
"path": "/Supplier country",
"value": "Netherlands"
},
{
"path": "Line_items",
"cells": [
{
"rowIndex": 0,
"column": "gl_code",
"value": "1234"
},
{
"rowIndex": 1,
"column": "gl_code",
"value": "5678"
}
]
}
]
}
'import requests
url = "https://api.orion.file.ai/prod/v1/files/{fileId}/values"
payload = {
"schemaValueId": "6a4bac981923768a61f47354",
"fieldPaths": [
{
"path": "/Supplier country",
"value": "Netherlands"
},
{
"path": "Line_items",
"cells": [
{
"rowIndex": 0,
"column": "gl_code",
"value": "1234"
},
{
"rowIndex": 1,
"column": "gl_code",
"value": "5678"
}
]
}
]
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
schemaValueId: '6a4bac981923768a61f47354',
fieldPaths: [
{path: '/Supplier country', value: 'Netherlands'},
{
path: 'Line_items',
cells: [
{rowIndex: 0, column: 'gl_code', value: '1234'},
{rowIndex: 1, column: 'gl_code', value: '5678'}
]
}
]
})
};
fetch('https://api.orion.file.ai/prod/v1/files/{fileId}/values', 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.orion.file.ai/prod/v1/files/{fileId}/values",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'schemaValueId' => '6a4bac981923768a61f47354',
'fieldPaths' => [
[
'path' => '/Supplier country',
'value' => 'Netherlands'
],
[
'path' => 'Line_items',
'cells' => [
[
'rowIndex' => 0,
'column' => 'gl_code',
'value' => '1234'
],
[
'rowIndex' => 1,
'column' => 'gl_code',
'value' => '5678'
]
]
]
]
]),
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.orion.file.ai/prod/v1/files/{fileId}/values"
payload := strings.NewReader("{\n \"schemaValueId\": \"6a4bac981923768a61f47354\",\n \"fieldPaths\": [\n {\n \"path\": \"/Supplier country\",\n \"value\": \"Netherlands\"\n },\n {\n \"path\": \"Line_items\",\n \"cells\": [\n {\n \"rowIndex\": 0,\n \"column\": \"gl_code\",\n \"value\": \"1234\"\n },\n {\n \"rowIndex\": 1,\n \"column\": \"gl_code\",\n \"value\": \"5678\"\n }\n ]\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.orion.file.ai/prod/v1/files/{fileId}/values")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"schemaValueId\": \"6a4bac981923768a61f47354\",\n \"fieldPaths\": [\n {\n \"path\": \"/Supplier country\",\n \"value\": \"Netherlands\"\n },\n {\n \"path\": \"Line_items\",\n \"cells\": [\n {\n \"rowIndex\": 0,\n \"column\": \"gl_code\",\n \"value\": \"1234\"\n },\n {\n \"rowIndex\": 1,\n \"column\": \"gl_code\",\n \"value\": \"5678\"\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.orion.file.ai/prod/v1/files/{fileId}/values")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"schemaValueId\": \"6a4bac981923768a61f47354\",\n \"fieldPaths\": [\n {\n \"path\": \"/Supplier country\",\n \"value\": \"Netherlands\"\n },\n {\n \"path\": \"Line_items\",\n \"cells\": [\n {\n \"rowIndex\": 0,\n \"column\": \"gl_code\",\n \"value\": \"1234\"\n },\n {\n \"rowIndex\": 1,\n \"column\": \"gl_code\",\n \"value\": \"5678\"\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true
}{
"type": "https://errors.file.ai/validation-failed",
"title": "Validation failed",
"status": 422,
"detail": "One or more fields are invalid.",
"instance": "/v1/files/upload",
"code": "VALIDATION_FAILED",
"requestId": "0f1c8e03-978e-40d5-bc93-6894a57f9324",
"errors": [
{
"code": "REQUIRED",
"detail": "must not be empty",
"pointer": "#/fileName",
"parameter": "limit"
}
],
"message": "Validation failed",
"error": "Unprocessable Entity",
"statusCode": 422,
"retryAfter": 42
}{
"type": "https://errors.file.ai/validation-failed",
"title": "Validation failed",
"status": 422,
"detail": "One or more fields are invalid.",
"instance": "/v1/files/upload",
"code": "VALIDATION_FAILED",
"requestId": "0f1c8e03-978e-40d5-bc93-6894a57f9324",
"errors": [
{
"code": "REQUIRED",
"detail": "must not be empty",
"pointer": "#/fileName",
"parameter": "limit"
}
],
"message": "Validation failed",
"error": "Unprocessable Entity",
"statusCode": 422,
"retryAfter": 42
}{
"type": "https://errors.file.ai/validation-failed",
"title": "Validation failed",
"status": 422,
"detail": "One or more fields are invalid.",
"instance": "/v1/files/upload",
"code": "VALIDATION_FAILED",
"requestId": "0f1c8e03-978e-40d5-bc93-6894a57f9324",
"errors": [
{
"code": "REQUIRED",
"detail": "must not be empty",
"pointer": "#/fileName",
"parameter": "limit"
}
],
"message": "Validation failed",
"error": "Unprocessable Entity",
"statusCode": 422,
"retryAfter": 42
}{
"type": "https://errors.file.ai/validation-failed",
"title": "Validation failed",
"status": 422,
"detail": "Invalid schemaValueId.",
"instance": "/v1/{route}",
"code": "VALIDATION_FAILED",
"requestId": "0f1c8e03-978e-40d5-bc93-6894a57f9324",
"errors": [],
"message": "Invalid schemaValueId.",
"error": "Unprocessable Entity",
"statusCode": 422
}{
"type": "https://errors.file.ai/validation-failed",
"title": "Validation failed",
"status": 422,
"detail": "One or more fields are invalid.",
"instance": "/v1/files/upload",
"code": "VALIDATION_FAILED",
"requestId": "0f1c8e03-978e-40d5-bc93-6894a57f9324",
"errors": [
{
"code": "REQUIRED",
"detail": "must not be empty",
"pointer": "#/fileName",
"parameter": "limit"
}
],
"message": "Validation failed",
"error": "Unprocessable Entity",
"statusCode": 422,
"retryAfter": 42
}{
"type": "https://errors.file.ai/validation-failed",
"title": "Validation failed",
"status": 422,
"detail": "One or more fields are invalid.",
"instance": "/v1/files/upload",
"code": "VALIDATION_FAILED",
"requestId": "0f1c8e03-978e-40d5-bc93-6894a57f9324",
"errors": [
{
"code": "REQUIRED",
"detail": "must not be empty",
"pointer": "#/fileName",
"parameter": "limit"
}
],
"message": "Validation failed",
"error": "Unprocessable Entity",
"statusCode": 422,
"retryAfter": 42
}PATCH /schemas, which is now
deprecated for that purpose. Use PATCH /schemas only to change schema field
definitions.Request Parameters
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| fileId | string | Yes | The ID of the file to update |
Request Body
| Property | Type | Required | Description |
|---|---|---|---|
| schemaValueId | string | Yes | The form value id — the id returned by GET /files/{fileId}/values |
| fieldPaths | array | Yes | The updates to apply. See below. |
fieldPaths entries
Each entry must specify exactly one ofvalue or cells.
| Property | Type | Description |
|---|---|---|
| path | string | For value: the field title (leading slash optional, e.g. /Supplier country). For cells: the table field title (e.g. Line_items). |
| value | string | The new value for a scalar field. |
| cells | array | Cell-level updates for a table/list field. |
cells entries
| Property | Type | Required | Description |
|---|---|---|---|
| rowIndex | number | Yes | Zero-based row index within the table |
| column | string | Yes | Column title — must match one of the table’s columns |
| value | string | Yes | The new cell value |
Example
{
"schemaValueId": "6a4bac981923768a61f47354",
"fieldPaths": [
{ "path": "/Supplier country", "value": "Netherlands" },
{
"path": "Line_items",
"cells": [
{ "rowIndex": 0, "column": "gl_code", "value": "1234" },
{ "rowIndex": 1, "column": "gl_code", "value": "5678" }
]
}
]
}
How table updates are applied
Idempotency-Key request header so a retry
cannot apply the change twice. See
Idempotent requests.Errors
A422 is returned for an invalid fileId, an invalid or missing
schemaValueId, empty or malformed fieldPaths, an unknown field path or
column, or a rowIndex outside the table’s row range. See
Error responses.Authorizations
API key for authentication
Headers
Optional opaque key (max 255 chars, UUIDv4 recommended) making this request idempotent for 24h: a retry with the same key and body replays the original response with Idempotent-Replayed: true.
Path Parameters
Body
The file values to update
The body is of type string.
Response
The file values are updated