Read and summarize an existing plan document
curl --request POST \
--url https://api.cx.stax.ai/packages/retirement/plans/_document_reads/{plan}/_summary \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"file": "<string>"
}
'import requests
url = "https://api.cx.stax.ai/packages/retirement/plans/_document_reads/{plan}/_summary"
payload = { "file": "<string>" }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({file: '<string>'})
};
fetch('https://api.cx.stax.ai/packages/retirement/plans/_document_reads/{plan}/_summary', 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.cx.stax.ai/packages/retirement/plans/_document_reads/{plan}/_summary",
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([
'file' => '<string>'
]),
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.cx.stax.ai/packages/retirement/plans/_document_reads/{plan}/_summary"
payload := strings.NewReader("{\n \"file\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.cx.stax.ai/packages/retirement/plans/_document_reads/{plan}/_summary")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"file\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cx.stax.ai/packages/retirement/plans/_document_reads/{plan}/_summary")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"file\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"read": {
"_id": "<string>",
"completed_at": "<string>",
"created_at": "<string>",
"error": {
"code": "<string>",
"message": "<string>"
},
"evidence": [
{
"citations": [
{
"description": "<string>",
"page": 123,
"printed_label": "<string>"
}
],
"finding_id": "<string>",
"group_id": "company_plan",
"section_id": "company_information",
"status": "found"
}
],
"external_request_id": "<string>",
"file": "<string>",
"filename": "<string>",
"full": {
"candidate_at": "<string>",
"completed_at": "<string>",
"coverage": {
"all": {
"denominator": 123,
"numerator": 123,
"percent": 123
},
"catalog_id": "<string>",
"catalog_version": "<string>",
"key": {
"denominator": 123,
"numerator": 123,
"percent": 123
}
},
"created_provision_id": "<string>",
"effective_on": "<string>",
"error": {
"code": "<string>",
"message": "<string>"
},
"external_request_id": "<string>",
"idempotency_key": "<string>",
"model": "<string>",
"prompt_version": "<string>",
"provenance": {
"coverage": {
"all": {
"denominator": 123,
"numerator": 123,
"percent": 123
},
"catalog_id": "<string>",
"catalog_version": "<string>",
"key": {
"denominator": 123,
"numerator": 123,
"percent": 123
}
},
"extraction_id": "<string>",
"issues": [
{
"citations": [
{
"page": 123
}
],
"domain": "<string>",
"field": "<string>",
"group": "<string>",
"message": "<string>",
"review": "<string>",
"status": "<string>"
}
],
"model_version": "<string>",
"prompt_version": "<string>",
"requires_review": true,
"source_file_id": "<string>",
"source_sha256": "<string>",
"target_catalog_id": "<string>",
"target_catalog_version": "<string>",
"warnings": {
"by_domain": {},
"by_field": {},
"by_page": {},
"by_status": {},
"items": [
{
"domain": "<string>",
"field": "<string>",
"id": "<string>",
"message": "<string>",
"pages": [
123
],
"review": "<string>",
"status": "<string>"
}
]
}
},
"reasoning_effort": "<string>",
"result": {
"evidence": [
{
"citations": [
{
"description": "<string>",
"page": 123,
"printed_label": "<string>"
}
],
"field_key": "<string>",
"note": "<string>",
"source_wording": "<string>",
"status": "found"
}
],
"issues": [
{
"citations": [
{
"description": "<string>",
"page": 123,
"printed_label": "<string>"
}
],
"code": "found",
"field_keys": [
"<string>"
],
"group_id": "company_plan",
"id": "<string>",
"message": "<string>",
"suggested_review": "<string>"
}
],
"provisions": {},
"unmapped_source_provisions": [
{
"citations": [
{
"description": "<string>",
"page": 123,
"printed_label": "<string>"
}
],
"description": "<string>",
"reason": "<string>"
}
]
},
"schema_version": "<string>",
"started_at": "<string>",
"status": "<string>",
"target_catalog_id": "<string>",
"target_catalog_version": "<string>",
"warnings": {
"by_domain": {},
"by_field": {},
"by_page": {},
"by_status": {},
"items": [
{
"domain": "<string>",
"field": "<string>",
"id": "<string>",
"message": "<string>",
"pages": [
123
],
"review": "<string>",
"status": "<string>"
}
]
},
"year": 123
},
"issues": [
{
"citations": [
{
"description": "<string>",
"page": 123,
"printed_label": "<string>"
}
],
"code": "found",
"field_keys": [
"<string>"
],
"group_id": "company_plan",
"id": "<string>",
"message": "<string>",
"suggested_review": "<string>"
}
],
"link": {
"activity_ids": [
"<string>"
],
"company_created": true,
"company_id": "<string>",
"expected_source_sha256": "<string>",
"idempotency_key": "<string>",
"linked_at": "<string>",
"payload_sha256": "<string>",
"plan_id": "<string>",
"status": "<string>"
},
"model": "<string>",
"plan": "<string>",
"plan_provision_snapshot": {
"plan_code": "<string>",
"plan_name": "<string>",
"plan_sequence": 123,
"plan_structure": "<string>",
"plan_type": "<string>",
"plan_updated_at": "<string>",
"provision_count": 123,
"provision_document_provider": "<string>",
"provision_effective_on": "<string>",
"provision_id": "<string>",
"provision_set_sha256": "<string>",
"provision_specs_sha256": "<string>",
"provision_version": "<string>"
},
"prompt_version": "<string>",
"reasoning_effort": "<string>",
"schema_version": "<string>",
"source_mime_type": "<string>",
"source_page_count": 123,
"source_sha256": "<string>",
"source_size": 123,
"status": "<string>",
"summary": {
"groups": [
{
"facts": [
{
"citations": [
{
"description": "<string>",
"page": 123,
"printed_label": "<string>"
}
],
"id": "<string>",
"label": "<string>",
"money_type": "<string>",
"status": "found",
"value": "<string>"
}
],
"id": "company_plan",
"notes": [
"<string>"
],
"source_pages": [
123
],
"status": "found",
"tables": [
{
"columns": [
"<string>"
],
"id": "<string>",
"note": "<string>",
"rows": [
{
"cells": [
"<string>"
],
"citations": [
{
"description": "<string>",
"page": 123,
"printed_label": "<string>"
}
],
"id": "<string>",
"status": "found"
}
]
}
],
"title": "<string>"
}
],
"issues": [
{
"citations": [
{
"description": "<string>",
"page": 123,
"printed_label": "<string>"
}
],
"code": "found",
"field_keys": [
"<string>"
],
"group_id": "company_plan",
"id": "<string>",
"message": "<string>",
"suggested_review": "<string>"
}
],
"plan_context": {
"affiliated_service_groups": [
"<string>"
],
"business_type": "<string>",
"choice_of_law": "<string>",
"company_name": "<string>",
"controlled_groups": [
"<string>"
],
"detected_source_provider": "<string>",
"effective_date": "<string>",
"ein": "<string>",
"fiscal_year_end": "<string>",
"phone": "<string>",
"plan_name": "<string>",
"plan_number": "<string>",
"plan_structure": "<string>",
"plan_type": "<string>",
"plan_year": "<string>",
"plan_year_end": "<string>",
"restatement_date": "<string>",
"sequence_number": 123,
"sponsor_address": {
"city": "<string>",
"country": "<string>",
"line1": "<string>",
"line2": "<string>",
"postal_code": "<string>",
"state": "<string>"
}
},
"sections": [
{
"applicable": true,
"id": "company_information",
"items": [
{
"boolean": true,
"citations": [
{
"description": "<string>",
"page": 123,
"printed_label": "<string>"
}
],
"completeness": "complete",
"detail": "<string>",
"display": "<string>",
"id": "<string>",
"issues": [
{
"citations": [
{
"description": "<string>",
"page": 123,
"printed_label": "<string>"
}
],
"code": "found",
"field_keys": [
"<string>"
],
"id": "<string>",
"message": "<string>",
"review": "<string>"
}
],
"kind": "boolean",
"label": "<string>",
"review": "<string>",
"status": "found"
}
],
"matrices": [
{
"columns": [
{
"id": "<string>",
"label": "<string>"
}
],
"id": "<string>",
"label": "<string>",
"rows": [
{
"cells": [
{
"boolean": true,
"citations": [
{
"description": "<string>",
"page": 123,
"printed_label": "<string>"
}
],
"completeness": "complete",
"detail": "<string>",
"display": "<string>",
"id": "<string>",
"issues": [
{
"citations": [
{
"description": "<string>",
"page": 123,
"printed_label": "<string>"
}
],
"code": "found",
"field_keys": [
"<string>"
],
"id": "<string>",
"message": "<string>",
"review": "<string>"
}
],
"kind": "boolean",
"label": "<string>",
"review": "<string>",
"status": "found"
}
],
"id": "<string>",
"label": "<string>"
}
]
}
],
"source_pages": [
123
],
"status": "found",
"title": "<string>"
}
]
},
"summary_cx_context": {
"business_type": "<string>",
"company_name": "<string>",
"ein": "<string>",
"plan_code": "<string>",
"plan_name": "<string>",
"plan_structure": "<string>",
"plan_type": "<string>",
"sequence_number": 123
},
"team": "<string>",
"updated_at": "<string>",
"user": "<string>"
}
}{}{}{}{}{}packages
Read and summarize an existing plan document
Synchronously validates and visually reads an authorized original PDF, persists the fixed cited summary v3 layout, and does not modify plan provisions. Historical v2 reads remain unchanged and readable.
POST
/
packages
/
retirement
/
plans
/
_document_reads
/
{plan}
/
_summary
Read and summarize an existing plan document
curl --request POST \
--url https://api.cx.stax.ai/packages/retirement/plans/_document_reads/{plan}/_summary \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"file": "<string>"
}
'import requests
url = "https://api.cx.stax.ai/packages/retirement/plans/_document_reads/{plan}/_summary"
payload = { "file": "<string>" }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({file: '<string>'})
};
fetch('https://api.cx.stax.ai/packages/retirement/plans/_document_reads/{plan}/_summary', 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.cx.stax.ai/packages/retirement/plans/_document_reads/{plan}/_summary",
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([
'file' => '<string>'
]),
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.cx.stax.ai/packages/retirement/plans/_document_reads/{plan}/_summary"
payload := strings.NewReader("{\n \"file\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.cx.stax.ai/packages/retirement/plans/_document_reads/{plan}/_summary")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"file\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cx.stax.ai/packages/retirement/plans/_document_reads/{plan}/_summary")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"file\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"read": {
"_id": "<string>",
"completed_at": "<string>",
"created_at": "<string>",
"error": {
"code": "<string>",
"message": "<string>"
},
"evidence": [
{
"citations": [
{
"description": "<string>",
"page": 123,
"printed_label": "<string>"
}
],
"finding_id": "<string>",
"group_id": "company_plan",
"section_id": "company_information",
"status": "found"
}
],
"external_request_id": "<string>",
"file": "<string>",
"filename": "<string>",
"full": {
"candidate_at": "<string>",
"completed_at": "<string>",
"coverage": {
"all": {
"denominator": 123,
"numerator": 123,
"percent": 123
},
"catalog_id": "<string>",
"catalog_version": "<string>",
"key": {
"denominator": 123,
"numerator": 123,
"percent": 123
}
},
"created_provision_id": "<string>",
"effective_on": "<string>",
"error": {
"code": "<string>",
"message": "<string>"
},
"external_request_id": "<string>",
"idempotency_key": "<string>",
"model": "<string>",
"prompt_version": "<string>",
"provenance": {
"coverage": {
"all": {
"denominator": 123,
"numerator": 123,
"percent": 123
},
"catalog_id": "<string>",
"catalog_version": "<string>",
"key": {
"denominator": 123,
"numerator": 123,
"percent": 123
}
},
"extraction_id": "<string>",
"issues": [
{
"citations": [
{
"page": 123
}
],
"domain": "<string>",
"field": "<string>",
"group": "<string>",
"message": "<string>",
"review": "<string>",
"status": "<string>"
}
],
"model_version": "<string>",
"prompt_version": "<string>",
"requires_review": true,
"source_file_id": "<string>",
"source_sha256": "<string>",
"target_catalog_id": "<string>",
"target_catalog_version": "<string>",
"warnings": {
"by_domain": {},
"by_field": {},
"by_page": {},
"by_status": {},
"items": [
{
"domain": "<string>",
"field": "<string>",
"id": "<string>",
"message": "<string>",
"pages": [
123
],
"review": "<string>",
"status": "<string>"
}
]
}
},
"reasoning_effort": "<string>",
"result": {
"evidence": [
{
"citations": [
{
"description": "<string>",
"page": 123,
"printed_label": "<string>"
}
],
"field_key": "<string>",
"note": "<string>",
"source_wording": "<string>",
"status": "found"
}
],
"issues": [
{
"citations": [
{
"description": "<string>",
"page": 123,
"printed_label": "<string>"
}
],
"code": "found",
"field_keys": [
"<string>"
],
"group_id": "company_plan",
"id": "<string>",
"message": "<string>",
"suggested_review": "<string>"
}
],
"provisions": {},
"unmapped_source_provisions": [
{
"citations": [
{
"description": "<string>",
"page": 123,
"printed_label": "<string>"
}
],
"description": "<string>",
"reason": "<string>"
}
]
},
"schema_version": "<string>",
"started_at": "<string>",
"status": "<string>",
"target_catalog_id": "<string>",
"target_catalog_version": "<string>",
"warnings": {
"by_domain": {},
"by_field": {},
"by_page": {},
"by_status": {},
"items": [
{
"domain": "<string>",
"field": "<string>",
"id": "<string>",
"message": "<string>",
"pages": [
123
],
"review": "<string>",
"status": "<string>"
}
]
},
"year": 123
},
"issues": [
{
"citations": [
{
"description": "<string>",
"page": 123,
"printed_label": "<string>"
}
],
"code": "found",
"field_keys": [
"<string>"
],
"group_id": "company_plan",
"id": "<string>",
"message": "<string>",
"suggested_review": "<string>"
}
],
"link": {
"activity_ids": [
"<string>"
],
"company_created": true,
"company_id": "<string>",
"expected_source_sha256": "<string>",
"idempotency_key": "<string>",
"linked_at": "<string>",
"payload_sha256": "<string>",
"plan_id": "<string>",
"status": "<string>"
},
"model": "<string>",
"plan": "<string>",
"plan_provision_snapshot": {
"plan_code": "<string>",
"plan_name": "<string>",
"plan_sequence": 123,
"plan_structure": "<string>",
"plan_type": "<string>",
"plan_updated_at": "<string>",
"provision_count": 123,
"provision_document_provider": "<string>",
"provision_effective_on": "<string>",
"provision_id": "<string>",
"provision_set_sha256": "<string>",
"provision_specs_sha256": "<string>",
"provision_version": "<string>"
},
"prompt_version": "<string>",
"reasoning_effort": "<string>",
"schema_version": "<string>",
"source_mime_type": "<string>",
"source_page_count": 123,
"source_sha256": "<string>",
"source_size": 123,
"status": "<string>",
"summary": {
"groups": [
{
"facts": [
{
"citations": [
{
"description": "<string>",
"page": 123,
"printed_label": "<string>"
}
],
"id": "<string>",
"label": "<string>",
"money_type": "<string>",
"status": "found",
"value": "<string>"
}
],
"id": "company_plan",
"notes": [
"<string>"
],
"source_pages": [
123
],
"status": "found",
"tables": [
{
"columns": [
"<string>"
],
"id": "<string>",
"note": "<string>",
"rows": [
{
"cells": [
"<string>"
],
"citations": [
{
"description": "<string>",
"page": 123,
"printed_label": "<string>"
}
],
"id": "<string>",
"status": "found"
}
]
}
],
"title": "<string>"
}
],
"issues": [
{
"citations": [
{
"description": "<string>",
"page": 123,
"printed_label": "<string>"
}
],
"code": "found",
"field_keys": [
"<string>"
],
"group_id": "company_plan",
"id": "<string>",
"message": "<string>",
"suggested_review": "<string>"
}
],
"plan_context": {
"affiliated_service_groups": [
"<string>"
],
"business_type": "<string>",
"choice_of_law": "<string>",
"company_name": "<string>",
"controlled_groups": [
"<string>"
],
"detected_source_provider": "<string>",
"effective_date": "<string>",
"ein": "<string>",
"fiscal_year_end": "<string>",
"phone": "<string>",
"plan_name": "<string>",
"plan_number": "<string>",
"plan_structure": "<string>",
"plan_type": "<string>",
"plan_year": "<string>",
"plan_year_end": "<string>",
"restatement_date": "<string>",
"sequence_number": 123,
"sponsor_address": {
"city": "<string>",
"country": "<string>",
"line1": "<string>",
"line2": "<string>",
"postal_code": "<string>",
"state": "<string>"
}
},
"sections": [
{
"applicable": true,
"id": "company_information",
"items": [
{
"boolean": true,
"citations": [
{
"description": "<string>",
"page": 123,
"printed_label": "<string>"
}
],
"completeness": "complete",
"detail": "<string>",
"display": "<string>",
"id": "<string>",
"issues": [
{
"citations": [
{
"description": "<string>",
"page": 123,
"printed_label": "<string>"
}
],
"code": "found",
"field_keys": [
"<string>"
],
"id": "<string>",
"message": "<string>",
"review": "<string>"
}
],
"kind": "boolean",
"label": "<string>",
"review": "<string>",
"status": "found"
}
],
"matrices": [
{
"columns": [
{
"id": "<string>",
"label": "<string>"
}
],
"id": "<string>",
"label": "<string>",
"rows": [
{
"cells": [
{
"boolean": true,
"citations": [
{
"description": "<string>",
"page": 123,
"printed_label": "<string>"
}
],
"completeness": "complete",
"detail": "<string>",
"display": "<string>",
"id": "<string>",
"issues": [
{
"citations": [
{
"description": "<string>",
"page": 123,
"printed_label": "<string>"
}
],
"code": "found",
"field_keys": [
"<string>"
],
"id": "<string>",
"message": "<string>",
"review": "<string>"
}
],
"kind": "boolean",
"label": "<string>",
"review": "<string>",
"status": "found"
}
],
"id": "<string>",
"label": "<string>"
}
]
}
],
"source_pages": [
123
],
"status": "found",
"title": "<string>"
}
]
},
"summary_cx_context": {
"business_type": "<string>",
"company_name": "<string>",
"ein": "<string>",
"plan_code": "<string>",
"plan_name": "<string>",
"plan_structure": "<string>",
"plan_type": "<string>",
"sequence_number": 123
},
"team": "<string>",
"updated_at": "<string>",
"user": "<string>"
}
}{}{}{}{}{}