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

# Document

A scorecard for document extraction: per-vendor accuracy and cost on real documents, exposed as endpoints rather than as a report.

Several extraction vendors are integrated for the same document types. This product measures them against ground truth and serves the result — accuracy per document type, per field, and the cost of each attempt.

Because it is an API rather than a dashboard, routing can consume it. A document type where one vendor is measurably better is a routing decision the pipeline can make rather than a preference someone remembers.

## How it works

Ground truth comes from a labelling pipeline run over real documents rather than synthetic ones. Measuring extraction on generated documents produces a number that does not survive contact with a scanned fax.

## Dual listing

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

## Operations

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

### Documents
<!--/source-->

`PUT` `/documents/{document_type}`

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

#### Create or update document type
<!--/source-->

`updateDocument`

<!--source:api-specifications-->
Create or update document type. Provided list of fields will be displayed to the labeller. Results will be translated to v2 and saved to response collection. Result with provided list of fields will be available via Retrieve Job endpoint.

<!--/source-->

##### Request

<!--source:api-specifications-->
application/json Copy
```
{
 "fields": [
 {
 "name": "document_date",
 "type": "date",
 "description": "Document date."
 },
 {
 "name": "document_signed_indicator",
 "type": "boolean",
 "description": "Identifies if document is signed"
 },
 {
 "name": "borrower_first_name",
 "type": "string",
 "description": "Borrower first name"
 }
 ],
 "language_name": "doc_v2_language"
}
```

<!--/source-->

##### Response

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

```
{
 "document_type": "my_document_type",
 "fields": [
 {
 "name": "document_date",
 "type": "date",
 "description": "Document date."
 },
 {
 "name": "document_signed_indicator",
 "type": "boolean",
 "description": "Identifies if document is signed"
 },
 {
 "name": "borrower_first_name",
 "type": "string",
 "description": "Borrower first name"
 }
 ],
 "mapping_name": "doc_v2_mapping"
}
```

<!--/source-->

##### Parameters

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

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `document_type` required | `string` path | `irs_w2` | <!--source:api-specifications-->Document type<!--/source--> |

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

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

| Field | Type | Description |
| --- | --- | --- |
| `fields`required | `object[]` | <!--source:api-specifications-->List of fields<!--/source--> |
| `name`required | `string` | <!--source:api-specifications-->Field name<!--/source--> |
| `type`required | `string` | <!--source:api-specifications-->Field datatype<!--/source-->`boolean``date``integer``number``string` |
| `description` | `string` | <!--source:api-specifications-->Field description.<!--/source--> |
| `enum` | `string[]` | <!--source:api-specifications-->List of possible values<!--/source--> |
| `mapping_name` | `string` | <!--source:api-specifications-->Name of mapping, created using staircase Translator product<!--/source--> |
| `language_name` | `string` | <!--source:api-specifications-->Name of language, created using staircase Language product.<!--/source--> |
| `soft_validation` | `boolean` | <!--source:api-specifications-->The flag that define if failed validation should fail creating/update of the document or just add validation errors as warnings to the document info.<!--/source--> |

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

<!--source:api-specifications-->
6 fields
<!--/source-->
<!--source:api-specifications-->
Document has been created/updated
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `document_type` | `string` | <!--source:api-specifications-->Document type<!--/source--> |
| `fields` | `object[]` | <!--source:api-specifications-->List of fields<!--/source--> |
| `name`required | `string` | <!--source:api-specifications-->Field name<!--/source--> |
| `type`required | `string` | <!--source:api-specifications-->Field datatype<!--/source-->`boolean``date``integer``number``string` |
| `description` | `string` | <!--source:api-specifications-->Field description.<!--/source--> |
| `enum` | `string[]` | <!--source:api-specifications-->List of possible values<!--/source--> |
| `mapping_name` | `string` | <!--source:api-specifications-->Name of mapping, created using staircase Translator product.<!--/source--> |
| `language_name` | `string` | <!--source:api-specifications-->Name of language, created using staircase Language product.<!--/source--> |
| `soft_validation` | `boolean` | <!--source:api-specifications-->The flag that define if failed validation should fail creating/update of the document or just add validation errors as warnings to the document info.<!--/source--> |
| `validation_errors` | `object` | <!--source:api-specifications-->Validation information<!--/source--> |
| `message`required | `string` | <!--source:api-specifications-->Validation general message<!--/source--> |
| `error` | `object` | <!--source:api-specifications-->Validation error details<!--/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--> |

##### Other responses

`422`

`GET` `/documents/{document_type}`

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

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

`retrieveDocument`

##### Response

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

```
{
 "document_type": "my_document_type",
 "fields": [
 {
 "name": "document_date",
 "type": "date",
 "description": "Document date."
 },
 {
 "name": "document_signed_indicator",
 "type": "boolean",
 "description": "Identifies if document is signed"
 },
 {
 "name": "borrower_first_name",
 "type": "string",
 "description": "Borrower first name"
 }
 ],
 "mapping_name": "doc_v2_mapping"
}
```

<!--/source-->

##### Parameters

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

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `document_type` required | `string` path | `irs_w2` | <!--source:api-specifications-->Document type<!--/source--> |

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

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

| Field | Type | Description |
| --- | --- | --- |
| `document_type` | `string` | <!--source:api-specifications-->Document type<!--/source--> |
| `fields` | `object[]` | <!--source:api-specifications-->List of fields<!--/source--> |
| `name`required | `string` | <!--source:api-specifications-->Field name<!--/source--> |
| `type`required | `string` | <!--source:api-specifications-->Field datatype<!--/source-->`boolean``date``integer``number``string` |
| `description` | `string` | <!--source:api-specifications-->Field description.<!--/source--> |
| `enum` | `string[]` | <!--source:api-specifications-->List of possible values<!--/source--> |
| `mapping_name` | `string` | <!--source:api-specifications-->Name of mapping, created using staircase Translator product.<!--/source--> |
| `language_name` | `string` | <!--source:api-specifications-->Name of language, created using staircase Language product.<!--/source--> |
| `soft_validation` | `boolean` | <!--source:api-specifications-->The flag that define if failed validation should fail creating/update of the document or just add validation errors as warnings to the document info.<!--/source--> |
| `validation_errors` | `object` | <!--source:api-specifications-->Validation information<!--/source--> |
| `message`required | `string` | <!--source:api-specifications-->Validation general message<!--/source--> |
| `error` | `object` | <!--source:api-specifications-->Validation error details<!--/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-->
Not Found
<!--/source-->

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

`DELETE` `/documents/{document_type}`

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

#### Delete document type
<!--/source-->

`deleteDocument`

##### Parameters

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

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `document_type` required | `string` path | `irs_w2` | <!--source:api-specifications-->Document type<!--/source--> |

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

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Document type has been deleted
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->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-->
Not Found
<!--/source-->

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

`POST` `/documents/{document_type}/samples`

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

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

`createSample`

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

<!--/source-->

##### Request

<!--source:api-specifications-->
application/json Copy
```
{
 "blob_id": "01G9300Q4KT3FHP61ANG2R66SY",
 "name": "FILLED_CLOSING_DISCLOSURE"
}
```

<!--/source-->

##### Parameters

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

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `document_type` required | `string` path | `irs_w2` | <!--source:api-specifications-->Document type<!--/source--> |

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

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

| Field | Type | Description |
| --- | --- | --- |
| `blob_id`required | `string (ulid)` | <!--source:api-specifications-->Blob ID<!--/source--> |
| `name` | `string` | <!--source:api-specifications-->Sample alias<!--/source--> |

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

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

| Field | Type | Description |
| --- | --- | --- |
| `sample_id`required | `string (ulid)` | <!--source:api-specifications-->Sample ID<!--/source--> |
| `blob_id`required | `string (ulid)` | <!--source:api-specifications-->Blob ID<!--/source--> |
| `name` | `string` | <!--source:api-specifications-->Sample alias<!--/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-->
Not Found
<!--/source-->

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

##### Other responses

`422`

`GET` `/documents/{document_type}/samples`

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

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

`retrieveSamples`

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

<!--/source-->

##### Parameters

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

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `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-->
Document samples
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `count` | `integer` | <!--source:api-specifications-->Samples count<!--/source--> |
| `samples` | `array` | <!--source:api-specifications-->Samples<!--/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-->
Not Found
<!--/source-->

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

`GET` `/documents/hint`

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

#### Get Classification Hint
<!--/source-->

`getClassificationHint`

<!--source:api-specifications-->
Provides the URL to the classification hint page.

<!--/source-->

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

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

| Field | Type | Description |
| --- | --- | --- |
| `hint_page_url`required | `string` | <!--source:api-specifications-->URL to the hint page<!--/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--> |

`DELETE` `/documents/{document_type}/samples/{sample_id}`

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

#### Delete Sample
<!--/source-->

`deleteSample`

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

<!--/source-->

##### Parameters

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

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `document_type` required | `string` path | `irs_w2` | <!--source:api-specifications-->Document type<!--/source--> |
| `sample_id` required | `string` path | `12345` | <!--source:api-specifications-->Sample ID<!--/source--> |

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

<!--source:api-specifications-->
3 fields
<!--/source-->
<!--source:api-specifications-->
Document type has been deleted
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `sample_id`required | `string (ulid)` | <!--source:api-specifications-->Sample ID<!--/source--> |
| `blob_id`required | `string (ulid)` | <!--source:api-specifications-->Blob ID<!--/source--> |
| `name` | `string` | <!--source:api-specifications-->Sample alias<!--/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-->
Not Found
<!--/source-->

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

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

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

`POST` `/transactions`

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

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

`createTransaction`

<!--source:api-specifications-->
Create empty transaction You can subscribe to every changes inside transaction by providing `callback_url` in body, and you will receive `POST` request to this url, with your `x-api-key` in headers. If you respond with a non `2XX` status code or not within 6 sec, requests will be retried during 5 minutes every 2 seconds, you can indicate if you already processed that event, but for some reasons respond with non `2XX` code by `id` parameter. `type` parameter indicates type of the event.

Show the rest

| Event type | Description |
| --- | --- |
| co.staircase.persistence.collection_created | New collection was created |
| co.staircase.persistence.collection_data_inserted | Data was added to collection |
| co.staircase.persistence.collection_metadata_updated | Metadata of collection was updated |
| co.staircase.persistence.collection_updated | Both metadata and data of collection was updated |
| Event structure is cloudevents, so you can use any tools that supports it or SDK ```json json_schema |  |
| { |  |
| "type": "object", |  |
| "$schema": "", |  |
| "properties": { |  |
| "specversion": { |  |
| "type": "string", |  |
| "description": "Version of cloudevents event structure" |  |
| }, |  |
| "id": { |  |
| "type": "string", |  |
| "description": "Unique identifier of the event, for retired requests will always be the same" |  |
| }, |  |
| "source": { |  |
| "type": "string", |  |
| "description": "Source of the event, for Persistence it will always be co.staircase.persistence", |  |
| "const": "persistence" |  |
| }, |  |
| "type": { |  |
| "type": "string", |  |
| "description": "Name of the event, that indicates, what happened", |  |
| "enum": [ |  |
| "co.staircase.persistence.collection_created", |  |
| "co.staircase.persistence.collection_data_inserted", |  |
| "co.staircase.persistence.collection_metadata_updated", |  |
| "co.staircase.persistence.collection_updated" |  |
| ] |  |
| }, |  |
| "time": { |  |
| "type": "string", |  |
| "format": "date-time", |  |
| "description": "Timestamp of when the occurrence happened." |  |
| }, |  |
| "data": { |  |
| "type": "object", |  |
| "properties": { |  |
| "transaction_id": { |  |
| "type": "string", |  |
| "format": "ulid", |  |
| "description": "Transaction id" |  |
| }, |  |
| "collection_id": { |  |
| "type": "string", |  |
| "format": "ulid", |  |
| "description": "Collection id" |  |
| }, |  |
| "collection": { |  |
| "type": "object", |  |
| "description": "Collection itself" |  |
| } |  |
| } |  |
| } |  |
| } |  |
| } |  |
| ``` You can assign label to transaction by providing `label` field. To search for transaction using label you should use Retrieve List of Transactions endpoint |  |

<!--/source-->

##### Request

<!--source:api-specifications-->
application/json Copy
```
{
 "label": "first_transaction",
 "callback_url": "https://webhook.site/0c1c4e00-79d9-490b-a0f3-bab8b12a61d5"
}
```

<!--/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 403 invalid error

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

<!--/source-->

<!--source:api-specifications-->
application/json Copy Internal server error

```
{
 "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-->
2 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `callback_url` | `string (url)` | <!--source:api-specifications-->URL for receiving events about changes inside transaction<!--/source--> |
| `label` | `string` | <!--source:api-specifications-->Transaction label<!--/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` | <!--source:api-specifications-->Staircase time string.<!--/source-->Example `03/03/2021, 8:24:04 AM EST` |

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

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
403 invalid error
<!--/source-->

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

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

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Internal server error
<!--/source-->

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

##### Other responses

`400`

`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
```
{}
```

<!--/source-->

##### Response

<!--source:api-specifications-->
201400 CreateCollectionError400 text/html403404 CreateCollectionError404 text/html500
<!--/source-->

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

```
{}
```

<!--/source-->

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

```
{
 "message": "Unable to create collection. Please check the collection data"
}
```

<!--/source-->

<!--source:api-specifications-->
text/html Copy Error

```
<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n</body>\r\n</html>\r\n
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy 403 invalid error

```
{
 "message": "Please check the key you used to call this service",
 "url": "https://api.staircase.co/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-->
text/html Copy Resource not found

```
<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n</body>\r\n</html>\r\n
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Internal server error

```
{
 "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--> |
| `transaction_id` required | `string (ulid)` path | `01F0KHK7DN3H5JZ4QJKMYAM6GB` | <!--source:api-specifications-->Staircase Transaction Identifier<!--/source--> |

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

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

| Field | Type | Description |
| --- | --- | --- |
| `message` | `one of` | <!--source:api-specifications-->Either message object with more properties.<!--/source--> |

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

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
403 invalid error
<!--/source-->

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

##### 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-->
Internal server error
<!--/source-->

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

##### Other responses

`201``405`

`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

```
{}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy 403 invalid error

```
{
 "message": "Please check the key you used to call this service",
 "url": "https://api.staircase.co/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 Internal server error

```
{
 "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 | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->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 `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
403 invalid error
<!--/source-->

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

##### 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-->
Internal server error
<!--/source-->

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

##### Other responses

`200``400`

`POST` `/classify`

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

#### Classification
<!--/source-->

`invokeProductFlow`

<!--source:api-specifications-->
Invoke Product
<!--/source-->

<!--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 rest
- Run the connector flow associated to the Product Flow Name;
- Translate the input collection from Vendor language to Staircase language if `output_translation_language` was configured for the product flow;
- Set the status, `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-->
InvokeByFlowNameInvokeByTagsInvokeWithRequestDataInvokeWithFlowOptionsCollectionsInvokeWithFlowOptionsRequestDataInvokeByFlowNameOptionsInvokeByVendorNameOptionsInvokeWaterfall
<!--/source-->

<!--source:api-specifications-->
application/json Copy
```
{
 "product_flow_name": "documentai",
 "transaction_id": "01F6NAMXWN2XVBD1YJ92A6S6R4",
 "response_collection_id": "01F6NAQ4894HPMCBGB4P0G95XK",
 "request_collection_id": "01F6QF1QJF20DMSXH4SYXKB1SN",
 "callback_url": "https://webhook.site/3706b519-9426-4533-9868-14a7dec4fd97",
 "request_data": {}
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy
```
{
 "transaction_id": "01F6NAMXWN2XVBD1YJ92A6S6R4",
 "response_collection_id": "01F6NAQ4894HPMCBGB4P0G95XK",
 "request_collection_id": "01F6QF1QJF20DMSXH4SYXKB1SN",
 "callback_url": "https://webhook.site/3706b519-9426-4533-9868-14a7dec4fd97",
 "tags": [
 "manual_verification"
 ]
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy
```
{
 "product_flow_name": "get-document-from-byte",
 "transaction_id": "01F6NAMXWN2XVBD1YJ92A6S6R4",
 "response_collection_id": "01F6NAQ4894HPMCBGB4P0G95XK",
 "callback_url": "https://webhook.site/3706b519-9426-4533-9868-14a7dec4fd97",
 "request_data": {
 "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
```
{
 "transaction_id": "01F6NAMXWN2XVBD1YJ92A6S6R4",
 "response_collection_id": "01F6NAQ4894HPMCBGB4P0G95XK",
 "request_collection_id": "01F6QF1QJF20DMSXH4SYXKB1SN",
 "callback_url": "https://webhook.site/3706b519-9426-4533-9868-14a7dec4fd97",
 "tags": [
 "manual_verification"
 ],
 "options": {
 "option1": "test_option"
 }
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy
```
{
 "transaction_id": "01F6NAMXWN2XVBD1YJ92A6S6R4",
 "response_collection_id": "01F6NAQ4894HPMCBGB4P0G95XK",
 "callback_url": "https://webhook.site/3706b519-9426-4533-9868-14a7dec4fd97",
 "request_data": {
 "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"
 }
 }
 ]
 }
 }
 }
 ]
 }
 }
 ]
 }
 }
 ]
 }
 }
 ]
 }
 },
 "tags": [
 "manual_verification"
 ],
 "options": {
 "option1": "test_option"
 }
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy
```
{
 "product_flow_name": "get-document-from-byte",
 "transaction_id": "01F6NAMXWN2XVBD1YJ92A6S6R4",
 "request_collection_id": "01F6QF1QJF20DMSXH4SYXKB1SN",
 "response_collection_id": "01F6NAQ4894HPMCBGB4P0G95XK",
 "callback_url": "https://webhook.site/3706b519-9426-4533-9868-14a7dec4fd97",
 "options": {
 "option1": "test_option"
 }
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy
```
{
 "vendor_name": "Vendor_name_example",
 "transaction_id": "01F6NAMXWN2XVBD1YJ92A6S6R4",
 "request_collection_id": "01F6QF1QJF20DMSXH4SYXKB1SN",
 "response_collection_id": "01F6NAQ4894HPMCBGB4P0G95XK",
 "callback_url": "https://webhook.site/3706b519-9426-4533-9868-14a7dec4fd97",
 "options": {
 "option1": "test_option"
 }
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy
```
{
 "transaction_id": "01F6NAMXWN2XVBD1YJ92A6S6R4",
 "request_collection_id": "01F6QF1QJF20DMSXH4SYXKB1SN",
 "response_collection_id": "01F6NAQ4894HPMCBGB4P0G95XK",
 "callback_url": "https://webhook.site/3706b519-9426-4533-9868-14a7dec4fd97",
 "invocation_mode": "waterfall"
}
```

<!--/source-->

##### Response

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

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

```
{
 "invocation_id": "9aefb465-90fb-4d50-8ae6-2df2b58373f4",
 "invocation_status": "STARTED",
 "product_flow_name": "product_flow_name_example",
 "transaction_id": "01F6NAMXWN2XVBD1YJ92A6S6R4",
 "request_collection_id": "01F6NAQ4894HPMCBGB4P0G95XK",
 "response_collection_id": "01F6NAQ4894HPMCBGB4P0G78HG",
 "options": {
 "dry_run": false
 },
 "tags": [
 "manual verification"
 ],
 "widget_url": "https://product-dev-productsbucket-1j472c4onqkxw.s3.amazonaws.com/widgets/063f5f"
}
```

<!--/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 403 invalid error

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

<!--/source-->

<!--source:api-specifications-->
text/html Copy Resource not found

```
<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n</body>\r\n</html>\r\n
```

<!--/source-->

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

```
{
 "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 Internal server error

```
{
 "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-->
10 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `product_flow_name` | `string` | <!--source:api-specifications-->Product flow name. If it is not specified, the default product flow will be invoked. If the product has no default product flow, the first created flow will be invoked. Cannot be specified together with vendor_name.<!--/source--> |
| `vendor_name` | `string` | <!--source:api-specifications-->Vendor name. Cannot be specified together with product_flow_name.<!--/source--> |
| `transaction_id` | `string` | <!--source:api-specifications-->Transaction ID used for invocation.<!--/source--> |
| `request_collection_id` | `string` | <!--source:api-specifications-->Request Collection ID.<!--/source--> |
| `response_collection_id` | `string` | <!--source:api-specifications-->Response Collection ID.<!--/source--> |
| `callback_url` | `string (uri)` | <!--source:api-specifications-->Callback URL.<!--/source--> |
| `request_data` | `object` | <!--source:api-specifications-->Request JSON body.<!--/source--> |
| `tags` | `string[]` | <!--source:api-specifications-->List of tags.<!--/source--> |
| `options` | `object` | <!--source:api-specifications-->Additional information that should be passed to the connector but not be added to the request collection.<!--/source--> |
| `invocation_mode` | `string` | <!--source:api-specifications-->The invocation mode of a product flow single_flow or waterfall, default value single_flow<!--/source--> |

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

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

| Field | Type | Description |
| --- | --- | --- |
| `invocation_id`required | `string` | <!--source:api-specifications-->Invocation ID.<!--/source--> |
| `invocation_status`required | `string` | <!--source:api-specifications-->The status of the invocation.<!--/source-->`STARTED` |
| `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--> |
| `product_flow_name` | `string` | <!--source:api-specifications-->Product flow name.<!--/source--> |
| `metadata` | `object` | <!--source:api-specifications-->The metadata of the invoked product flow.<!--/source--> |
| `callback_url` | `string` | <!--source:api-specifications-->Callback URL.<!--/source--> |
| `request_data` | `object` | <!--source:api-specifications-->The data for the request collection.<!--/source--> |
| `tags` | `string[]` | <!--source:api-specifications-->List of tags.<!--/source--> |
| `options` | `object` | <!--source:api-specifications-->Additional information that should be passed to the connector but not be added to the request collection.<!--/source--> |
| `widget_url` | `string` | <!--source:api-specifications-->Product widget_url listening on the connector widget_url<!--/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-->
403 invalid error
<!--/source-->

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

##### 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 `422``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Unprocessable entity error
<!--/source-->

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

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

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Internal server error
<!--/source-->

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

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

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

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

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

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

`RetrieveTransactionCollections`

<!--source:api-specifications-->
Retrieve Transaction Collections. Collections can be filtered by collection_id or created_at fields. Supported operations per fields:

- collection_id:
- in:
- description: Get only collections with specified ids
- example: collection_id+in+01EZQ32PJQGKRA6HR8D72Q9FFF,01EZQ32NZ34WACWSAF54WGEM51
- created_at:
- gt:
- description: Get collections that were created after specified datetime in ISO format
- example: created_at+gt+2021-03-30T04:27:15.372006-04:00
- lt:
- description: Get collections that were created before specified datetime in ISO format
- example: created_at+lt+2021-03-30T04:27:15.372006-04:00

<!--/source-->

##### Response

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

<!--source:api-specifications-->
application/json Copy Transaction collection retrieved successfully

```
{}
```

<!--/source-->

<!--source:api-specifications-->
text/html Copy Error

```
<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n</body>\r\n</html>\r\n
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy 403 invalid error

```
{
 "message": "Please check the key you used to call this service",
 "url": "https://api.staircase.co/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 collections of given transaction. Please check the transaction id"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Internal server error

```
{
 "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--> |
| `transaction_id` required | `string (ulid)` path | `01F0KHK7DN3H5JZ4QJKMYAM6GB` | <!--source:api-specifications-->Staircase Transaction Identifier<!--/source--> |

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

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

| Field | Type | Description |
| --- | --- | --- |
| `message` | `one of` | <!--source:api-specifications-->Either message object with more properties.<!--/source--> |

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

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
403 invalid error
<!--/source-->

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

##### 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-->
Internal server error
<!--/source-->

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

##### Other responses

`200`

`GET` `/partners`

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

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

`getVendors`

<!--source:api-specifications-->
Retrieve Product Partners
<!--/source-->

<!--source:api-specifications-->
Retrieve Partners retrieves: -All the Partners (vendors) configured in the Product Flows configurations. -The Order of the partner in the Product Waterfall Settings or default order in Product Flows if Product Waterfall was not configured. -The status of the partners as active/upcoming according to the configurations of the product flows of these partners (partner will be active if at least one flow is active).

<!--/source-->

##### Response

<!--source:api-specifications-->
200 Example1200 Example2400403404 GetProduct404 text/html500
<!--/source-->

<!--source:api-specifications-->
application/json Copy Successfully retrieved product partners.

```
[
 {
 "Partner": "partner_name",
 "order": 1,
 "active": true,
 "status": "active",
 "verification_type": "borrower",
 "byoc": true
 }
]
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Successfully retrieved product partners.

```
[
 {
 "Partner": "partner_name",
 "order": 1,
 "active": false,
 "status": "upcoming",
 "verification_type": "borrower",
 "byoc": true
 }
]
```

<!--/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 403 invalid error

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

<!--/source-->

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

```
{
 "type": "string",
 "description": "Error Message."
}
```

<!--/source-->

<!--source:api-specifications-->
text/html Copy Resource not found

```
<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n</body>\r\n</html>\r\n
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Internal server error

```
{
 "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--> |
| `active` | `boolean` query | `false` | <!--source:api-specifications-->Include vendors with active product flows<!--/source--> |

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

<!--source:api-specifications-->
6 fields
<!--/source-->
<!--source:api-specifications-->
Successfully retrieved product partners.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `partner` | `string` | <!--source:api-specifications-->Partner name<!--/source--> |
| `order` | `number` | <!--source:api-specifications-->Order of the product flows associated with this partner<!--/source--> |
| `active` | `boolean` | <!--source:api-specifications-->Partner has active flows<!--/source--> |
| `status` | `string` | <!--source:api-specifications-->Status of the partner<!--/source--> |
| `verification_type` | `string` | <!--source:api-specifications-->Type of verification<!--/source--> |
| `byoc` | `boolean` | <!--source:api-specifications-->Specify whether customer should add its own partner credentials or not<!--/source--> |

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

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Validation Error
<!--/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-->
403 invalid error
<!--/source-->

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

##### 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-->Error Message.<!--/source--> |

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

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Internal server error
<!--/source-->

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

`GET` `/products/{product_name}/custom_endpoint/document_language`

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

#### Get Document Language
<!--/source-->

`getDocumentLanguage`

<!--source:api-specifications-->
Get document language
<!--/source-->

<!--source:api-specifications-->
Retrieves a document language using the provided name.

<!--/source-->

##### Response

<!--source:api-specifications-->
400403500
<!--/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 403 invalid error

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

<!--/source-->

<!--source:api-specifications-->
application/json Copy Internal server error

```
{
 "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 |
| --- | --- | --- | --- |
| `product_name` required | `string` path | `Document` | <!--source:api-specifications-->product name<!--/source--> |
| `language_name` required | `string` query | `train-documents-irsw2` | <!--source:api-specifications-->language name<!--/source--> |

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

<!--source:api-specifications-->
11 fields
<!--/source-->
<!--source:api-specifications-->
Successfully retrieved document language.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `product_name` | `string` | — |
| `updated_at` | `string` | — |
| `company_name` | `string` | — |
| `format` | `string` | <!--source:api-specifications-->Can be JSON or TTL<!--/source--> |
| `type` | `string` | — |
| `original_data` | `object` | — |
| `graph_data_ttl` | `string` | — |
| `example` | `object` | — |
| `jsonld_settings` | `object` | — |
| `jsonschema` | `object` | — |
| `language_name` | `string` | — |

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

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Validation Error
<!--/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-->
403 invalid error
<!--/source-->

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

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

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Internal server error
<!--/source-->

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

`GET` `/products/{product_name}/custom_endpoint/document_language_search`

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

#### Search Document Language
<!--/source-->

`searchDocumentLanguage`

<!--source:api-specifications-->
Get element of document language
<!--/source-->

<!--source:api-specifications-->
Retrieves an element of a document language using the provided query

<!--/source-->

##### Response

<!--source:api-specifications-->
400403500
<!--/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 403 invalid error

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

<!--/source-->

<!--source:api-specifications-->
application/json Copy Internal server error

```
{
 "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 |
| --- | --- | --- | --- |
| `product_name` required | `string` path | `Document` | <!--source:api-specifications-->product name<!--/source--> |
| `language_name` required | `string` query | `train-documents-irsw2` | <!--source:api-specifications-->language name<!--/source--> |
| `query` required | `string` query | `extracted_data` | <!--source:api-specifications-->query<!--/source--> |

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

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Validation Error
<!--/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-->
403 invalid error
<!--/source-->

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

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

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Internal server error
<!--/source-->

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

##### Other responses

`200`

`GET` `/schema/{data_object}`

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

#### Retrieve Example Schema
<!--/source-->

`retrieveProductSchema`

<!--source:api-specifications-->
Retrieve Product Schema
<!--/source-->

<!--source:api-specifications-->
Retrieve Product Schema retrieves a JSON that provides schema and examples of the configured product. With Product Schema it is possible to have multiple examples and request, response and merged.

<!--/source-->

##### Response

<!--source:api-specifications-->
200400 DataObjectNotProvided400 text/html403404 GetProduct404 text/html500
<!--/source-->

<!--source:api-specifications-->
application/json Copy Successfully returned the object requested

```
{}
```

<!--/source-->

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

```
{
 "message": "data_object should be any of the following strings: request, response or merged."
}
```

<!--/source-->

<!--source:api-specifications-->
text/html Copy Error

```
<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n</body>\r\n</html>\r\n
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy 403 invalid error

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

<!--/source-->

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

```
{
 "type": "string",
 "description": "Error Message."
}
```

<!--/source-->

<!--source:api-specifications-->
text/html Copy Resource not found

```
<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n</body>\r\n</html>\r\n
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Internal server error

```
{
 "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-->
4
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->Environment API Key.<!--/source--> |
| `data_object` required | `string` path | `request` | <!--source:api-specifications-->Data Object<!--/source--> |
| `version` | `string` query | `v2` | <!--source:api-specifications-->If included restrict retrieval to the version specified<!--/source--> |
| `return_examples` | `boolean` query | `false` | <!--source:api-specifications-->If included and set to `true`, returns one or more examples. Default to `false`<!--/source--> |

##### 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-->
403 invalid error
<!--/source-->

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

##### 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-->Error Message.<!--/source--> |

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

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Internal server error
<!--/source-->

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

##### Other responses

`200`

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

### Product Invocation
<!--/source-->

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

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

#### Retrieve Product Flow Invocation Status
<!--/source-->

`RetrieveProductFlowInvocationStatus`

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

- STARTED: The product flow invocation has been started.
- RUNNING: The product flow invocation is running and the status of the running products can be found in `service_invocation`.
- ACTION_REQUIRED: Action is required from the customer and `widget_url` will be filled to guide the user for the next step.
- COMPLETED: The product flow invocation is completed successfully.
- FAILED: The product flow invocation failed and the reason of failure can be found in `failure_reason`.

<!--/source-->

##### Response

<!--source:api-specifications-->
200 ProductFlowStatus200 WaterfallStatusCompleted200 WaterfallStatusFailed400403404500
<!--/source-->

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

```
{
 "invocation_id": "9aefb465-90fb-4d50-8ae6-2df2b58373f4",
 "invocation_status": "COMPLETED",
 "product_flow_name": "product_flow_name_example",
 "service_invocation": {
 "Connector": {
 "connector_flow_name": "demo_flow",
 "invocation_id": "e75e8566-976d-4a15-b801-1e2301646f4e",
 "status": "COMPLETED"
 },
 "Translator": {
 "output": {
 "translation_id": "ad985392-1255-4dc0-8a26-bc166744c60c",
 "language_name": "output_language_example",
 "status": "COMPLETED"
 },
 "convert_output": {
 "translation_id": "5382d495-9ec9-4619-8e46-299879c1e92e",
 "language_name": "output_language_example",
 "status": "COMPLETED"
 },
 "input": {
 "translation_id": "0742bc3d-07ca-45fb-a4b7-e9bf627108d0",
 "language_name": "input_language_example",
 "status": "COMPLETED"
 },
 "convert_input": {
 "translation_id": "57082d7c-9964-49b6-945c-7c655768e56a",
 "language_name": "input_language_example",
 "status": "COMPLETED"
 }
 }
 },
 "transaction_id": "01F6NAMXWN2XVBD1YJ92A6S6R4",
 "request_collection_id": "01F6NAQ4894HPMCBGB4P0G95XK",
 "convert_request_collection_id": "01F6NAQ4894HPMCBGB4P0G9KX5",
 "response_collection_id": "01F6QF1QJF20DMSXH4SYXKB1SN",
 "convert_response_collection_id": "01F6QF1QJF20DMSXH4SYXKBNS1",
 "connector_job_id": "3706b519-9426-4533-9868-14a7dec4fd97",
 "request_collection": {
 "collection_id": "01FCWSAQD3QDKEW91K7CPXN4Y2",
 "transaction_id": "01FCWSAH1RVMC0DH6GRQ9JSAE7",
 "data": {},
 "metadata": {
 "created_at": "2021-08-12T04:58:15.331517-04:00",
 "validation": false
 }
 },
 "response_collection": {
 "collection_id": "01FCWSAQD3QDKEW91K7CPXN4Y2",
 "transaction_id": "01FCWSAH1RVMC0DH6GRQ9JSAE7",
 "data": {},
 "metadata": {
 "created_at": "2021-08-12T04:58:15.331517-04:00",
 "validation": false,
 "partner_name": "test_partner",
 "report_download_urls": {
 "voe_template": {
 "download_url": "https://dev-data-manager-blobs-bucket-us-east-1-873429376159.s3.amazonaws.com/01FJYAHNJR",
 "blob_id": "01FCWSAQD3QDKEW91K7CPXN4Y2",
 "status": "Succeeded"
 }
 },
 "service_invocation": {
 "Connector": {
 "connector_flow_name": "demo_flow",
 "invocation_id": "e75e8566-976d-4a15-b801-1e2301646f4e",
 "status": "COMPLETED"
 },
 "Translator": {
 "output": {
 "translation_id": "ad985392-1255-4dc0-8a26-bc166744c60c",
 "language_name": "output_language_example",
 "status": "COMPLETED"
 },
 "convert_output": {
 "translation_id": "5382d495-9ec9-4619-8e46-299879c1e92e",
 "language_name": "output_language_example",
 "status": "COMPLETED"
 },
 "input": {
 "translation_id": "0742bc3d-07ca-45fb-a4b7-e9bf627108d0",
 "language_name": "input_language_example",
 "status": "COMPLETED"
 },
 "convert_input": {
 "translation_id": "57082d7c-9964-49b6-945c-7c655768e56a",
 "language_name": "input_language_example",
 "status": "COMPLETED"
 }
 }
 }
 }
 },
 "options": {
 "dry_run": false
 },
 "tags": [
 "manual verification"
 ]
}
```

<!--/source-->

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

```
{
 "invocation_id": "fbc19f9b-1d37-4ced-9f1d-d2769b018b0a",
 "invocation_status": "COMPLETED",
 "request_collection_id": "01FCWK741N7GWYBVG4Z3N74V16",
 "callback_url": "https://webhook.site/68a4aa6a-bf18-4f7d-be7d-bc26503adeb2",
 "transaction_id": "01FCWK72GC1MFM5003SXJHMWNG",
 "request_collection": {
 "data": {
 "foo": "bar",
 "biz": "baz"
 },
 "metadata": {
 "created_at": "2021-08-12T03:11:25.749933-04:00",
 "validation": false
 },
 "transaction_id": "01FCWK72GC1MFM5003SXJHMWNG",
 "collection_id": "01FCWK741N7GWYBVG4Z3N74V16"
 },
 "response_collection": {
 "data": {},
 "collection_id": "01FCWSMVWW7192SZXR9MP52B4A",
 "transaction_id": "01FCWSMNZM271WVQY6FDS2CB6M",
 "metadata": {
 "created_at": "2021-08-12T05:03:47.612771-04:00",
 "validation": false,
 "partner_name": "test_partner",
 "report_download_urls": {
 "voe_template": {
 "download_url": "https://dev-data-manager-blobs-bucket-us-east-1-873429376159.s3.amazonaws.com/01FJYAHNJR",
 "blob_id": "01FCWSAQD3QDKEW91K7CPXN4Y2",
 "status": "Succeeded"
 }
 }
 }
 },
 "flows_responses": {
 "flow1": {
 "response_collection_id": "01FCWSAQD3QDKEW91K7CPXN4Y2",
 "invocation_id": "7a8980a1-73ac-4313-ada5-e0e976c38ebb",
 "invocation_status": "FAILED",
 "transaction_id": "01FCWSAH1RVMC0DH6GRQ9JSAE7",
 "product_flow_name": "demo_product_flow_422",
 "failure_reason": "Service Connector failed. Connector flow failed. Response payload: {\"Error\": \"CallVendorError\", \"Cause\": {\"errorMessage\": \"\", \"errorType\": \"CallVendorError\"}}",
 "response_collection": {
 "collection_id": "01FCWSAQD3QDKEW91K7CPXN4Y2",
 "data": {},
 "transaction_id": "01FCWSAH1RVMC0DH6GRQ9JSAE7",
 "metadata": {
 "created_at": "2021-08-12T04:58:15.331517-04:00",
 "validation": false
 }
 }
 },
 "flow2": {
 "response_collection_id": "01FCWSMVWW7192SZXR9MP52B4A",
 "invocation_id": "c861def5-5e5d-4690-9313-2f25427029a8",
 "invocation_status": "COMPLETED",
 "transaction_id": "01FCWSMNZM271WVQY6FDS2CB6M",
 "product_flow_name": "demo_product_flow"
 },
 "metadata": {
 "actual_flow_name": "flow2",
 "response_collection_id": "01FCWSMVWW7192SZXR9MP52B4A"
 }
 }
}
```

<!--/source-->

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

```
{
 "invocation_id": "fbc19f9b-1d37-4ced-9f1d-d2769b018b0a",
 "invocation_status": "FAILED",
 "request_collection_id": "01FCWK741N7GWYBVG4Z3N74V16",
 "callback_url": "https://webhook.site/68a4aa6a-bf18-4f7d-be7d-bc26503adeb2",
 "transaction_id": "01FCWK72GC1MFM5003SXJHMWNG",
 "failure_reason": "All product flows were failed.",
 "request_collection": {
 "data": {
 "foo": "bar",
 "biz": "baz"
 },
 "metadata": {
 "created_at": "2021-08-12T03:11:25.749933-04:00",
 "validation": false
 },
 "transaction_id": "01FCWK72GC1MFM5003SXJHMWNG",
 "collection_id": "01FCWK741N7GWYBVG4Z3N74V16"
 },
 "response_collection": {
 "collection_id": "01FCWSAQD3QDKEW91K7CPXN4Y2",
 "data": {},
 "transaction_id": "01FCWSAH1RVMC0DH6GRQ9JSAE7",
 "metadata": {
 "partner_name": "test_partner",
 "created_at": "2021-08-12T04:58:15.331517-04:00",
 "validation": false
 }
 },
 "flows_responses": {
 "flow1": {
 "response_collection_id": "01FCWSAQD3QDKEW91K7CPXN4Y2",
 "invocation_id": "7a8980a1-73ac-4313-ada5-e0e976c38ebb",
 "invocation_status": "FAILED",
 "transaction_id": "01FCWSAH1RVMC0DH6GRQ9JSAE7",
 "product_flow_name": "demo_product_flow_422",
 "failure_reason": "Service Connector failed. Connector flow failed. Response payload: {\"Error\": \"CallVendorError\", \"Cause\": {\"errorMessage\": \"\", \"errorType\": \"CallVendorError\"}}"
 }
 },
 "metadata": {
 "actual_flow_name": "flow1"
 }
}
```

<!--/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 403 invalid error

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

<!--/source-->

<!--source:api-specifications-->
text/html Copy Resource not found

```
<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n</body>\r\n</html>\r\n
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Internal server error

```
{
 "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 | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->Environment API Key.<!--/source--> |
| `product_name` required | `string` path | `demo_product_product` | <!--source:api-specifications-->Product Name<!--/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`required | `string` | <!--source:api-specifications-->Invocation ID.<!--/source--> |
| `invocation_status`required | `string` | <!--source:api-specifications-->Invocation Status.<!--/source-->`ACTION_REQUIRED``COMPLETED``FAILED``RUNNING``STARTED` |
| `transaction_id`required | `string` | <!--source:api-specifications-->Transaction ID used for invocation.<!--/source--> |
| `request_collection_id` | `string` | <!--source:api-specifications-->Request Collection ID.<!--/source--> |
| `request_collection` | `object` | <!--source:api-specifications-->Collection.<!--/source--> |
| `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_collection_id` | `string` | <!--source:api-specifications-->Response Collection ID.<!--/source--> |
| `response_collection` | `object` | <!--source:api-specifications-->Collection.<!--/source--> |
| `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--> |
| `report_download_urls`required | `object` | <!--source:api-specifications-->Information about each generated report identified by template name.<!--/source--> |
| `callback_url` | `string` | <!--source:api-specifications-->URL that was specified in flow invocation and will be used to send the callback when flow invocation will be finished.<!--/source--> |
| `widget_url` | `string (uri)` | <!--source:api-specifications-->URL of the widget.<!--/source--> |
| `metadata` | `object` | <!--source:api-specifications-->Response Collection ID.<!--/source--> |
| `options` | `—` | <!--source:api-specifications-->Options that were passed to the flow invocation.<!--/source--> |
| `connector_job_id` | `string` | <!--source:api-specifications-->Connector job ID.<!--/source--> |
| `service_invocation`required | `one of` | <!--source:api-specifications-->Includes underlying services invocation.<!--/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-->
403 invalid error
<!--/source-->

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

##### 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-->
Internal server error
<!--/source-->

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

## Providers

- Ephesoft
- Mindee
- Ocrolus
- SoftworksAI

## Errors

`400``403``404``405``422``500`

## More in Validation

- Previous product: Appraisal
- Next product: Title
