> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://developer.fortresstech.io/api-reference/documents/post-document-results/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developer.fortresstech.io/_mcp/server. # Post Document Results POST https://api.fortresstech.io/v1/documents/{documentId}/results Content-Type: application/json Defined, not yet publishedThe only write route for documents. Every status CORA writes goes through it, with or without data. Fortress recomputes the requirement status after each call (see RequirementStatus).One run, in order:1) Pickup: status EXTRACTING and reviewResult.runId (opens the run). No data yet. 2) Extraction ("Save the extracted data in Fortress"): extractedFields and reviewResult.quality, with status EVALUATING\_RULES. If a quality check fails (wrong item, unreadable, incomplete), this call carries the outcome status and reasonCodes instead, and the run ends here. 3) Evaluated rules: reviewResult.checks and computed, with the outcome status (VALIDATED\_BY\_CORA, REJECTED, WAITING\_FOR\_APPLICANT or WAITING\_FOR\_COMPLIANCE) and reasonCodes.Clarification: CORA writes WAITING\_FOR\_APPLICANT while it waits for the applicant's clarification, then WAITING\_FOR\_COMPLIANCE when the clarification is ready for compliance. The applicant's reply stays in the message thread (POST /v1/messages, message.received), where compliance reads it.REJECTED: CORA failed the document and it needs a new upload (unreadable, wrong document, a rule failed). CORA writes REJECTED with the reasonCodes. A rejected document stays in the bundle as history only and never counts toward the requirement, so the requirement derives AWAITING\_UPLOAD. CORA waits for the applicant's new upload (requirement.upload\_received) and reviews the new document. Staff can set REJECTED too; statusSetBy says who.Outcomes without data (e.g. WAITING\_FOR\_COMPLIANCE with NO\_DEFINITION or SYS\_FORTRESS\_API) send only status and reasonCodes. reviewResult is optional, except that it is required whenever extractedFields is sent: a body with extractedFields and no reviewResult returns 400.Fortress can refuse a write with 409 (see below). CORA must handle it: stop, re-read the bundle and continue from the state Fortress returns.Calls with the same reviewResult.runId merge into one result: properties not sent are left unchanged; extractedFields and checks items replace earlier items with the same canonicalName or checkId. A new runId starts a new result. The bundle returns the latest run, in the same shape (requirements\[].documentTypes\[].documents\[]).This route is defined for the CORA integration and is not delivered yet. Fortress does not serve it until it moves to Available. Authenticate with the `x-api-key` header. Reference: https://developer.fortresstech.io/api-reference/documents/post-document-results ## Authentication - `x-api-key` header (required) — API Key authentication via header ## Request ### Path parameters - `documentId` (string, required) — The document. ### Body (application/json) This endpoint expects a DocumentResultsWrite. - `applicationId` (string, required) — The application the document belongs to. - `status` (enum, required) — The document statuses CORA may write (a subset of BundleDocumentStatus). NOT_YET_REVIEWED and APPROVED are Fortress only; writing them returns 403. - Allowed values: `EXTRACTING`, `EVALUATING_RULES`, `WAITING_FOR_APPLICANT`, `WAITING_FOR_COMPLIANCE`, `VALIDATED_BY_CORA`, `REJECTED` - `reasonCodes` (list of string, required) - `extractedFields` (list of ExtractedField, optional) — Sent with the extraction call. - `reviewResult` (ReviewResult, optional) — Required when extractedFields is sent; Fortress returns 400 otherwise. Omit for outcomes without data. ## Response ### 204 Saved and status set. Requirement status recomputed. ## Errors ### 400 Bad Request Error Invalid body, for example extractedFields sent without reviewResult. - `any` ### 401 Unauthorized Error Missing or invalid x-api-key. - `any` ### 403 Forbidden Error Status not writable by CORA (NOT_YET_REVIEWED, APPROVED). - `any` ### 404 Not Found Error Document not found, or not in the API key's organization. - `any` ### 409 Conflict Error Nothing was written: Fortress refused the write. The document's status was set by a Fortress user (statusSetBy fortress_user), the document was removed, or a manual compliance review is open on the application. CORA must handle it: stop, re-read the bundle and continue from the state Fortress returns. - `code` (enum, required) - Allowed values: `STATUS_SET_BY_USER`, `DOCUMENT_REMOVED`, `COMPLIANCE_REVIEW_OPEN` - `message` (string, optional) ## Types ### ExtractedField - `canonicalName` (string, required) - `value` (ExtractedFieldValue, required, nullable) - `confidence` (double, optional) - `page` (integer, optional) ### ReviewResult - `runId` (string, required) - `definitionVersion` (string, required) - `applicationVersion` (string, optional) - `reviewedAt` (datetime, optional) - `quality` (ReviewQuality, optional) - `checks` (list of ReviewCheck, optional) - `computed` (list of ComputedValue, optional) ### ExtractedFieldValue ### ReviewQuality - `documentTypeDetected` (string, optional) — documentTypeKey of the type CORA recognized. - `rightDocument` (enum, optional) - Allowed values: `pass`, `fail` - `legibility` (enum, optional) - Allowed values: `pass`, `fail` - `completeness` (enum, optional) - Allowed values: `pass`, `fail` ### ReviewCheck - `checkId` (string, required) — ruleId or mappingId. - `kind` (enum, required) - Allowed values: `rule`, `mapping` - `checkType` (enum, required) - Allowed values: `exact`, `ai_judgement` - `verdict` (string, required) - `inputs` (list of string, optional) - `observed` (string, optional) - `expected` (string, optional) - `onFail` (enum, optional) — What CORA does when the check fails, and the document status it writes: - reupload -> REJECTED (the document no longer counts and the requirement derives AWAITING_UPLOAD; the applicant uploads a new document and the review starts again). - clarification -> WAITING_FOR_APPLICANT while CORA waits for the applicant's clarification (in the message thread), then WAITING_FOR_COMPLIANCE when the clarification is ready for compliance. - compliance_only -> WAITING_FOR_COMPLIANCE. - note -> does not block; recorded for the reviewer. - fortress_decides -> CORA returns the computed figure; Fortress decides. - Allowed values: `reupload`, `clarification`, `compliance_only`, `note`, `fortress_decides` - `applicantMessage` (string, optional) - `comment` (string, optional) ### ComputedValue - `name` (string, required) - `value` (ComputedValueValue, required) - `sourceCheck` (string, optional) ### ComputedValueValue ## Examples ### 1. Pickup - CORA starts on the document **Request** ```json { "applicationId": "9d8c7b6a-5e4f-4d3c-9b2a-1e0f9d8c7b6a", "status": "EXTRACTING", "reasonCodes": [], "reviewResult": { "runId": "run_9202A", "definitionVersion": "1.0", "applicationVersion": "a17" } } ``` **SDK Code** ```python 1. Pickup - CORA starts on the document import requests url = "https://api.fortresstech.io/v1/documents/documentId/results" payload = { "applicationId": "9d8c7b6a-5e4f-4d3c-9b2a-1e0f9d8c7b6a", "status": "EXTRACTING", "reasonCodes": [], "reviewResult": { "runId": "run_9202A", "definitionVersion": "1.0", "applicationVersion": "a17" } } headers = { "x-api-key": "", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript 1. Pickup - CORA starts on the document const url = 'https://api.fortresstech.io/v1/documents/documentId/results'; const options = { method: 'POST', headers: {'x-api-key': '', 'Content-Type': 'application/json'}, body: '{"applicationId":"9d8c7b6a-5e4f-4d3c-9b2a-1e0f9d8c7b6a","status":"EXTRACTING","reasonCodes":[],"reviewResult":{"runId":"run_9202A","definitionVersion":"1.0","applicationVersion":"a17"}}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go 1. Pickup - CORA starts on the document package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.fortresstech.io/v1/documents/documentId/results" payload := strings.NewReader("{\n \"applicationId\": \"9d8c7b6a-5e4f-4d3c-9b2a-1e0f9d8c7b6a\",\n \"status\": \"EXTRACTING\",\n \"reasonCodes\": [],\n \"reviewResult\": {\n \"runId\": \"run_9202A\",\n \"definitionVersion\": \"1.0\",\n \"applicationVersion\": \"a17\"\n }\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("x-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(res) fmt.Println(string(body)) } ``` ```ruby 1. Pickup - CORA starts on the document require 'uri' require 'net/http' url = URI("https://api.fortresstech.io/v1/documents/documentId/results") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["x-api-key"] = '' request["Content-Type"] = 'application/json' request.body = "{\n \"applicationId\": \"9d8c7b6a-5e4f-4d3c-9b2a-1e0f9d8c7b6a\",\n \"status\": \"EXTRACTING\",\n \"reasonCodes\": [],\n \"reviewResult\": {\n \"runId\": \"run_9202A\",\n \"definitionVersion\": \"1.0\",\n \"applicationVersion\": \"a17\"\n }\n}" response = http.request(request) puts response.read_body ``` ```java 1. Pickup - CORA starts on the document import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.fortresstech.io/v1/documents/documentId/results") .header("x-api-key", "") .header("Content-Type", "application/json") .body("{\n \"applicationId\": \"9d8c7b6a-5e4f-4d3c-9b2a-1e0f9d8c7b6a\",\n \"status\": \"EXTRACTING\",\n \"reasonCodes\": [],\n \"reviewResult\": {\n \"runId\": \"run_9202A\",\n \"definitionVersion\": \"1.0\",\n \"applicationVersion\": \"a17\"\n }\n}") .asString(); ``` ```php 1. Pickup - CORA starts on the document request('POST', 'https://api.fortresstech.io/v1/documents/documentId/results', [ 'body' => '{ "applicationId": "9d8c7b6a-5e4f-4d3c-9b2a-1e0f9d8c7b6a", "status": "EXTRACTING", "reasonCodes": [], "reviewResult": { "runId": "run_9202A", "definitionVersion": "1.0", "applicationVersion": "a17" } }', 'headers' => [ 'Content-Type' => 'application/json', 'x-api-key' => '', ], ]); echo $response->getBody(); ``` ```csharp 1. Pickup - CORA starts on the document using RestSharp; var client = new RestClient("https://api.fortresstech.io/v1/documents/documentId/results"); var request = new RestRequest(Method.POST); request.AddHeader("x-api-key", ""); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"applicationId\": \"9d8c7b6a-5e4f-4d3c-9b2a-1e0f9d8c7b6a\",\n \"status\": \"EXTRACTING\",\n \"reasonCodes\": [],\n \"reviewResult\": {\n \"runId\": \"run_9202A\",\n \"definitionVersion\": \"1.0\",\n \"applicationVersion\": \"a17\"\n }\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift 1. Pickup - CORA starts on the document import Foundation let headers = [ "x-api-key": "", "Content-Type": "application/json" ] let parameters = [ "applicationId": "9d8c7b6a-5e4f-4d3c-9b2a-1e0f9d8c7b6a", "status": "EXTRACTING", "reasonCodes": [], "reviewResult": [ "runId": "run_9202A", "definitionVersion": "1.0", "applicationVersion": "a17" ] ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.fortresstech.io/v1/documents/documentId/results")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ``` ### 2. Extraction saved, rules about to run **Request** ```json { "applicationId": "9d8c7b6a-5e4f-4d3c-9b2a-1e0f9d8c7b6a", "status": "EVALUATING_RULES", "reasonCodes": [], "extractedFields": [ { "canonicalName": "paystub.employee.full_name", "value": "James R. Lopez", "confidence": 0.97, "page": 1 }, { "canonicalName": "paystub.employer.name", "value": "The Home Depot", "confidence": 0.95, "page": 1 }, { "canonicalName": "paystub.period.end_date", "value": "2026-06-02", "confidence": 0.93, "page": 1 }, { "canonicalName": "paystub.period.frequency", "value": "biweekly", "confidence": 0.9, "page": 1 }, { "canonicalName": "paystub.current.gross_pay", "value": 1240, "confidence": 0.98, "page": 1 }, { "canonicalName": "paystub.current.total_deductions", "value": 201.15, "confidence": 0.96, "page": 1 }, { "canonicalName": "paystub.current.net_pay", "value": 1038.85, "confidence": 0.98, "page": 1 } ], "reviewResult": { "runId": "run_9202A", "definitionVersion": "1.0", "applicationVersion": "a17", "quality": { "documentTypeDetected": "employment_pay_stub", "rightDocument": "pass", "legibility": "pass", "completeness": "pass" } } } ``` **SDK Code** ```python 2. Extraction saved, rules about to run import requests url = "https://api.fortresstech.io/v1/documents/documentId/results" payload = { "applicationId": "9d8c7b6a-5e4f-4d3c-9b2a-1e0f9d8c7b6a", "status": "EVALUATING_RULES", "reasonCodes": [], "extractedFields": [ { "canonicalName": "paystub.employee.full_name", "value": "James R. Lopez", "confidence": 0.97, "page": 1 }, { "canonicalName": "paystub.employer.name", "value": "The Home Depot", "confidence": 0.95, "page": 1 }, { "canonicalName": "paystub.period.end_date", "value": "2026-06-02", "confidence": 0.93, "page": 1 }, { "canonicalName": "paystub.period.frequency", "value": "biweekly", "confidence": 0.9, "page": 1 }, { "canonicalName": "paystub.current.gross_pay", "value": 1240, "confidence": 0.98, "page": 1 }, { "canonicalName": "paystub.current.total_deductions", "value": 201.15, "confidence": 0.96, "page": 1 }, { "canonicalName": "paystub.current.net_pay", "value": 1038.85, "confidence": 0.98, "page": 1 } ], "reviewResult": { "runId": "run_9202A", "definitionVersion": "1.0", "applicationVersion": "a17", "quality": { "documentTypeDetected": "employment_pay_stub", "rightDocument": "pass", "legibility": "pass", "completeness": "pass" } } } headers = { "x-api-key": "", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript 2. Extraction saved, rules about to run const url = 'https://api.fortresstech.io/v1/documents/documentId/results'; const options = { method: 'POST', headers: {'x-api-key': '', 'Content-Type': 'application/json'}, body: '{"applicationId":"9d8c7b6a-5e4f-4d3c-9b2a-1e0f9d8c7b6a","status":"EVALUATING_RULES","reasonCodes":[],"extractedFields":[{"canonicalName":"paystub.employee.full_name","value":"James R. Lopez","confidence":0.97,"page":1},{"canonicalName":"paystub.employer.name","value":"The Home Depot","confidence":0.95,"page":1},{"canonicalName":"paystub.period.end_date","value":"2026-06-02","confidence":0.93,"page":1},{"canonicalName":"paystub.period.frequency","value":"biweekly","confidence":0.9,"page":1},{"canonicalName":"paystub.current.gross_pay","value":1240,"confidence":0.98,"page":1},{"canonicalName":"paystub.current.total_deductions","value":201.15,"confidence":0.96,"page":1},{"canonicalName":"paystub.current.net_pay","value":1038.85,"confidence":0.98,"page":1}],"reviewResult":{"runId":"run_9202A","definitionVersion":"1.0","applicationVersion":"a17","quality":{"documentTypeDetected":"employment_pay_stub","rightDocument":"pass","legibility":"pass","completeness":"pass"}}}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go 2. Extraction saved, rules about to run package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.fortresstech.io/v1/documents/documentId/results" payload := strings.NewReader("{\n \"applicationId\": \"9d8c7b6a-5e4f-4d3c-9b2a-1e0f9d8c7b6a\",\n \"status\": \"EVALUATING_RULES\",\n \"reasonCodes\": [],\n \"extractedFields\": [\n {\n \"canonicalName\": \"paystub.employee.full_name\",\n \"value\": \"James R. Lopez\",\n \"confidence\": 0.97,\n \"page\": 1\n },\n {\n \"canonicalName\": \"paystub.employer.name\",\n \"value\": \"The Home Depot\",\n \"confidence\": 0.95,\n \"page\": 1\n },\n {\n \"canonicalName\": \"paystub.period.end_date\",\n \"value\": \"2026-06-02\",\n \"confidence\": 0.93,\n \"page\": 1\n },\n {\n \"canonicalName\": \"paystub.period.frequency\",\n \"value\": \"biweekly\",\n \"confidence\": 0.9,\n \"page\": 1\n },\n {\n \"canonicalName\": \"paystub.current.gross_pay\",\n \"value\": 1240,\n \"confidence\": 0.98,\n \"page\": 1\n },\n {\n \"canonicalName\": \"paystub.current.total_deductions\",\n \"value\": 201.15,\n \"confidence\": 0.96,\n \"page\": 1\n },\n {\n \"canonicalName\": \"paystub.current.net_pay\",\n \"value\": 1038.85,\n \"confidence\": 0.98,\n \"page\": 1\n }\n ],\n \"reviewResult\": {\n \"runId\": \"run_9202A\",\n \"definitionVersion\": \"1.0\",\n \"applicationVersion\": \"a17\",\n \"quality\": {\n \"documentTypeDetected\": \"employment_pay_stub\",\n \"rightDocument\": \"pass\",\n \"legibility\": \"pass\",\n \"completeness\": \"pass\"\n }\n }\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("x-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(res) fmt.Println(string(body)) } ``` ```ruby 2. Extraction saved, rules about to run require 'uri' require 'net/http' url = URI("https://api.fortresstech.io/v1/documents/documentId/results") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["x-api-key"] = '' request["Content-Type"] = 'application/json' request.body = "{\n \"applicationId\": \"9d8c7b6a-5e4f-4d3c-9b2a-1e0f9d8c7b6a\",\n \"status\": \"EVALUATING_RULES\",\n \"reasonCodes\": [],\n \"extractedFields\": [\n {\n \"canonicalName\": \"paystub.employee.full_name\",\n \"value\": \"James R. Lopez\",\n \"confidence\": 0.97,\n \"page\": 1\n },\n {\n \"canonicalName\": \"paystub.employer.name\",\n \"value\": \"The Home Depot\",\n \"confidence\": 0.95,\n \"page\": 1\n },\n {\n \"canonicalName\": \"paystub.period.end_date\",\n \"value\": \"2026-06-02\",\n \"confidence\": 0.93,\n \"page\": 1\n },\n {\n \"canonicalName\": \"paystub.period.frequency\",\n \"value\": \"biweekly\",\n \"confidence\": 0.9,\n \"page\": 1\n },\n {\n \"canonicalName\": \"paystub.current.gross_pay\",\n \"value\": 1240,\n \"confidence\": 0.98,\n \"page\": 1\n },\n {\n \"canonicalName\": \"paystub.current.total_deductions\",\n \"value\": 201.15,\n \"confidence\": 0.96,\n \"page\": 1\n },\n {\n \"canonicalName\": \"paystub.current.net_pay\",\n \"value\": 1038.85,\n \"confidence\": 0.98,\n \"page\": 1\n }\n ],\n \"reviewResult\": {\n \"runId\": \"run_9202A\",\n \"definitionVersion\": \"1.0\",\n \"applicationVersion\": \"a17\",\n \"quality\": {\n \"documentTypeDetected\": \"employment_pay_stub\",\n \"rightDocument\": \"pass\",\n \"legibility\": \"pass\",\n \"completeness\": \"pass\"\n }\n }\n}" response = http.request(request) puts response.read_body ``` ```java 2. Extraction saved, rules about to run import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.fortresstech.io/v1/documents/documentId/results") .header("x-api-key", "") .header("Content-Type", "application/json") .body("{\n \"applicationId\": \"9d8c7b6a-5e4f-4d3c-9b2a-1e0f9d8c7b6a\",\n \"status\": \"EVALUATING_RULES\",\n \"reasonCodes\": [],\n \"extractedFields\": [\n {\n \"canonicalName\": \"paystub.employee.full_name\",\n \"value\": \"James R. Lopez\",\n \"confidence\": 0.97,\n \"page\": 1\n },\n {\n \"canonicalName\": \"paystub.employer.name\",\n \"value\": \"The Home Depot\",\n \"confidence\": 0.95,\n \"page\": 1\n },\n {\n \"canonicalName\": \"paystub.period.end_date\",\n \"value\": \"2026-06-02\",\n \"confidence\": 0.93,\n \"page\": 1\n },\n {\n \"canonicalName\": \"paystub.period.frequency\",\n \"value\": \"biweekly\",\n \"confidence\": 0.9,\n \"page\": 1\n },\n {\n \"canonicalName\": \"paystub.current.gross_pay\",\n \"value\": 1240,\n \"confidence\": 0.98,\n \"page\": 1\n },\n {\n \"canonicalName\": \"paystub.current.total_deductions\",\n \"value\": 201.15,\n \"confidence\": 0.96,\n \"page\": 1\n },\n {\n \"canonicalName\": \"paystub.current.net_pay\",\n \"value\": 1038.85,\n \"confidence\": 0.98,\n \"page\": 1\n }\n ],\n \"reviewResult\": {\n \"runId\": \"run_9202A\",\n \"definitionVersion\": \"1.0\",\n \"applicationVersion\": \"a17\",\n \"quality\": {\n \"documentTypeDetected\": \"employment_pay_stub\",\n \"rightDocument\": \"pass\",\n \"legibility\": \"pass\",\n \"completeness\": \"pass\"\n }\n }\n}") .asString(); ``` ```php 2. Extraction saved, rules about to run request('POST', 'https://api.fortresstech.io/v1/documents/documentId/results', [ 'body' => '{ "applicationId": "9d8c7b6a-5e4f-4d3c-9b2a-1e0f9d8c7b6a", "status": "EVALUATING_RULES", "reasonCodes": [], "extractedFields": [ { "canonicalName": "paystub.employee.full_name", "value": "James R. Lopez", "confidence": 0.97, "page": 1 }, { "canonicalName": "paystub.employer.name", "value": "The Home Depot", "confidence": 0.95, "page": 1 }, { "canonicalName": "paystub.period.end_date", "value": "2026-06-02", "confidence": 0.93, "page": 1 }, { "canonicalName": "paystub.period.frequency", "value": "biweekly", "confidence": 0.9, "page": 1 }, { "canonicalName": "paystub.current.gross_pay", "value": 1240, "confidence": 0.98, "page": 1 }, { "canonicalName": "paystub.current.total_deductions", "value": 201.15, "confidence": 0.96, "page": 1 }, { "canonicalName": "paystub.current.net_pay", "value": 1038.85, "confidence": 0.98, "page": 1 } ], "reviewResult": { "runId": "run_9202A", "definitionVersion": "1.0", "applicationVersion": "a17", "quality": { "documentTypeDetected": "employment_pay_stub", "rightDocument": "pass", "legibility": "pass", "completeness": "pass" } } }', 'headers' => [ 'Content-Type' => 'application/json', 'x-api-key' => '', ], ]); echo $response->getBody(); ``` ```csharp 2. Extraction saved, rules about to run using RestSharp; var client = new RestClient("https://api.fortresstech.io/v1/documents/documentId/results"); var request = new RestRequest(Method.POST); request.AddHeader("x-api-key", ""); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"applicationId\": \"9d8c7b6a-5e4f-4d3c-9b2a-1e0f9d8c7b6a\",\n \"status\": \"EVALUATING_RULES\",\n \"reasonCodes\": [],\n \"extractedFields\": [\n {\n \"canonicalName\": \"paystub.employee.full_name\",\n \"value\": \"James R. Lopez\",\n \"confidence\": 0.97,\n \"page\": 1\n },\n {\n \"canonicalName\": \"paystub.employer.name\",\n \"value\": \"The Home Depot\",\n \"confidence\": 0.95,\n \"page\": 1\n },\n {\n \"canonicalName\": \"paystub.period.end_date\",\n \"value\": \"2026-06-02\",\n \"confidence\": 0.93,\n \"page\": 1\n },\n {\n \"canonicalName\": \"paystub.period.frequency\",\n \"value\": \"biweekly\",\n \"confidence\": 0.9,\n \"page\": 1\n },\n {\n \"canonicalName\": \"paystub.current.gross_pay\",\n \"value\": 1240,\n \"confidence\": 0.98,\n \"page\": 1\n },\n {\n \"canonicalName\": \"paystub.current.total_deductions\",\n \"value\": 201.15,\n \"confidence\": 0.96,\n \"page\": 1\n },\n {\n \"canonicalName\": \"paystub.current.net_pay\",\n \"value\": 1038.85,\n \"confidence\": 0.98,\n \"page\": 1\n }\n ],\n \"reviewResult\": {\n \"runId\": \"run_9202A\",\n \"definitionVersion\": \"1.0\",\n \"applicationVersion\": \"a17\",\n \"quality\": {\n \"documentTypeDetected\": \"employment_pay_stub\",\n \"rightDocument\": \"pass\",\n \"legibility\": \"pass\",\n \"completeness\": \"pass\"\n }\n }\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift 2. Extraction saved, rules about to run import Foundation let headers = [ "x-api-key": "", "Content-Type": "application/json" ] let parameters = [ "applicationId": "9d8c7b6a-5e4f-4d3c-9b2a-1e0f9d8c7b6a", "status": "EVALUATING_RULES", "reasonCodes": [], "extractedFields": [ [ "canonicalName": "paystub.employee.full_name", "value": "James R. Lopez", "confidence": 0.97, "page": 1 ], [ "canonicalName": "paystub.employer.name", "value": "The Home Depot", "confidence": 0.95, "page": 1 ], [ "canonicalName": "paystub.period.end_date", "value": "2026-06-02", "confidence": 0.93, "page": 1 ], [ "canonicalName": "paystub.period.frequency", "value": "biweekly", "confidence": 0.9, "page": 1 ], [ "canonicalName": "paystub.current.gross_pay", "value": 1240, "confidence": 0.98, "page": 1 ], [ "canonicalName": "paystub.current.total_deductions", "value": 201.15, "confidence": 0.96, "page": 1 ], [ "canonicalName": "paystub.current.net_pay", "value": 1038.85, "confidence": 0.98, "page": 1 ] ], "reviewResult": [ "runId": "run_9202A", "definitionVersion": "1.0", "applicationVersion": "a17", "quality": [ "documentTypeDetected": "employment_pay_stub", "rightDocument": "pass", "legibility": "pass", "completeness": "pass" ] ] ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.fortresstech.io/v1/documents/documentId/results")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ``` ### 3. Rules evaluated, R5 failed (document rejected, new upload needed) **Request** ```json { "applicationId": "9d8c7b6a-5e4f-4d3c-9b2a-1e0f9d8c7b6a", "status": "REJECTED", "reasonCodes": [ "R5" ], "reviewResult": { "runId": "run_9202A", "definitionVersion": "1.0", "applicationVersion": "a17", "reviewedAt": "2026-09-21T10:15:00Z", "checks": [ { "checkId": "R2", "kind": "rule", "checkType": "exact", "verdict": "PASS", "inputs": [ "paystub.current.gross_pay", "paystub.current.net_pay", "paystub.current.total_deductions" ], "observed": "1240.00 vs 1038.85 + 201.15 = 1240.00", "expected": "difference <= 1.00" }, { "checkId": "R5", "kind": "rule", "checkType": "exact", "verdict": "FLAG", "inputs": [ "paystub.period.end_date", "application.certification_effective_date" ], "observed": "2026-06-02 is 152 days before 2026-11-01", "expected": "within 120 days", "onFail": "reupload", "applicantMessage": "Please upload a recent pay stub. The one we have is more than 120 days old." }, { "checkId": "M3", "kind": "mapping", "checkType": "ai_judgement", "verdict": "PASS", "inputs": [ "paystub.employer.name", "application.income.employment.employer" ], "observed": "The Home Depot", "expected": "The Home Depot Inc.", "comment": "The Home Depot and The Home Depot Inc. are the same employer." } ], "computed": [ { "name": "annualized_gross", "value": 32240, "sourceCheck": "E1" } ] } } ``` **SDK Code** ```python 3. Rules evaluated, R5 failed (document rejected, new upload needed) import requests url = "https://api.fortresstech.io/v1/documents/documentId/results" payload = { "applicationId": "9d8c7b6a-5e4f-4d3c-9b2a-1e0f9d8c7b6a", "status": "REJECTED", "reasonCodes": ["R5"], "reviewResult": { "runId": "run_9202A", "definitionVersion": "1.0", "applicationVersion": "a17", "reviewedAt": "2026-09-21T10:15:00Z", "checks": [ { "checkId": "R2", "kind": "rule", "checkType": "exact", "verdict": "PASS", "inputs": ["paystub.current.gross_pay", "paystub.current.net_pay", "paystub.current.total_deductions"], "observed": "1240.00 vs 1038.85 + 201.15 = 1240.00", "expected": "difference <= 1.00" }, { "checkId": "R5", "kind": "rule", "checkType": "exact", "verdict": "FLAG", "inputs": ["paystub.period.end_date", "application.certification_effective_date"], "observed": "2026-06-02 is 152 days before 2026-11-01", "expected": "within 120 days", "onFail": "reupload", "applicantMessage": "Please upload a recent pay stub. The one we have is more than 120 days old." }, { "checkId": "M3", "kind": "mapping", "checkType": "ai_judgement", "verdict": "PASS", "inputs": ["paystub.employer.name", "application.income.employment.employer"], "observed": "The Home Depot", "expected": "The Home Depot Inc.", "comment": "The Home Depot and The Home Depot Inc. are the same employer." } ], "computed": [ { "name": "annualized_gross", "value": 32240, "sourceCheck": "E1" } ] } } headers = { "x-api-key": "", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript 3. Rules evaluated, R5 failed (document rejected, new upload needed) const url = 'https://api.fortresstech.io/v1/documents/documentId/results'; const options = { method: 'POST', headers: {'x-api-key': '', 'Content-Type': 'application/json'}, body: '{"applicationId":"9d8c7b6a-5e4f-4d3c-9b2a-1e0f9d8c7b6a","status":"REJECTED","reasonCodes":["R5"],"reviewResult":{"runId":"run_9202A","definitionVersion":"1.0","applicationVersion":"a17","reviewedAt":"2026-09-21T10:15:00Z","checks":[{"checkId":"R2","kind":"rule","checkType":"exact","verdict":"PASS","inputs":["paystub.current.gross_pay","paystub.current.net_pay","paystub.current.total_deductions"],"observed":"1240.00 vs 1038.85 + 201.15 = 1240.00","expected":"difference <= 1.00"},{"checkId":"R5","kind":"rule","checkType":"exact","verdict":"FLAG","inputs":["paystub.period.end_date","application.certification_effective_date"],"observed":"2026-06-02 is 152 days before 2026-11-01","expected":"within 120 days","onFail":"reupload","applicantMessage":"Please upload a recent pay stub. The one we have is more than 120 days old."},{"checkId":"M3","kind":"mapping","checkType":"ai_judgement","verdict":"PASS","inputs":["paystub.employer.name","application.income.employment.employer"],"observed":"The Home Depot","expected":"The Home Depot Inc.","comment":"The Home Depot and The Home Depot Inc. are the same employer."}],"computed":[{"name":"annualized_gross","value":32240,"sourceCheck":"E1"}]}}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go 3. Rules evaluated, R5 failed (document rejected, new upload needed) package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.fortresstech.io/v1/documents/documentId/results" payload := strings.NewReader("{\n \"applicationId\": \"9d8c7b6a-5e4f-4d3c-9b2a-1e0f9d8c7b6a\",\n \"status\": \"REJECTED\",\n \"reasonCodes\": [\n \"R5\"\n ],\n \"reviewResult\": {\n \"runId\": \"run_9202A\",\n \"definitionVersion\": \"1.0\",\n \"applicationVersion\": \"a17\",\n \"reviewedAt\": \"2026-09-21T10:15:00Z\",\n \"checks\": [\n {\n \"checkId\": \"R2\",\n \"kind\": \"rule\",\n \"checkType\": \"exact\",\n \"verdict\": \"PASS\",\n \"inputs\": [\n \"paystub.current.gross_pay\",\n \"paystub.current.net_pay\",\n \"paystub.current.total_deductions\"\n ],\n \"observed\": \"1240.00 vs 1038.85 + 201.15 = 1240.00\",\n \"expected\": \"difference <= 1.00\"\n },\n {\n \"checkId\": \"R5\",\n \"kind\": \"rule\",\n \"checkType\": \"exact\",\n \"verdict\": \"FLAG\",\n \"inputs\": [\n \"paystub.period.end_date\",\n \"application.certification_effective_date\"\n ],\n \"observed\": \"2026-06-02 is 152 days before 2026-11-01\",\n \"expected\": \"within 120 days\",\n \"onFail\": \"reupload\",\n \"applicantMessage\": \"Please upload a recent pay stub. The one we have is more than 120 days old.\"\n },\n {\n \"checkId\": \"M3\",\n \"kind\": \"mapping\",\n \"checkType\": \"ai_judgement\",\n \"verdict\": \"PASS\",\n \"inputs\": [\n \"paystub.employer.name\",\n \"application.income.employment.employer\"\n ],\n \"observed\": \"The Home Depot\",\n \"expected\": \"The Home Depot Inc.\",\n \"comment\": \"The Home Depot and The Home Depot Inc. are the same employer.\"\n }\n ],\n \"computed\": [\n {\n \"name\": \"annualized_gross\",\n \"value\": 32240,\n \"sourceCheck\": \"E1\"\n }\n ]\n }\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("x-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(res) fmt.Println(string(body)) } ``` ```ruby 3. Rules evaluated, R5 failed (document rejected, new upload needed) require 'uri' require 'net/http' url = URI("https://api.fortresstech.io/v1/documents/documentId/results") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["x-api-key"] = '' request["Content-Type"] = 'application/json' request.body = "{\n \"applicationId\": \"9d8c7b6a-5e4f-4d3c-9b2a-1e0f9d8c7b6a\",\n \"status\": \"REJECTED\",\n \"reasonCodes\": [\n \"R5\"\n ],\n \"reviewResult\": {\n \"runId\": \"run_9202A\",\n \"definitionVersion\": \"1.0\",\n \"applicationVersion\": \"a17\",\n \"reviewedAt\": \"2026-09-21T10:15:00Z\",\n \"checks\": [\n {\n \"checkId\": \"R2\",\n \"kind\": \"rule\",\n \"checkType\": \"exact\",\n \"verdict\": \"PASS\",\n \"inputs\": [\n \"paystub.current.gross_pay\",\n \"paystub.current.net_pay\",\n \"paystub.current.total_deductions\"\n ],\n \"observed\": \"1240.00 vs 1038.85 + 201.15 = 1240.00\",\n \"expected\": \"difference <= 1.00\"\n },\n {\n \"checkId\": \"R5\",\n \"kind\": \"rule\",\n \"checkType\": \"exact\",\n \"verdict\": \"FLAG\",\n \"inputs\": [\n \"paystub.period.end_date\",\n \"application.certification_effective_date\"\n ],\n \"observed\": \"2026-06-02 is 152 days before 2026-11-01\",\n \"expected\": \"within 120 days\",\n \"onFail\": \"reupload\",\n \"applicantMessage\": \"Please upload a recent pay stub. The one we have is more than 120 days old.\"\n },\n {\n \"checkId\": \"M3\",\n \"kind\": \"mapping\",\n \"checkType\": \"ai_judgement\",\n \"verdict\": \"PASS\",\n \"inputs\": [\n \"paystub.employer.name\",\n \"application.income.employment.employer\"\n ],\n \"observed\": \"The Home Depot\",\n \"expected\": \"The Home Depot Inc.\",\n \"comment\": \"The Home Depot and The Home Depot Inc. are the same employer.\"\n }\n ],\n \"computed\": [\n {\n \"name\": \"annualized_gross\",\n \"value\": 32240,\n \"sourceCheck\": \"E1\"\n }\n ]\n }\n}" response = http.request(request) puts response.read_body ``` ```java 3. Rules evaluated, R5 failed (document rejected, new upload needed) import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.fortresstech.io/v1/documents/documentId/results") .header("x-api-key", "") .header("Content-Type", "application/json") .body("{\n \"applicationId\": \"9d8c7b6a-5e4f-4d3c-9b2a-1e0f9d8c7b6a\",\n \"status\": \"REJECTED\",\n \"reasonCodes\": [\n \"R5\"\n ],\n \"reviewResult\": {\n \"runId\": \"run_9202A\",\n \"definitionVersion\": \"1.0\",\n \"applicationVersion\": \"a17\",\n \"reviewedAt\": \"2026-09-21T10:15:00Z\",\n \"checks\": [\n {\n \"checkId\": \"R2\",\n \"kind\": \"rule\",\n \"checkType\": \"exact\",\n \"verdict\": \"PASS\",\n \"inputs\": [\n \"paystub.current.gross_pay\",\n \"paystub.current.net_pay\",\n \"paystub.current.total_deductions\"\n ],\n \"observed\": \"1240.00 vs 1038.85 + 201.15 = 1240.00\",\n \"expected\": \"difference <= 1.00\"\n },\n {\n \"checkId\": \"R5\",\n \"kind\": \"rule\",\n \"checkType\": \"exact\",\n \"verdict\": \"FLAG\",\n \"inputs\": [\n \"paystub.period.end_date\",\n \"application.certification_effective_date\"\n ],\n \"observed\": \"2026-06-02 is 152 days before 2026-11-01\",\n \"expected\": \"within 120 days\",\n \"onFail\": \"reupload\",\n \"applicantMessage\": \"Please upload a recent pay stub. The one we have is more than 120 days old.\"\n },\n {\n \"checkId\": \"M3\",\n \"kind\": \"mapping\",\n \"checkType\": \"ai_judgement\",\n \"verdict\": \"PASS\",\n \"inputs\": [\n \"paystub.employer.name\",\n \"application.income.employment.employer\"\n ],\n \"observed\": \"The Home Depot\",\n \"expected\": \"The Home Depot Inc.\",\n \"comment\": \"The Home Depot and The Home Depot Inc. are the same employer.\"\n }\n ],\n \"computed\": [\n {\n \"name\": \"annualized_gross\",\n \"value\": 32240,\n \"sourceCheck\": \"E1\"\n }\n ]\n }\n}") .asString(); ``` ```php 3. Rules evaluated, R5 failed (document rejected, new upload needed) request('POST', 'https://api.fortresstech.io/v1/documents/documentId/results', [ 'body' => '{ "applicationId": "9d8c7b6a-5e4f-4d3c-9b2a-1e0f9d8c7b6a", "status": "REJECTED", "reasonCodes": [ "R5" ], "reviewResult": { "runId": "run_9202A", "definitionVersion": "1.0", "applicationVersion": "a17", "reviewedAt": "2026-09-21T10:15:00Z", "checks": [ { "checkId": "R2", "kind": "rule", "checkType": "exact", "verdict": "PASS", "inputs": [ "paystub.current.gross_pay", "paystub.current.net_pay", "paystub.current.total_deductions" ], "observed": "1240.00 vs 1038.85 + 201.15 = 1240.00", "expected": "difference <= 1.00" }, { "checkId": "R5", "kind": "rule", "checkType": "exact", "verdict": "FLAG", "inputs": [ "paystub.period.end_date", "application.certification_effective_date" ], "observed": "2026-06-02 is 152 days before 2026-11-01", "expected": "within 120 days", "onFail": "reupload", "applicantMessage": "Please upload a recent pay stub. The one we have is more than 120 days old." }, { "checkId": "M3", "kind": "mapping", "checkType": "ai_judgement", "verdict": "PASS", "inputs": [ "paystub.employer.name", "application.income.employment.employer" ], "observed": "The Home Depot", "expected": "The Home Depot Inc.", "comment": "The Home Depot and The Home Depot Inc. are the same employer." } ], "computed": [ { "name": "annualized_gross", "value": 32240, "sourceCheck": "E1" } ] } }', 'headers' => [ 'Content-Type' => 'application/json', 'x-api-key' => '', ], ]); echo $response->getBody(); ``` ```csharp 3. Rules evaluated, R5 failed (document rejected, new upload needed) using RestSharp; var client = new RestClient("https://api.fortresstech.io/v1/documents/documentId/results"); var request = new RestRequest(Method.POST); request.AddHeader("x-api-key", ""); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"applicationId\": \"9d8c7b6a-5e4f-4d3c-9b2a-1e0f9d8c7b6a\",\n \"status\": \"REJECTED\",\n \"reasonCodes\": [\n \"R5\"\n ],\n \"reviewResult\": {\n \"runId\": \"run_9202A\",\n \"definitionVersion\": \"1.0\",\n \"applicationVersion\": \"a17\",\n \"reviewedAt\": \"2026-09-21T10:15:00Z\",\n \"checks\": [\n {\n \"checkId\": \"R2\",\n \"kind\": \"rule\",\n \"checkType\": \"exact\",\n \"verdict\": \"PASS\",\n \"inputs\": [\n \"paystub.current.gross_pay\",\n \"paystub.current.net_pay\",\n \"paystub.current.total_deductions\"\n ],\n \"observed\": \"1240.00 vs 1038.85 + 201.15 = 1240.00\",\n \"expected\": \"difference <= 1.00\"\n },\n {\n \"checkId\": \"R5\",\n \"kind\": \"rule\",\n \"checkType\": \"exact\",\n \"verdict\": \"FLAG\",\n \"inputs\": [\n \"paystub.period.end_date\",\n \"application.certification_effective_date\"\n ],\n \"observed\": \"2026-06-02 is 152 days before 2026-11-01\",\n \"expected\": \"within 120 days\",\n \"onFail\": \"reupload\",\n \"applicantMessage\": \"Please upload a recent pay stub. The one we have is more than 120 days old.\"\n },\n {\n \"checkId\": \"M3\",\n \"kind\": \"mapping\",\n \"checkType\": \"ai_judgement\",\n \"verdict\": \"PASS\",\n \"inputs\": [\n \"paystub.employer.name\",\n \"application.income.employment.employer\"\n ],\n \"observed\": \"The Home Depot\",\n \"expected\": \"The Home Depot Inc.\",\n \"comment\": \"The Home Depot and The Home Depot Inc. are the same employer.\"\n }\n ],\n \"computed\": [\n {\n \"name\": \"annualized_gross\",\n \"value\": 32240,\n \"sourceCheck\": \"E1\"\n }\n ]\n }\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift 3. Rules evaluated, R5 failed (document rejected, new upload needed) import Foundation let headers = [ "x-api-key": "", "Content-Type": "application/json" ] let parameters = [ "applicationId": "9d8c7b6a-5e4f-4d3c-9b2a-1e0f9d8c7b6a", "status": "REJECTED", "reasonCodes": ["R5"], "reviewResult": [ "runId": "run_9202A", "definitionVersion": "1.0", "applicationVersion": "a17", "reviewedAt": "2026-09-21T10:15:00Z", "checks": [ [ "checkId": "R2", "kind": "rule", "checkType": "exact", "verdict": "PASS", "inputs": ["paystub.current.gross_pay", "paystub.current.net_pay", "paystub.current.total_deductions"], "observed": "1240.00 vs 1038.85 + 201.15 = 1240.00", "expected": "difference <= 1.00" ], [ "checkId": "R5", "kind": "rule", "checkType": "exact", "verdict": "FLAG", "inputs": ["paystub.period.end_date", "application.certification_effective_date"], "observed": "2026-06-02 is 152 days before 2026-11-01", "expected": "within 120 days", "onFail": "reupload", "applicantMessage": "Please upload a recent pay stub. The one we have is more than 120 days old." ], [ "checkId": "M3", "kind": "mapping", "checkType": "ai_judgement", "verdict": "PASS", "inputs": ["paystub.employer.name", "application.income.employment.employer"], "observed": "The Home Depot", "expected": "The Home Depot Inc.", "comment": "The Home Depot and The Home Depot Inc. are the same employer." ] ], "computed": [ [ "name": "annualized_gross", "value": 32240, "sourceCheck": "E1" ] ] ] ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.fortresstech.io/v1/documents/documentId/results")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ``` ### Outcome without data - no approved definition, handed to compliance **Request** ```json { "applicationId": "9d8c7b6a-5e4f-4d3c-9b2a-1e0f9d8c7b6a", "status": "WAITING_FOR_COMPLIANCE", "reasonCodes": [ "NO_DEFINITION" ] } ``` **SDK Code** ```python Outcome without data - no approved definition, handed to compliance import requests url = "https://api.fortresstech.io/v1/documents/documentId/results" payload = { "applicationId": "9d8c7b6a-5e4f-4d3c-9b2a-1e0f9d8c7b6a", "status": "WAITING_FOR_COMPLIANCE", "reasonCodes": ["NO_DEFINITION"] } headers = { "x-api-key": "", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript Outcome without data - no approved definition, handed to compliance const url = 'https://api.fortresstech.io/v1/documents/documentId/results'; const options = { method: 'POST', headers: {'x-api-key': '', 'Content-Type': 'application/json'}, body: '{"applicationId":"9d8c7b6a-5e4f-4d3c-9b2a-1e0f9d8c7b6a","status":"WAITING_FOR_COMPLIANCE","reasonCodes":["NO_DEFINITION"]}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go Outcome without data - no approved definition, handed to compliance package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.fortresstech.io/v1/documents/documentId/results" payload := strings.NewReader("{\n \"applicationId\": \"9d8c7b6a-5e4f-4d3c-9b2a-1e0f9d8c7b6a\",\n \"status\": \"WAITING_FOR_COMPLIANCE\",\n \"reasonCodes\": [\n \"NO_DEFINITION\"\n ]\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("x-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(res) fmt.Println(string(body)) } ``` ```ruby Outcome without data - no approved definition, handed to compliance require 'uri' require 'net/http' url = URI("https://api.fortresstech.io/v1/documents/documentId/results") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["x-api-key"] = '' request["Content-Type"] = 'application/json' request.body = "{\n \"applicationId\": \"9d8c7b6a-5e4f-4d3c-9b2a-1e0f9d8c7b6a\",\n \"status\": \"WAITING_FOR_COMPLIANCE\",\n \"reasonCodes\": [\n \"NO_DEFINITION\"\n ]\n}" response = http.request(request) puts response.read_body ``` ```java Outcome without data - no approved definition, handed to compliance import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.fortresstech.io/v1/documents/documentId/results") .header("x-api-key", "") .header("Content-Type", "application/json") .body("{\n \"applicationId\": \"9d8c7b6a-5e4f-4d3c-9b2a-1e0f9d8c7b6a\",\n \"status\": \"WAITING_FOR_COMPLIANCE\",\n \"reasonCodes\": [\n \"NO_DEFINITION\"\n ]\n}") .asString(); ``` ```php Outcome without data - no approved definition, handed to compliance request('POST', 'https://api.fortresstech.io/v1/documents/documentId/results', [ 'body' => '{ "applicationId": "9d8c7b6a-5e4f-4d3c-9b2a-1e0f9d8c7b6a", "status": "WAITING_FOR_COMPLIANCE", "reasonCodes": [ "NO_DEFINITION" ] }', 'headers' => [ 'Content-Type' => 'application/json', 'x-api-key' => '', ], ]); echo $response->getBody(); ``` ```csharp Outcome without data - no approved definition, handed to compliance using RestSharp; var client = new RestClient("https://api.fortresstech.io/v1/documents/documentId/results"); var request = new RestRequest(Method.POST); request.AddHeader("x-api-key", ""); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"applicationId\": \"9d8c7b6a-5e4f-4d3c-9b2a-1e0f9d8c7b6a\",\n \"status\": \"WAITING_FOR_COMPLIANCE\",\n \"reasonCodes\": [\n \"NO_DEFINITION\"\n ]\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift Outcome without data - no approved definition, handed to compliance import Foundation let headers = [ "x-api-key": "", "Content-Type": "application/json" ] let parameters = [ "applicationId": "9d8c7b6a-5e4f-4d3c-9b2a-1e0f9d8c7b6a", "status": "WAITING_FOR_COMPLIANCE", "reasonCodes": ["NO_DEFINITION"] ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.fortresstech.io/v1/documents/documentId/results")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```