Create Processor
curl --request POST \
--url https://api-prod.extend.app/processors \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"type": "<string>",
"cloneProcessorId": "<string>",
"jsonSchemaEnabled": true
}
'import requests
url = "https://api-prod.extend.app/processors"
payload = {
"name": "<string>",
"type": "<string>",
"cloneProcessorId": "<string>",
"jsonSchemaEnabled": True
}
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({
name: '<string>',
type: '<string>',
cloneProcessorId: '<string>',
jsonSchemaEnabled: true
})
};
fetch('https://api-prod.extend.app/processors', 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-prod.extend.app/processors",
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([
'name' => '<string>',
'type' => '<string>',
'cloneProcessorId' => '<string>',
'jsonSchemaEnabled' => true
]),
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://api-prod.extend.app/processors"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"cloneProcessorId\": \"<string>\",\n \"jsonSchemaEnabled\": true\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://api-prod.extend.app/processors")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"cloneProcessorId\": \"<string>\",\n \"jsonSchemaEnabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-prod.extend.app/processors")
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 \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"cloneProcessorId\": \"<string>\",\n \"jsonSchemaEnabled\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"processor": {
"object": "document_processor",
"id": "processor_1234",
"name": "New Invoice Processor",
"type": "EXTRACT",
"createdAt": "2024-03-01T12:00:00Z",
"updatedAt": "2024-03-01T12:00:00Z"
}
}
Processor Endpoints
Create Processor
Create a new processor in Extend, optionally cloning from an existing processor.
Create Processor
curl --request POST \
--url https://api-prod.extend.app/processors \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"type": "<string>",
"cloneProcessorId": "<string>",
"jsonSchemaEnabled": true
}
'import requests
url = "https://api-prod.extend.app/processors"
payload = {
"name": "<string>",
"type": "<string>",
"cloneProcessorId": "<string>",
"jsonSchemaEnabled": True
}
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({
name: '<string>',
type: '<string>',
cloneProcessorId: '<string>',
jsonSchemaEnabled: true
})
};
fetch('https://api-prod.extend.app/processors', 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-prod.extend.app/processors",
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([
'name' => '<string>',
'type' => '<string>',
'cloneProcessorId' => '<string>',
'jsonSchemaEnabled' => true
]),
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://api-prod.extend.app/processors"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"cloneProcessorId\": \"<string>\",\n \"jsonSchemaEnabled\": true\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://api-prod.extend.app/processors")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"cloneProcessorId\": \"<string>\",\n \"jsonSchemaEnabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-prod.extend.app/processors")
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 \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"cloneProcessorId\": \"<string>\",\n \"jsonSchemaEnabled\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"processor": {
"object": "document_processor",
"id": "processor_1234",
"name": "New Invoice Processor",
"type": "EXTRACT",
"createdAt": "2024-03-01T12:00:00Z",
"updatedAt": "2024-03-01T12:00:00Z"
}
}
This endpoint allows you to create a new processor or clone an existing one. Typically processors are created and configured in the Extend Studio, but this endpoint can be used to create processors programmatically in order to sync ID’s across systems.
Body
The ID of an existing processor to clone. If provided, a new processor will be
created that clones the config of this processor.
Whether to enable JSON Schema config type for the processor. This is only
necessary if you have access to the legacy “Fields Array” config type. See if
you have access here.
Response
A Processor object representing the newly created processor. See the
DocumentProcessor object for more details.
Error Responses
Possible Common Errors
- 400 Bad Request: If the request body fails schema validation.
- 404 Not Found: If the processor to clone (cloneProcessorId) is not found.
{
"success": true,
"processor": {
"object": "document_processor",
"id": "processor_1234",
"name": "New Invoice Processor",
"type": "EXTRACT",
"createdAt": "2024-03-01T12:00:00Z",
"updatedAt": "2024-03-01T12:00:00Z"
}
}

