<!-- https://staircase.co/products/contract/document -->
# Document

# Document

Document generation, classification and closing-package assembly, plus the ingestion half of the document pipeline.

Two directions. Outbound, it generates documents from the canonical model — disclosures, letters and the closing package — so the document and the loan record cannot disagree. Inbound, it classifies an uploaded document, extracts its fields, and writes them back into the model.

Extraction quality is measured rather than assumed. The scorecard is a separate product, Document under Validation, which carries per-vendor accuracy and cost.

## How it works

Classification comes before extraction and is treated as its own step. A document routed to the wrong extractor produces confident wrong fields, which is worse than an unprocessed upload, so the classifier's output is a first-class result with its own confidence rather than an internal detail.

Field mappings are declared per document type against the canonical model. The recorded mappings cover the standard loan application and its coborrower variant, tax returns and their schedules, wage statements, the loan estimate, closing data, housing expenses and the preapproval letter.

## Dual listing

Document is filed under two categories. The other listing is Document under Validation
<!--source:api-specifications-->
, and the recorded specifications resolve there — its 17 operations render on that page.
<!--/source-->

## Operations

<!--source:api-specifications-->

### Platform
<!--/source-->

`POST` `/combine-results`

<!--source:api-specifications-->

#### Combine Collections Data
<!--/source-->

`post-data-extraction-combine`

<!--source:api-specifications-->
Combines data from multiple collections

<!--/source-->

##### Request

<!--source:api-specifications-->
application/jsonapplication/json
<!--/source-->

<!--source:api-specifications-->
application/json Copy
```
{
 "transaction_id": "01EZY81SYVQ98YYG0KMM462NKZ",
 "collection_ids": [
 "01EZY9J8SEFM2JKDJ1Q3YX65HS",
 "01EZY9J8SEFM2JKDJ1Q3YX65HS"
 ]
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy
```
{
 "transaction_id": "",
 "collection_ids": []
}
```

<!--/source-->

##### Response

<!--source:api-specifications-->
application/json Copy Successfully created collection with combined results.

```
{
 "collection_id": "01EZY9J8SEFM2JKDJ1Q3YX65HS"
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
1
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->Environment API Key.<!--/source--> |

##### Request body`application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `transaction_id`required | `string` | <!--source:api-specifications-->Transaction ID<!--/source--> |
| `collection_ids`required | `string[]` | <!--source:api-specifications-->List of collection IDs<!--/source--> |

##### Response `201``application/json`

<!--source:api-specifications-->
4 fields
<!--/source-->
<!--source:api-specifications-->
Successfully created collection with combined results.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `transaction_id` | `string` | <!--source:api-specifications-->Transaction ID<!--/source--> |
| `collection_id` | `string` | <!--source:api-specifications-->Collection ID<!--/source--> |
| `data` | `object` | <!--source:api-specifications-->Data object<!--/source--> |
| `metadata` | `object` | <!--source:api-specifications-->Metadata object<!--/source--> |

##### Other responses

`400``404`

`POST` `/coverage`

<!--source:api-specifications-->

#### Find Path in IDE Languages
<!--/source-->

`post-data-extraction-coverage`

<!--source:api-specifications-->
Find Path in IDE Languages finds flatten V2 path in product languages.

<!--/source-->

##### Request

<!--source:api-specifications-->
application/jsonapplication/json
<!--/source-->

<!--source:api-specifications-->
application/json Copy
```
{
 "path": "$.people[1].has_first_name.has_value"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy
```
{
 "path": ""
}
```

<!--/source-->

##### Response

<!--source:api-specifications-->
application/json Copy Success

```
[
 {
 "Document Type": "appraisal_report",
 "IDE Schema Path": "$.document.extracted_data.Property_Address_Zip.value",
 "Partner Paths": [
 {
 "partner": "ocrolus",
 "path": "$.extractedData[0].fieldList[?(@.name == 'Property_Address_Zip')].data"
 }
 ]
 }
]
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
1
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->Environment API Key.<!--/source--> |

##### Request body`application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `path`required | `string` | <!--source:api-specifications-->Flatten V2 path<!--/source--> |

##### Other responses

`200``400``404`

`GET` `/stats`

<!--source:api-specifications-->

#### Retrieve Statistics
<!--/source-->

`get-adr-stats`

<!--source:api-specifications-->
Retrieve Statistics retrieves partner stats for document classification.

<!--/source-->

##### Response

<!--source:api-specifications-->
application/json Copy Success

```
{
 "stats": [
 {
 "document_type": "uniform_residential_loan_application",
 "partners": [
 {
 "partner": "documentai",
 "historical_precision": 91.8
 },
 {
 "partner": "ocrolus",
 "historical_precision": null
 },
 {
 "partner": "ephesoft",
 "historical_precision": null
 }
 ]
 }
 ]
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
1
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->Environment API Key.<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Success
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `stats` | `object[]` | <!--source:api-specifications-->Partner stats<!--/source--> |
| `document_type` | `string` | <!--source:api-specifications-->Type of document<!--/source--> |
| `partners` | `object[]` | <!--source:api-specifications-->List of partners<!--/source--> |
| `partner` | `string` | <!--source:api-specifications-->Name of the partner<!--/source--> |
| `historical_precision` | `number` | <!--source:api-specifications-->Precision from historical data<!--/source--> |

`GET` `/document-types`

<!--source:api-specifications-->

#### Retrieve Document Types
<!--/source-->

`get-ide-doctypes`

<!--source:api-specifications-->
Retrieve Doctypes retrieves the list of available document types for data extraction. Partner documentai supports only bank_statements documents that contain data just for one period.

<!--/source-->

##### Response

<!--source:api-specifications-->
application/json Copy Success

```
[
 {
 "document_type": "irs_w2",
 "supported_partners": [
 "documentai",
 "ocrolus"
 ]
 },
 {
 "document_type": "irs_1040",
 "supported_partners": [
 "ocrolus"
 ]
 }
]
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
1
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->Environment API Key.<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Success
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `document_type`required | `string` | — |
| `supported_partners`required | `string[]` | — |

##### Other responses

`400``403`

`GET` `/extracted-fields/{document_type}`

<!--source:api-specifications-->

#### Retrieve Extracted Fields
<!--/source-->

`get-ide-extracted-fields`

<!--source:api-specifications-->
Retrieve Extracted Fields retrieves the list of extracted fields for given document type

<!--/source-->

##### Response

<!--source:api-specifications-->
application/json Copy Success

```
{
 "document_type": "irs_w2",
 "field_names": [
 "year",
 "wages_tips_other_compensation",
 "verification_code",
 "third_party_sick_pay",
 "statutory_employee",
 "state_wages_tips_other_comp_secondary",
 "state_wages_tips_other_comp_primary",
 "state_income_tax_secondary",
 "state_income_tax_primary",
 "social_security_wages",
 "social_security_tips",
 "social_security_tax_withheld",
 "social_security_number",
 "retirement_plan",
 "nonqualified_plans",
 "medicare_wages_and_tips",
 "medicare_tax_withheld",
 "locality_name_primary",
 "locality_name_secondary",
 "local_wages_tips_other_comp_secondary",
 "local_wages_tips_other_comp_primary",
 "local_income_tax_secondary",
 "local_income_tax_primary",
 "federal_income_tax_withheld",
 "employer_name",
 "employer_id",
 "employer_full_address",
 "employer_address_zip",
 "employer_address_state",
 "employer_address_line2",
 "employer_address_line1",
 "employer_address_city",
 "employee_last_name",
 "employee_full_name",
 "employee_full_address",
 "employee_first_name_and_initial",
 "employee_address_zip",
 "employee_address_state",
 "employee_address_line2",
 "employee_address_line1",
 "employee_address_city",
 "dependent_care_benefits",
 "control_number",
 "box_15_state_secondary",
 "box_15_state_primary",
 "box_15_employer_state_id_secondary",
 "box_15_employer_state_id_primary",
 "box_14_other",
 "box_12d_code",
 "box_12d_amount",
 "box_12c_code",
 "box_12c_amount",
 "box_12b_code",
 "box_12b_amount",
 "box_12a_code",
 "box_12a_amount",
 "allocated_tips"
 ]
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
2
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->Environment API Key.<!--/source--> |
| `document_type` required | `string` path | `irs_w2` | <!--source:api-specifications-->Document Type<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Success
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `document_type` | `string` | <!--source:api-specifications-->Document type<!--/source--> |
| `field_names` | `string[]` | <!--source:api-specifications-->List of field names<!--/source--> |

##### Other responses

`400``403`

`GET` `/partners`

<!--source:api-specifications-->

#### Retrieve Partners
<!--/source-->

`get-ide-partners`

<!--source:api-specifications-->
Retrieve Partners retrieves the list of available data partners for data extraction.

<!--/source-->

##### Response

<!--source:api-specifications-->
application/json Copy Success

```
{
 "partners": [
 {
 "company_name": "Ocrolus",
 "invoke_name": "ocrolus",
 "status": "preview",
 "description": "https://www.ocrolus.com/"
 },
 {
 "company_name": "Google",
 "invoke_name": "documentai",
 "status": "preview",
 "description": "https://cloud.google.com/document-ai"
 }
 ]
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
1
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->Environment API Key.<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Success
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `partners` | `object[]` | <!--source:api-specifications-->Partner details<!--/source--> |

##### Other responses

`400``403`

`GET` `/partners/costs`

<!--source:api-specifications-->

#### Retrieve Partners costs
<!--/source-->

`get-ide-partners-costs`

<!--source:api-specifications-->
Retrieve Partners costs retrieves the list of data partners costs for data extraction.

<!--/source-->

##### Response

<!--source:api-specifications-->
application/json Copy Success

```
{
 "costs": [
 {
 "partner_name": "ocrolus",
 "costs_details": [
 {
 "cost_type": "per_execution",
 "document_type": null,
 "priority": 1,
 "description": null,
 "conditional": {
 "hypotesis": "number_of_pages > 25",
 "conclusion": "2500 + ((number_of_pages // 50) * 1000)"
 },
 "cost_in_cents": null
 },
 {
 "cost_type": "per_document",
 "document_type": null,
 "priority": null,
 "description": null,
 "conditional": null,
 "cost_in_cents": 200
 }
 ]
 }
 ]
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
3
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->Environment API Key.<!--/source--> |
| `document_type` | `string` query | `irs_w2` | <!--source:api-specifications-->Filters data by document_type<!--/source--> |
| `partner_name` | `string` query | `ocrolus` | <!--source:api-specifications-->Filters data by partner<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Success
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `costs` | `object[]` | <!--source:api-specifications-->Partner costs details<!--/source--> |
| `partner_name` | `string` | <!--source:api-specifications-->Name of the partner<!--/source--> |
| `costs_details` | `object[]` | <!--source:api-specifications-->List of partner costs<!--/source--> |
| `cost_type` | `string` | <!--source:api-specifications-->Type of the cost<!--/source--> |
| `document_type` | `string` | <!--source:api-specifications-->Document type<!--/source--> |
| `priority` | `number` | <!--source:api-specifications-->Priority<!--/source--> |
| `description` | `string` | <!--source:api-specifications-->Description of the cost<!--/source--> |
| `conditional` | `object` | <!--source:api-specifications-->Conditional for cost calculation<!--/source--> |
| `cost_in_cents` | `number` | <!--source:api-specifications-->Partner costs in cents<!--/source--> |

##### Other responses

`400``403`

`GET` `/transactions/{transaction_id}/collections`

<!--source:api-specifications-->

#### Retrieve Transaction Collections
<!--/source-->

`get-adr-transactions-collections`

<!--source:api-specifications-->
Retrieve Transaction Collections retrieves a list of all collections associated with a transaction.

<!--/source-->

##### Response

<!--source:api-specifications-->
400404
<!--/source-->

<!--source:api-specifications-->
application/json Copy Request data failed validation

```
{
 "message": "{'data': ['Missing data for required field.']}"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Requested resource not found

```
{
 "message": "Collection not found"
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
6
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `transaction_id` required | `string (ulid)` path | `01FJCADX5QEXEDVRWNXAK206MA` | <!--source:api-specifications-->Transaction ID<!--/source--> |
| `filter` | `string` query | `collection_id+in+01EZQ32PJQGKRA6HR8D72Q9FFF,01EZQ32NZ34WACWSAF54WGEM51` | <!--source:api-specifications-->Filter expression in format {field_name}+{operation}+{value}<!--/source--> |
| `sort` | `string` query | `asc` | <!--source:api-specifications-->Order of sorting<!--/source--> |
| `limit` | `number` query | `5` | <!--source:api-specifications-->Amount of items to show<!--/source--> |
| `after_id` | `string` query | `01EZQ32PJQGKRA6HR8D72Q9FFF` | <!--source:api-specifications-->id of last evaluated transaction<!--/source--> |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->Environment API Key.<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
4 fields
<!--/source-->
<!--source:api-specifications-->
200 response
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `transaction_id` | `string (ulid)` | <!--source:api-specifications-->Transaction id<!--/source-->Example `01EZQ32PJQGKRA6HR8D72Q9FFF` |
| `collection_id` | `string (ulid)` | <!--source:api-specifications-->Collection id<!--/source-->Example `01EZQ32PJQGKRA6HR8D72Q9FFF` |
| `data` | `object` | <!--source:api-specifications-->Data in Staircase language schema<!--/source--> |
| `metadata` | `object` | <!--source:api-specifications-->Metadata about collection, f.e version of used Staircase schema<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Request data failed validation
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `one of` | <!--source:api-specifications-->Message<!--/source--> |

##### Response `404``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Requested resource not found
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Message<!--/source--> |

`GET` `/response-elements`

<!--source:api-specifications-->

#### Retrieve Response Elements
<!--/source-->

`get-ide-response-elements`

<!--source:api-specifications-->
Retrieve Response Elements retrieves the list of elements that will be returned by a partner performing data extraction.

<!--/source-->

##### Response

<!--source:api-specifications-->
200 Example v0200 Example v2
<!--/source-->

<!--source:api-specifications-->
application/json Copy Success

```
{
 "$.document.document_type": null,
 "$.document.extracted_data.employee_address": null,
 "$.document.extracted_data.employee_name": null,
 "$.document.extracted_data.employer_address": null,
 "$.document.extracted_data.employer_name": null,
 "$.document.extracted_data.federal_income_tax_witheld": null,
 "$.document.extracted_data.medicare_tax_witheld": null,
 "$.document.extracted_data.medicare_wages_and_tips": null,
 "$.document.extracted_data.social_security_tax_witheld": null,
 "$.document.extracted_data.social_security_wages": null,
 "$.document.extracted_data.tax_year": null,
 "$.document.extracted_data.wages_tips_and_other_compensation": null
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Success

```
{
 "$.documents.@type": null,
 "$.documents.extracted_data.employee_address": null,
 "$.people[0].has_first_name.has_value": null,
 "$.people[0].has_last_name.has_value": null,
 "$.addresses[0].has_address_line_1_text.has_value": null,
 "$.addresses[0].has_city_name.has_value": null,
 "$.addresses[0].has_state_code.has_value": null
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
1
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->Environment API Key.<!--/source--> |

##### Other responses

`200``400``403`

`POST` `/separate_document_blobs/{transaction_id}/{collection_id}`

<!--source:api-specifications-->

#### Separate documents blob
<!--/source-->

`get-adr-blob-splitter`

<!--source:api-specifications-->
Creates a new collection which will contain new blob_id for each document in collection
<!--/source-->

<!--source:api-specifications-->
Separate document blobs creates new collection that contains new blob_id for each document in collection. Completion of the request must be check in the response collection `metadata.status`. Possible values are: WAITING_FOR_RESPONSE, COMPLETED or ERROR. Newly created blobs will contain respective pages as defined by the classification result.

<!--/source-->

##### Request

<!--source:api-specifications-->
application/json Copy
```
{
 "callback_url": "https://webhook.site/b3506b5c-8ed2-4d58-a386-04a402aba1d6"
}
```

<!--/source-->

##### Response

<!--source:api-specifications-->
200 Example - v0200 Example - v2
<!--/source-->

<!--source:api-specifications-->
application/json Copy Success

```
{
 "collection_id": "01EZY95SC1K85WTA3J66R81WCV",
 "data": {
 "document_sets": {
 "document_set": [
 {
 "documents": {
 "document": [
 {
 "document_classification": null,
 "document_classes": {
 "document_class": [
 {
 "type": "irs_w2"
 }
 ]
 },
 "content": {
 "foreign_object": {
 "reference": {
 "location_label_value": "01FNBCR3YWX4A203A6R4NXN0J9"
 }
 }
 }
 },
 {
 "document_classification": null,
 "document_classes": {
 "document_class": [
 {
 "type": "irs_closing_disclosure"
 }
 ]
 },
 "content": {
 "foreign_object": {
 "reference": {
 "location_label_value": "01FNBCQCCAPBR8RPGRP5M5E0YA"
 }
 }
 }
 }
 ]
 }
 }
 ]
 }
 },
 "metadata": {},
 "transaction_id": "01EZY81SYVQ98YYG0KMM462NKZ"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Success

```
{
 "collection_id": "01EZY95SC1K85WTA3J66R81WCV",
 "data": {
 "documents": [
 {
 "@id": "01FNBDWKSRSK23E3ZMQN5NJECT",
 "@type": "irs_w2",
 "has_staircase_blob_identifier": {
 "has_value": "01FNBCR3YWX4A203A6R4NXN0J9"
 },
 "has_page_number_first": {
 "has_value": 1
 },
 "has_page_number_last": {
 "has_value": 1
 }
 },
 {
 "@id": "01FNBCREQW52H4R0QHBB1FKERP",
 "@type": "closing_disclosure",
 "has_staircase_blob_identifier": {
 "has_value": "01FNBCQCCAPBR8RPGRP5M5E0YA"
 },
 "has_page_number_first": {
 "has_value": 1
 },
 "has_page_number_last": {
 "has_value": 1
 }
 }
 ]
 },
 "metadata": {},
 "transaction_id": "01EZY81SYVQ98YYG0KMM462NKZ"
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
3
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `transaction_id` required | `string` path | `01EZY81SYVQ98YYG0KMM462NKZ` | <!--source:api-specifications-->Transaction ID<!--/source--> |
| `collection_id` required | `string` path | `01EZY94X63AXWZ14TT8R1MAS3S` | <!--source:api-specifications-->Collection ID<!--/source--> |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->Environment API Key.<!--/source--> |

##### Request body`application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `callback_url` | `string` | <!--source:api-specifications-->Callback url<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
4 fields
<!--/source-->
<!--source:api-specifications-->
Success
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `transaction_id` | `string` | <!--source:api-specifications-->Transaction ID<!--/source--> |
| `collection_id` | `string` | <!--source:api-specifications-->Collection ID<!--/source--> |
| `data` | `object` | <!--source:api-specifications-->Data object<!--/source--> |
| `metadata` | `object` | <!--source:api-specifications-->Metadata object<!--/source--> |
| `status` | `string` | <!--source:api-specifications-->Status description, either COMPLETED or WAITING_FOR_RESPONSE<!--/source--> |

##### Other responses

`400``403`

`POST` `/request-elements/complete`

<!--source:api-specifications-->

#### Validate Collection
<!--/source-->

`post-data-extraction-complete`

<!--source:api-specifications-->
Validate Collection verifies that a collection contains all the elements needed to invoke a partner for data extraction.

<!--/source-->

##### Request

<!--source:api-specifications-->
Example v0Example v2
<!--/source-->

<!--source:api-specifications-->
application/json Copy
```
{
 "data": {
 "document_sets": {
 "document_set": [
 {
 "documents": {
 "document": [
 {
 "document_classification": {
 "document_classes": {
 "document_class": [
 {
 "type": "bank_statement"
 }
 ]
 }
 },
 "content": {
 "foreign_object": {
 "reference": {
 "location_label_value": "01EZY94X63AXWZ14TT8R1MAS3S"
 }
 }
 }
 }
 ]
 }
 }
 ]
 }
 }
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy
```
{
 "data": {
 "documents": [
 {
 "@type": "document_type",
 "has_staircase_blob_identifier": {
 "has_value": "blob_id"
 }
 }
 ]
 }
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
1
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->Environment API Key.<!--/source--> |

##### Request body`application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `data`required | `object` | <!--source:api-specifications-->Validate collection request body<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Collection is valid.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Message<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Missing elements
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Error message<!--/source--> |
| `errors` | `object` | <!--source:api-specifications-->List of elements that are missing<!--/source--> |

##### Other responses

`403`

`GET` `/costs/list`

<!--source:api-specifications-->

#### Get costs list
<!--/source-->

`get-ide-costs-list`

<!--source:api-specifications-->
Gets list of costs
<!--/source-->

<!--source:api-specifications-->
Gets list of costs retrieves the list of costs for every successful product invocation

<!--/source-->

##### Response

<!--source:api-specifications-->
application/json Copy Success

```
{
 "costs": [
 {
 "transaction_id": "01FKETNWHN67T9ZS2PD4QT4MW9",
 "request_collection_id": "01FKETPHVKGZF7JSZB73MJZ424",
 "response_collection_id": "01FKETPT6G09ERSG7WTQYVVRTA",
 "partner_name": "documentai",
 "finished_at": "2021-11-01 19:20:29.312",
 "document_type": "irs_w2",
 "pages": "1",
 "cost_in_cents": "25"
 }
 ]
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
4
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->Environment API Key.<!--/source--> |
| `start_date` | `string` query | `2021-12-30` | <!--source:api-specifications-->If provided, filters by start_date it must be used together with the end_date. Date must be in ISO8601 format: YYYY-MM-DD, if not provided then period parameter must be set<!--/source--> |
| `end_date` | `string` query | `2021-12-30` | <!--source:api-specifications-->If provided, filters by end_date it must be used together with the start_date. Date must be in ISO8601 format: YYYY-MM-DD<!--/source--> |
| `period` | `string` query | `1m` | <!--source:api-specifications-->If used must be sent using d for days, w for weeks and m for months, the number always goes first e.g. 3w<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Success
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `costs`required | `object[]` | <!--source:api-specifications-->Cost details<!--/source--> |
| `transaction_id`required | `string` | <!--source:api-specifications-->Transaction id<!--/source--> |
| `request_collection_id`required | `string` | <!--source:api-specifications-->Request collection id<!--/source--> |
| `response_collection_id`required | `string` | <!--source:api-specifications-->Response collection id<!--/source--> |
| `partner_name`required | `string` | <!--source:api-specifications-->Name of the partner<!--/source--> |
| `finished_at`required | `string` | <!--source:api-specifications-->Finish date of the execution<!--/source--> |
| `document_type`required | `string` | <!--source:api-specifications-->Document type used for data extraction<!--/source--> |
| `pages`required | `string` | <!--source:api-specifications-->Number of pages for provided PDF<!--/source--> |
| `cost_in_cents`required | `string` | <!--source:api-specifications-->Cost in cents for data extraction invocation<!--/source--> |

##### Other responses

`400``403`

`GET` `/costs/partner-cost`

<!--source:api-specifications-->

#### Get parner costs
<!--/source-->

`get-ide-partner-costs`

<!--source:api-specifications-->
Gets partner costs
<!--/source-->

<!--source:api-specifications-->
Gets partner costs retrieves list of partner costs for every product invocation

<!--/source-->

##### Response

<!--source:api-specifications-->
application/json Copy Success

```
{
 "costs": [
 {
 "partner_name": "ocrolus",
 "total_cost_in_cents": 225,
 "number_of_invocations": 9
 }
 ]
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
4
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->Environment API Key.<!--/source--> |
| `start_date` | `string` query | `2021-12-30` | <!--source:api-specifications-->If provided, filters by start_date it must be used together with the end_date. Date must be in ISO8601 format: YYYY-MM-DD, if not provided then period parameter must be set<!--/source--> |
| `end_date` | `string` query | `2021-12-30` | <!--source:api-specifications-->If provided, filters by end_date it must be used together with the start_date. Date must be in ISO8601 format: YYYY-MM-DD<!--/source--> |
| `period` | `string` query | `1m` | <!--source:api-specifications-->If used must be sent using d for days, w for weeks and m for months, the number always goes first e.g. 3w<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Success
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `costs`required | `object[]` | <!--source:api-specifications-->Cost details<!--/source--> |
| `partner_name`required | `string` | <!--source:api-specifications-->Partner name<!--/source--> |
| `total_cost_in_cents`required | `number` | <!--source:api-specifications-->Costs in cents<!--/source--> |
| `number_of_invocations`required | `number` | <!--source:api-specifications-->Number of invocations<!--/source--> |

##### Other responses

`400``403`

`GET` `/extraction-statistics/{transaction_id}/{collection_id}`

<!--source:api-specifications-->

#### Get extractions statistics by collection
<!--/source-->

`get-extraction-statistics-transaction-collection`

<!--source:api-specifications-->
Gets extraction statistics for provided response collection
<!--/source-->

<!--source:api-specifications-->
Gets extraction statistics by collection retrieves extraction statistics for provided response collection

<!--/source-->

##### Response

<!--source:api-specifications-->
application/json Copy Success

```
{
 "statistics": [
 {
 "transaction_id": "01FYPECS78YBA6BEAFZKB7SA3C",
 "request_collection_id": "01FYPECSR1XCG7HXYKDH3E0S1S",
 "response_collection_id": "01FYPWX9XJJKZ8WA0VQQ90J363",
 "document_type": "irs_w2",
 "partner": "ocrolus",
 "expected_fields_count": 2,
 "translated_fields_count": 3,
 "translated_fields": [
 "$.income[0].has_wages_salaries_tips_and_other_compensation_amount.has_value",
 "$.income[0].has_state_1_income_amount.has_value",
 "$.income[0].has_state_1_tax_withheld_amount.has_value"
 ]
 }
 ]
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
3
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->Environment API Key.<!--/source--> |
| `transaction_id` required | `string` path | `01EZY95SC1K85WTA3J66R81WCV` | <!--source:api-specifications-->Transaction ID<!--/source--> |
| `collection_id` required | `string` path | `01FYPWX9XJJKZ8WA0VQQ90J363` | <!--source:api-specifications-->Response collection ID<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Success
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `total_number_of_extractions` | `number` | <!--source:api-specifications-->Total number of extractions<!--/source--> |
| `statistics` | `object[]` | <!--source:api-specifications-->Statistics details<!--/source--> |
| `transaction_id`required | `string` | <!--source:api-specifications-->Transaction id<!--/source--> |
| `request_collection_id`required | `string` | <!--source:api-specifications-->Request collection id<!--/source--> |
| `response_collection_id`required | `string` | <!--source:api-specifications-->Response collection id<!--/source--> |
| `document_type`required | `string` | <!--source:api-specifications-->Extracted document type<!--/source--> |
| `partner`required | `string` | <!--source:api-specifications-->Name of partner used for extraction<!--/source--> |
| `expected_fields_count`required | `number` | <!--source:api-specifications-->Number of expected fields<!--/source--> |
| `translated_fields_count`required | `number` | <!--source:api-specifications-->Number of translated fields<!--/source--> |
| `translated_fields`required | `array` | <!--source:api-specifications-->List of translated fields<!--/source--> |

##### Other responses

`400``403`

`GET` `/extraction-statistics/document-type`

<!--source:api-specifications-->

#### Get extraction statistics for all document types
<!--/source-->

`get-extraction-statistics-document-types`

<!--source:api-specifications-->
Gets extraction statistics for all document types
<!--/source-->

<!--source:api-specifications-->
Gets extraction statistics for all document types

<!--/source-->

##### Response

<!--source:api-specifications-->
application/json Copy Success

```
{
 "statistics": [
 {
 "document_type": "irs_w2",
 "average_expected_fields": 2,
 "average_translated_fields": 3,
 "executions_count": 5
 }
 ]
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
5
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->Environment API Key.<!--/source--> |
| `document_type` | `string` query | `irs_w2` | <!--source:api-specifications-->Filters results by document type<!--/source--> |
| `start_date` | `string` query | `2021-12-30` | <!--source:api-specifications-->If provided, filters by start_date it must be used together with the end_date. Date must be in ISO8601 format: YYYY-MM-DD, if not provided and period parameter is also not provided it will retrieve data for past 30 days.<!--/source--> |
| `end_date` | `string` query | `2021-12-30` | <!--source:api-specifications-->If provided, filters by end_date it must be used together with the start_date. Date must be in ISO8601 format: YYYY-MM-DD<!--/source--> |
| `period` | `string` query | `1m` | <!--source:api-specifications-->If used must be sent using d for days, w for weeks and m for months, the number always goes first e.g. 3w. If not provided and start_date is also not provided it will retrieve data for past 30 days.<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Success
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `statistics`required | `object[]` | <!--source:api-specifications-->Statistics details<!--/source--> |
| `document_type`required | `string` | <!--source:api-specifications-->Document type<!--/source--> |
| `average_expected_fields`required | `number` | <!--source:api-specifications-->Request collection id<!--/source--> |
| `average_translated_fields`required | `number` | <!--source:api-specifications-->Response collection id<!--/source--> |
| `executions_count`required | `number` | <!--source:api-specifications-->Number of extraction executions<!--/source--> |

##### Other responses

`400``403`

`GET` `/extraction-statistics/document-type/{transaction_id}`

<!--source:api-specifications-->

#### Get extractions statistics by transaction
<!--/source-->

`get-extraction-statistics-transaction`

<!--source:api-specifications-->
Gets extraction statistics by transaction_id
<!--/source-->

<!--source:api-specifications-->
Gets extraction statistics retrieves extraction statistics for provided transaction

<!--/source-->

##### Response

<!--source:api-specifications-->
application/json Copy Success

```
{
 "statistics": [
 {
 "transaction_id": "01FYPECS78YBA6BEAFZKB7SA3C",
 "request_collection_id": "01FYPECSR1XCG7HXYKDH3E0S1S",
 "response_collection_id": "01FYPWX9XJJKZ8WA0VQQ90J363",
 "document_type": "irs_w2",
 "partner": "ocrolus",
 "expected_fields_count": 2,
 "translated_fields_count": 3,
 "translated_fields": [
 "$.income[0].has_wages_salaries_tips_and_other_compensation_amount.has_value",
 "$.income[0].has_state_1_income_amount.has_value",
 "$.income[0].has_state_1_tax_withheld_amount.has_value"
 ]
 }
 ]
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
2
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->Environment API Key.<!--/source--> |
| `transaction_id` required | `string` path | `01EZY95SC1K85WTA3J66R81WCV` | <!--source:api-specifications-->Transaction ID<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Success
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `total_number_of_extractions` | `number` | <!--source:api-specifications-->Total number of extractions<!--/source--> |
| `statistics` | `object[]` | <!--source:api-specifications-->Statistics details<!--/source--> |
| `transaction_id`required | `string` | <!--source:api-specifications-->Transaction id<!--/source--> |
| `request_collection_id`required | `string` | <!--source:api-specifications-->Request collection id<!--/source--> |
| `response_collection_id`required | `string` | <!--source:api-specifications-->Response collection id<!--/source--> |
| `document_type`required | `string` | <!--source:api-specifications-->Extracted document type<!--/source--> |
| `partner`required | `string` | <!--source:api-specifications-->Name of partner used for extraction<!--/source--> |
| `expected_fields_count`required | `number` | <!--source:api-specifications-->Number of expected fields<!--/source--> |
| `translated_fields_count`required | `number` | <!--source:api-specifications-->Number of translated fields<!--/source--> |
| `translated_fields`required | `array` | <!--source:api-specifications-->List of translated fields<!--/source--> |

##### Other responses

`400``403`

<!--source:api-specifications-->

### QR code
<!--/source-->

`POST` `/generate`

<!--source:api-specifications-->

#### Generate QR Code
<!--/source-->

`generateQrCode`

##### Request

<!--source:api-specifications-->
application/json Copy
```
{
 "url": "https://staircaseapi.com",
 "presign_url_ttl": 3600
}
```

<!--/source-->

##### Response

<!--source:api-specifications-->
200400404
<!--/source-->

<!--source:api-specifications-->
application/json Copy Successfully generated the QR code.

```
{
 "presigned_url": "https://presigned-url"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Request data invalid

```
{
 "message": "Request body is invalid."
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Requested resource not found

```
{
 "message": "Container not found"
}
```

<!--/source-->

##### Request body`application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `url`required | `string` | <!--source:api-specifications-->URL to generate QR code<!--/source-->Example `https://staircaseapi.com` |
| `presign_url_ttl` | `integer` | <!--source:api-specifications-->TTL of presigned url in seconds, default is 86400<!--/source-->Example `3600` |

##### Response `200``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Successfully generated the QR code.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `presigned_url`required | `string` | <!--source:api-specifications-->presigned_url<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Request data invalid
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Error message<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Missing API key
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Message<!--/source--> |

##### Response `404``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Requested resource not found
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Message<!--/source--> |

<!--source:api-specifications-->

### Workflow
<!--/source-->

`POST` `/products/document/invocations`

<!--source:api-specifications-->

#### Invoke Document Creation
<!--/source-->

`invokeDocumentCreation`

<!--source:api-specifications-->
**Invoke Document Creation ** invokes an automated process that will create documents in the loan with the partner.

To invoke Invoke Document Creation, you will need:

- transaction_id, a unique identifier for Staircase operations.
- collection_id, a unique identifier that contains Staircase V2 data with loan_identifier.
- vendor_name, a supported vendor name for this operation
- product_flow_name, a Staircase Connector flow name that is going to be executed in the process.
- callback_url, URL for getting result of this asynchronous operation.

To create documents in the loan, there are some mandatory Staircase containers you should store in the collection that you provide in the input:

Show the rest
- loan_identifiers container for storing loan identifier information.

Example Staircase Collection data:

```
{
 "loan_identifiers": [
 {
 "@type": "loan_identifier",
 "has_loan_identifier_value": {
 "has_value": "test"
 },
 "@id": "01GKF93BSG0S0F86EYREY87FZH"
 }
 ]
 }
```

In the response, you will get a staircase collection that contains loan related information and a linkage for each document in the package.

Example document creation result:

```
{
 "addresses": [
 {
 "@type": "subject_property_address",
 "has_address_line_1_text": {
 "has_value": "1000 N WICKHAM RD R"
 },
 "has_city_name": {
 "has_value": "HELENA"
 },
 "has_postal_code": {
 "has_value": "35020"
 },
 "has_state_code": {
 "has_value": "AL"
 },
 "@id": "01GM367RV66WKA98JK8N2R55CV"
 }
 ],
 "closing_information": [
 {
 "@type": "closing_information",
 "has_closing_date": {
 "has_value": "2022-08-16"
 },
 "@id": "01GM367RV6A54XX62YX1QXTER4"
 }
 ],
 "contact_point_emails": [
 {
 "@id": "01GM367RV6JWCQCG54NM6JMBD0",
 "@type": "contact_point_email",
 "has_contact_point_email_value": {
 "has_value": "jlindseth@firstam.com"
 }
 }
 ],
 "contact_points": [
 {
 "@id": "01GM367RV6QZCJHRJ5768AEKJD",
 "@type": "contact_point",
 "with_contact_point_email": [
 "01GM367RV6JWCQCG54NM6JMBD0"
 ]
 }
 ],
 "loan_identifiers": [
 {
 "@type": "loan_identifier",
 "has_loan_identifier_type": {
 "has_value": "lender_loan"
 },
 "has_loan_identifier_value": {
 "has_value": "JL_ECLOSE_NOSF_TEST_6"
 },
 "@id": "01GM367RV6K5CZCYT4NT6YZXVC"
 },
 {
 "@type": "loan_identifier",
 "has_loan_identifier_type": {
 "has_value": "mers_min"
 },
 "has_loan_identifier_value": {
 "has_value": "999933857913323869"
 },
 "@id": "01GM367RV65RW5FFEM82F62XNY"
 }
 ],
 "people": [
 {
 "@type": "person",
 "has_full_name": {
 "has_value": "JOHN TEST"
 },
 "with_contact_point": [
 "01GM367RV6QZCJHRJ5768AEKJD"
 ],
 "@id": "01GM367RV6P47NE7N9PR9YNA1T"
 }
 ],
 "sales_contracts": [
 {
 "@type": "property_sales_contract",
 "has_sales_contract_amount": {
 "has_value": "260000.00"
 },
 "@id": "01GM367RV6W4FNYBTJW80AVZCB"
 }
 ],
 "staircase_collection_references": [
 {
 "@type": "staircase_collection_reference",
 "has_collection_identifier": {
 "has_value": "01GM367DQ9TRGFMZC52518SD72"
 },
 "has_transaction_identifier": {
 "has_value": "01GKWCZQK53F7FRJBQC49NNADJ"
 },
 "@id": "01GM367RV6HBDPH57BCC4QWFQH"
 },
 {
 "@type": "staircase_collection_reference",
 "has_collection_identifier": {
 "has_value": "01GM367EWCW7QT6K8R5W1VJE1T"
 },
 "has_transaction_identifier": {
 "has_value": "01GKWCZQK53F7FRJBQC49NNADJ"
 },
 "@id": "01GM367RV6WWH2K8H9AR8A3EZ0"
 },
 {
 "@type": "staircase_collection_reference",
 "has_collection_identifier": {
 "has_value": "01GM367EZJW3870B3H806AD3AK"
 },
 "has_transaction_identifier": {
 "has_value": "01GKWCZQK53F7FRJBQC49NNADJ"
 },
 "@id": "01GM367RV662JC4XTSCVSJ6131"
 },
 {
 "@type": "staircase_collection_reference",
 "has_collection_identifier": {
 "has_value": "01GM367EW5HWWNND3D3MFR5VMB"
 },
 "has_transaction_identifier": {
 "has_value": "01GKWCZQK53F7FRJBQC49NNADJ"
 },
 "@id": "01GM367RV7TE94KBR8B5B99TCZ"
 },
 {
 "@type": "staircase_collection_reference",
 "has_collection_identifier": {
 "has_value": "01GM367EH3JJWKA111Z7P0H6QW"
 },
 "has_transaction_identifier": {
 "has_value": "01GKWCZQK53F7FRJBQC49NNADJ"
 },
 "@id": "01GM367RV74Y6072K2EAAZ5DK4"
 }
 ],
 "terms_of_loans": [
 {
 "@type": "terms_of_loan",
 "has_note_amount": {
 "has_value": "195000.00"
 },
 "has_purpose_type": {
 "has_value": "Purchase"
 },
 "@id": "01GM367RV7Z50YSMAEAN631KXT"
 }
 ]
 }
```

In staircase_collection_references container, each object represents a distinct document in the package itself.

Example generated document data:

```
{
 "document_form_fields": [
 {
 "@id": "SignerSignature1",
 "@type": "form_field_signature",
 "with_field_reference": [
 "01GM367BBE013SMYRZGD81JNX0"
 ],
 "with_signer": [
 "BOR1"
 ]
 },
 {
 "@id": "SignatureDate1",
 "@type": "form_field_text",
 "with_field_reference": [
 "01GM367BBEKPJ4YYRA0A53PF9W"
 ],
 "with_signer": [
 "BOR1"
 ]
 }
 ],
 "document_forms": [
 {
 "@id": "01GM367BBEM7XXERGRHWSA6F2T",
 "@type": "document_form",
 "with_document_form_field": [
 "01GM367BBEC0D4CWJZPFTQ81Y0",
 "01GM367BBEBRWQX1CMSC54BT0Z"
 ]
 }
 ],
 "documents": [
 {
 "@id": "12",
 "@type": "document",
 "has_document_name": {
 "has_value": "Amortization Schedule"
 },
 "has_staircase_blob_identifier": {
 "has_value": "01GM366N4AQ53GJ44S3EVM36G1"
 },
 "with_document_form": [
 "01GM367BBEM7XXERGRHWSA6F2T"
 ]
 }
 ],
 "field_references": [
 {
 "@id": "01GM367BBE013SMYRZGD81JNX0",
 "@type": "field_reference",
 "has_field_height_number": {
 "has_value": "10"
 },
 "has_field_width_number": {
 "has_value": "162"
 },
 "has_offset_from_left_number": {
 "has_value": "36"
 },
 "has_offset_from_top_number": {
 "has_value": "368.65"
 },
 "has_page_number_value": {
 "has_value": "6"
 }
 },
 {
 "@id": "01GM367BBEKPJ4YYRA0A53PF9W",
 "@type": "field_reference",
 "has_field_height_number": {
 "has_value": "10"
 },
 "has_field_width_number": {
 "has_value": "66"
 },
 "has_offset_from_left_number": {
 "has_value": "198"
 },
 "has_offset_from_top_number": {
 "has_value": "368.65"
 },
 "has_page_number_value": {
 "has_value": "6"
 }
 }
 ]
}
```

<!--/source-->

##### Request

<!--source:api-specifications-->
application/json Copy
```
{
 "transaction_id": "example_transaction_id",
 "collection_id": "example_collection_id",
 "vendor_name": "docutech",
 "callback_url": "example_url",
 "product_flow_name": "document-creation"
}
```

<!--/source-->

##### Response

<!--source:api-specifications-->
400422
<!--/source-->

<!--source:api-specifications-->
application/json Copy Request data failed validation

```
{
 "code": 400,
 "message": "Bad Request"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Unprocessed Entity

```
{
 "code": 422,
 "message": "Unprocessed Entity."
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
1
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->Environment API Key.<!--/source--> |

##### Request body`application/json`

<!--source:api-specifications-->
5 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `transaction_id` | `string` | <!--source:api-specifications-->Unique identifier for Staircase operations<!--/source--> |
| `collection_id` | `string` | <!--source:api-specifications-->Identifier for stored Staircase data<!--/source--> |
| `vendor_name` | `string` | <!--source:api-specifications-->Document creation partner<!--/source-->`docutech` |
| `callback_url` | `string` | <!--source:api-specifications-->URL for getting operation result<!--/source--> |
| `product_flow_name` | `string` | <!--source:api-specifications-->Staircase connector flow that operates this process<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Response collection
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Asynchronous operation start message<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Request data failed validation
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `object` | <!--source:api-specifications-->Unprocessed entity error.<!--/source--> |
| `code`required | `string` | <!--source:api-specifications-->Error name.<!--/source--> |
| `message`required | `string` | <!--source:api-specifications-->Error description.<!--/source--> |

##### Response `422``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Unprocessed Entity
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `object` | <!--source:api-specifications-->Unprocessed entity error.<!--/source--> |
| `code`required | `string` | <!--source:api-specifications-->Error name.<!--/source--> |
| `message`required | `string` | <!--source:api-specifications-->Error description.<!--/source--> |

`POST` `/blobs`

<!--source:api-specifications-->

#### Create Blob
<!--/source-->

`post-data-extraction-blob-create`

<!--source:api-specifications-->
Create Blob creates a blob in Staircase.

A Binary Large Object (blob) is a collection of binary data stored as a single entity. Typically, it represents a document, image or other multimedia object.

To invoke a partner for Data Extraction, you must first create a blob for your document. The presigned URL, which is returned as a response, represents a container in Staircase for your document. A presigned URL expires one hour after creation.

<!--/source-->

##### Request

<!--source:api-specifications-->
application/json Copy
```
{
 "extension": ".pdf"
}
```

<!--/source-->

##### Response

<!--source:api-specifications-->
application/json Copy Blob has been created

```
{
 "blob_id": "01EZY9ENJGRMTW4S9CS4V1Y6XH",
 "extension": ".pdf",
 "presigned_urls": {
 "upload": {
 "url": "https://dev-data-manager-blobs-bucket-us-east-1-867210375911.s3.amazonaws.com/01EZY9ENJGRMTW4S9CS4V1Y6XH"
 }
 },
 "message": "Blob has been created."
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
1
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->Environment API Key.<!--/source--> |

##### Request body`application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `extension`required | `string` | <!--source:api-specifications-->Document extension that blob is persisting<!--/source-->Example `.pdf` |

##### Response `201``application/json`

<!--source:api-specifications-->
3 fields
<!--/source-->
<!--source:api-specifications-->
Blob has been created
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `blob_id` | `string` | <!--source:api-specifications-->Blob ID<!--/source--> |
| `extension` | `string` | <!--source:api-specifications-->File extension<!--/source--> |
| `presigned_urls` | `object` | <!--source:api-specifications-->Presigned URL<!--/source--> |

##### Other responses

`400``403`

`GET` `/products/document/invocations/{invocation_id}`

<!--source:api-specifications-->

#### Retrieve Document Creation Status
<!--/source-->

`RetrieveProductFlowInvocationStatus`

<!--source:api-specifications-->
Retrieves the status of running Product flow invocation.

<!--/source-->

##### Response

<!--source:api-specifications-->
200400403500
<!--/source-->

<!--source:api-specifications-->
application/json Copy Successfully returned status of the Product flow Invocation.

```
{
 "invocation_id": "01GKGM9FEKBGH5NY1DVS01GK0R",
 "transaction_id": "01GKGHPJDN46RW12WENHQF9YCD",
 "product_flow_name": "document-creation",
 "response_collection_id": "01GKGM9FEKBGH5NY1DVS01GK0R",
 "invocation_status": "COMPLETED",
 "callback_url": "https://webhook.site/d42faea3-6a42-440d-9226-d8fbcdfb5838",
 "widget_url": "",
 "metadata": {},
 "options": {},
 "service_invocation": {
 "CallConnector": {
 "started_on": "2022-12-05T07:51:30.687304",
 "finished_on": "2022-12-05T07:51:47.925999",
 "status": "COMPLETED"
 },
 "CallJob": {
 "started_on": "2022-12-05T07:51:50.091899",
 "finished_on": "2022-12-05T07:51:59.032819",
 "status": "COMPLETED"
 },
 "ConvertXmlToJson": {
 "started_on": "2022-12-05T07:51:48.561624",
 "finished_on": "2022-12-05T07:51:49.395832",
 "status": "COMPLETED"
 },
 "CreateBlob": {
 "started_on": "2022-12-05T07:51:48.138654",
 "finished_on": "2022-12-05T07:51:48.390732",
 "status": "COMPLETED"
 },
 "GeneratePresignedURL": {
 "started_on": "2022-12-05T07:51:49.561906",
 "finished_on": "2022-12-05T07:51:49.863825",
 "status": "COMPLETED"
 },
 "GetCollection": {
 "started_on": "2022-12-05T07:51:30.089996",
 "finished_on": "2022-12-05T07:51:30.478678",
 "status": "COMPLETED"
 },
 "GetJobResultCollection": {
 "started_on": "2022-12-05T07:51:59.343658",
 "finished_on": "2022-12-05T07:51:59.671978",
 "status": "COMPLETED"
 },
 "UpdateResponseCollection": {
 "started_on": "2022-12-05T07:51:59.858050",
 "finished_on": "2022-12-05T07:52:00.162106",
 "status": "COMPLETED"
 }
 },
 "response_collection": {
 "collection_id": "01GKGM9FEKBGH5NY1DVS01GK0R",
 "transaction_id": "01GKGHPJDN46RW12WENHQF9YCD"
 },
 "flows_responses": {},
 "_links": {
 "finance_metrics": "https://test.staircaseapi.com/finance/metrics/query/",
 "health_metrics": "https://test.staircaseapi.com/code-health-checker/metric/01GKGHPJDN46RW12WENHQF9YCD?product_name=document"
 }
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Request data failed validation

```
{
 "message": "{'data': ['Missing data for required field.']}"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Invalid key for service

```
{
 "message": "Please check the key you used to call this service",
 "url": "https://staircase.stoplight.io/docs/api-reference/customer-account-manager-service.yml/paths/~1products~1refresh/post"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy The product has encountered an internal server error. If possible, please contact Staircase support with the transaction_id you used.

```
{
 "message": "The product has encountered an internal server error. If you have used a transaction_id to call our services, please submit it to Staircase support."
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
2
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->Environment API Key.<!--/source--> |
| `invocation_id` required | `string (ulid)` path | `d7ccedb8-8889-4657-add4-bc1s4xs97637` | <!--source:api-specifications-->Product flow invocation identifier<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
13 fields
<!--/source-->
<!--source:api-specifications-->
Successfully returned status of the Product flow Invocation.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `invocation_id` | `string` | <!--source:api-specifications-->Invocation id<!--/source--> |
| `transaction_id` | `string` | <!--source:api-specifications-->Transaction id<!--/source--> |
| `product_flow_name` | `string` | <!--source:api-specifications-->Product flow name<!--/source--> |
| `response_collection_id` | `string` | <!--source:api-specifications-->Response collection id<!--/source--> |
| `invocation_status` | `string` | <!--source:api-specifications-->Invocation status<!--/source--> |
| `callback_url` | `string` | <!--source:api-specifications-->Callback URL<!--/source--> |
| `widget_url` | `string` | <!--source:api-specifications-->Widget URL<!--/source--> |
| `metadata` | `object` | <!--source:api-specifications-->Metadata<!--/source--> |
| `options` | `object` | <!--source:api-specifications-->Options<!--/source--> |
| `service_invocation` | `object` | <!--source:api-specifications-->Service invocation<!--/source--> |
| `CallConnector` | `object` | <!--source:api-specifications-->Connector process<!--/source--> |
| `started_on` | `string` | <!--source:api-specifications-->Date information<!--/source--> |
| `finished_on` | `string` | <!--source:api-specifications-->Date information<!--/source--> |
| `status` | `string` | <!--source:api-specifications-->Status information<!--/source--> |
| `CallJob` | `object` | <!--source:api-specifications-->Job process<!--/source--> |
| `started_on` | `string` | <!--source:api-specifications-->Date information<!--/source--> |
| `finished_on` | `string` | <!--source:api-specifications-->Date information<!--/source--> |
| `status` | `string` | <!--source:api-specifications-->Status information<!--/source--> |
| `ConvertXmlToJson` | `object` | <!--source:api-specifications-->Conversion process<!--/source--> |
| `started_on` | `string` | <!--source:api-specifications-->Date information<!--/source--> |
| `finished_on` | `string` | <!--source:api-specifications-->Date information<!--/source--> |
| `status` | `string` | <!--source:api-specifications-->Status information<!--/source--> |
| `CreateBlob` | `object` | <!--source:api-specifications-->Creating blob process<!--/source--> |
| `started_on` | `string` | <!--source:api-specifications-->Date information<!--/source--> |
| `finished_on` | `string` | <!--source:api-specifications-->Date information<!--/source--> |
| `status` | `string` | <!--source:api-specifications-->Status information<!--/source--> |
| `GeneratePresignedURL` | `object` | <!--source:api-specifications-->Generating URL process<!--/source--> |
| `started_on` | `string` | <!--source:api-specifications-->Date information<!--/source--> |
| `finished_on` | `string` | <!--source:api-specifications-->Date information<!--/source--> |
| `status` | `string` | <!--source:api-specifications-->Status information<!--/source--> |
| `GetCollection` | `object` | <!--source:api-specifications-->Getting collection data process<!--/source--> |
| `started_on` | `string` | <!--source:api-specifications-->Date information<!--/source--> |
| `finished_on` | `string` | <!--source:api-specifications-->Date information<!--/source--> |
| `status` | `string` | <!--source:api-specifications-->Status information<!--/source--> |
| `GetJobResultCollection` | `object` | <!--source:api-specifications-->Getting job data process<!--/source--> |
| `started_on` | `string` | <!--source:api-specifications-->Date information<!--/source--> |
| `finished_on` | `string` | <!--source:api-specifications-->Date information<!--/source--> |
| `status` | `string` | <!--source:api-specifications-->Status information<!--/source--> |
| `UpdateResponseCollection` | `object` | <!--source:api-specifications-->Updating response collection process<!--/source--> |
| `started_on` | `string` | <!--source:api-specifications-->Date information<!--/source--> |
| `finished_on` | `string` | <!--source:api-specifications-->Date information<!--/source--> |
| `status` | `string` | <!--source:api-specifications-->Status information<!--/source--> |
| `response_collection` | `object` | <!--source:api-specifications-->Response collection<!--/source--> |
| `collection_id` | `string` | <!--source:api-specifications-->Collection id<!--/source--> |
| `transaction_id` | `string` | <!--source:api-specifications-->Transaction id<!--/source--> |
| `flows_responses` | `object` | <!--source:api-specifications-->Flows responses<!--/source--> |
| `_links` | `object` | <!--source:api-specifications-->Links<!--/source--> |
| `finance_metrics` | `string` | <!--source:api-specifications-->Finance metrics<!--/source--> |
| `health_metrics` | `string` | <!--source:api-specifications-->Health metrics<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Request data failed validation
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `one of` | <!--source:api-specifications-->Message<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Invalid key for service
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | — |
| `url` | `string` | — |

##### Response `404``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Resource not found
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message`required | `string` | — |

##### Response `500``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
The product has encountered an internal server error. If possible, please contact Staircase support with the transaction_id you used.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | — |

`GET` `/request-elements`

<!--source:api-specifications-->

#### Retrieve Request Elements
<!--/source-->

`get-data-extraction-request-elements`

<!--source:api-specifications-->
Retrieve Request Elements retrieves a list of elements needed to invoke a partner for data extraction.

<!--/source-->

##### Response

<!--source:api-specifications-->
200 Example v0200 Example v2404
<!--/source-->

<!--source:api-specifications-->
application/json Copy Elements retrieved successfully.

```
{
 "$.document_sets.document_set[0].documents.document[0].document_classification.document_classes.document_class[0].type": null,
 "$.document_sets.document_set[0].documents.document[0].content.foreign_object.reference.location_label_value": null
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Elements retrieved successfully.

```
{
 "$.documents[0].@type": null,
 "$.documents[0].has_staircase_blob_identifier.has_value": null
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Elements not found.

```
{
 "message": "Elements not found."
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
1
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->Environment API Key.<!--/source--> |

##### Response `404``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Elements not found.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Elements not found.<!--/source--> |

##### Other responses

`200``400`

`POST` `/classify`

<!--source:api-specifications-->

#### Classify Document
<!--/source-->

`post-adr`

<!--source:api-specifications-->
Classify Document invokes a partner to classify the pages within a document according to document type(s).

To invoke Classify Document, you will need:

- a transaction_id, and
- a collection_id.

Once you have a transaction_id and collection_id, you can send them, along with your api key (authorization key) to as many partners as you want. Simply invoke Classify Document with the same transaction_id and collection_id, but with different partner names. Doing so enables you to get classification results from multiple partners, and to see which one provides the optimal response.

Show the rest Classify Document returns, as a synchronous acknowledgement, a new collection_id. The new collection_id represents an empty container which will hold the partner's response once processing has completed.

In case `partner_name` was provided as default, classify will be run through Ephesoft & DocumentAI partners. The `response_collection_id` will be a combined one, and we will provide the confidence score of Staircase which will be equal or higher than the one of a singular partner.

<!--/source-->

##### Request

<!--source:api-specifications-->
example-1example-2application/json
<!--/source-->

<!--source:api-specifications-->
application/json Copy
```
{
 "transaction_id": "01FM04Q4WKNGG0AWRKPBC8KBC3",
 "collection_id": "01FM04QXEVT3V2SXBV2KM74RV2",
 "partner_name": "ocrolus"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy
```
{
 "transaction_id": "01FM04Q4WKNGG0AWRKPBC8KBC3",
 "collection_id": "01FM04QXEVT3V2SXBV2KM74RV2",
 "partner_name": "ocrolus",
 "options": {
 "separate_document_blobs": true
 }
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy
```
{
 "transaction_id": "",
 "collection_id": "",
 "partner_name": "ocrolus"
}
```

<!--/source-->

##### Response

<!--source:api-specifications-->
200422 InvalidTransactionIDFormat422 InvalidCollectionIDFormat500
<!--/source-->

<!--source:api-specifications-->
application/json Copy Document classification request created successfully.

```
{
 "collection_id": "01EZY95SC1K85WTA3J66R81WCV",
 "message": "When ready, data will be available in the collection specified by this collection_id. Use this new collection_id to get the execution status."
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Unprocessable Entity

```
{
 "message": "transaction_id value had non-alphanumeric characters. Please check transaction id"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Unprocessable Entity

```
{
 "message": "collection_id value had non-alphanumeric characters. Please check collection id"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy The product has encountered an internal server error. If possible, please contact Staircase support with the transaction_id you used.

```
{
 "message": "The product has encountered an internal server error. If you have used a transaction_id to call our services, please submit it to Staircase support"
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
1
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->Environment API Key.<!--/source--> |

##### Request body`application/json`

<!--source:api-specifications-->
5 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `transaction_id`required | `string (ulid)` | <!--source:api-specifications-->Transaction ID<!--/source-->Example `01FM04Q4WKNGG0AWRKPBC8KBCP` |
| `collection_id`required | `string (ulid)` | <!--source:api-specifications-->Collection ID<!--/source-->Example `01FM04QXEVT3V2SXBV2KM74RV1` |
| `partner_name`required | `string` | <!--source:api-specifications-->Partner name such as DocumentAI<!--/source-->`default``documentai``ephesoft``ocrolus` |
| `callback_url` | `string` | <!--source:api-specifications-->Callback url<!--/source--> |
| `options` | `object` | <!--source:api-specifications-->Additional options for document classification<!--/source--> |
| `separate_document_blobs` | `boolean` | <!--source:api-specifications-->In case blob contains multiple documents response collection will contain unique blob_id for each document classified<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Document classification request created successfully.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `collection_id` | `string` | <!--source:api-specifications-->Collection ID<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->Message<!--/source--> |

##### Response `500``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
The product has encountered an internal server error. If possible, please contact Staircase support with the transaction_id you used.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | — |

##### Other responses

`400``403``404``422`

`POST` `/extract`

<!--source:api-specifications-->

#### Extract Data
<!--/source-->

`post-data-extraction-extract`

<!--source:api-specifications-->
Extract Data invokes a partner to extract the data within a document according to document type.

To invoke Extract Data, you will need:

- a transaction_id, and
- a collection_id.

Once you have a transaction_id and collection_id, you can send them, along with your api_key (authorization key) to as many partners as you want. Simply invoke Extract Data with the same transaction_id and collection_id, but with different partner names. Doing so enables you to extract data using multiple partners, and to see which one provides the optimal response.

Extract Data returns, as a synchronous acknowledgement, a new collection_id. The new collection_id represents an empty container which will hold the partner's response once processing has completed.

<!--/source-->

##### Request

<!--source:api-specifications-->
Example 1Example 2Example 3application/json
<!--/source-->

<!--source:api-specifications-->
application/json Copy
```
{
 "transaction_id": "01EZY81SYVQ98YYG0KMM462NKZ",
 "collection_id": "01EZY9J8SEFM2JKDJ1Q3YX65HS",
 "partner_name": "ocrolus"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy
```
{
 "transaction_id": "01EZY81SYVQ98YYG0KMM462NKZ",
 "collection_id": "01EZY9J8SEFM2JKDJ1Q3YX65HS",
 "partner_name": "ocrolus",
 "options": {
 "include_simplified_response": false
 }
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy
```
{
 "transaction_id": "01EZY81SYVQ98YYG0KMM462NKZ",
 "collection_id": "01EZY9J8SEFM2JKDJ1Q3YX65HS",
 "partners": [
 "ocrolus"
 ]
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy
```
{
 "transaction_id": "",
 "collection_id": "",
 "partner_name": "ocrolus",
 "data_elements": [
 "element1",
 "element2"
 ]
}
```

<!--/source-->

##### Response

<!--source:api-specifications-->
200 Example 1200 Example 2
<!--/source-->

<!--source:api-specifications-->
application/json Copy Data Extraction request created successfully.

```
{
 "collection_id": "01EZY94X63AXWZ14TT8R1MAS3S"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Data Extraction request created successfully.

```
{
 "response_collections": [
 {
 "collection_id": "01EZY94X63AXWZ14TT8R1MAS3S"
 },
 {
 "collection_id": "01EZY9J8SEFM2JKDJ1Q3YX65HS"
 }
 ]
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
1
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->Environment API Key.<!--/source--> |

##### Request body`application/json`

<!--source:api-specifications-->
7 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `transaction_id`required | `string` | <!--source:api-specifications-->Transaction ID<!--/source--> |
| `collection_id`required | `string` | <!--source:api-specifications-->Collection ID<!--/source--> |
| `partner_name` | `string` | <!--source:api-specifications-->Name of partner providing data extraction. If you wish to invoke multiple partners with one request you can use partners parameter instead. If this parameter is not set then it is required to set partners parameter<!--/source-->`documentai``ocrolus` |
| `partners` | `string[]` | <!--source:api-specifications-->List of partners you want to use for extraction. If this parameter is not set then you have to set partner_name parameter<!--/source--> |
| `callback_url` | `string` | <!--source:api-specifications-->Callback url<!--/source--> |
| `data_elements` | `string[]` | <!--source:api-specifications-->All elements that need to be selected in the response<!--/source--> |
| `options` | `object` | <!--source:api-specifications-->Additional settings for extraction.<!--/source--> |
| `include_simplified_response` | `boolean` | <!--source:api-specifications-->Simplified response has simple structure and better field coverage. In case request collections is v0 this value is set to true by default. For v2 request collections this value is set to false by default.<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
3 fields
<!--/source-->
<!--source:api-specifications-->
Data Extraction request created successfully.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `response_collections` | `object[]` | <!--source:api-specifications-->In case partners parameter is set in request payload response will contain this object.<!--/source--> |
| `collection_id`required | `string` | <!--source:api-specifications-->Collection ID<!--/source--> |
| `message`required | `string` | <!--source:api-specifications-->Message with additional information about execution<!--/source--> |
| `collection_id` | `string` | <!--source:api-specifications-->Response will contain this parameter only if partner_name parameter is set in request collection<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->Response will contain this parameter only if partner_name parameter is set in request collection<!--/source--> |

##### Other responses

`400`

`GET` `/status/{transaction_id}/{collection_id}`

<!--source:api-specifications-->

#### Retrieve Status
<!--/source-->

`get-data-extraction-status`

<!--source:api-specifications-->
Retrieve Status determines if a partner has completed data extraction for a document.

<!--/source-->

##### Response

<!--source:api-specifications-->
application/json Copy Request received. Potential status responses: 'REQUEST_MADE', 'WAITING_FOR_RESPONSE', 'COMPLETED', 'ERROR'"

```
{
 "status": "COMPLETED"
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
3
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->Environment API Key.<!--/source--> |
| `transaction_id` required | `string` path | `01EZY95SC1K85WTA3J66R81WCV` | <!--source:api-specifications-->Transaction ID<!--/source--> |
| `collection_id` required | `string` path | `01EZY9J8SEFM2JKDJ1Q3YX65HS` | <!--source:api-specifications-->Collection ID<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Request received. Potential status responses: 'REQUEST_MADE', 'WAITING_FOR_RESPONSE', 'COMPLETED', 'ERROR'"
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `status` | `string` | <!--source:api-specifications-->Request received.<!--/source--> |

##### Other responses

`400``403``404`

<!--source:api-specifications-->

### PDFs
<!--/source-->

`POST` `/fill`

<!--source:api-specifications-->

#### Fill PDF template with data
<!--/source-->

`fill_pdf`

<!--source:api-specifications-->
Fill PDF
<!--/source-->

<!--source:api-specifications-->
This endpoint takes a document's content in JSON format, translates it into the specified target language, and then fills a PDF template using the translated content. It requires a blob ID for the PDF template, the target language for translation, and the data to be translated. The process involves translating the input data, mapping it according to a predefined schema, and dynamically filling the PDF with the translated content, returning a new blob ID for the filled document. For now endpoint works only with `loan-application-doc-language-v2` language. Source blob_id should be 1003 borrower information PDF from this link:

<!--/source-->

##### Request

<!--source:api-specifications-->
application/json Copy
```
{
 "blob_id": "01G92FSH5FYKQE6X22FECB95V2",
 "to_language_name": "loan-application-doc-language",
 "data": {
 "properties": {
 "@id": "01HB6AQNA7M9ZR9SB4KH8D4ECS",
 "@type": "property",
 "property_acquired_date": "2022-12-19",
 "property_type": "SingleFamily",
 "community_property_state_indicator": false,
 "existing_clean_energy_lien_indicator": false,
 "property_existing_lien_amount": 10000,
 "property_estate_type": "FeeSimple",
 "lease_expiration_date": "2024-12-12",
 "property_in_project_indicator": true,
 "construction_improvement_cost_amount": 15000,
 "lot_original_cost_amount": 20000,
 "native_american_lands_type": "IndividualTrustLand"
 }
 }
}
```

<!--/source-->

##### Response

<!--source:api-specifications-->
200400404
<!--/source-->

<!--source:api-specifications-->
application/json Copy OK.

```
{
 "to_language_name": "loan-application-doc-language",
 "data": {
 "properties": {
 "@id": "01HB6AQNA7M9ZR9SB4KH8D4ECS",
 "@type": "property",
 "property_acquired_date": "2022-12-19",
 "property_type": "SingleFamily",
 "community_property_state_indicator": false,
 "existing_clean_energy_lien_indicator": false,
 "property_existing_lien_amount": 10000,
 "property_estate_type": "FeeSimple",
 "lease_expiration_date": "2024-12-12",
 "property_in_project_indicator": true,
 "construction_improvement_cost_amount": 15000,
 "lot_original_cost_amount": 20000,
 "native_american_lands_type": "IndividualTrustLand"
 }
 },
 "generated_blob_id": "01G92FSH5FYKQE6X22FECB95V2"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Request data failed validation

```
{
 "message": "{'data': ['Missing data for required field.']}"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Requested resource not found

```
{
 "message": "Collection not found"
}
```

<!--/source-->

##### Request body`application/json`

<!--source:api-specifications-->
3 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `blob_id`required | `string` | <!--source:api-specifications-->Blob ID<!--/source--> |
| `to_language_name` | `string` | <!--source:api-specifications-->Language name to translate data<!--/source--> |
| `data` | `object` | <!--source:api-specifications-->Data to fill in PDF template<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
4 fields
<!--/source-->
<!--source:api-specifications-->
OK.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `to_language_name` | `string` | <!--source:api-specifications-->language data<!--/source--> |
| `data` | `object` | <!--source:api-specifications-->language data<!--/source--> |
| `generated_blob_id` | `string` | <!--source:api-specifications-->Generated blob ID<!--/source--> |
| `warnings` | `object` | <!--source:api-specifications-->Warning message<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Request data failed validation
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `one of` | <!--source:api-specifications-->Message<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Missing API key
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Message<!--/source--> |

##### Response `404``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Requested resource not found
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Message<!--/source--> |

##### Other responses

`422`

`POST` `/generate-language-pdf`

<!--source:api-specifications-->

#### Generate language from PDF template
<!--/source-->

`generate_language_pdf`

<!--source:api-specifications-->
Generate mapping from PDF template
<!--/source-->

<!--source:api-specifications-->
Generates the language definition of PDF template from blob. Generation type is language by default. Generation type `language` generates Language product definition from PDF template. Generation type `form` generates form to fill PDF template. Generation type `info` generates information data about PDF template fields.

<!--/source-->

##### Request

<!--source:api-specifications-->
application/json Copy
```
{
 "blob_id": "01G92FSH5FYKQE6X22FECB95V2"
}
```

<!--/source-->

##### Response

<!--source:api-specifications-->
200400404
<!--/source-->

<!--source:api-specifications-->
application/json Copy OK.

```
{
 "format": "json",
 "type": "class",
 "company_name": "Staircase",
 "product_name": "PDFGenerator",
 "data": {
 "Amount": {
 "type": "string"
 }
 }
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Request data failed validation

```
{
 "message": "{'data': ['Missing data for required field.']}"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Requested resource not found

```
{
 "message": "Collection not found"
}
```

<!--/source-->

##### Request body`application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `blob_id`required | `string` | <!--source:api-specifications-->Blob ID<!--/source--> |
| `generation_type` | `string` | <!--source:api-specifications-->Generation type<!--/source-->`language``form``info` |

##### Response `200``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
OK.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `data` | `object` | <!--source:api-specifications-->language data<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Request data failed validation
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `one of` | <!--source:api-specifications-->Message<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Missing API key
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Message<!--/source--> |

##### Response `404``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Requested resource not found
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Message<!--/source--> |

##### Other responses

`422`

`POST` `/fill-pre-approval`

<!--source:api-specifications-->

#### Fill Pre approval PDF template with data
<!--/source-->

`fill_pdf_pre_approval`

<!--source:api-specifications-->
Fill PDF Pre approval
<!--/source-->

<!--source:api-specifications-->
This endpoint takes a document's content in JSON format, translates it into the specified target language, and then fills a PDF template using the translated content. It requires a the target language for translation, and the data to be translated. The process involves translating the input data, mapping it according to a predefined schema, and dynamically filling the PDF with the translated content, returning a new blob ID for the filled document. For now endpoint works only with `pre-approval-letter` language.

<!--/source-->

##### Request

<!--source:api-specifications-->
application/json Copy
```
{
 "data": {
 "people": [
 {
 "@id": "_borrower",
 "@type": "person",
 "first_name": "Vladyslav",
 "middle_name": "J",
 "last_name": "Kartavets"
 },
 {
 "@id": "_borrower2",
 "@type": "person",
 "first_name": "Mariia",
 "last_name": "Kartavets"
 },
 {
 "@id": "_borrower3",
 "@type": "person",
 "first_name": "MMM",
 "last_name": "Kartavets"
 }
 ],
 "relationships": [
 {
 "@type": "finance_relation",
 "role": "Borrower",
 "has_loan": "_loan",
 "has_person": "_borrower"
 },
 {
 "@type": "finance_relation",
 "role": "CoBorrower",
 "has_loan": "_loan",
 "has_person": "_borrower2"
 },
 {
 "@type": "finance_relation",
 "role": "CoBorrower",
 "has_loan": "_loan",
 "has_person": "_borrower3"
 }
 ],
 "loans": [
 {
 "@id": "_loan",
 "@type": "loan",
 "has_property": "_property",
 "base_loan_amount": 425000,
 "note_rate_percent": 5.948,
 "loan_amortization_period_count": 30,
 "loan_amortization_period_type": "Year",
 "amortization_type": "Fixed",
 "rebate_percent": 1.1
 }
 ],
 "properties": [
 {
 "@id": "_property",
 "@type": "property",
 "has_address": "_address"
 }
 ],
 "addresses": [
 {
 "@id": "_address",
 "@type": "address",
 "address_line_1": "1452 N. Mustang Rd",
 "city_name": "Mustang",
 "state_code": "OK",
 "postal_code": "73604"
 }
 ]
 }
}
```

<!--/source-->

##### Response

<!--source:api-specifications-->
200400404
<!--/source-->

<!--source:api-specifications-->
application/json Copy OK.

```
{
 "data": {
 "people": [
 {
 "@id": "_borrower",
 "@type": "person",
 "first_name": "Vladyslav",
 "middle_name": "J",
 "last_name": "Kartavets"
 },
 {
 "@id": "_borrower2",
 "@type": "person",
 "first_name": "Mariia",
 "last_name": "Kartavets"
 },
 {
 "@id": "_borrower3",
 "@type": "person",
 "first_name": "MMM",
 "last_name": "Kartavets"
 }
 ],
 "relationships": [
 {
 "@type": "finance_relation",
 "role": "Borrower",
 "has_loan": "_loan",
 "has_person": "_borrower"
 },
 {
 "@type": "finance_relation",
 "role": "CoBorrower",
 "has_loan": "_loan",
 "has_person": "_borrower2"
 },
 {
 "@type": "finance_relation",
 "role": "CoBorrower",
 "has_loan": "_loan",
 "has_person": "_borrower3"
 }
 ],
 "loans": [
 {
 "@id": "_loan",
 "@type": "loan",
 "has_property": "_property",
 "base_loan_amount": 425000,
 "note_rate_percent": 5.948,
 "loan_amortization_period_count": 30,
 "loan_amortization_period_type": "Year",
 "amortization_type": "Fixed",
 "rebate_percent": 1.1
 }
 ],
 "properties": [
 {
 "@id": "_property",
 "@type": "property",
 "has_address": "_address"
 }
 ],
 "addresses": [
 {
 "@id": "_address",
 "@type": "address",
 "address_line_1": "1452 N. Mustang Rd",
 "city_name": "Mustang",
 "state_code": "OK",
 "postal_code": "73604"
 }
 ]
 },
 "generated_blob_id": "01G92FSH5FYKQE6X22FECB95V2"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Request data failed validation

```
{
 "message": "{'data': ['Missing data for required field.']}"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Requested resource not found

```
{
 "message": "Collection not found"
}
```

<!--/source-->

##### Request body`application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `data`required | `object` | <!--source:api-specifications-->Data to fill in PDF template<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
3 fields
<!--/source-->
<!--source:api-specifications-->
OK.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `data` | `object` | <!--source:api-specifications-->language data<!--/source--> |
| `generated_blob_id` | `string` | <!--source:api-specifications-->Generated blob ID<!--/source--> |
| `warnings` | `object` | <!--source:api-specifications-->Warning message<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Request data failed validation
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `one of` | <!--source:api-specifications-->Message<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Missing API key
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Message<!--/source--> |

##### Response `404``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Requested resource not found
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Message<!--/source--> |

##### Other responses

`422`

`POST` `/fill-listing-agreement`

<!--source:api-specifications-->

#### Fill Listing Agreement PDF template with data
<!--/source-->

`fill_pdf_listing_cancellation`

<!--source:api-specifications-->
Fill PDF Listing Cancellation
<!--/source-->

<!--source:api-specifications-->
This endpoint takes a document's content in JSON format and then fills a PDF template using the translated content. It requires the data to be translated. The process involves translating the input data, mapping it according to a predefined schema, and dynamically filling the PDF with the translated content, returning a new blob ID for the filled document.

<!--/source-->

##### Request

<!--source:api-specifications-->
application/json Copy
```
{
 "data": {
 "lead": {
 "@id": "01J17WAPBYY5A3C3EB342K1TRT",
 "@type": "lead",
 "has_listing": {
 "@id": "01J17WAPBY69HXZ1C8XP7HMW1X",
 "@type": "listing",
 "broker_cancellation_fee_amount": {
 "@type": "http://www.w3.org/2001/XMLSchema#integer",
 "@value": "0"
 },
 "broker_cancellation_fee_indicator": {
 "@type": "http://www.w3.org/2001/XMLSchema#boolean",
 "@value": "true"
 },
 "broker_compensation_indicator": {
 "@type": "http://www.w3.org/2001/XMLSchema#boolean",
 "@value": "true"
 },
 "conditional_termination_agreement_indicator": {
 "@type": "http://www.w3.org/2001/XMLSchema#boolean",
 "@value": "true"
 },
 "current_list_price_amount": {
 "@type": "http://www.w3.org/2001/XMLSchema#integer",
 "@value": "2500000"
 },
 "exclusive_brokerage_listing_agreement_indicator": {
 "@type": "http://www.w3.org/2001/XMLSchema#boolean",
 "@value": "false"
 },
 "exclusive_right_of_sale_listing_agreement_indicator": {
 "@type": "http://www.w3.org/2001/XMLSchema#boolean",
 "@value": "true"
 },
 "exclusive_right_to_lease_agreement_indicator": {
 "@type": "http://www.w3.org/2001/XMLSchema#boolean",
 "@value": "false"
 },
 "has_agent": [
 {
 "@id": "01J17WAPBYCV1NKE2F810G9D82",
 "@type": "person",
 "first_name": "Kesa",
 "last_name": "Longfellow"
 },
 {
 "@id": "01J17WAPBYSAS7JVKVJP52H9Y6",
 "@type": "person",
 "first_name": "Robert",
 "last_name": "Thomson"
 }
 ],
 "has_agent_company": {
 "@id": "01J17WAPBYN3R18K0ENCQJVEEM",
 "@type": "company",
 "name": "Waterfront Properties & Club C (303140)"
 },
 "has_listing_timeline": [
 {
 "@id": "01J17WAPBY1RJYRCVV5YH3E9HM",
 "@type": "listing_timeline",
 "listing_status_type": "Active"
 },
 {
 "@id": "01J17WAPBYNJYWKAQPR53FR3GA",
 "@type": "listing_timeline",
 "price_date": "2023-10-14",
 "price_type": "InitialListing"
 },
 {
 "@id": "01J17WAPBYNX103Z4TG7SASWDP",
 "@type": "listing_timeline",
 "price_amount": {
 "@type": "http://www.w3.org/2001/XMLSchema#integer",
 "@value": "2500000"
 },
 "price_date": "2023-10-15",
 "price_type": "MinSold"
 }
 ],
 "has_previous_version": {
 "@id": "01J17WAPBY69HXZ1C8XP7HMW1X_2"
 },
 "listing_agreement_price_terms": "785,000.00",
 "listing_agreement_price_terms_indicator": {
 "@type": "http://www.w3.org/2001/XMLSchema#boolean",
 "@value": "false"
 },
 "listing_agreement_termination_date": "2024-10-25",
 "listing_agreement_termination_date_indicator": {
 "@type": "http://www.w3.org/2001/XMLSchema#boolean",
 "@value": "true"
 },
 "listing_identifier": "RX-10927244",
 "listing_property_description": "Crystal Pointe PL 2 Lt 25, Washer and Dryer, Refrigerator, Oven, Microwave, Dish Washer, All Window Coverings, all pool equipment",
 "listing_status_type": "Active",
 "special_listing_conditions": "Listing Brokers commission to be paid at time of listing agreement. Cooperating Brokers will be paid at funding.",
 "special_listing_conditions_indicator": {
 "@type": "http://www.w3.org/2001/XMLSchema#boolean",
 "@value": "true"
 },
 "unconditional_termination_agreement_indicator": {
 "@type": "http://www.w3.org/2001/XMLSchema#boolean",
 "@value": "false"
 }
 },
 "has_person": [
 {
 "@id": "01J17WAPBY2K8Z6PS1WY5Y93WW",
 "@type": "person",
 "first_name": "WALTER",
 "has_communication_method": [
 {
 "@id": "01J17WAPBXNHYKESB682SBGN3V",
 "@type": "communication",
 "phone_number": "7463044"
 },
 {
 "@id": "01J17WAPBXVNJMB1TT77XVYWSA",
 "@type": "communication",
 "phone_number": "8637634638"
 },
 {
 "@id": "01J17WAPBX4KR4WS9Y2KXXD08T",
 "@type": "communication",
 "phone_number": "5619727157"
 },
 {
 "@id": "01J17WAPBXHVAST0QWEH80RPX0",
 "@type": "communication",
 "phone_number": "5617463044"
 }
 ],
 "last_name": "ARRINGTON",
 "middle_name": ""
 },
 {
 "@id": "01J17WAPBY6D6PK74KMT7QKN23",
 "@type": "person",
 "first_name": "BETTY",
 "last_name": "ARRINGTON",
 "middle_name": ""
 }
 ],
 "has_property": {
 "@id": "01J17WAPBYYPC0PKEVBZQDN2TZ",
 "@type": "property",
 "bedroom_count": {
 "@type": "http://www.w3.org/2001/XMLSchema#integer",
 "@value": "4"
 },
 "covered_spaces": {
 "@type": "http://www.w3.org/2001/XMLSchema#integer",
 "@value": "2"
 },
 "full_bathroom_count": {
 "@type": "http://www.w3.org/2001/XMLSchema#integer",
 "@value": "3"
 },
 "garage_spaces": {
 "@type": "http://www.w3.org/2001/XMLSchema#integer",
 "@value": "2"
 },
 "gross_living_area_square_feet_number": {
 "@type": "http://www.w3.org/2001/XMLSchema#integer",
 "@value": "4104"
 },
 "half_bathroom_count": {
 "@type": "http://www.w3.org/2001/XMLSchema#integer",
 "@value": "0"
 },
 "has_address": {
 "@id": "01J17WAPBY1W0FCZGYADP20KSN",
 "@type": "address",
 "address_line_1": "12274 150th Ln N",
 "city_name": "Jupiter",
 "country_code": "US",
 "country_name": "USA",
 "county_code": "12099",
 "county_name": "Palm Beach",
 "full_address": "12274 150th Ln N, Jupiter, FL 33478-3512, United States",
 "latitude": {
 "@type": "http://www.w3.org/2001/XMLSchema#decimal",
 "@value": "-80.22953"
 },
 "longitude": {
 "@type": "http://www.w3.org/2001/XMLSchema#decimal",
 "@value": "26.89854"
 },
 "plus_four_postal_code": "3512",
 "postal_code": "33478",
 "sequence_number": "12274",
 "state_code": "FL",
 "street_name": "150th Ln N"
 },
 "has_appliance": [
 {
 "@id": "01J17WAPBX70H0YY9WQMKQ0TFF",
 "@type": "appliance",
 "appliance_type": "Washer"
 },
 {
 "@id": "01J17WAPBX0RD6N57C93HEJJPM",
 "@type": "appliance",
 "appliance_type": "WaterSoftenerOwned"
 },
 {
 "@id": "01J17WAPBXK7RQE050QSWCDMPQ",
 "@type": "appliance",
 "appliance_type": "Refrigerator"
 },
 {
 "@id": "01J17WAPBXD3XY93XB4T8VAGM0",
 "@type": "appliance",
 "appliance_type": "Microwave"
 },
 {
 "@id": "01J17WAPBXTEYZHZTHDTRTVF51",
 "@type": "appliance",
 "appliance_type": "GasWaterHeater"
 },
 {
 "@id": "01J17WAPBXYGG2TXE5NNGECY7C",
 "@type": "appliance",
 "appliance_type": "GasRange"
 },
 {
 "@id": "01J17WAPBX4AMFY6K66XFA7PFK",
 "@type": "appliance",
 "appliance_type": "Dishwasher"
 },
 {
 "@id": "01J17WAPBXW7M1PH3K894EMXAA",
 "@type": "appliance",
 "appliance_type": "Dryer"
 },
 {
 "@id": "01J17WAPBXGMFJV2KJHA1HCBG0",
 "@type": "appliance",
 "appliance_type": "BuiltInOven"
 }
 ],
 "has_exterior": [
 {
 "@id": "01J17WAPBX7HP9CJ34AM2A3QA0",
 "@type": "exterior",
 "parking_type": "GarageDoorOpener"
 },
 {
 "@id": "01J17WAPBXNZ9EX8E0ZHA35JT5",
 "@type": "exterior",
 "parking_type": "TwoOrMoreSpaces"
 },
 {
 "@id": "01J17WAPBX0ZZZK5DSJEWRB9NW",
 "@type": "exterior",
 "parking_type": "Other",
 "parking_type_other_description": "RV Access/Parking"
 },
 {
 "@id": "01J17WAPBXGZ1JASW2ZAMMN1B5",
 "@type": "exterior",
 "parking_type": "Other",
 "parking_type_other_description": "Open"
 },
 {
 "@id": "01J17WAPBX4P828R02XRMBVYJ4",
 "@type": "exterior",
 "parking_type": "Other",
 "parking_type_other_description": "Guest"
 },
 {
 "@id": "01J17WAPBXTRMMQ944K216C9KF",
 "@type": "exterior",
 "parking_type": "Other",
 "parking_type_other_description": "Golf Cart Garage"
 },
 {
 "@id": "01J17WAPBX5J7BBA26Q56SMWWE",
 "@type": "exterior",
 "parking_type": "Garage"
 },
 {
 "@id": "01J17WAPBX44Z547DBP8T2PE6N",
 "@type": "exterior",
 "parking_type": "Driveway"
 },
 {
 "@id": "01J17WAPBXY00DKQTSM7MNMQ8A",
 "@type": "exterior",
 "parking_type": "Other",
 "parking_type_other_description": "Covered"
 },
 {
 "@id": "01J17WAPBXRPE71NEQHQDKSH7P",
 "@type": "exterior",
 "parking_type": "CircularDriveway"
 },
 {
 "@id": "01J17WAPBXCRTKHXQWF1CV2Y6T",
 "@type": "exterior",
 "parking_type": "Attached"
 }
 ],
 "has_structure": [
 {
 "@id": "01J17WAPBXRVE16C04VG31EXT2",
 "@type": "structure",
 "window_type": "ImpactGlass"
 },
 {
 "@id": "01J17WAPBX2PQ23SS998W2DRR1",
 "@type": "structure",
 "window_type": "Other",
 "window_type_other_description": "Blinds"
 },
 {
 "@id": "01J17WAPBXJERD12ST5XXV9P0Y",
 "@type": "structure",
 "roof_type": "Other",
 "roof_type_other_description": "Metal"
 },
 {
 "@id": "01J17WAPBXE64385CRBCERXA75",
 "@type": "structure",
 "construction_material_type": "Block"
 },
 {
 "@id": "01J17WAPBXNCM0BXDP15G53TJV",
 "@type": "structure",
 "flooring_type": "Other",
 "flooring_type_other_description": "Vinyl"
 },
 {
 "@id": "01J17WAPBXP1Q2X4QXY79PQ77C",
 "@type": "structure",
 "flooring_type": "Other",
 "flooring_type_other_description": "Carpet"
 }
 ],
 "has_utility": [
 {
 "@id": "01J17WAPBYNF3MVD9RFTFJ2Z96",
 "@type": "utility",
 "cooling_system_type": "Electric"
 },
 {
 "@id": "01J17WAPBYJ8R7208NBEVTA04J",
 "@type": "utility",
 "cooling_system_type": "Other",
 "cooling_system_type_other_description": "Ceiling Fan(s)"
 },
 {
 "@id": "01J17WAPBY2EVRGT1T7WW0CJQ0",
 "@type": "utility",
 "cooling_system_type": "CentralAir"
 },
 {
 "@id": "01J17WAPBYSB8G88NT0MEQ8VK2",
 "@type": "utility",
 "water_source_type": "Well"
 },
 {
 "@id": "01J17WAPBYD06T872GT0V97VVW",
 "@type": "utility",
 "public_utility_type": "Other",
 "public_utility_type_other_description": "Natural Gas Available"
 },
 {
 "@id": "01J17WAPBY9D4HSC1WA766C22X",
 "@type": "utility",
 "public_utility_type": "ElectricityAvailable"
 },
 {
 "@id": "01J17WAPBY60D4C50AJQKPK6ZG",
 "@type": "utility",
 "public_utility_type": "CableAvailable"
 },
 {
 "@id": "01J17WAPBYY14KBZBP15AC92D0",
 "@type": "utility",
 "sewer_type": "Septic"
 },
 {
 "@id": "01J17WAPBY6MJDPW9VSWRGXGWE",
 "@type": "utility",
 "heating_system_type": "Central"
 }
 ],
 "property_structure_built_year": {
 "@type": "http://www.w3.org/2001/XMLSchema#integer",
 "@value": "2021"
 },
 "property_type": "SingleFamily",
 "stories_count": {
 "@type": "http://www.w3.org/2001/XMLSchema#integer",
 "@value": "1"
 },
 "subdivision": "Jupiter Farms",
 "total_room_count": {
 "@type": "http://www.w3.org/2001/XMLSchema#integer",
 "@value": "7"
 }
 },
 "lead_identifier": "01J17WAPBYY5A3C3EB342K1TRT",
 "has_real_estate_agent_notes": [
 {
 "@id": "01J1C80RB815MHH1VH81Y5FGRF",
 "@type": "chat_message",
 "message_content": "Real Estate Agent left a chat card on Walter Arrington's gate.",
 "message_datetime": "2024-06-27T07:02:06.811085"
 },
 {
 "@id": "01J1CCFY9D7ZHFJZAP7ZGBBX63",
 "@type": "chat_message",
 "message_content": "Left ChatMTG card to Walter Arrington",
 "message_datetime": "2024-06-27T08:20:18.725224"
 },
 {
 "@id": "01J1FT99PVPP87YDGM9S73J9R3",
 "@type": "chat_message",
 "message_content": "Real Estate Agent left a chat card on Walter Arrington's gate on June 27, 2024.",
 "message_datetime": "2024-06-28T16:19:04.387580"
 },
 {
 "@id": "01J1FT9CY58CQEAZXNWDAKQXDQ",
 "@type": "chat_message",
 "message_content": "Real Estate Agent left a chat card to Walter Arrington on June 27, 2024.",
 "message_datetime": "2024-06-28T16:19:07.711293"
 },
 {
 "@id": "01J1PS2PZZM3ZD0CJN78KWMFH0",
 "@type": "chat_message",
 "message_content": "Generated icebreaker prompts for Walter Arrington.",
 "message_datetime": "2024-07-01T09:12:41.075499"
 },
 {
 "@id": "01J1Q0N1K9J744E80KGB10ENJX",
 "@type": "chat_message",
 "message_content": "Client is ready to move the listing.",
 "message_datetime": "2024-07-01T11:25:01.786014"
 },
 {
 "@id": "01J1Q0S1XDZ1PDWYWT76WFAD7J",
 "@type": "chat_message",
 "message_content": "Broker's name is Alex Taylor.",
 "message_datetime": "2024-07-01T11:27:13.173127"
 },
 {
 "@id": "01J1Q6NNHMFFMVNYCCC47AQE0J",
 "@type": "chat_message",
 "message_content": "Lead Walter Arrington is ready to move the listing at 12274 150th Ln N, Jupiter, FL, 33478.",
 "message_datetime": "2024-07-01T13:10:13.661928"
 },
 {
 "@id": "01J1Q6SBS0FHG9HE1GNEMAP7SF",
 "@type": "chat_message",
 "message_content": "The lead, Walter Arrington, has agreed to move the listing.",
 "message_datetime": "2024-07-01T13:12:14.625923"
 },
 {
 "@id": "01J1Q6VCTHREFN9ESZF583XFK6",
 "@type": "chat_message",
 "message_content": "The lead agreed to move the listing.",
 "message_datetime": "2024-07-01T13:13:21.328873"
 },
 {
 "@id": "01J1Q6YA254NY7TXN8D7ZKGKFD",
 "@type": "chat_message",
 "message_content": "Lead Walter Arrington is ready to move the listing",
 "message_datetime": "2024-07-01T13:14:56.831426"
 },
 {
 "@id": "01J1Q7339B8VFYKDRWV80RBFK2",
 "@type": "chat_message",
 "message_content": "The client, Walter Arrington, is ready to move the listing for the property at 12274 150th Ln N, Jupiter, FL, 33478.",
 "message_datetime": "2024-07-01T13:17:33.721484"
 },
 {
 "@id": "01J1Q76MAZXZAW4CV0WXZYN8CX",
 "@type": "chat_message",
 "message_content": "The client, Walter Arrington, is ready to move the listing at 12274 150th Ln N, Jupiter, FL, 33478.",
 "message_datetime": "2024-07-01T13:19:29.481406"
 },
 {
 "@id": "01J1Q7B2CJTT3KXW75Q2H8VPEJ",
 "@type": "chat_message",
 "message_content": "Lead Walter Arrington is ready to move the listing",
 "message_datetime": "2024-07-01T13:21:54.944470"
 },
 {
 "@id": "01J1Q7ZRVY0PXKH5RSJZBGFMQQ",
 "@type": "chat_message",
 "message_content": "Lead Walter Arrington agreed to move the listing for the property at 12274 150th Ln N, Jupiter, FL, 33478",
 "message_datetime": "2024-07-01T13:33:13.339853"
 },
 {
 "@id": "01J1Q91P0QH4BZZVYV9TV07VB1",
 "@type": "chat_message",
 "message_content": "The client is ready to move their listing.",
 "message_datetime": "2024-07-01T13:51:44.524739"
 },
 {
 "@id": "01J1Q91VSB3WTVDYR1TKC0SN3A",
 "@type": "chat_message",
 "message_content": "Walter Arrington is ready to move the listing for the property at 12274 150th Ln N, Jupiter, FL, 33478.",
 "message_datetime": "2024-07-01T13:51:50.423623"
 },
 {
 "@id": "01J1Q91WP9DA3KW86B6801B3QA",
 "@type": "chat_message",
 "message_content": "The lead, Walter Arrington, is ready to move the listing.",
 "message_datetime": "2024-07-01T13:51:51.362478"
 },
 {
 "@id": "01J1Q91Z7XXGNFCH80AEMGCZ6X",
 "@type": "chat_message",
 "message_content": "Lead agreed to move the listing.",
 "message_datetime": "2024-07-01T13:51:53.977552"
 },
 {
 "@id": "01J1Q9212950NFAZPZDS7RWT2R",
 "@type": "chat_message",
 "message_content": "Lead Walter Arrington is ready to move the listing for the property at 12274 150th Ln N, Jupiter, FL, 33478.",
 "message_datetime": "2024-07-01T13:51:55.837267"
 },
 {
 "@id": "01J1Q9FD2CJ6ME5SDM52BZ9H6G",
 "@type": "chat_message",
 "message_content": "Walter Arrington agreed to move the listing.",
 "message_datetime": "2024-07-01T13:59:14.114412"
 },
 {
 "@id": "01J1Q9FEJGR0WYGQSWVZ4DC2R6",
 "@type": "chat_message",
 "message_content": "Lead agreed to move the listing to us.",
 "message_datetime": "2024-07-01T13:59:15.639663"
 },
 {
 "@id": "01J1Q9M9T9HPPP8MTKB74YKV0S",
 "@type": "chat_message",
 "message_content": "Lead agreed to move the listing.",
 "message_datetime": "2024-07-01T14:01:54.618791"
 },
 {
 "@id": "01J1Q9MF109ARJ3JJJ7PNDM1NA",
 "@type": "chat_message",
 "message_content": "Walter Arrington is ready to move the listing for the property at 12274 150th Ln N, Jupiter, FL, 33478.",
 "message_datetime": "2024-07-01T14:01:59.959381"
 },
 {
 "@id": "01J1Q9RBJWDDJJPQX4BYYAEES1",
 "@type": "chat_message",
 "message_content": "Lead Walter Arrington agreed to move the listing.",
 "message_datetime": "2024-07-01T14:04:07.499670"
 },
 {
 "@id": "01J1Q9RBM9VWD2F716MP2VAWPH",
 "@type": "chat_message",
 "message_content": "The lead expressed readiness to move his listing.",
 "message_datetime": "2024-07-01T14:04:07.551797"
 },
 {
 "@id": "01J1QA4VXAXPWXF5WC2JSS9R0B",
 "@type": "chat_message",
 "message_content": "Walter Arrington is ready to move his listing.",
 "message_datetime": "2024-07-01T14:10:57.425425"
 },
 {
 "@id": "01J1QA4X1MVZA90Z35ZH5GMY9A",
 "@type": "chat_message",
 "message_content": "Walter Arrington is ready to move the listing.",
 "message_datetime": "2024-07-01T14:10:58.601251"
 },
 {
 "@id": "01J1QAEGZF23F0WPAB0C54FFEY",
 "@type": "chat_message",
 "message_content": "Lead agreed to move the listing.",
 "message_datetime": "2024-07-01T14:16:13.922487"
 },
 {
 "@id": "01J1QAEMY0R0CMP39JS7B4QZ2J",
 "@type": "chat_message",
 "message_content": "Walter Arrington is ready to move the listing.",
 "message_datetime": "2024-07-01T14:16:17.977624"
 },
 {
 "@id": "01J1QAMBS15KANVMB4Z7PM8DK9",
 "@type": "chat_message",
 "message_content": "Lead Walter Arrington is ready to move the listing.",
 "message_datetime": "2024-07-01T14:19:25.176210"
 },
 {
 "@id": "01J1QAMJTPPGC3QG4V9QPKEZ7M",
 "@type": "chat_message",
 "message_content": "Walter Arrington is ready to move the listing.",
 "message_datetime": "2024-07-01T14:19:32.409926"
 },
 {
 "@id": "01J1QAMPEGC9ZF5B2XMX6XKPNC",
 "@type": "chat_message",
 "message_content": "Lead agrees to move the listing.",
 "message_datetime": "2024-07-01T14:19:36.131188"
 },
 {
 "@id": "01J1QB4XEG2MVY8TDPEHT6S0A3",
 "@type": "chat_message",
 "message_content": "Lead WALTER ARRINGTON has agreed to move the listing at 12274 150th Ln N, Jupiter, FL, 33478.",
 "message_datetime": "2024-07-01T14:28:27.600725"
 },
 {
 "@id": "01J1QB50AZARAZKZ9R96KGBX1C",
 "@type": "chat_message",
 "message_content": "The lead is ready to move the listing.",
 "message_datetime": "2024-07-01T14:28:30.547010"
 },
 {
 "@id": "01J1QB53YPWRA29RR4Z7YJZ98D",
 "@type": "chat_message",
 "message_content": "Lead is ready to move their listing.",
 "message_datetime": "2024-07-01T14:28:34.246355"
 },
 {
 "@id": "01J1QB9GP4T8Y2R1Q4V609NCVX",
 "@type": "chat_message",
 "message_content": "Client Walter Arrington is ready to move the listing at 12274 150th Ln N, Jupiter, FL, 33478.",
 "message_datetime": "2024-07-01T14:30:58.345685"
 },
 {
 "@id": "01J1QB9JY449NERKQK7RR9RPB6",
 "@type": "chat_message",
 "message_content": "The client, Walter Arrington, is ready to move the listing.",
 "message_datetime": "2024-07-01T14:31:00.662517"
 },
 {
 "@id": "01J1QB9QYCR3D7AYANQ4ZWBST7",
 "@type": "chat_message",
 "message_content": "Lead agreed to move their listing.",
 "message_datetime": "2024-07-01T14:31:05.785133"
 },
 {
 "@id": "01J1QC5BD0HXAFJGZJBZ43WY27",
 "@type": "chat_message",
 "message_content": "Lead is ready to move the listing.",
 "message_datetime": "2024-07-01T14:46:10.442077"
 },
 {
 "@id": "01J1QC5DMCVYQESSTQ8FT0JDNZ",
 "@type": "chat_message",
 "message_content": "Lead is ready to move the listing.",
 "message_datetime": "2024-07-01T14:46:12.735697"
 },
 {
 "@id": "01J1QDAKJ57R02QY94EXC3WVG4",
 "@type": "chat_message",
 "message_content": "Generated tailored icebreaker prompts for Walter Arrington.",
 "message_datetime": "2024-07-01T15:06:31.223288"
 },
 {
 "@id": "01J1QEEBS5YEB6XHQPVWAN1C7W",
 "@type": "chat_message",
 "message_content": "Walter Arrington is ready to move their listing.",
 "message_datetime": "2024-07-01T15:26:02.909692"
 },
 {
 "@id": "01J1QEECDWV89MQ9A1FRG38W1Q",
 "@type": "chat_message",
 "message_content": "Walter Arrington is ready to move the listing.",
 "message_datetime": "2024-07-01T15:26:03.572510"
 },
 {
 "@id": "01J1QEECKX37Q78GWH67N1GNH1",
 "@type": "chat_message",
 "message_content": "The client WALTER ARRINGTON is ready to move the listing.",
 "message_datetime": "2024-07-01T15:26:03.760093"
 },
 {
 "@id": "01J1QEFFMF03H76C1AMPDP198A",
 "@type": "chat_message",
 "message_content": "Client Walter Arrington has agreed to move the listing for the property at 12274 150th Ln N, Jupiter, FL, 33478.",
 "message_datetime": "2024-07-01T15:26:39.616660"
 },
 {
 "@id": "01J1QEN6WPK7PFWWAT825243YJ",
 "@type": "chat_message",
 "message_content": "Walter Arrington agreed to move the listing for the property at 12274 150th Ln N, Jupiter, FL, 33478.",
 "message_datetime": "2024-07-01T15:29:47.280712"
 },
 {
 "@id": "01J1QFD3JBT2NN01H3Q998H4X9",
 "@type": "chat_message",
 "message_content": "Borrower is ready to move their listing.",
 "message_datetime": "2024-07-01T15:42:50.311125"
 },
 {
 "@id": "01J1SC35PMQP4MB3V2WC9RVPWN",
 "@type": "chat_message",
 "message_content": "Lead Walter Arrington agreed to move their listing.",
 "message_datetime": "2024-07-02T09:23:27.948810"
 },
 {
 "@id": "01J1SC8BKT3E68CEKQT0J4BVJ2",
 "@type": "chat_message",
 "message_content": "The borrower, Walter Arrington, agreed to move their listing.",
 "message_datetime": "2024-07-02T09:26:17.838358"
 },
 {
 "@id": "01J1SCWRFKEKSSQ0PCH66VKFJN",
 "@type": "chat_message",
 "message_content": "WALTER ARRINGTON is ready to move the listing.",
 "message_datetime": "2024-07-02T09:37:26.368239"
 },
 {
 "@id": "01J1SCWS9M6GW0TZET9XYVQP83",
 "@type": "chat_message",
 "message_content": "WALTER ARRINGTON is ready to move the listing.",
 "message_datetime": "2024-07-02T09:37:27.211964"
 },
 {
 "@id": "01J1SCWSH1SNCXDVMKNFEDDC0W",
 "@type": "chat_message",
 "message_content": "Lead expressed readiness to move the listing.",
 "message_datetime": "2024-07-02T09:37:27.449811"
 },
 {
 "@id": "01J210ES4JYCMC5TD22CEF8ZCH",
 "@type": "chat_message",
 "message_content": "Borrower agreed to move their listing.",
 "message_datetime": "2024-07-05T08:34:00.841450"
 }
 ]
 }
 }
}
```

<!--/source-->

##### Response

<!--source:api-specifications-->
200400404
<!--/source-->

<!--source:api-specifications-->
application/json Copy OK.

```
{
 "generated_blob_id": "01G92FSH5FYKQE6X22FECB95V2"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Request data failed validation

```
{
 "message": "{'data': ['Missing data for required field.']}"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Requested resource not found

```
{
 "message": "Collection not found"
}
```

<!--/source-->

##### Request body`application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `data`required | `object` | <!--source:api-specifications-->Data to fill in PDF template<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
OK.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `generated_blob_id` | `string` | <!--source:api-specifications-->Generated blob ID<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Request data failed validation
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `one of` | <!--source:api-specifications-->Message<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Missing API key
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Message<!--/source--> |

##### Response `404``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Requested resource not found
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Message<!--/source--> |

##### Other responses

`422`

<!--source:api-specifications-->

### Operations
<!--/source-->

`GET` `/blobs/{blob_id}`

<!--source:api-specifications-->

#### Retrieve Blob
<!--/source-->

`retrieveBlob`

<!--source:api-specifications-->
Retrieve Blob retrieves, for a given blob_id, extension and presigned URLs for uploading and downloading the blob to and from Staircase.

<!--/source-->

##### Response

<!--source:api-specifications-->
200403500
<!--/source-->

<!--source:api-specifications-->
application/json Copy Blob retrieved successfully.

```
{
 "blob_id": "01EZY9ENJGRMTW4S9CS4V1Y6XH",
 "extension": ".pdf",
 "message": "Blob retrieved successfully.",
 "presigned_urls": {
 "upload": {
 "url": "https://dev-data-manager-blobs-bucket-us-east-1-867210375911.s3.amazonaws.com/01EZY9ENJGRMTW4S9CS4V1Y6XH"
 }
 }
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Invalid key for service

```
{
 "message": "Please check the key you used to call this service",
 "url": "https://staircase.stoplight.io/docs/api-reference/customer-account-manager-service.yml/paths/~1products~1refresh/post"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy The product has encountered an internal server error. If possible, please contact Staircase support with the transaction_id you used.

```
{
 "message": "The product has encountered an internal server error. If you have used a transaction_id to call our services, please submit it to Staircase support"
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
2
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | — | <!--source:api-specifications-->adapter.staircaseapi.com environment API key.<!--/source--> |
| `blob_id` required | `string` path | `01EZY9J8SEFM2JKDJ1Q3YX65HS` | <!--source:api-specifications-->Blob identifier<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
4 fields
<!--/source-->
<!--source:api-specifications-->
Blob retrieved successfully.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `blob_id` | `string` | <!--source:api-specifications-->Blob ID<!--/source--> |
| `extension` | `string` | <!--source:api-specifications-->File extension<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->Blob retrieved successfully.<!--/source--> |
| `presigned_urls` | `object` | <!--source:api-specifications-->Presigned URL<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Invalid key for service
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | — |
| `url` | `string` | — |

##### Response `500``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
The product has encountered an internal server error. If possible, please contact Staircase support with the transaction_id you used.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | — |

##### Other responses

`400``404`

`POST` `/blobs/{blob_id}`

<!--source:api-specifications-->

#### Upload blob
<!--/source-->

##### Parameters

<!--source:api-specifications-->
1
<!--/source-->

| Parameter | Type | Description |
| --- | --- | --- |
| `blob_id` required | `string` path | <!--source:api-specifications-->Blob id<!--/source--> |

##### Other responses

`200`

`GET` `/blobs/{blob_id}/presigned-urls`

<!--source:api-specifications-->

#### Retrieve Presigned URLs
<!--/source-->

`retrievePresignedUrls`

<!--source:api-specifications-->
Retrieve Presigned URLs retrieves, for a given blob_id, presigned URLs for uploading and downloading the blob to and from Staircase.

<!--/source-->

##### Response

<!--source:api-specifications-->
200403
<!--/source-->

<!--source:api-specifications-->
application/json Copy Presigned URLs retrieved successfully.

```
{
 "upload": {
 "url": "https://dev-data-manager-blobs-bucket.s3.amazonaws.com/01EZY9J8SEFM2JKDJ1Q3YX65HS"
 }
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Invalid key for service

```
{
 "message": "Please check the key you used to call this service",
 "url": "https://staircase.stoplight.io/docs/api-reference/customer-account-manager-service.yml/paths/~1products~1refresh/post"
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
2
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | — | <!--source:api-specifications-->adapter.staircaseapi.com environment API key.<!--/source--> |
| `blob_id` required | `string` path | `01EZY9J8SEFM2JKDJ1Q3YX65HS` | <!--source:api-specifications-->Blob identifier<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Presigned URLs retrieved successfully.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `presigned_urls` | `object` | — |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Invalid key for service
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | — |
| `url` | `string` | — |

##### Other responses

`400``404`

`GET` `/blobs/{blob_id}/presigned-urls/{action}`

<!--source:api-specifications-->

#### Retrieve Presigned URL for Action
<!--/source-->

`retrievePresignedUrl`

<!--source:api-specifications-->
Retrieve Presigned URL for Action retrieves a presigned URL for a specific action. An action can be download or upload.

<!--/source-->

##### Response

<!--source:api-specifications-->
200403500
<!--/source-->

<!--source:api-specifications-->
application/json Copy Presigned URL retrieved successfully.

```
{
 "url": "https://dev-data-manager-blobs-bucket.s3.amazonaws.com/01EZY9J8SEFM2JKDJ1Q3YX65HS"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Invalid key for service

```
{
 "message": "Please check the key you used to call this service",
 "url": "https://staircase.stoplight.io/docs/api-reference/customer-account-manager-service.yml/paths/~1products~1refresh/post"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy The product has encountered an internal server error. If possible, please contact Staircase support with the transaction_id you used.

```
{
 "message": "The product has encountered an internal server error. If you have used a transaction_id to call our services, please submit it to Staircase support"
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
3
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | — | <!--source:api-specifications-->adapter.staircaseapi.com environment API key.<!--/source--> |
| `blob_id` required | `string` path | `01EZY9J8SEFM2JKDJ1Q3YX65HS` | <!--source:api-specifications-->Blob identifier<!--/source--> |
| `action` required | `string` path | `upload` | <!--source:api-specifications-->Possible actions: - upload - download<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Presigned URL retrieved successfully.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `url` | `string` | <!--source:api-specifications-->Presigned url<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Invalid key for service
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | — |
| `url` | `string` | — |

##### Response `500``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
The product has encountered an internal server error. If possible, please contact Staircase support with the transaction_id you used.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | — |

##### Other responses

`400``404`

`PUT` `/blobs/{blob_id}/presigned-urls/{action}`

<!--source:api-specifications-->

#### Create Presigned URL
<!--/source-->

`createPresignedUrl`

<!--source:api-specifications-->
Create Presigned URL creates a presigned URL in Staircase. The presigned URL is used to upload or download a blob (document). It expires one hour after creation.

<!--/source-->

##### Response

<!--source:api-specifications-->
200403
<!--/source-->

<!--source:api-specifications-->
application/json Copy Presigned URL created successfully.

```
{
 "presigned_urls": {
 "upload": {
 "url": "https://dev-data-manager-blobs-bucket.s3.amazonaws.com/01EZY9J8SEFM2JKDJ1Q3YX65HS"
 },
 "download": {
 "url": "https://dev-data-manager-blobs-bucket.s3.amazonaws.com/01EZY9J8SEFM2JKDJ1Q3YX65HS"
 }
 }
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Invalid key for service

```
{
 "message": "Please check the key you used to call this service",
 "url": "https://staircase.stoplight.io/docs/api-reference/customer-account-manager-service.yml/paths/~1products~1refresh/post"
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
3
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | — | <!--source:api-specifications-->adapter.staircaseapi.com environment API key.<!--/source--> |
| `blob_id` required | `string (ulid)` path | `01EZQ32PJQGKRA6HR8D72Q9FFF` | <!--source:api-specifications-->Blob id<!--/source--> |
| `action` required | `string` path | `upload` | <!--source:api-specifications-->Action, one of one of ['upload', 'donwload']<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Presigned URL created successfully.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `presigned_urls` | `object` | — |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Invalid key for service
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | — |
| `url` | `string` | — |

##### Other responses

`400``404`

`POST` `/blobs/upload/{blob_id}`

<!--source:api-specifications-->

#### Upload Blob
<!--/source-->

`uploadBlob`

<!--source:api-specifications-->
Upload Blob uploads a document (blob) to a presigned URL via the HTML Request Maker.

Try It Out:

- Place your api_key in the request header, your blob_id in the path parameter
- Set the request body to binary and browse to your document.
- Click Send to upload your document.

This service should be used in the HTML Request Maker Try it Out only. To upload a document within code, you need to use a PUT request to the presigned URL returned into the Create Blob response body.

Show the rest
```
import requests
# Create Blob endpoint returns blob_id and upload presigned url
# For example, the presigned_url might look like this:
presigned_url = ""

# Set the path to the file you want to upload
filepath = "document.pdf"

# Set the headers appropriately
headers = {
'Content-Type': 'application/pdf'
}

# Read the file data and make the PUT request
with open(filepath, 'rb') as file:
 payload = file.read
 response = requests.put(url=upload_presigned_url, headers=headers, data=payload)
```

<!--/source-->

##### Request

<!--source:api-specifications-->
application/octet-stream Copy
```
Select option 'binary' in order to upload file
```

<!--/source-->

##### Response

<!--source:api-specifications-->
200403500
<!--/source-->

<!--source:api-specifications-->
application/json Copy Blob uploaded

```
{
 "message": "Blob uploaded."
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Invalid key for service

```
{
 "message": "Please check the key you used to call this service",
 "url": "https://staircase.stoplight.io/docs/api-reference/customer-account-manager-service.yml/paths/~1products~1refresh/post"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy The product has encountered an internal server error. If possible, please contact Staircase support with the transaction_id you used.

```
{
 "message": "The product has encountered an internal server error. If you have used a transaction_id to call our services, please submit it to Staircase support"
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
2
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | — | <!--source:api-specifications-->adapter.staircaseapi.com environment API key.<!--/source--> |
| `blob_id` required | `string` path | `01EZY9HV24XQDGMNEPPXDNK0FY` | <!--source:api-specifications-->Blob identifier<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Blob uploaded
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Blob uploaded<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Invalid key for service
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | — |
| `url` | `string` | — |

##### Response `500``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
The product has encountered an internal server error. If possible, please contact Staircase support with the transaction_id you used.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | — |

##### Other responses

`400``404``405`

`POST` `/build-payload`

<!--source:api-specifications-->

#### Build JSON Payload
<!--/source-->

`retrieveExampleJSON`

<!--source:api-specifications-->
Build JSON Payload retrieves a JSON schema for either:

- a request for product invocation, or
- a response containing response details. To retrieve the employment verification request schema:

1. Invoke Retrieve Request Elements to get an array of product request elements.
1. Place the output from Retrieve Request Elements into the Build JSON Payload request body.
1. Place your api_key into the Build JSON Payload header.
1. Send the request to Build JSON Payload. You will receive a JSON schema in response, with null values that must be replaced with your own. To retrieve the product response schema:
1. Show the rest>Invoke Retrieve Response Elements to get the product response elements.
1. Place the output from Retrieve Response Elements into the Build JSON Payload request body.
1. Place your api_key into the Build JSON Payload header.
1. Send the request to Build JSON Payload. You will receive a JSON schema in response, with null values that will be replaced by the partner upon return of employment verification details.

<!--/source-->

##### Request

<!--source:api-specifications-->
application/json Copy
```
{
 "$.deal_sets.deal_set[0].deals.deal[0].parties.party[0].individual.name.first": "John",
 "$.deal_sets.deal_set[0].deals.deal[0].parties.party[0].individual.name.last": "Doe",
 "$.deal_sets.deal_set[0].deals.deal[0].loans.loan[0].loan_identifiers.loan_identifier[0].identifier": 12345,
 "$.deal_sets.deal_set[0].deals.deal[0].parties.party[0].taxpayer_identifiers.taxpayer_identifier[0].value": 67890
}
```

<!--/source-->

##### Response

<!--source:api-specifications-->
200400403500
<!--/source-->

<!--source:api-specifications-->
application/json Copy Product Invocation Flow Payload.

```
{
 "deal_sets": {
 "deal_set": [
 {
 "deals": {
 "deal": [
 {
 "parties": {
 "party": [
 {
 "individual": {
 "name": {
 "first": "Thomas",
 "last": "Alex"
 }
 },
 "taxpayer_identifiers": {
 "taxpayer_identifier": [
 {
 "value": "12345"
 }
 ]
 },
 "roles": {
 "role": [
 {
 "borrower": {
 "residences": {
 "residence": [
 {
 "address": {
 "line_text": "street 101",
 "city": "example city",
 "state": "state",
 "postal_code": "1234",
 "street_name": "street 23"
 }
 }
 ]
 }
 }
 }
 ]
 }
 }
 ]
 }
 }
 ]
 }
 }
 ]
 }
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Request data failed validation

```
{
 "message": "{'data': ['Missing data for required field.']}"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Invalid key for service

```
{
 "message": "Please check the key you used to call this service",
 "url": "https://staircase.stoplight.io/docs/api-reference/customer-account-manager-service.yml/paths/~1products~1refresh/post"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy The product has encountered an internal server error. If possible, please contact Staircase support with the transaction_id you used.

```
{
 "message": "The product has encountered an internal server error. If you have used a transaction_id to call our services, please submit it to Staircase support"
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
1
<!--/source-->

| Parameter | Type | Description |
| --- | --- | --- |
| `x-api-key` required | `string` header | <!--source:api-specifications-->adapter.staircaseapi.com environment API key.<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Request data failed validation
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Message<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Invalid key for service
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | — |
| `url` | `string` | — |

##### Response `500``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
The product has encountered an internal server error. If possible, please contact Staircase support with the transaction_id you used.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | — |

##### Other responses

`200`

`POST` `/create_blob_from_content`

<!--source:api-specifications-->

#### Create Blob from Partner content
<!--/source-->

`createBlobFromContent`

<!--source:api-specifications-->
Create Blob from Partner content will create a blob from the content that a partner has returned. The payload will be the extension path of the blob to be created in the vendor response object, content_path is the path of the content element in the vendor response object.

<!--/source-->

##### Response

<!--source:api-specifications-->
201400 UnableToRetrieveURL400 UnableToExtractValues403422500
<!--/source-->

<!--source:api-specifications-->
application/json Copy Presigned URLs retrieved successfully.

```
{
 "blob_id": "01F739J4XDSNCZMMJSJCB83PCQ"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Invalid body request.

```
{
 "message": "Unable to retrieve url"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Invalid body request.

```
{
 "message": "Unable to extract data from URL"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Invalid key for service

```
{
 "message": "Please check the key you used to call this service",
 "url": "https://staircase.stoplight.io/docs/api-reference/customer-account-manager-service.yml/paths/~1products~1refresh/post"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy The server understands the content type of the request entity, and the syntax of the request entity is correct but was unable to process the contained instructions.

```
{
 "message": "The product has encountered an internal server error. If you have used a transaction_id to call our services, please submit it to Staircase support"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy The product has encountered an internal server error. If possible, please contact Staircase support with the transaction_id you used.

```
{
 "message": "The product has encountered an internal server error. If you have used a transaction_id to call our services, please submit it to Staircase support"
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
1
<!--/source-->

| Parameter | Type | Description |
| --- | --- | --- |
| `x-api-key` required | `string` header | <!--source:api-specifications-->adapter.staircaseapi.com environment API key.<!--/source--> |

##### Request body`application/json`

<!--source:api-specifications-->
5 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `extension_path` | `string` | <!--source:api-specifications-->JSON path where the extension is in the response object. If it is not specified, extension will be "pdf".<!--/source-->Example `$.DocumentExension` |
| `content_path`required | `string` | <!--source:api-specifications-->JSON path where the actual content is in the response object.<!--/source-->Example `$.DocumentData` |
| `decode_from_base64` | `boolean` | <!--source:api-specifications-->Need to decode a content from base64.<!--/source--> |
| `encode_to_base64` | `boolean` | <!--source:api-specifications-->Need to encode a content to base64.<!--/source--> |
| `url`required | `string` | <!--source:api-specifications-->URL with the partner response.<!--/source-->Example `https://google.com` |

##### Response `201``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Presigned URLs retrieved successfully.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `blob_id` | `string` | — |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Invalid body request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | — |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Invalid key for service
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | — |
| `url` | `string` | — |

##### Response `422``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
The server understands the content type of the request entity, and the syntax of the request entity is correct but was unable to process the contained instructions.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | — |

##### Response `500``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
The product has encountered an internal server error. If possible, please contact Staircase support with the transaction_id you used.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | — |

`POST` `/document-creation`

<!--source:api-specifications-->

#### Create Document Creation
<!--/source-->

`post-document-creation`

##### Request

<!--source:api-specifications-->
application/json Copy
```
{
 "transaction_id": "uhz6t54e-9d74-g17e-99ca-a36b30vdfd35",
 "collection_id": "hg62e49f-9d74-g17e-99ca-a36b30vdfd35",
 "partner_name": "PartnerName"
}
```

<!--/source-->

##### Response

<!--source:api-specifications-->
application/json Copy Document Creation request created successfully.

```
{
 "collection_id": "e4502ed2-8df8-4b8f-84bd-a1097e999a77",
 "message": "When ready, data will be available under the following collection_id. Use this new collection_id to get the execution status."
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
1
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->Authorization key<!--/source--> |

##### Request body`application/json`

<!--source:api-specifications-->
3 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `transaction_id`required | `string` | <!--source:api-specifications-->Transaction ID<!--/source--> |
| `collection_id`required | `string` | <!--source:api-specifications-->Collection ID<!--/source--> |
| `partner_name`required | `string` | — |

##### Response `200``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Document Creation request created successfully.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `collection_id` | `string` | <!--source:api-specifications-->Collection ID<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->Message<!--/source--> |

`GET` `/document-creation/elements`

<!--source:api-specifications-->

#### Retrieve Elements
<!--/source-->

`get-document-creation-elements`

<!--source:api-specifications-->
Retrieve Elements provides a list of the elements needed to invoke a partner product.

<!--/source-->

##### Parameters

<!--source:api-specifications-->
1
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->Authorization key<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Elements needed for request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `elements` | `object` | <!--source:api-specifications-->List of elements<!--/source--> |

`POST` `/document-creation/elements/complete`

<!--source:api-specifications-->

#### Validate Collection
<!--/source-->

`post-document-creation-collection-complete`

<!--source:api-specifications-->
Validate Collection validates that a collection contains all of the elements needed to invoke a partner product.

<!--/source-->

##### Parameters

<!--source:api-specifications-->
1
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->Authorization key<!--/source--> |

##### Request body`application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `collection`required | `object` | — |

##### Response `400``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Collection is invalid.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Error message<!--/source--> |
| `errors` | `object` | <!--source:api-specifications-->List of elements that are missing<!--/source--> |

##### Other responses

`200`

`GET` `/document-creation/status/{transaction_id}/{collection_id}`

<!--source:api-specifications-->

#### Retrieve Status
<!--/source-->

`get-document-creation-status`

<!--source:api-specifications-->
Retrieve Status checks status of your request. Possible statuses:

- REQUEST_MADE
- REQUEST_ACCEPTED
- WAITING_FOR_RESPONSE
- COMPLETED

<!--/source-->

##### Response

<!--source:api-specifications-->
200400
<!--/source-->

<!--source:api-specifications-->
application/json Copy Statuses include: * REQUEST_MADE<p> * REQUEST_ACCEPTED<p> * WAITING_FOR_RESPONSE<p> * COMPLETED

```
{
 "status": "COMPLETED"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Status is unavailable

```
{
 "error": "Request for specified transaction_id and collection_id was not found!"
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
3
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `transaction_id` required | `string` path | `9u8z7t65-cb71-4f20-8e40-7a829b52e91e` | <!--source:api-specifications-->Transaction ID<!--/source--> |
| `collection_id` required | `string` path | `e4502ed2-8df8-4b8f-84bd-a1097e999a77` | <!--source:api-specifications-->Collection ID<!--/source--> |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->Authorization key<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Statuses include: * REQUEST_MADE<p> * REQUEST_ACCEPTED<p> * WAITING_FOR_RESPONSE<p> * COMPLETED
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `status` | `object` | <!--source:api-specifications-->Current execution status<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Status is unavailable
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message<!--/source--> |

`POST` `/document-creation/transactions`

<!--source:api-specifications-->

#### Create Transaction
<!--/source-->

`post-document-creation-transaction`

<!--source:api-specifications-->
Create Transaction creates a transaction in Staircase. A transaction in Staircase is an acknowledgement that you want to call a Staircase product. It's a container for everything associated with that product invocation, and is correlated with a collection related to the product (e.g. a document). You need to create a new transaction every time you want to connect with a Staircase product. Staircase then associates everything, from a data and API execution standpoint, to that transaction.

<!--/source-->

##### Response

<!--source:api-specifications-->
application/json Copy Transaction successfully created.

```
{
 "transaction_id": "a34c40a6-3c02-44f9-a696-cd7388f506d3"
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
1
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->Authorization key<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Transaction successfully created.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `transaction_id` | `string` | <!--source:api-specifications-->Transaction ID<!--/source--> |

`POST` `/document-creation/transactions/{transaction_id}/collections`

<!--source:api-specifications-->

#### Create Collection
<!--/source-->

`post-document-creation-collection`

<!--source:api-specifications-->
Create Collection creates a collection of elements . The elements within the collection are required.

<!--/source-->

##### Request

<!--source:api-specifications-->
application/json Copy
```
{
 "sets": {
 "set": [
 {
 "elements": {
 "element": [
 {
 "property_entry": {
 "property_entries": {
 "datetime": "2020-08-25",
 "description": "Description of property",
 "event_type": "TestType"
 }
 },
 "property_class": {
 "property_clases": {
 "type": "STATEMENT"
 },
 "name": "Test",
 "period_start_date": "2020-07-01",
 "period_end_date": "2020-07-31"
 },
 "content": {
 "foreign_object": "7e62ce76-d93d-4f31-92d3-45c2cb8255ea"
 }
 }
 ]
 }
 }
 ]
 }
}
```

<!--/source-->

##### Response

<!--source:api-specifications-->
application/json Copy Collection successfully created.

```
{
 "collection_id": "hg62e49f-9d74-g17e-99ca-a36b30vdfd35",
 "data": {
 "sets": {
 "set": [
 {
 "elements": {
 "element": [
 {
 "property_entry": {
 "property_entries": {
 "datetime": "2020-08-25",
 "description": "Description of property",
 "event_type": "TestType"
 }
 },
 "property_class": {
 "property_clases": {
 "type": "STATEMENT"
 },
 "name": "Test",
 "period_start_date": "2020-07-01",
 "period_end_date": "2020-07-31"
 },
 "content": {
 "foreign_object": "7e62ce76-d93d-4f31-92d3-45c2cb8255ea"
 }
 }
 ]
 }
 }
 ]
 }
 },
 "metadata": {},
 "transaction_id": "6t5r4wq1-9d74-g17e-99ca-a36b30vdfd35"
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
2
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `transaction_id` required | `string` path | `3wet53r4-cb71-8u74-8e40-7a829b52e91e` | <!--source:api-specifications-->Transaction ID<!--/source--> |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->Authorization key<!--/source--> |

##### Request body`application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `data`required | `object` | — |
| `metadata` | `object` | — |

##### Response `200``application/json`

<!--source:api-specifications-->
4 fields
<!--/source-->
<!--source:api-specifications-->
Collection successfully created.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `transaction_id` | `object` | <!--source:api-specifications-->Transaction ID<!--/source--> |
| `collection_id` | `object` | <!--source:api-specifications-->Collection ID<!--/source--> |
| `data` | `object` | <!--source:api-specifications-->Data object<!--/source--> |
| `metadata` | `object` | <!--source:api-specifications-->Metadata object<!--/source--> |

`PUT` `/document-creation/transactions/{transaction_id}/collections/{collection_id}`

<!--source:api-specifications-->

#### Update Collection
<!--/source-->

`put-document-creation-collection`

<!--source:api-specifications-->
Update Collection updates a collection of elements by new elements.

<!--/source-->

##### Request

<!--source:api-specifications-->
application/json Copy
```
{
 "sets": {
 "set": [
 {
 "properties": {
 "property": [
 {
 "propety_entry": {
 "propety_entries": {
 "datetime": "2020-05-05",
 "description": "Test Description",
 "event_type": "TestType"
 }
 },
 "propety_class": {
 "propety_classes": {
 "type": "TestType"
 },
 "name": "TestName",
 "period_start_date": "2019-01-01",
 "period_end_date": "2019-12-31"
 },
 "content": {
 "foreign_object": "7z6t5r4e-d93d-4f31-92d3-45c2cb8255ea"
 }
 }
 ]
 }
 }
 ]
 }
}
```

<!--/source-->

##### Response

<!--source:api-specifications-->
application/json Copy Collection successfully updated

```
{
 "collection_id": "hg62e49f-9d74-g17e-99ca-a36b30vdfd35",
 "data": {
 "sets": {
 "set": [
 {
 "properties": {
 "property": [
 {
 "property_data": {
 "property_class": {
 "datetime": "2020-05-05",
 "description": "Info",
 "event_type": "TestEvent"
 }
 },
 "document_classification": {
 "document_classes": {
 "type": "TestType"
 },
 "name": "TestName",
 "period_start_date": "2019-01-01",
 "period_end_date": "2019-12-31"
 },
 "content": {
 "foreign_object": "7z6t5r4e-d93d-4f31-92d3-45c2cb8255ea"
 }
 }
 ]
 }
 }
 ]
 }
 },
 "metadata": {},
 "transaction_id": "6t5r4wq1-9d74-g17e-99ca-a36b30vdfd35"
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
3
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `transaction_id` required | `string` path | `3wet53r4-cb71-8u74-8e40-7a829b52e91e` | <!--source:api-specifications-->Transaction ID<!--/source--> |
| `collection_id` required | `string` path | `9u8z7t65-cb71-8u74-8e40-7a829b52e91e` | <!--source:api-specifications-->Transaction ID<!--/source--> |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->API Key<!--/source--> |

##### Request body`application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `data`required | `object` | — |
| `metadata` | `object` | — |

##### Response `200``application/json`

<!--source:api-specifications-->
4 fields
<!--/source-->
<!--source:api-specifications-->
Collection successfully updated
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `transaction_id` | `object` | <!--source:api-specifications-->Transaction ID<!--/source--> |
| `collection_id` | `object` | <!--source:api-specifications-->Collection ID<!--/source--> |
| `data` | `object` | <!--source:api-specifications-->Data object<!--/source--> |
| `metadata` | `object` | <!--source:api-specifications-->Metadata object<!--/source--> |

`POST` `/products/ide-output-adapter/invocations`

<!--source:api-specifications-->

#### Invoke Specific Product Flow
<!--/source-->

`InvokeSpecificProductFlow`

<!--source:api-specifications-->
Invoke Specific Product Flow helps you to invoke specific product flow, this endpoint shall:

- Validate the input `transaction_id`, `request_collection_id`, `response_collection_id` if provided.
- Create transaction if the `transaction_id` was not provided
- Create input collection with the `request_data` provided if the `request_collection_id` was not provided.
- Create empty output collection if the `response_collection_id` was not provided.
- Validate the provided product name and the product flow name
- Retrieve the product flow information associated to the provided Product Flow Name
Show the resti>Translate the input collection from Staircase language to Vendor language if `input_translation_language' was configured for the product flow.
- Run the connector flow associated to the Product Flow Name
- Set the status, connector `invocation_id` and `output_translation_language` that will be used to translate the results from Vendor Language to Staircase language if `output_translation_language` was configured for the product flow.

<!--/source-->

##### Request

<!--source:api-specifications-->
application/json Copy
```
{
 "product_flow_name": "get-document-from-byte",
 "transaction_id": "01F6NAMXWN2XVBD1YJ92A6S6R4",
 "response_collection_id": "01F6NAQ4894HPMCBGB4P0G95XK",
 "request_collection_id": "01F6QF1QJF20DMSXH4SYXKB1SN",
 "callback_url": "https://webhook.site/3706b519-9426-4533-9868-14a7dec4fd97",
 "request_data": {
 "request_example_v0": {
 "deal_sets": {
 "deal_set": [
 {
 "deals": {
 "deal": [
 {
 "parties": {
 "party": [
 {
 "individual": {
 "name": {
 "first": "John",
 "last": "Deere"
 }
 },
 "taxpayer_identifiers": {
 "taxpayer_identifier": [
 {
 "value": "999-00-0000"
 }
 ]
 }
 }
 ]
 },
 "loans": {
 "loan": [
 {
 "loan_identifiers": {
 "loan_identifier": [
 {
 "identifier": "6f039329-3fd6-44c1-a460-9af546e798de"
 }
 ]
 }
 }
 ]
 }
 }
 ]
 }
 }
 ]
 }
 }
 }
}
```

<!--/source-->

##### Response

<!--source:api-specifications-->
201400403500
<!--/source-->

<!--source:api-specifications-->
application/json Copy Successfully started flow invocation.

```
{
 "invocation_id": "9aefb465-90fb-4d50-8ae6-2df2b58373f4",
 "status": "STARTED",
 "output_language_name": "staircase",
 "transaction_id": "01F6NAMXWN2XVBD1YJ92A6S6R4",
 "request_collection_id": "01F6NAQ4894HPMCBGB4P0G95XK",
 "response_collection_id": "01F6QF1QJF20DMSXH4SYXKB1SN"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Request data failed validation

```
{
 "message": "string"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Invalid key for service

```
{
 "message": "Please check the key you used to call this service",
 "url": "https://staircase.stoplight.io/docs/api-reference/customer-account-manager-service.yml/paths/~1products~1refresh/post"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy The product has encountered an internal server error. If possible, please contact Staircase support with the transaction_id you used.

```
{
 "message": "The product has encountered an internal server error. If you have used a transaction_id to call our services, please submit it to Staircase support"
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
1
<!--/source-->

| Parameter | Type | Description |
| --- | --- | --- |
| `x-api-key` required | `string` header | <!--source:api-specifications-->adapter.staircaseapi.com environment API key.<!--/source--> |

##### Request body`application/json`

<!--source:api-specifications-->
6 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `product_flow_name` | `string` | — |
| `transaction_id` | `string` | — |
| `request_collection_id` | `string` | — |
| `response_collection_id` | `string` | — |
| `callback_url` | `string (uri)` | — |
| `request_data` | `object` | — |

##### Response `201``application/json`

<!--source:api-specifications-->
5 fields
<!--/source-->
<!--source:api-specifications-->
Successfully started flow invocation.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `invocation_id` | `string` | — |
| `invocation_status` | `string` | — |
| `transaction_id` | `string` | — |
| `request_collection_id` | `string` | — |
| `response_collection_id` | `string` | — |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Request data failed validation
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `one of` | — |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Invalid key for service
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | — |
| `url` | `string` | — |

##### Response `404``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Resource not found
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Message<!--/source--> |

##### Response `500``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
The product has encountered an internal server error. If possible, please contact Staircase support with the transaction_id you used.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | — |

`GET` `/products/ide-output-adapter/invocations/{invocation_id}`

<!--source:api-specifications-->

#### Retrieve Product Flow Invocation Status
<!--/source-->

`RetrieveProductFlowInvocationStatus`

<!--source:api-specifications-->
Retrieves the status of running Product flow invocation.

<!--/source-->

##### Response

<!--source:api-specifications-->
200400403500
<!--/source-->

<!--source:api-specifications-->
application/json Copy Successfully returned status of the Product flow Invocation.

```
{
 "status": "SUCCEEDED",
 "updated_at": "2021-05-27T15:17:59.859954-04:00",
 "transaction_id": "01F6NAMXWN2XVBD1YJ92A6S6R4",
 "response_collection_id": "01F6NAQ4894HPMCBGB4P0G95XK",
 "request_collection_id": "01F6QF1QJF20DMSXH4SYXKB1SN"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Request data failed validation

```
{
 "message": "string"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Invalid key for service

```
{
 "message": "Please check the key you used to call this service",
 "url": "https://staircase.stoplight.io/docs/api-reference/customer-account-manager-service.yml/paths/~1products~1refresh/post"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy The product has encountered an internal server error. If possible, please contact Staircase support with the transaction_id you used.

```
{
 "message": "The product has encountered an internal server error. If you have used a transaction_id to call our services, please submit it to Staircase support"
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
2
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | — | <!--source:api-specifications-->adapter.staircaseapi.com environment API key.<!--/source--> |
| `invocation_id` required | `string (ulid)` path | `01F0KHKADN0HRFXMCQQXPA6AFZ` | <!--source:api-specifications-->Product flow invocation identifier<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
5 fields
<!--/source-->
<!--source:api-specifications-->
Successfully returned status of the Product flow Invocation.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `invocation_status` | `string` | — |
| `updated_at` | `string` | — |
| `transaction_id` | `string` | — |
| `request_collection_id` | `string` | — |
| `response_collection_id` | `string` | — |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Request data failed validation
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Message<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Invalid key for service
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | — |
| `url` | `string` | — |

##### Response `404``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Resource not found
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Message<!--/source--> |

##### Response `500``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
The product has encountered an internal server error. If possible, please contact Staircase support with the transaction_id you used.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | — |

`GET` `/products/ide-output-adapter/request-elements`

<!--source:api-specifications-->

#### Retrieve Request Elements
<!--/source-->

`requestElements`

<!--source:api-specifications-->
Retrieve Request Elements retrieves a list of elements needed to invoke a data partner for product function invocation.

<!--/source-->

##### Response

<!--source:api-specifications-->
200400403404500
<!--/source-->

<!--source:api-specifications-->
application/json Copy Example for the Product Invocation Request Elements object

```
{
 "elements": [
 "$.file_data_id"
 ]
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Validation Error

```
{
 "message": "3 is not of type 'string'. Failed validating 'type' in schema['properties']['deal_sets']['items'][0]['properties']['parties']['items'][0]['properties']['customer_transaction_ID']:"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Invalid key for service

```
{
 "message": "Please check the key you used to call this service",
 "url": "https://staircase.stoplight.io/docs/api-reference/customer-account-manager-service.yml/paths/~1products~1refresh/post"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Resource not found

```
{
 "message": "Product with name superproduct is not found."
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy The product has encountered an internal server error. If possible, please contact Staircase support with the transaction_id you used.

```
{
 "message": "The product has encountered an internal server error. If you have used a transaction_id to call our services, please submit it to Staircase support"
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
1
<!--/source-->

| Parameter | Type | Description |
| --- | --- | --- |
| `x-api-key` required | `string` header | <!--source:api-specifications-->adapter.staircaseapi.com environment API key.<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Elements were retrieved successfully
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `elements`required | `string[]` | — |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Validation Error
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Message<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Invalid key for service
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | — |
| `url` | `string` | — |

##### Response `404``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Resource not found
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Message<!--/source--> |

##### Response `500``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
The product has encountered an internal server error. If possible, please contact Staircase support with the transaction_id you used.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | — |

`POST` `/products/ide-output-adapter/request-elements/validate`

<!--source:api-specifications-->

#### Validate Collection
<!--/source-->

`validateCollection`

<!--source:api-specifications-->
Validate Collection allows you to validate an input collection prior to submitting to our partners for a specific product. This endpoint will give messages with all the corrections you need to make to your collection in order for it to be accepted by our partner call.

<!--/source-->

##### Request

<!--source:api-specifications-->
application/json Copy
```
{
 "data": {
 "request_example_v0": {
 "deal_sets": {
 "deal_set": [
 {
 "deals": {
 "deal": [
 {
 "parties": {
 "party": [
 {
 "individual": {
 "name": {
 "first": "John",
 "last": "Deere"
 }
 },
 "taxpayer_identifiers": {
 "taxpayer_identifier": [
 {
 "value": "999-00-0000"
 }
 ]
 }
 }
 ]
 },
 "loans": {
 "loan": [
 {
 "loan_identifiers": {
 "loan_identifier": [
 {
 "identifier": "6f039329-3fd6-44c1-a460-9af546e798de"
 }
 ]
 }
 }
 ]
 }
 }
 ]
 }
 }
 ]
 }
 }
 },
 "metadata": {}
}
```

<!--/source-->

##### Response

<!--source:api-specifications-->
200400403404500
<!--/source-->

<!--source:api-specifications-->
application/json Copy Collection is valid

```
{
 "message": "Collection is valid."
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Validation Error

```
{
 "message": "3 is not of type 'string'. Failed validating 'type' in schema['properties']['deal_sets']['items'][0]['properties']['parties']['items'][0]['properties']['customer_transaction_ID']:"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Invalid key for service

```
{
 "message": "Please check the key you used to call this service",
 "url": "https://staircase.stoplight.io/docs/api-reference/customer-account-manager-service.yml/paths/~1products~1refresh/post"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Resource not found

```
{
 "message": "Product with name superproduct is not found."
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy The product has encountered an internal server error. If possible, please contact Staircase support with the transaction_id you used.

```
{
 "message": "The product has encountered an internal server error. If you have used a transaction_id to call our services, please submit it to Staircase support"
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
1
<!--/source-->

| Parameter | Type | Description |
| --- | --- | --- |
| `x-api-key` required | `string` header | <!--source:api-specifications-->adapter.staircaseapi.com environment API key.<!--/source--> |

##### Request body`application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `deal_sets` | `object` | — |
| `deal_set` | `object[]` | — |
| `deals` | `object` | — |
| `deal` | `object[]` | — |

##### Response `200``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Collection is valid
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Message<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Validation Error
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Message<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Invalid key for service
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | — |
| `url` | `string` | — |

##### Response `404``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Resource not found
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Message<!--/source--> |

##### Response `500``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
The product has encountered an internal server error. If possible, please contact Staircase support with the transaction_id you used.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | — |

`GET` `/products/ide-output-adapter/request-schema`

<!--source:api-specifications-->

#### Retrieve Request Schema
<!--/source-->

`retrieveRequestSchema`

<!--source:api-specifications-->
Retrieve Request Schema retrieves a JSON schema for the request to the product waterfall. It also has the option of returning an example for the request object expected through the return_example attribute.

<!--/source-->

##### Response

<!--source:api-specifications-->
200400403404500
<!--/source-->

<!--source:api-specifications-->
application/json Copy Successfully returned the list of elements needed for product waterfall.

```
{
 "data": {
 "request_example_v0": {
 "deal_sets": {
 "deal_set": [
 {
 "deals": {
 "deal": [
 {
 "parties": {
 "party": [
 {
 "individual": {
 "name": {
 "first": "John",
 "last": "Deere"
 }
 },
 "taxpayer_identifiers": {
 "taxpayer_identifier": [
 {
 "value": "999-00-0000"
 }
 ]
 }
 }
 ]
 },
 "loans": {
 "loan": [
 {
 "loan_identifiers": {
 "loan_identifier": [
 {
 "identifier": "6f039329-3fd6-44c1-a460-9af546e798de"
 }
 ]
 }
 }
 ]
 }
 }
 ]
 }
 }
 ]
 }
 }
 },
 "metadata": {}
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Error

```
{
 "message": "Please provide one of valid return examples values: true, false"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Invalid key for service

```
{
 "message": "Please check the key you used to call this service",
 "url": "https://staircase.stoplight.io/docs/api-reference/customer-account-manager-service.yml/paths/~1products~1refresh/post"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Resource not found

```
{
 "message": "Product with name superproduct is not found."
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy The product has encountered an internal server error. If possible, please contact Staircase support with the transaction_id you used.

```
{
 "message": "The product has encountered an internal server error. If you have used a transaction_id to call our services, please submit it to Staircase support"
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
2
<!--/source-->

| Parameter | Type | Description |
| --- | --- | --- |
| `x-api-key` required | `string` header | <!--source:api-specifications-->adapter.staircaseapi.com environment API key.<!--/source--> |
| `return_examples` | `boolean` query | <!--source:api-specifications-->If included and set to `true`, returns one or more pre-filled examples that conform to the schema. Default to `false`<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Successfully returned the list of elements needed for product waterfall.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `schema` | `object` | — |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Error
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Message<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Invalid key for service
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | — |
| `url` | `string` | — |

##### Response `404``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Resource not found
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Message<!--/source--> |

##### Response `500``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
The product has encountered an internal server error. If possible, please contact Staircase support with the transaction_id you used.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | — |

`GET` `/products/ide-output-adapter/response-elements`

<!--source:api-specifications-->

#### Retrieve Response Elements
<!--/source-->

`responseElements`

<!--source:api-specifications-->
Retrieve Response Elements provides a list of elements that will be returned by a data partner after invoking the product.

<!--/source-->

##### Response

<!--source:api-specifications-->
200400403404500
<!--/source-->

<!--source:api-specifications-->
application/json Copy Example for the Product Invocation Request Elements object

```
{
 "elements": "not implemented."
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Validation Error

```
{
 "message": "3 is not of type 'string'. Failed validating 'type' in schema['properties']['deal_sets']['items'][0]['properties']['parties']['items'][0]['properties']['customer_transaction_ID']:"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Invalid key for service

```
{
 "message": "Please check the key you used to call this service",
 "url": "https://staircase.stoplight.io/docs/api-reference/customer-account-manager-service.yml/paths/~1products~1refresh/post"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Resource not found

```
{
 "message": "Product with name superproduct is not found."
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy The product has encountered an internal server error. If possible, please contact Staircase support with the transaction_id you used.

```
{
 "message": "The product has encountered an internal server error. If you have used a transaction_id to call our services, please submit it to Staircase support"
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
1
<!--/source-->

| Parameter | Type | Description |
| --- | --- | --- |
| `x-api-key` required | `string` header | <!--source:api-specifications-->adapter.staircaseapi.com environment API key.<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Elements were retrieved successfully
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `elements`required | `string[]` | — |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Validation Error
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Message<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Invalid key for service
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | — |
| `url` | `string` | — |

##### Response `404``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Resource not found
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Message<!--/source--> |

##### Response `500``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
The product has encountered an internal server error. If possible, please contact Staircase support with the transaction_id you used.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | — |

`GET` `/products/ide-output-adapter/response-schema`

<!--source:api-specifications-->

#### Retrieve Response Schema
<!--/source-->

`retrieveResponseSchema`

<!--source:api-specifications-->
Retrieve Schema retrieves a JSON schema for the response returned by the product. It can also return an example for the response output object through return_example attribute.

<!--/source-->

##### Response

<!--source:api-specifications-->
200400403404500
<!--/source-->

<!--source:api-specifications-->
application/json Copy Successfully returned the list of elements of response of the product waterfall.

```
{
 "data": {
 "request_example_v0": {
 "deal_sets": {
 "deal_set": [
 {
 "deals": {
 "deal": [
 {
 "parties": {
 "party": [
 {
 "individual": {
 "name": {
 "first": "John",
 "last": "Deere"
 }
 },
 "taxpayer_identifiers": {
 "taxpayer_identifier": [
 {
 "value": "999-00-0000"
 }
 ]
 }
 }
 ]
 },
 "loans": {
 "loan": [
 {
 "loan_identifiers": {
 "loan_identifier": [
 {
 "identifier": "6f039329-3fd6-44c1-a460-9af546e798de"
 }
 ]
 }
 }
 ]
 }
 }
 ]
 }
 }
 ]
 }
 }
 },
 "metadata": {}
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Error

```
{
 "message": "Please provide one of valid return examples values: true, false"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Invalid key for service

```
{
 "message": "Please check the key you used to call this service",
 "url": "https://staircase.stoplight.io/docs/api-reference/customer-account-manager-service.yml/paths/~1products~1refresh/post"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Resource not found

```
{
 "message": "Product with name superproduct is not found."
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy The product has encountered an internal server error. If possible, please contact Staircase support with the transaction_id you used.

```
{
 "message": "The product has encountered an internal server error. If you have used a transaction_id to call our services, please submit it to Staircase support"
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
2
<!--/source-->

| Parameter | Type | Description |
| --- | --- | --- |
| `x-api-key` required | `string` header | <!--source:api-specifications-->adapter.staircaseapi.com environment API key.<!--/source--> |
| `return_examples` | `boolean` query | <!--source:api-specifications-->If included and set to `true`, returns one or more pre-filled examples that conform to the schema. Default to `false`<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Successfully returned the list of elements of response of the product waterfall.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `schema` | `object` | — |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Error
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Message<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Invalid key for service
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | — |
| `url` | `string` | — |

##### Response `404``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Resource not found
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Message<!--/source--> |

##### Response `500``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
The product has encountered an internal server error. If possible, please contact Staircase support with the transaction_id you used.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | — |

`POST` `/transactions`

<!--source:api-specifications-->

#### Create Transaction
<!--/source-->

`createTransaction`

<!--source:api-specifications-->
Create Transaction creates a transaction in Staircase. Transactions in Staircase are containers for all the data related to an instance of a transaction type. They enable you to correlate the output of various products to a single transaction type, where the transaction type depends on your line of business.

Transactions are identified by a unique key called `transaction_id`. As you use different Staircase products to gather the data needed for a specific instance of your transaction type, and receive different sets of output from each product, use the same transaction_id to correlate all the outputs to the same transaction. A `transaction_id`, when used properly, gives you a holistic view of the data related to the transaction you’ve assembled.

To access all collections associated with a given transaction_id, try out /transactions/{transaction_id}/collections

<!--/source-->

##### Response

<!--source:api-specifications-->
201403500
<!--/source-->

<!--source:api-specifications-->
application/json Copy Transaction created successfully

```
{
 "transaction_id": "01F0KHK7DN3H5JZ4QJKMYAM6GB",
 "created_at": "03/04/2021, 1:04:05 PM EST"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Invalid key for service

```
{
 "message": "Please check the key you used to call this service",
 "url": "https://staircase.stoplight.io/docs/api-reference/customer-account-manager-service.yml/paths/~1products~1refresh/post"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy The product has encountered an internal server error. If possible, please contact Staircase support with the transaction_id you used.

```
{
 "message": "The product has encountered an internal server error. If you have used a transaction_id to call our services, please submit it to Staircase support"
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
1
<!--/source-->

| Parameter | Type | Description |
| --- | --- | --- |
| `x-api-key` required | `string` header | <!--source:api-specifications-->adapter.staircaseapi.com environment API key.<!--/source--> |

##### Response `201``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Transaction created successfully
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `transaction_id` | `string (ulid)` | <!--source:api-specifications-->Staircase Transaction Identifier<!--/source-->Example `01F0KHK7DN3H5JZ4QJKMYAM6GB` |
| `created_at` | `string` | Example `03/03/2021, 8:24:04 AM EST` |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Invalid key for service
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | — |
| `url` | `string` | — |

##### Response `500``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
The product has encountered an internal server error. If possible, please contact Staircase support with the transaction_id you used.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | — |

`POST` `/transactions/{transaction_id}/collections`

<!--source:api-specifications-->

#### Create Collection
<!--/source-->

`createCollection`

<!--source:api-specifications-->
Create Collection creates a collection of data points required for product invocation. A collection contains a digital representation of the input or output data for the product and is identified by `collection_id`.

The Example below contains a sample collection that you can use to make the product invocation in /get-collection

<!--/source-->

##### Request

<!--source:api-specifications-->
application/json Copy
```
{
 "data": {
 "request_example_v0": {
 "deal_sets": {
 "deal_set": [
 {
 "deals": {
 "deal": [
 {
 "parties": {
 "party": [
 {
 "individual": {
 "name": {
 "first": "John",
 "last": "Deere"
 }
 },
 "taxpayer_identifiers": {
 "taxpayer_identifier": [
 {
 "value": "999-00-0000"
 }
 ]
 }
 }
 ]
 },
 "loans": {
 "loan": [
 {
 "loan_identifiers": {
 "loan_identifier": [
 {
 "identifier": "6f039329-3fd6-44c1-a460-9af546e798de"
 }
 ]
 }
 }
 ]
 }
 }
 ]
 }
 }
 ]
 }
 }
 },
 "metadata": {}
}
```

<!--/source-->

##### Response

<!--source:api-specifications-->
201400403404500
<!--/source-->

<!--source:api-specifications-->
application/json Copy Collection created successfully

```
{
 "data": {
 "request_example_v0": {
 "deal_sets": {
 "deal_set": [
 {
 "deals": {
 "deal": [
 {
 "parties": {
 "party": [
 {
 "individual": {
 "name": {
 "first": "John",
 "last": "Deere"
 }
 },
 "taxpayer_identifiers": {
 "taxpayer_identifier": [
 {
 "value": "999-00-0000"
 }
 ]
 }
 }
 ]
 },
 "loans": {
 "loan": [
 {
 "loan_identifiers": {
 "loan_identifier": [
 {
 "identifier": "6f039329-3fd6-44c1-a460-9af546e798de"
 }
 ]
 }
 }
 ]
 }
 }
 ]
 }
 }
 ]
 }
 }
 },
 "metadata": {}
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Error

```
{
 "message": "Unable to create collection. Please check the collection data"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Invalid key for service

```
{
 "message": "Please check the key you used to call this service",
 "url": "https://staircase.stoplight.io/docs/api-reference/customer-account-manager-service.yml/paths/~1products~1refresh/post"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Resource not found

```
{
 "message": "Unable to create collection. Please check the transaction Id"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy The product has encountered an internal server error. If possible, please contact Staircase support with the transaction_id you used.

```
{
 "message": "The product has encountered an internal server error. If you have used a transaction_id to call our services, please submit it to Staircase support"
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
2
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | — | <!--source:api-specifications-->adapter.staircaseapi.com environment API key.<!--/source--> |
| `transaction_id` required | `string (ulid)` path | `01F0KHK7DN3H5JZ4QJKMYAM6GB` | <!--source:api-specifications-->Staircase Transaction Identifier<!--/source--> |

##### Request body`application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `data` | `object` | — |
| `document`required | `object` | — |
| `file_data_id`required | `string` | — |
| `metadata` | `—` | — |

##### Response `201``application/json`

<!--source:api-specifications-->
4 fields
<!--/source-->
<!--source:api-specifications-->
Collection created successfully
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `transaction_id` | `string (ulid)` | <!--source:api-specifications-->Transaction id<!--/source-->Example `01EZQ32PJQGKRA6HR8D72Q9FFF` |
| `collection_id` | `string (ulid)` | <!--source:api-specifications-->Collection id<!--/source-->Example `01EZQ32PJQGKRA6HR8D72Q9FFF` |
| `data` | `array` | — |
| `metadata` | `object` | <!--source:api-specifications-->Metadata about collection, f.e version of used Staircase schema<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Error
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `one of` | — |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Invalid key for service
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | — |
| `url` | `string` | — |

##### Response `404``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Resource not found
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Message<!--/source--> |

##### Response `500``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
The product has encountered an internal server error. If possible, please contact Staircase support with the transaction_id you used.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | — |

`GET` `/transactions/{transaction_id}/collections/{collection_id}`

<!--source:api-specifications-->

#### Retrieve Collection
<!--/source-->

`retrieveCollection`

<!--source:api-specifications-->
Retrieve Collection returns the content of a given `collection_id` associated with a `transaction_id`.

<!--/source-->

##### Response

<!--source:api-specifications-->
200403404 GetCollectionError404 GetCollectionsError500
<!--/source-->

<!--source:api-specifications-->
application/json Copy Successfully Retrieved Collection

```
{
 "data": {
 "request_example_v0": {
 "deal_sets": {
 "deal_set": [
 {
 "deals": {
 "deal": [
 {
 "parties": {
 "party": [
 {
 "individual": {
 "name": {
 "first": "John",
 "last": "Deere"
 }
 },
 "taxpayer_identifiers": {
 "taxpayer_identifier": [
 {
 "value": "999-00-0000"
 }
 ]
 }
 }
 ]
 },
 "loans": {
 "loan": [
 {
 "loan_identifiers": {
 "loan_identifier": [
 {
 "identifier": "6f039329-3fd6-44c1-a460-9af546e798de"
 }
 ]
 }
 }
 ]
 }
 }
 ]
 }
 }
 ]
 }
 }
 },
 "metadata": {}
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Invalid key for service

```
{
 "message": "Please check the key you used to call this service",
 "url": "https://staircase.stoplight.io/docs/api-reference/customer-account-manager-service.yml/paths/~1products~1refresh/post"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Resource not found

```
{
 "message": "Unable to get collection. Please check the given ids"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Resource not found

```
{
 "message": "Unable to get collections of given transaction. Please check the transaction id"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy The product has encountered an internal server error. If possible, please contact Staircase support with the transaction_id you used.

```
{
 "message": "The product has encountered an internal server error. If you have used a transaction_id to call our services, please submit it to Staircase support"
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
3
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | — | <!--source:api-specifications-->adapter.staircaseapi.com environment API key.<!--/source--> |
| `transaction_id` required | `string (ulid)` path | `01F0KHK7DN3H5JZ4QJKMYAM6GB` | <!--source:api-specifications-->Staircase Transaction Identifier<!--/source--> |
| `collection_id` required | `string (ulid)` path | `01F0KHKADN0HRFXMCQQXPA6AFZ` | <!--source:api-specifications-->Staircase collection_id<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Successfully Retrieved Collection
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `data` | `object` | — |
| `document`required | `object` | — |
| `file_data_id`required | `string` | — |
| `metadata` | `—` | — |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Invalid key for service
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | — |
| `url` | `string` | — |

##### Response `404``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Resource not found
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Message<!--/source--> |

##### Response `500``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
The product has encountered an internal server error. If possible, please contact Staircase support with the transaction_id you used.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | — |

##### Other responses

`400`

`PUT` `/transactions/{transaction_id}/collections/{collection_id}`

<!--source:api-specifications-->

#### Update Collection
<!--/source-->

`updateCollection`

<!--source:api-specifications-->
Update Collection allows you to update the content of a given `collection_id` associated with a `transaction_id`.

<!--/source-->

##### Request

<!--source:api-specifications-->
application/json Copy
```
{
 "data": {
 "request_example_v0": {
 "deal_sets": {
 "deal_set": [
 {
 "deals": {
 "deal": [
 {
 "parties": {
 "party": [
 {
 "individual": {
 "name": {
 "first": "John",
 "last": "Deere"
 }
 },
 "taxpayer_identifiers": {
 "taxpayer_identifier": [
 {
 "value": "999-00-0000"
 }
 ]
 }
 }
 ]
 },
 "loans": {
 "loan": [
 {
 "loan_identifiers": {
 "loan_identifier": [
 {
 "identifier": "6f039329-3fd6-44c1-a460-9af546e798de"
 }
 ]
 }
 }
 ]
 }
 }
 ]
 }
 }
 ]
 }
 }
 },
 "metadata": {}
}
```

<!--/source-->

##### Response

<!--source:api-specifications-->
200400403404500
<!--/source-->

<!--source:api-specifications-->
application/json Copy Collection updated successfully

```
{
 "data": {
 "request_example_v0": {
 "deal_sets": {
 "deal_set": [
 {
 "deals": {
 "deal": [
 {
 "parties": {
 "party": [
 {
 "individual": {
 "name": {
 "first": "John",
 "last": "Deere"
 }
 },
 "taxpayer_identifiers": {
 "taxpayer_identifier": [
 {
 "value": "999-00-0000"
 }
 ]
 }
 }
 ]
 },
 "loans": {
 "loan": [
 {
 "loan_identifiers": {
 "loan_identifier": [
 {
 "identifier": "6f039329-3fd6-44c1-a460-9af546e798de"
 }
 ]
 }
 }
 ]
 }
 }
 ]
 }
 }
 ]
 }
 }
 },
 "metadata": {}
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Error

```
{
 "message": "Unable to update collection. Please check the collection data"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Invalid key for service

```
{
 "message": "Please check the key you used to call this service",
 "url": "https://staircase.stoplight.io/docs/api-reference/customer-account-manager-service.yml/paths/~1products~1refresh/post"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Resource not found

```
{
 "message": "Unable to update collection. Please check the given ids"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy The product has encountered an internal server error. If possible, please contact Staircase support with the transaction_id you used.

```
{
 "message": "The product has encountered an internal server error. If you have used a transaction_id to call our services, please submit it to Staircase support"
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
3
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | — | <!--source:api-specifications-->adapter.staircaseapi.com environment API key.<!--/source--> |
| `transaction_id` required | `string (ulid)` path | `01F0KHK7DN3H5JZ4QJKMYAM6GB` | <!--source:api-specifications-->Staircase Transaction Identifier<!--/source--> |
| `collection_id` required | `string (ulid)` path | `01F0KHKADN0HRFXMCQQXPA6AFZ` | <!--source:api-specifications-->Staircase collection_id<!--/source--> |

##### Request body`application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `data` | `object` | — |
| `document`required | `object` | — |
| `file_data_id`required | `string` | — |
| `metadata` | `—` | — |

##### Response `200``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Collection updated successfully
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `data` | `object` | — |
| `document`required | `object` | — |
| `file_data_id`required | `string` | — |
| `metadata` | `—` | — |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Error
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `one of` | — |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Invalid key for service
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | — |
| `url` | `string` | — |

##### Response `404``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Resource not found
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Message<!--/source--> |

##### Response `500``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
The product has encountered an internal server error. If possible, please contact Staircase support with the transaction_id you used.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | — |

## Providers

- Docutech

## Errors

`400``403``404``405``422``500`

## More in Contract

- Next product: Electronic
