payapp.check
Reconcile an AIA G702/G703 (1992) pay application from one workbook or a JSON summary with up to 500 JSON, CSV, or XLSX line items per period. PDF is unsupported.
https://api.kanagu.dev/v1/payapp/check- Price
- $0.50 per application, on successful calls only
- Without a key
- 10 free calls per IP per UTC day, shared by REST and MCP.
- MCP tool
payapp.checkathttps://api.kanagu.dev/mcp- Markdown
- /docs/payapp.check.md
curl https://api.kanagu.dev/v1/payapp/check \
-H "Content-Type: application/json" \
-d '{"current":{"summary":{"originalContractSum":12000,"netChangeOrders":0,"contractSumToDate":12000,"totalCompletedAndStored":4500,"retainage":{"mode":"fixed","completedWorkRate":10,"storedMaterialsRate":5,"completedWork":350,"storedMaterials":50,"total":400},"earnedLessRetainage":4100,"previousCertificates":0,"currentPaymentDue":4100,"balanceToFinish":7900},"continuationSheet":{"format":"json","lines":[{"item":"03-100","description":"Concrete formwork","scheduledValue":12000,"previousWork":0,"currentWork":3500,"storedMaterials":1000,"totalCompletedAndStored":4500,"percentComplete":37.5,"balanceToFinish":7500}]}}}'curl https://api.kanagu.dev/v1/payapp/check \
-H "Authorization: Bearer $KANAGU_KEY" \
-H "Content-Type: application/json" \
-d '{"current":{"summary":{"originalContractSum":12000,"netChangeOrders":0,"contractSumToDate":12000,"totalCompletedAndStored":4500,"retainage":{"mode":"fixed","completedWorkRate":10,"storedMaterialsRate":5,"completedWork":350,"storedMaterials":50,"total":400},"earnedLessRetainage":4100,"previousCertificates":0,"currentPaymentDue":4100,"balanceToFinish":7900},"continuationSheet":{"format":"json","lines":[{"item":"03-100","description":"Concrete formwork","scheduledValue":12000,"previousWork":0,"currentWork":3500,"storedMaterials":1000,"totalCompletedAndStored":4500,"percentComplete":37.5,"balanceToFinish":7500}]}}}'const res = await fetch("https://api.kanagu.dev/v1/payapp/check", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.KANAGU_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"current": {
"summary": {
"originalContractSum": 12000,
"netChangeOrders": 0,
"contractSumToDate": 12000,
"totalCompletedAndStored": 4500,
"retainage": {
"mode": "fixed",
"completedWorkRate": 10,
"storedMaterialsRate": 5,
"completedWork": 350,
"storedMaterials": 50,
"total": 400
},
"earnedLessRetainage": 4100,
"previousCertificates": 0,
"currentPaymentDue": 4100,
"balanceToFinish": 7900
},
"continuationSheet": {
"format": "json",
"lines": [
{
"item": "03-100",
"description": "Concrete formwork",
"scheduledValue": 12000,
"previousWork": 0,
"currentWork": 3500,
"storedMaterials": 1000,
"totalCompletedAndStored": 4500,
"percentComplete": 37.5,
"balanceToFinish": 7500
}
]
}
}
}),
});
if (!res.ok) throw new Error((await res.json()).error.message);
const result = await res.json();{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "payapp.check",
"arguments": {
"current": {
"summary": {
"originalContractSum": 12000,
"netChangeOrders": 0,
"contractSumToDate": 12000,
"totalCompletedAndStored": 4500,
"retainage": {
"mode": "fixed",
"completedWorkRate": 10,
"storedMaterialsRate": 5,
"completedWork": 350,
"storedMaterials": 50,
"total": 400
},
"earnedLessRetainage": 4100,
"previousCertificates": 0,
"currentPaymentDue": 4100,
"balanceToFinish": 7900
},
"continuationSheet": {
"format": "json",
"lines": [
{
"item": "03-100",
"description": "Concrete formwork",
"scheduledValue": 12000,
"previousWork": 0,
"currentWork": 3500,
"storedMaterials": 1000,
"totalCompletedAndStored": 4500,
"percentComplete": 37.5,
"balanceToFinish": 7500
}
]
}
}
}
}
}{
"current": {
"summary": {
"originalContractSum": 12000,
"netChangeOrders": 0,
"contractSumToDate": 12000,
"totalCompletedAndStored": 4500,
"retainage": {
"mode": "fixed",
"completedWorkRate": 10,
"storedMaterialsRate": 5,
"completedWork": 350,
"storedMaterials": 50,
"total": 400
},
"earnedLessRetainage": 4100,
"previousCertificates": 0,
"currentPaymentDue": 4100,
"balanceToFinish": 7900
},
"continuationSheet": {
"format": "json",
"lines": [
{
"item": "03-100",
"description": "Concrete formwork",
"scheduledValue": 12000,
"previousWork": 0,
"currentWork": 3500,
"storedMaterials": 1000,
"totalCompletedAndStored": 4500,
"percentComplete": 37.5,
"balanceToFinish": 7500
}
]
}
}
}{
"edition": 1992,
"sources": {
"G702": "https://assets.aiacontracts.com/ctrzdweb02/zdpdfs/preview_g702-1992.pdf",
"G703": "https://help.aiacontracts.com/hc/en-us/articles/1500009308302-Instructions-G703-1992-Continuation-Sheet",
"G702Instructions": "https://help.aiacontracts.com/hc/en-us/articles/1500009290501-completing-payment-applications-in-acd5"
},
"needs_review": false,
"findings": [],
"lines": [
{
"row": 1,
"item": "03-100",
"description": "Concrete formwork",
"scheduledValue": 12000,
"previousWork": 0,
"currentWork": 3500,
"storedMaterials": 1000,
"totalCompletedAndStored": 4500,
"percentComplete": 37.5,
"balanceToFinish": 7500,
"retainage": null
}
],
"summary": {
"originalContractSum": 12000,
"netChangeOrders": 0,
"contractSumToDate": 12000,
"totalCompletedAndStored": 4500,
"retainage": {
"completedWork": 350,
"storedMaterials": 50,
"total": 400
},
"earnedLessRetainage": 4100,
"previousCertificates": 0,
"currentPaymentDue": 4100,
"balanceToFinish": 7900
}
}Request body
application/json
currentobjectrequiredpreviousobject- Prior certified application. Its G703 supplies the approved SOV and its G702 line 6 supplies the current line 7. For variable retainage, carry forward the prior holdback, including when stored materials move into completed work. Infer the rates on newly billed work and materials from column I or the remaining G702 line 5 amount. An amount covering both work and stored materials implies a blended rate.
retainageChangeobject- New retainage rates for an agreed change or release, in percentage points. Use 0 for each released category. Fixed rates must match these values. For variable retainage these rates set the minimum amount on each item.
retainageChange.completedWorkRatenumber (0 to 100)required- Percentage points, e.g. 10 for 10%.
retainageChange.storedMaterialsRatenumber (0 to 100)required- Percentage points, e.g. 10 for 10%.
changeOrdersarray of object- All approved changes through the current period. Omitting this list carries forward the prior approved SOV and net change when available.
Response
200 · application/json
edition1992requiredsourcesobjectrequiredsources.G702stringrequiredsources.G703stringrequiredsources.G702Instructionsstringrequiredneeds_reviewbooleanrequiredfindingsarray of objectrequiredfindings[].rule"unmapped_header" | "missing_header" | "calculation_mismatch" | "scheduled_value_mismatch" | "overbilling" | "undefined_percent" | … (20 values)requiredfindings[].severity"mismatch" | "needs_review"requiredfindings[].form"G702" | "G703"requiredfindings[].columnstringrequired- G702 line, G703 column, or one-based position of an unrecognized header.
findings[].application"current" | "previous"findings[].skippedChecksarray of string- Checks blocked by a missing G703 header.
findings[].rowinteger (-9007199254740991 to 9007199254740991)- Current JSON line number or spreadsheet row/CSV record, one-based.
findings[].itemstringfindings[].changeOrderIdstringfindings[].expectednumber | string | nullrequiredfindings[].actualnumber | string | nullrequiredlinesarray of objectrequiredlines[].rowinteger (-9007199254740991 to 9007199254740991)requiredlines[].itemstringrequiredlines[].descriptionstringrequiredlines[].scheduledValuenumberrequiredlines[].previousWorknumberrequiredlines[].currentWorknumberrequiredlines[].storedMaterialsnumberrequiredlines[].totalCompletedAndStorednumberrequiredlines[].percentCompletenumber | nullrequiredlines[].balanceToFinishnumberrequiredlines[].retainagenumber | nullrequiredsummaryobjectrequiredsummary.originalContractSumnumberrequiredsummary.netChangeOrdersnumber | nullrequiredsummary.contractSumToDatenumber | nullrequiredsummary.totalCompletedAndStorednumber | nullrequiredsummary.retainageobjectrequiredsummary.retainage.completedWorknumber | nullrequiredsummary.retainage.storedMaterialsnumber | nullrequiredsummary.retainage.totalnumber | nullrequiredsummary.earnedLessRetainagenumber | nullrequiredsummary.previousCertificatesnumberrequiredsummary.currentPaymentDuenumber | nullrequiredsummary.balanceToFinishnumber | nullrequired
Try it
Errors
Errors are JSON {"error":{"code","message"}}. An operation may add its own 400 codes; the message says what to fix.
| Status | Code and meaning |
|---|---|
| 400 | invalid_inputThe body does not match the request schema. The message names each field. |
| 400 | invalid_jsonThe body is missing or is not valid JSON. |
| 400 | invalid_idempotency_keyIdempotency-Key must be 1–128 visible ASCII characters. |
| 401 | invalid_api_keyThe Bearer key is missing, malformed, invalid or inactive. |
| 402 | free_allowance_exhaustedThis month's free usage is used up and the account has no subscription. Subscribe from the dashboard, or wait for the next UTC month; Retry-After gives the seconds left. |
| 404 | not_foundNo operation at this path. |
| 409 | idempotency_conflictThe Idempotency-Key was already used with a different body. |
| 413 | payload_too_largeJSON bodies may be at most 64 KiB. |
| 429 | trial_limitThe anonymous trial allows 10 calls per IP per UTC day, shared by REST and MCP. Retry-After gives the seconds left. |
| 500 | internal_errorThe call failed on our side. It is not billed; retry with the same Idempotency-Key. |
JSON Schema
Request schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"current": {
"anyOf": [
{
"type": "object",
"properties": {
"summary": {
"type": "object",
"properties": {
"originalContractSum": {
"type": "number",
"minimum": 0,
"maximum": 1000000000,
"multipleOf": 0.01,
"description": "Signed USD to the cent."
},
"netChangeOrders": {
"type": "number",
"minimum": -1000000000,
"maximum": 1000000000,
"multipleOf": 0.01,
"description": "Signed USD to the cent."
},
"contractSumToDate": {
"type": "number",
"minimum": -1000000000,
"maximum": 1000000000,
"multipleOf": 0.01,
"description": "Signed USD to the cent."
},
"totalCompletedAndStored": {
"type": "number",
"minimum": -1000000000,
"maximum": 1000000000,
"multipleOf": 0.01,
"description": "Signed USD to the cent."
},
"retainage": {
"oneOf": [
{
"type": "object",
"properties": {
"completedWorkRate": {
"type": "number",
"minimum": 0,
"maximum": 100,
"multipleOf": 0.0001,
"description": "Percentage points, e.g. 10 for 10%."
},
"storedMaterialsRate": {
"type": "number",
"minimum": 0,
"maximum": 100,
"multipleOf": 0.0001,
"description": "Percentage points, e.g. 10 for 10%."
},
"mode": {
"type": "string",
"const": "fixed"
},
"completedWork": {
"description": "Reported G702 line 5a amount.",
"type": "number",
"minimum": -1000000000,
"maximum": 1000000000,
"multipleOf": 0.01
},
"storedMaterials": {
"description": "Reported G702 line 5b amount.",
"type": "number",
"minimum": -1000000000,
"maximum": 1000000000,
"multipleOf": 0.01
},
"total": {
"type": "number",
"minimum": -1000000000,
"maximum": 1000000000,
"multipleOf": 0.01,
"description": "G702 line 5 total."
}
},
"required": [
"mode",
"total"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"mode": {
"type": "string",
"const": "variable"
},
"total": {
"type": "number",
"minimum": -1000000000,
"maximum": 1000000000,
"multipleOf": 0.01,
"description": "G702 line 5 total, from G703 column I."
}
},
"required": [
"mode",
"total"
],
"additionalProperties": false
}
]
},
"earnedLessRetainage": {
"type": "number",
"minimum": -1000000000,
"maximum": 1000000000,
"multipleOf": 0.01,
"description": "Signed USD to the cent."
},
"previousCertificates": {
"type": "number",
"minimum": -1000000000,
"maximum": 1000000000,
"multipleOf": 0.01,
"description": "Signed USD to the cent."
},
"currentPaymentDue": {
"type": "number",
"minimum": -1000000000,
"maximum": 1000000000,
"multipleOf": 0.01,
"description": "Signed USD to the cent."
},
"balanceToFinish": {
"type": "number",
"minimum": -1000000000,
"maximum": 1000000000,
"multipleOf": 0.01,
"description": "G702 line 9, including retainage."
}
},
"required": [
"originalContractSum",
"netChangeOrders",
"contractSumToDate",
"totalCompletedAndStored",
"retainage",
"earnedLessRetainage",
"previousCertificates",
"currentPaymentDue",
"balanceToFinish"
],
"additionalProperties": false
},
"continuationSheet": {
"oneOf": [
{
"type": "object",
"properties": {
"format": {
"type": "string",
"const": "json"
},
"lines": {
"minItems": 1,
"maxItems": 500,
"type": "array",
"items": {
"type": "object",
"properties": {
"item": {
"type": "string",
"minLength": 1,
"maxLength": 100,
"description": "Stable G703 item identifier."
},
"description": {
"type": "string",
"minLength": 1,
"maxLength": 500
},
"scheduledValue": {
"type": "number",
"minimum": -1000000000,
"maximum": 1000000000,
"multipleOf": 0.01,
"description": "Signed USD to the cent."
},
"previousWork": {
"type": "number",
"minimum": -1000000000,
"maximum": 1000000000,
"multipleOf": 0.01,
"description": "Signed USD to the cent."
},
"currentWork": {
"type": "number",
"minimum": -1000000000,
"maximum": 1000000000,
"multipleOf": 0.01,
"description": "Signed USD to the cent."
},
"storedMaterials": {
"type": "number",
"minimum": -1000000000,
"maximum": 1000000000,
"multipleOf": 0.01,
"description": "Signed USD to the cent."
},
"totalCompletedAndStored": {
"type": "number",
"minimum": -1000000000,
"maximum": 1000000000,
"multipleOf": 0.01,
"description": "Signed USD to the cent."
},
"percentComplete": {
"description": "Percentage points, e.g. 50 for 50%.",
"type": "number"
},
"balanceToFinish": {
"type": "number",
"minimum": -1000000000,
"maximum": 1000000000,
"multipleOf": 0.01,
"description": "Signed USD to the cent."
},
"retainage": {
"description": "G703 column I for variable retainage.",
"type": "number",
"minimum": -1000000000,
"maximum": 1000000000,
"multipleOf": 0.01
}
},
"required": [
"item",
"description",
"scheduledValue",
"previousWork",
"currentWork",
"storedMaterials"
],
"additionalProperties": false
}
}
},
"required": [
"format",
"lines"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"format": {
"type": "string",
"const": "csv"
},
"text": {
"type": "string",
"minLength": 1,
"maxLength": 524288,
"description": "CSV text with a header and up to 500 item rows."
}
},
"required": [
"format",
"text"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"format": {
"type": "string",
"const": "xlsx"
},
"base64": {
"type": "string",
"minLength": 1,
"maxLength": 699052,
"format": "base64",
"contentEncoding": "base64",
"pattern": "^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$",
"description": "Base64 XLSX up to 512 KiB. Recalculate formulas before saving."
},
"sheet": {
"description": "Worksheet name. Defaults to the first worksheet.",
"type": "string",
"minLength": 1,
"maxLength": 31
}
},
"required": [
"format",
"base64"
],
"additionalProperties": false
}
],
"description": "For CSV and XLSX, start with a single header row using the JSON line field names or G703 labels. Include only SOV item rows. Include item, description, and G703 columns C–I including percent complete. Missing financial columns and unrecognized headers require review. Use 0 for empty amounts in columns D–F. Use percentage points in CSV and Excel percentage cells in XLSX."
},
"percentDecimals": {
"description": "Displayed G703 percent precision. Defaults to 2. Use 0 for whole percentages.",
"type": "integer",
"minimum": 0,
"maximum": 4
}
},
"required": [
"summary",
"continuationSheet"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"format": {
"type": "string",
"const": "xlsx"
},
"base64": {
"type": "string",
"minLength": 1,
"maxLength": 699052,
"format": "base64",
"contentEncoding": "base64",
"pattern": "^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$",
"description": "Base64 XLSX up to 512 KiB. Recalculate formulas before saving."
},
"percentDecimals": {
"description": "Displayed G703 percent precision. Defaults to 2. Use 0 for whole percentages.",
"type": "integer",
"minimum": 0,
"maximum": 4
}
},
"required": [
"format",
"base64"
],
"additionalProperties": false,
"description": "Workbook with sheets named G702 and G703. In G702 use columns A–C for line number, amount, and optional Excel percentage rate. Include lines 1–9 and use 5 for total retainage. Include 5a and/or 5b for fixed retainage. Use the reported amounts on lines 5a and 5b or, when those amounts are blank, the total of G703 column I. A rate without either source requires review of the eligible base. In G703 use a single header row for columns A–I including percent complete, followed by SOV items. Missing financial columns and unrecognized headers require review."
}
]
},
"previous": {
"description": "Prior certified application. Its G703 supplies the approved SOV and its G702 line 6 supplies the current line 7. For variable retainage, carry forward the prior holdback, including when stored materials move into completed work. Infer the rates on newly billed work and materials from column I or the remaining G702 line 5 amount. An amount covering both work and stored materials implies a blended rate.",
"anyOf": [
{
"type": "object",
"properties": {
"summary": {
"type": "object",
"properties": {
"originalContractSum": {
"type": "number",
"minimum": 0,
"maximum": 1000000000,
"multipleOf": 0.01,
"description": "Signed USD to the cent."
},
"netChangeOrders": {
"type": "number",
"minimum": -1000000000,
"maximum": 1000000000,
"multipleOf": 0.01,
"description": "Signed USD to the cent."
},
"contractSumToDate": {
"type": "number",
"minimum": -1000000000,
"maximum": 1000000000,
"multipleOf": 0.01,
"description": "Signed USD to the cent."
},
"totalCompletedAndStored": {
"type": "number",
"minimum": -1000000000,
"maximum": 1000000000,
"multipleOf": 0.01,
"description": "Signed USD to the cent."
},
"retainage": {
"oneOf": [
{
"type": "object",
"properties": {
"completedWorkRate": {
"type": "number",
"minimum": 0,
"maximum": 100,
"multipleOf": 0.0001,
"description": "Percentage points, e.g. 10 for 10%."
},
"storedMaterialsRate": {
"type": "number",
"minimum": 0,
"maximum": 100,
"multipleOf": 0.0001,
"description": "Percentage points, e.g. 10 for 10%."
},
"mode": {
"type": "string",
"const": "fixed"
},
"completedWork": {
"description": "Reported G702 line 5a amount.",
"type": "number",
"minimum": -1000000000,
"maximum": 1000000000,
"multipleOf": 0.01
},
"storedMaterials": {
"description": "Reported G702 line 5b amount.",
"type": "number",
"minimum": -1000000000,
"maximum": 1000000000,
"multipleOf": 0.01
},
"total": {
"type": "number",
"minimum": -1000000000,
"maximum": 1000000000,
"multipleOf": 0.01,
"description": "G702 line 5 total."
}
},
"required": [
"mode",
"total"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"mode": {
"type": "string",
"const": "variable"
},
"total": {
"type": "number",
"minimum": -1000000000,
"maximum": 1000000000,
"multipleOf": 0.01,
"description": "G702 line 5 total, from G703 column I."
}
},
"required": [
"mode",
"total"
],
"additionalProperties": false
}
]
},
"earnedLessRetainage": {
"type": "number",
"minimum": -1000000000,
"maximum": 1000000000,
"multipleOf": 0.01,
"description": "Signed USD to the cent."
},
"previousCertificates": {
"type": "number",
"minimum": -1000000000,
"maximum": 1000000000,
"multipleOf": 0.01,
"description": "Signed USD to the cent."
},
"currentPaymentDue": {
"type": "number",
"minimum": -1000000000,
"maximum": 1000000000,
"multipleOf": 0.01,
"description": "Signed USD to the cent."
},
"balanceToFinish": {
"type": "number",
"minimum": -1000000000,
"maximum": 1000000000,
"multipleOf": 0.01,
"description": "G702 line 9, including retainage."
}
},
"required": [
"originalContractSum",
"netChangeOrders",
"contractSumToDate",
"totalCompletedAndStored",
"retainage",
"earnedLessRetainage",
"previousCertificates",
"currentPaymentDue",
"balanceToFinish"
],
"additionalProperties": false
},
"continuationSheet": {
"oneOf": [
{
"type": "object",
"properties": {
"format": {
"type": "string",
"const": "json"
},
"lines": {
"minItems": 1,
"maxItems": 500,
"type": "array",
"items": {
"type": "object",
"properties": {
"item": {
"type": "string",
"minLength": 1,
"maxLength": 100,
"description": "Stable G703 item identifier."
},
"description": {
"type": "string",
"minLength": 1,
"maxLength": 500
},
"scheduledValue": {
"type": "number",
"minimum": -1000000000,
"maximum": 1000000000,
"multipleOf": 0.01,
"description": "Signed USD to the cent."
},
"previousWork": {
"type": "number",
"minimum": -1000000000,
"maximum": 1000000000,
"multipleOf": 0.01,
"description": "Signed USD to the cent."
},
"currentWork": {
"type": "number",
"minimum": -1000000000,
"maximum": 1000000000,
"multipleOf": 0.01,
"description": "Signed USD to the cent."
},
"storedMaterials": {
"type": "number",
"minimum": -1000000000,
"maximum": 1000000000,
"multipleOf": 0.01,
"description": "Signed USD to the cent."
},
"totalCompletedAndStored": {
"type": "number",
"minimum": -1000000000,
"maximum": 1000000000,
"multipleOf": 0.01,
"description": "Signed USD to the cent."
},
"percentComplete": {
"description": "Percentage points, e.g. 50 for 50%.",
"type": "number"
},
"balanceToFinish": {
"type": "number",
"minimum": -1000000000,
"maximum": 1000000000,
"multipleOf": 0.01,
"description": "Signed USD to the cent."
},
"retainage": {
"description": "G703 column I for variable retainage.",
"type": "number",
"minimum": -1000000000,
"maximum": 1000000000,
"multipleOf": 0.01
}
},
"required": [
"item",
"description",
"scheduledValue",
"previousWork",
"currentWork",
"storedMaterials"
],
"additionalProperties": false
}
}
},
"required": [
"format",
"lines"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"format": {
"type": "string",
"const": "csv"
},
"text": {
"type": "string",
"minLength": 1,
"maxLength": 524288,
"description": "CSV text with a header and up to 500 item rows."
}
},
"required": [
"format",
"text"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"format": {
"type": "string",
"const": "xlsx"
},
"base64": {
"type": "string",
"minLength": 1,
"maxLength": 699052,
"format": "base64",
"contentEncoding": "base64",
"pattern": "^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$",
"description": "Base64 XLSX up to 512 KiB. Recalculate formulas before saving."
},
"sheet": {
"description": "Worksheet name. Defaults to the first worksheet.",
"type": "string",
"minLength": 1,
"maxLength": 31
}
},
"required": [
"format",
"base64"
],
"additionalProperties": false
}
],
"description": "For CSV and XLSX, start with a single header row using the JSON line field names or G703 labels. Include only SOV item rows. Include item, description, and G703 columns C–I including percent complete. Missing financial columns and unrecognized headers require review. Use 0 for empty amounts in columns D–F. Use percentage points in CSV and Excel percentage cells in XLSX."
},
"percentDecimals": {
"description": "Displayed G703 percent precision. Defaults to 2. Use 0 for whole percentages.",
"type": "integer",
"minimum": 0,
"maximum": 4
}
},
"required": [
"summary",
"continuationSheet"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"format": {
"type": "string",
"const": "xlsx"
},
"base64": {
"type": "string",
"minLength": 1,
"maxLength": 699052,
"format": "base64",
"contentEncoding": "base64",
"pattern": "^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$",
"description": "Base64 XLSX up to 512 KiB. Recalculate formulas before saving."
},
"percentDecimals": {
"description": "Displayed G703 percent precision. Defaults to 2. Use 0 for whole percentages.",
"type": "integer",
"minimum": 0,
"maximum": 4
}
},
"required": [
"format",
"base64"
],
"additionalProperties": false,
"description": "Workbook with sheets named G702 and G703. In G702 use columns A–C for line number, amount, and optional Excel percentage rate. Include lines 1–9 and use 5 for total retainage. Include 5a and/or 5b for fixed retainage. Use the reported amounts on lines 5a and 5b or, when those amounts are blank, the total of G703 column I. A rate without either source requires review of the eligible base. In G703 use a single header row for columns A–I including percent complete, followed by SOV items. Missing financial columns and unrecognized headers require review."
}
]
},
"retainageChange": {
"description": "New retainage rates for an agreed change or release, in percentage points. Use 0 for each released category. Fixed rates must match these values. For variable retainage these rates set the minimum amount on each item.",
"type": "object",
"properties": {
"completedWorkRate": {
"type": "number",
"minimum": 0,
"maximum": 100,
"multipleOf": 0.0001,
"description": "Percentage points, e.g. 10 for 10%."
},
"storedMaterialsRate": {
"type": "number",
"minimum": 0,
"maximum": 100,
"multipleOf": 0.0001,
"description": "Percentage points, e.g. 10 for 10%."
}
},
"required": [
"completedWorkRate",
"storedMaterialsRate"
],
"additionalProperties": false
},
"changeOrders": {
"description": "All approved changes through the current period. Omitting this list carries forward the prior approved SOV and net change when available.",
"maxItems": 500,
"type": "array",
"items": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"amount": {
"type": "number",
"minimum": -1000000000,
"maximum": 1000000000,
"multipleOf": 0.01,
"description": "Total approved amount, including signed deductions."
},
"reflectedInPrevious": {
"description": "With a prior application, set true for orders already included in its approved SOV and false for new orders. An unknown period requires review.",
"type": "boolean"
},
"item": {
"description": "G703 item receiving the full amount. Defaults to the order ID.",
"type": "string",
"minLength": 1,
"maxLength": 100
}
},
"required": [
"id",
"amount"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"amount": {
"type": "number",
"minimum": -1000000000,
"maximum": 1000000000,
"multipleOf": 0.01,
"description": "Total approved amount, including signed deductions."
},
"reflectedInPrevious": {
"description": "With a prior application, set true for orders already included in its approved SOV and false for new orders. An unknown period requires review.",
"type": "boolean"
},
"allocations": {
"minItems": 1,
"maxItems": 500,
"type": "array",
"items": {
"type": "object",
"properties": {
"item": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"amount": {
"type": "number",
"minimum": -1000000000,
"maximum": 1000000000,
"multipleOf": 0.01,
"description": "Signed USD to the cent."
}
},
"required": [
"item",
"amount"
],
"additionalProperties": false
},
"description": "Signed amounts by G703 item. The amounts must sum to the order total."
}
},
"required": [
"id",
"amount",
"allocations"
],
"additionalProperties": false
}
]
}
}
},
"required": [
"current"
],
"additionalProperties": false,
"examples": [
{
"current": {
"summary": {
"originalContractSum": 12000,
"netChangeOrders": 0,
"contractSumToDate": 12000,
"totalCompletedAndStored": 4500,
"retainage": {
"mode": "fixed",
"completedWorkRate": 10,
"storedMaterialsRate": 5,
"completedWork": 350,
"storedMaterials": 50,
"total": 400
},
"earnedLessRetainage": 4100,
"previousCertificates": 0,
"currentPaymentDue": 4100,
"balanceToFinish": 7900
},
"continuationSheet": {
"format": "json",
"lines": [
{
"item": "03-100",
"description": "Concrete formwork",
"scheduledValue": 12000,
"previousWork": 0,
"currentWork": 3500,
"storedMaterials": 1000,
"totalCompletedAndStored": 4500,
"percentComplete": 37.5,
"balanceToFinish": 7500
}
]
}
}
}
]
}Response schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"edition": {
"type": "number",
"const": 1992
},
"sources": {
"type": "object",
"properties": {
"G702": {
"type": "string"
},
"G703": {
"type": "string"
},
"G702Instructions": {
"type": "string"
}
},
"required": [
"G702",
"G703",
"G702Instructions"
],
"additionalProperties": false
},
"needs_review": {
"type": "boolean"
},
"findings": {
"type": "array",
"items": {
"type": "object",
"properties": {
"rule": {
"type": "string",
"enum": [
"unmapped_header",
"missing_header",
"calculation_mismatch",
"scheduled_value_mismatch",
"overbilling",
"undefined_percent",
"carry_forward_mismatch",
"prior_item_missing",
"stored_materials_reduction",
"retainage_reduction",
"retainage_rate_drift",
"retainage_rate_ambiguous",
"retainage_mode_changed",
"retainage_missing",
"amount_out_of_range",
"change_order_missing",
"change_order_unmapped",
"change_order_period_unknown",
"change_order_history_mismatch",
"change_order_allocation_mismatch"
]
},
"severity": {
"type": "string",
"enum": [
"mismatch",
"needs_review"
]
},
"form": {
"type": "string",
"enum": [
"G702",
"G703"
]
},
"column": {
"type": "string",
"description": "G702 line, G703 column, or one-based position of an unrecognized header."
},
"application": {
"type": "string",
"enum": [
"current",
"previous"
]
},
"skippedChecks": {
"description": "Checks blocked by a missing G703 header.",
"type": "array",
"items": {
"type": "string"
}
},
"row": {
"description": "Current JSON line number or spreadsheet row/CSV record, one-based.",
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"item": {
"type": "string"
},
"changeOrderId": {
"type": "string"
},
"expected": {
"type": [
"number",
"string",
"null"
]
},
"actual": {
"type": [
"number",
"string",
"null"
]
}
},
"required": [
"rule",
"severity",
"form",
"column",
"expected",
"actual"
],
"additionalProperties": false
}
},
"lines": {
"type": "array",
"items": {
"type": "object",
"properties": {
"row": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"item": {
"type": "string"
},
"description": {
"type": "string"
},
"scheduledValue": {
"type": "number"
},
"previousWork": {
"type": "number"
},
"currentWork": {
"type": "number"
},
"storedMaterials": {
"type": "number"
},
"totalCompletedAndStored": {
"type": "number"
},
"percentComplete": {
"type": [
"number",
"null"
]
},
"balanceToFinish": {
"type": "number"
},
"retainage": {
"type": [
"number",
"null"
]
}
},
"required": [
"row",
"item",
"description",
"scheduledValue",
"previousWork",
"currentWork",
"storedMaterials",
"totalCompletedAndStored",
"percentComplete",
"balanceToFinish",
"retainage"
],
"additionalProperties": false
}
},
"summary": {
"type": "object",
"properties": {
"originalContractSum": {
"type": "number"
},
"netChangeOrders": {
"type": [
"number",
"null"
]
},
"contractSumToDate": {
"type": [
"number",
"null"
]
},
"totalCompletedAndStored": {
"type": [
"number",
"null"
]
},
"retainage": {
"type": "object",
"properties": {
"completedWork": {
"type": [
"number",
"null"
]
},
"storedMaterials": {
"type": [
"number",
"null"
]
},
"total": {
"type": [
"number",
"null"
]
}
},
"required": [
"completedWork",
"storedMaterials",
"total"
],
"additionalProperties": false
},
"earnedLessRetainage": {
"type": [
"number",
"null"
]
},
"previousCertificates": {
"type": "number"
},
"currentPaymentDue": {
"type": [
"number",
"null"
]
},
"balanceToFinish": {
"type": [
"number",
"null"
]
}
},
"required": [
"originalContractSum",
"netChangeOrders",
"contractSumToDate",
"totalCompletedAndStored",
"retainage",
"earnedLessRetainage",
"previousCertificates",
"currentPaymentDue",
"balanceToFinish"
],
"additionalProperties": false
}
},
"required": [
"edition",
"sources",
"needs_review",
"findings",
"lines",
"summary"
],
"additionalProperties": false
}