Extraction Templates
Get Extraction Template by ID
Retrieve a single extraction template by its unique identifier. Use this to get the evaluation_schema and details of a specific template before submitting workflows.
POST
/
workflows
/
extractionTemplates
/
getById
Get Extraction Template by ID
curl --request POST \
--url https://api.emberqa.com/api/workflows/extractionTemplates/getById \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "123e4567-e89b-12d3-a456-426614174000"
}
'import requests
url = "https://api.emberqa.com/api/workflows/extractionTemplates/getById"
payload = { "id": "123e4567-e89b-12d3-a456-426614174000" }
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({id: '123e4567-e89b-12d3-a456-426614174000'})
};
fetch('https://api.emberqa.com/api/workflows/extractionTemplates/getById', 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.emberqa.com/api/workflows/extractionTemplates/getById",
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([
'id' => '123e4567-e89b-12d3-a456-426614174000'
]),
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;
}HttpResponse<String> response = Unirest.post("https://api.emberqa.com/api/workflows/extractionTemplates/getById")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"123e4567-e89b-12d3-a456-426614174000\"\n}")
.asString();package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.emberqa.com/api/workflows/extractionTemplates/getById"
payload := strings.NewReader("{\n \"id\": \"123e4567-e89b-12d3-a456-426614174000\"\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))
}require 'uri'
require 'net/http'
url = URI("https://api.emberqa.com/api/workflows/extractionTemplates/getById")
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 \"id\": \"123e4567-e89b-12d3-a456-426614174000\"\n}"
response = http.request(request)
puts response.read_body{
"statusCode": "SUCCESS",
"statusMessage": "Successfully retrieved extraction template",
"doc": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"org_id": "org-abc123",
"name": "Invoice Data Extraction",
"evaluation_schema": {
"invoice_number": "Find the invoice number at the top of the document",
"total_amount": "Locate the total amount due"
}
}
}{
"error": "<string>",
"details": "<string>"
}{
"error": "<string>",
"details": "<string>"
}Authorizations
API key obtained from the EmberQA dashboard under the "Integrations" tab
Body
application/json
Unique identifier of the extraction template
Example:
"123e4567-e89b-12d3-a456-426614174000"
⌘I
Get Extraction Template by ID
curl --request POST \
--url https://api.emberqa.com/api/workflows/extractionTemplates/getById \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "123e4567-e89b-12d3-a456-426614174000"
}
'import requests
url = "https://api.emberqa.com/api/workflows/extractionTemplates/getById"
payload = { "id": "123e4567-e89b-12d3-a456-426614174000" }
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({id: '123e4567-e89b-12d3-a456-426614174000'})
};
fetch('https://api.emberqa.com/api/workflows/extractionTemplates/getById', 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.emberqa.com/api/workflows/extractionTemplates/getById",
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([
'id' => '123e4567-e89b-12d3-a456-426614174000'
]),
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;
}HttpResponse<String> response = Unirest.post("https://api.emberqa.com/api/workflows/extractionTemplates/getById")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"123e4567-e89b-12d3-a456-426614174000\"\n}")
.asString();package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.emberqa.com/api/workflows/extractionTemplates/getById"
payload := strings.NewReader("{\n \"id\": \"123e4567-e89b-12d3-a456-426614174000\"\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))
}require 'uri'
require 'net/http'
url = URI("https://api.emberqa.com/api/workflows/extractionTemplates/getById")
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 \"id\": \"123e4567-e89b-12d3-a456-426614174000\"\n}"
response = http.request(request)
puts response.read_body{
"statusCode": "SUCCESS",
"statusMessage": "Successfully retrieved extraction template",
"doc": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"org_id": "org-abc123",
"name": "Invoice Data Extraction",
"evaluation_schema": {
"invoice_number": "Find the invoice number at the top of the document",
"total_amount": "Locate the total amount due"
}
}
}{
"error": "<string>",
"details": "<string>"
}{
"error": "<string>",
"details": "<string>"
}
