Document and image models: signature detection, hosted document extraction, and the training-data pipelines behind them.
Two model families. Signature detection answers whether a page carries a signature and where, which is what makes an executed-document check automatic. Document extraction reads fields from a page image.
Training data comes from a labelling pipeline that annotates real mortgage documents rather than generated ones, and accuracy per vendor and per document type is reported by Document.
How it works
Hosting a vendor's extraction engine rather than calling its API was a deliberate option, and the deployment path for it is Host. The choice turns on where the document is allowed to be, not on which is easier to integrate.
Operations
AWSDocumentAI
POST/document
OCR process document
document
Long-running operation endpoint to process document by AWS Textract OCR.
Request
application/json
An example of a batch request. Presigned URLs shown here are just examples, you need to provide valid and active Presigned URLs when making the request.
{
"code": "401",
"message": "This token is not valid for this service."
}
application/json
Forbidden
{
"url": "https://staircase.stoplight.io/docs/api-reference/customer-account-manager-service.yml/paths/~1products~1refresh/post",
"message": "This key is not valid for this service."
}
Request bodyapplication/json
2 fields
Field
Type
Description
urlsrequired
string[]
One or more Presigned URLs of PDFs to extract data from.
processor
string
Name of AWS DocumentAI processor to be used for data extractionExample irs_w2
Response 200application/json
1 fields
Ok.
Field
Type
Description
documents_info
object[]
Array of IDs for query results of OCR.
uuids
object
UUIDs associated with the documents being processed as part of the batch.
{
"code": "401",
"message": "This token is not valid for this service."
}
application/json
Forbidden
{
"url": "https://staircase.stoplight.io/docs/api-reference/customer-account-manager-service.yml/paths/~1products~1refresh/post",
"message": "This key is not valid for this service."
}
application/json
File not found
{
"code": "Not Found",
"message": "Nothing matches the given URI"
}
{
"code": "401",
"message": "This token is not valid for this service."
}
Response 200application/json
2 fields
Ok.
Field
Type
Description
count
number
Count of trained modelsExample 11
models
object[]
List of models.
name
string
Model name.Example closing-disclosure
versions
object[]
List of versions.
name
string
Version name.Example 2022-05-12-10-25-09
precision
number
Version precision.Example 70.35830618892508
annotations
string[]
List of trained annotations.
status
string
Status of the version. Only trained or imported models are used for extraction.Example TRAINED
message
string
Message about model version status.Example TRAINED
Response 401application/json
1 fields
Unauthorized.
Field
Type
Description
error
object
Unauthorized error.
coderequired
string
Error name.
messagerequired
string
Error description.
POST/setting
Settings
settings
AWS Comprehend settings. Can be used for update inference units count to increase throughput. 1 inference unit corresponds to throughput in 100 characters per second.
Request
application/json
{
"inference_units_count": 3
}
Response
application/json
Request accepted.
{
"message": "Settings have been successfully updated"
}
{
"url": "https://staircase.stoplight.io/docs/api-reference/customer-account-manager-service.yml/paths/~1products~1refresh/post",
"message": "This key is not valid for this service."
}
Request bodyapplication/json
1 fields
Field
Type
Description
inference_units_countrequired
integer
Comprehend inference units count.
Response 202application/json
1 fields
Request accepted.
Field
Type
Description
message
string
Response message
Response 400application/json
1 fields
Bad Request.
Field
Type
Description
error
object
Bad Request error.
coderequired
one of
Bad Request
messagerequired
string
Error description.
Response 403application/json
2 fields
Forbidden
Field
Type
Description
url
string
The URL.
message
string
Error message.
ML
POST/extract
Detect human signature
detectSignature
Check if PDF contains a human written signature
Response
application/json
Ok.
{
"job_id": "WB6XV833KNWF0GZ7"
}
application/json
Bad Request.
{
"message": "Bad request syntax or unsupported method"
}
text/html
Bad Request.
Bad request syntax or unsupported method
application/json
Forbidden
{
"url": "https://staircase.stoplight.io/docs/api-reference/customer-account-manager-service.yml/paths/~1products~1refresh/post",
"message": "This key is not valid for this service."
}
Response 200application/json
1 fields
Ok.
Field
Type
Description
job_id
string
Extraction job ID
Response 400application/json
1 fields
Bad Request.
Field
Type
Description
message
string
Error description.
Response 403application/json
2 fields
Forbidden
Field
Type
Description
url
string
The URL.
message
string
Error message.
POST/extract/{job_id}
Detect human signature status
detectSignatureStatus
Check status of extraction job
Response
application/json
Ok.
{
"is_signed": true,
"page": 7
}
application/json
Bad Request.
{
"message": "Bad request syntax or unsupported method"
}
text/html
Bad Request.
Bad request syntax or unsupported method
application/json
Forbidden
{
"url": "https://staircase.stoplight.io/docs/api-reference/customer-account-manager-service.yml/paths/~1products~1refresh/post",
"message": "This key is not valid for this service."
}
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.
Response
application/json
Successfully returned the list of elements of response of the product waterfall.
{
"message": "Please provide one of valid return examples values: true, false"
}
text/html
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
application/json
403 invalid error
{
"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"
}
<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
application/json
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"
}
Parameters
2
Parameter
Type
Example
Description
x-api-keyrequired
stringheader
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
The environment API key.
return_examples
booleanquery
false
If included and set to `true`, returns one or more pre-filled examples that conform to the schema. Default to `false`
Response 200application/json
1 fields
Successfully returned the list of elements of response of the product waterfall.
Field
Type
Description
schema
object
Element key / value element
Response 400application/json
1 fields
Error
Field
Type
Description
message
string
Message
Response 403application/json
2 fields
403 invalid error
Field
Type
Description
message
string
Error message.
url
string
Error additional URL.
Response 404application/json
1 fields
Resource not found
Field
Type
Description
message
string
Error Message.
Response 500application/json
1 fields
Internal server error
Field
Type
Description
message
string
Error message.
GET/transactions/{transaction_id}/collections
Retrieve Transaction Collections
RetrieveTransactionCollections
Retrieve Transaction Collections returns the content of a given collection_id associated with a specific transaction_id.
Response
application/json
Transaction collection retrieved successfully
{
"data": {}
}
text/html
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
application/json
403 invalid error
{
"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"
}
application/json
Resource not found
{
"message": "Unable to get collections of given transaction. Please check the transaction id"
}
application/json
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"
}
Parameters
2
Parameter
Type
Example
Description
x-api-keyrequired
stringheader
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
The environment API key.
transaction_idrequired
string (ulid)path
01F0KHK7DN3H5JZ4QJKMYAM6GB
Staircase Transaction Identifier
Response 200application/json
4 fields
Transaction collection retrieved successfully
Field
Type
Description
collection_id
string (ulid)
Collection idExample 01EZQ32PJQGKRA6HR8D72Q9FFF
data
array
The data
metadata
object
Metadata about collection, f.e version of used Staircase schema
{
"description": "Error details.",
"message": "Unable to update collection. Please check the collection data"
}
text/html
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
application/json
403 invalid error
{
"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"
}
application/json
Resource not found
{
"message": "Unable to update collection. Please check the given ids"
}
text/html
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
application/json
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"
}
Parameters
3
Parameter
Type
Example
Description
x-api-keyrequired
stringheader
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
The environment API key.
transaction_idrequired
string (ulid)path
01F0KHK7DN3H5JZ4QJKMYAM6GB
Staircase Transaction Identifier
collection_idrequired
string (ulid)path
01F0KHKADN0HRFXMCQQXPA6AFZ
Staircase collection_id
Request bodyapplication/json
1 fields
Field
Type
Description
data
object
The data object
Response 200application/json
1 fields
Collection updated successfully
Field
Type
Description
data
object
The data object
Response 400application/json
1 fields
Error
Field
Type
Description
message
one of
Either message object with more properties.
Response 403application/json
2 fields
403 invalid error
Field
Type
Description
message
string
Error message.
url
string
Error additional URL.
Response 404application/json
1 fields
Resource not found
Field
Type
Description
message
string
Message
Response 500application/json
1 fields
Internal server error
Field
Type
Description
message
string
Error message.
DocumentAI
POST/setup-credentials
Set Up Google Cloud Account Credentials
setup-credentials
Setup Google Cloud service account credentials
Setup Google Cloud credentials in the form of a service account key in order to authenticate an application as a service account.
Request
application/json
An example of a Google Cloud service account key. The key shown is just an example, you need to provide a valid key in order to use the service.
{
"code": "401",
"message": "This token is not valid for this service."
}
application/json
Forbidden
{
"url": "https://staircase.stoplight.io/docs/api-reference/customer-account-manager-service.yml/paths/~1products~1refresh/post",
"message": "This key is not valid for this service."
}
application/json
Request Timeout.
{
"code": "408",
"message": "SoftworksAI partner is not available."
}
{
"code": "500",
"message": "Internal Server Error"
}
application/json
Not Implemented
{
"code": "501",
"message": "Error"
}
application/json
Bad Gateway
{
"code": "502",
"message": "Error"
}
application/json
Service Unavailable
{
"code": "503",
"message": "Error"
}
Request bodyapplication/json
10 fields
Field
Type
Description
typerequired
string
The type of member this key is for.Example service_account
project_idrequired
string
The project identifier.Example my-great-project-1234560
private_key_idrequired
string
The project key identifier.Example aeb28addda999e5dde66de00041a1fd99ed7e4a32
private_keyrequired
string
The private key contents.Example <redacted>
client_emailrequired
string
The client emails.Example name-of-the-service-account@my-great-project-1234560.iam.gserviceaccount.com
client_idrequired
string
The client id.Example 378463746364563353673
auth_urirequired
string
The authorization URI.Example https://accounts.google.com/o/oauth2/auth
token_urirequired
string
The token URI.Example https://oauth2.googleapis.com/token
auth_provider_x509_cert_urlrequired
string
The URL of the public x509 certificate provider.Example https://www.googleapis.com/oauth2/v1/certs
client_x509_cert_urlrequired
string
The RL of the public x509 certificate.Example https://www.googleapis.com/robot/v1/metadata/x509/name-of-the-service-account%40my-great-project-1234560.iam.gserviceaccount.com
Response 200application/json
2 fields
Ok.
Field
Type
Description
code
string
Status code.
message
string
The message.
Response 400application/json
1 fields
Bad Request.
Field
Type
Description
error
object
Bad Request error.
coderequired
one of
Bad Request
messagerequired
string
Error description.
Response 401application/json
1 fields
Unauthorized.
Field
Type
Description
error
object
Unauthorized error.
coderequired
string
Error name.
messagerequired
string
Error description.
Response 403application/json
2 fields
Forbidden
Field
Type
Description
url
string
The URL.
message
string
Error message.
Response 408application/json
1 fields
Request Timeout.
Field
Type
Description
error
object
Timeout error.
coderequired
string
Error name.
messagerequired
string
Error description.
Response 409application/json
1 fields
Conflict
Field
Type
Description
error
object
Conflict error.
coderequired
string
Error name.
messagerequired
string
Error description.
Response 422application/json
1 fields
Unprocessable entity
Field
Type
Description
error
object
Conflict error.
coderequired
string
Error name.
messagerequired
string
Error description.
Response 500application/json
1 fields
Internal Server Error
Field
Type
Description
error
object
Conflict error.
coderequired
string
Error name.
messagerequired
string
Error description.
Response 501application/json
1 fields
Not Implemented
Field
Type
Description
error
object
Conflict error.
coderequired
string
Error name.
messagerequired
string
Error description.
Response 502application/json
1 fields
Bad Gateway
Field
Type
Description
error
object
Conflict error.
coderequired
string
Error name.
messagerequired
string
Error description.
Response 503application/json
1 fields
Service Unavailable
Field
Type
Description
error
object
Conflict error.
coderequired
string
Error name.
messagerequired
string
Error description.
POST/batch-process-document
Process Batch
new-batch
Long-running operation endpoint to batch process many documents.
Request
application/json
An example of a batch request. Presigned URLs shown here are just examples, you need to provide valid and active Presigned URLs when making the request.
{
"code": "401",
"message": "This token is not valid for this service."
}
application/json
Forbidden
{
"url": "https://staircase.stoplight.io/docs/api-reference/customer-account-manager-service.yml/paths/~1products~1refresh/post",
"message": "This key is not valid for this service."
}
application/json
Request Timeout.
{
"code": "408",
"message": "SoftworksAI partner is not available."
}
{
"code": "401",
"message": "This token is not valid for this service."
}
application/json
Forbidden
{
"url": "https://staircase.stoplight.io/docs/api-reference/customer-account-manager-service.yml/paths/~1products~1refresh/post",
"message": "This key is not valid for this service."
}
application/json
Request Timeout.
{
"code": "408",
"message": "SoftworksAI partner is not available."
}
{
"code": "500",
"message": "Internal Server Error"
}
application/json
Not Implemented
{
"code": "501",
"message": "Error"
}
application/json
Bad Gateway
{
"code": "502",
"message": "Error"
}
application/json
Service Unavailable
{
"code": "503",
"message": "Error"
}
Parameters
1
Parameter
Type
Example
Description
uuidrequired
stringpath
d8b01c18-10f7-4a71-962-43eeaed5ae6b
UUID of the document which extracted data it's being requested.
Response 200application/json
6 fields
Ok.
Field
Type
Description
uri
string
Google Storage location where the file was uploaded to be processed by Document AI.Example gs://staircase-host-documentai/batch/input/d8b01c18-10f7-4a71-9612-43eeaed5ae6b-test.pdf
mimeType
string
Mime type of the documentExample application/pdf
text
string
Extracted data as plain textExample 22222 Void
999-00-0000
a Employee’s social security number For Official Use Only ▶
OMB No. 1545-0008
b Employer identification number (EIN)
1 Wages, tips, other compensation 2 Federal income tax withheld
12-3456789
c Employer’s name, address, and ZIP code
3 Social security wages 4 Social security tax withheld
Ocrolus Inc.
101 Greenwich Street, Floor 23
New York, NY 10006
5 Medicare wages and tips 6 6 Medicare tax withheld
7 Social security tips 8 Allocated tips
d Control number
9 10 Dependent care benefits
e Employee’s first name and initial Last name Suff.
M99999
John Doe
123 Main Street
New York, NY 10001
100000.00 15000.00
98750.00 7500.00
98750.00 4500.00
0.00
0.00
0.00
D 1000.00
x
11 Nonqualified plans 12a See instructions for box 12
C
o
d
e
13 Statutory
Retirement
Third-party
employee
plan
sick pay
12b
C
o
d
e
14 Other
12c
C
o
d
e
12d
C
o
d
e
NY-PFR 223.25
f Employee’s address and ZIP code
15 State Employer’s state ID number 16 State wages, tips, etc. 17 State income tax 18 Local wages, tips, etc. 19 Local income tax 20 Locality name
NY | 999999999 100000.00 9000.00
W-2
Wage and Tax Statement
Form
2019
Copy A For Social Security Administration — Send this entire page with
Form W-3 to the Social Security Administration; photocopies are not acceptable.
Department of the Treasury—Internal Revenue Service
For Privacy Act and Paperwork Reduction
Act Notice, see the separate instructions.
Cat. No. 10134D
Do Not Cut, Fold, or Staple Forms on This Page
pages
object[]
Pages of the document
entities
object[]
Entities of the document
shardInfo
object
Share info of the document
Response 400application/json
1 fields
Bad Request.
Field
Type
Description
error
object
Bad Request error.
coderequired
one of
Bad Request
messagerequired
string
Error description.
Response 401application/json
1 fields
Unauthorized.
Field
Type
Description
error
object
Unauthorized error.
coderequired
string
Error name.
messagerequired
string
Error description.
Response 403application/json
2 fields
Forbidden
Field
Type
Description
url
string
The URL.
message
string
Error message.
Response 404application/json
2 fields
Not found.
Field
Type
Description
code
string
Error type.Example Not Found
message
string
Reason of errorExample Nothing matches the given uuid
Response 408application/json
1 fields
Request Timeout.
Field
Type
Description
error
object
Timeout error.
coderequired
string
Error name.
messagerequired
string
Error description.
Response 409application/json
1 fields
Conflict
Field
Type
Description
error
object
Conflict error.
coderequired
string
Error name.
messagerequired
string
Error description.
Response 422application/json
1 fields
Unprocessable entity
Field
Type
Description
error
object
Conflict error.
coderequired
string
Error name.
messagerequired
string
Error description.
Response 500application/json
1 fields
Internal Server Error
Field
Type
Description
error
object
Conflict error.
coderequired
string
Error name.
messagerequired
string
Error description.
Response 501application/json
1 fields
Not Implemented
Field
Type
Description
error
object
Conflict error.
coderequired
string
Error name.
messagerequired
string
Error description.
Response 502application/json
1 fields
Bad Gateway
Field
Type
Description
error
object
Conflict error.
coderequired
string
Error name.
messagerequired
string
Error description.
Response 503application/json
1 fields
Service Unavailable
Field
Type
Description
error
object
Conflict error.
coderequired
string
Error name.
messagerequired
string
Error description.
POST/document-type
Create New Document Type
document-type
Create new document type.
Create new document type to train a model with DocumentAI.
Request
application/json
An example of a document type.
{
"name": "W-2"
}
Response
application/json
Ok.
{
"message": "The data started to import successfully"
}
{
"code": "401",
"message": "This token is not valid for this service."
}
application/json
Forbidden
{
"url": "https://staircase.stoplight.io/docs/api-reference/customer-account-manager-service.yml/paths/~1products~1refresh/post",
"message": "This key is not valid for this service."
}
application/json
Request Timeout.
{
"code": "408",
"message": "SoftworksAI partner is not available."
}
{
"url": "https://staircase.stoplight.io/docs/api-reference/customer-account-manager-service.yml/paths/~1products~1refresh/post",
"message": "This key is not valid for this service."
}
Response 200application/json
3 fields
Ok.
Field
Type
Description
documentType
string
Document type.Example W-2
enabled
boolean
Is auto training enabled.Example true
readyForTrainCount
number
Ready for training documents count.Example 12
Response 403application/json
2 fields
Forbidden
Field
Type
Description
url
string
The URL.
message
string
Error message.
PUT/auto-train/{document_type_name}
Auto Train Document Type
auto-train-document
Auto train document type
Inserting a configuration to enable automatic training of document type.
Request
application/json
An example of configuration.
{
"enabled": true
}
Response
application/json
Ok.
{
"message": "Auto training configuration successfully created"
}
{
"url": "https://staircase.stoplight.io/docs/api-reference/customer-account-manager-service.yml/paths/~1products~1refresh/post",
"message": "This key is not valid for this service."
}
Parameters
1
Parameter
Type
Example
Description
document_type_namerequired
stringpath
W-2
The name of document type
Request bodyapplication/json
1 fields
Field
Type
Description
enabledrequired
boolean
Status of auto training.Example true
Response 201application/json
1 fields
Ok.
Field
Type
Description
message
string
Configuration creation message.Example Auto training configuration successfully created
Response 400application/json
1 fields
Bad Request.
Field
Type
Description
error
object
Bad Request error.
coderequired
one of
Bad Request
messagerequired
string
Error description.
Response 403application/json
2 fields
Forbidden
Field
Type
Description
url
string
The URL.
message
string
Error message.
Response 404application/json
1 fields
Not found
Field
Type
Description
message
string
message
PUT/train-document/{document_type_name}
Train Document Type
train-document
Train document type
This service imports documents annotations and labels to a document type created. The model is trained when the number of documents is enough to train, validate and test.
{
"code": "401",
"message": "This token is not valid for this service."
}
application/json
Forbidden
{
"url": "https://staircase.stoplight.io/docs/api-reference/customer-account-manager-service.yml/paths/~1products~1refresh/post",
"message": "This key is not valid for this service."
}
application/json
Request Timeout.
{
"code": "408",
"message": "SoftworksAI partner is not available."
}
{
"code": "401",
"message": "This token is not valid for this service."
}
application/json
Forbidden
{
"url": "https://staircase.stoplight.io/docs/api-reference/customer-account-manager-service.yml/paths/~1products~1refresh/post",
"message": "This key is not valid for this service."
}
application/json
Request Timeout.
{
"code": "408",
"message": "SoftworksAI partner is not available."
}
{
"code": "401",
"message": "This token is not valid for this service."
}
application/json
Forbidden
{
"url": "https://staircase.stoplight.io/docs/api-reference/customer-account-manager-service.yml/paths/~1products~1refresh/post",
"message": "This key is not valid for this service."
}
application/json
File not found
{
"code": "Not Found",
"message": "Nothing matches the given URI"
}
application/json
Request Timeout.
{
"code": "408",
"message": "SoftworksAI partner is not available."
}
{
"code": "401",
"message": "This token is not valid for this service."
}
application/json
Forbidden
{
"url": "https://staircase.stoplight.io/docs/api-reference/customer-account-manager-service.yml/paths/~1products~1refresh/post",
"message": "This key is not valid for this service."
}
application/json
File not found
{
"code": "Not Found",
"message": "Nothing matches the given URI"
}
application/json
Request Timeout.
{
"code": "408",
"message": "SoftworksAI partner is not available."
}
{
"code": "401",
"message": "This token is not valid for this service."
}
application/json
Forbidden
{
"url": "https://staircase.stoplight.io/docs/api-reference/customer-account-manager-service.yml/paths/~1products~1refresh/post",
"message": "This key is not valid for this service."
}
application/json
Request Timeout.
{
"code": "408",
"message": "SoftworksAI partner is not available."
}
{
"url": "https://staircase.stoplight.io/docs/api-reference/customer-account-manager-service.yml/paths/~1products~1refresh/post",
"message": "This key is not valid for this service."
}
{
"url": "https://staircase.stoplight.io/docs/api-reference/customer-account-manager-service.yml/paths/~1products~1refresh/post",
"message": "This key is not valid for this service."
}
application/json
File not found
{
"code": "Not Found",
"message": "Nothing matches the given URI"
}
{
"code": "401",
"message": "This token is not valid for this service."
}
application/json
Forbidden
{
"url": "https://staircase.stoplight.io/docs/api-reference/customer-account-manager-service.yml/paths/~1products~1refresh/post",
"message": "This key is not valid for this service."
}
{
"url": "https://staircase.stoplight.io/docs/api-reference/customer-account-manager-service.yml/paths/~1products~1refresh/post",
"message": "This key is not valid for this service."
}
application/json
File not found
{
"code": "Not Found",
"message": "Nothing matches the given URI"
}
Parameters
3
Parameter
Type
Example
Description
document_typerequired
stringpath
W-2
Document type.
model_idrequired
stringpath
TEN0007099176139227136
Model ID.
force
booleanquery
false
Include model deletion from GCP.
Response 400application/json
1 fields
Bad Request.
Field
Type
Description
error
object
Bad Request error.
coderequired
one of
Bad Request
messagerequired
string
Error description.
Response 403application/json
2 fields
Forbidden
Field
Type
Description
url
string
The URL.
message
string
Error message.
Response 404application/json
1 fields
File not found
Field
Type
Description
error
object
File not found error.
coderequired
string
Error name.
messagerequired
string
Error description.
Other responses
204
Workflow
POST/transactions
Create Transaction
createTransaction
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
{
"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"
}
application/json
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"
}
Parameters
1
Parameter
Type
Example
Description
x-api-keyrequired
stringheader
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
The environment API key.
Response 201application/json
2 fields
Transaction created successfully
Field
Type
Description
created_at
string
Staircase time string.Example 03/03/2021, 8:24:04 AM EST
Upload Blob allows a customer to upload a document in .pdf form.
Upload Blob uploads a .pdf document (blob) to Persistence product.
You can upload PDF using HTML Request Maker Try It Out.
Place your API key in the request header, set the request body to binary and browse to your document.
Click Send to upload your document.
To upload a document programmatically, use the programmatic upload example below.
After the approval document is successfully uploaded, a blob_id value is provided.
Example: 'blob_id': '01EZYHKY4EXFW4Z8RKWHDP1KHB'
After you got successful response, you need to use the blob_id in collection with the following path.
{
"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"
}
application/json
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"
}
Parameters
1
Parameter
Type
Example
Description
x-api-keyrequired
stringheader
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
The environment API key.
Response 201application/json
1 fields
Blob uploaded
Field
Type
Description
blob_id
string
Created blob id
Response 403application/json
2 fields
403 invalid error
Field
Type
Description
message
string
Error message.
url
string
Error additional URL.
Response 500application/json
1 fields
Internal server error
Field
Type
Description
message
string
Error message.
Other responses
400405422
GET/products/train_data_extraction/request-schema
Retrieve Request Schema
retrieveRequestSchema
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.
Response
application/json
Successfully returned the list of elements needed for product waterfall.
{
"message": "Please provide one of valid return examples values: true, false"
}
text/html
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
application/json
403 invalid error
{
"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"
}
<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
application/json
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"
}
Parameters
2
Parameter
Type
Example
Description
x-api-keyrequired
stringheader
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
The environment API key.
return_examples
booleanquery
false
If included and set to `true`, returns one or more pre-filled examples that conform to the schema. Default to `false`
Response 200application/json
1 fields
Successfully returned the list of elements needed for product waterfall.
Field
Type
Description
schema
object
Element key / value
Response 400application/json
1 fields
Error
Field
Type
Description
message
string
Message
Response 403application/json
2 fields
403 invalid error
Field
Type
Description
message
string
Error message.
url
string
Error additional URL.
Response 404application/json
1 fields
Resource not found
Field
Type
Description
message
string
Error Message.
Response 500application/json
1 fields
Internal server error
Field
Type
Description
message
string
Error message.
POST/transactions/{transaction_id}/collections
Create Collection
createCollection
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
{
"message": "Unable to create collection. Please check the collection data"
}
text/html
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
application/json
403 invalid error
{
"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"
}
application/json
Resource not found
{
"message": "Unable to create collection. Please check the transaction ID."
}
text/html
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
application/json
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"
}
Parameters
2
Parameter
Type
Example
Description
x-api-keyrequired
stringheader
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
The environment API key.
transaction_idrequired
string (ulid)path
01F0KHK7DN3H5JZ4QJKMYAM6GB
Staircase Transaction Identifier
Request bodyapplication/json
1 fields
Field
Type
Description
data
object
The data object
Response 201application/json
4 fields
Collection created successfully
Field
Type
Description
collection_id
string (ulid)
Collection idExample 01EZQ32PJQGKRA6HR8D72Q9FFF
data
array
The data
metadata
object
Metadata about collection, f.e version of used Staircase schema
transaction_id
string (ulid)
Transaction idExample 01EZQ32PJQGKRA6HR8D72Q9FFF
Response 400application/json
1 fields
Error
Field
Type
Description
message
one of
Either message object with more properties.
Response 403application/json
2 fields
403 invalid error
Field
Type
Description
message
string
Error message.
url
string
Error additional URL.
Response 404application/json
1 fields
Resource not found
Field
Type
Description
message
string
Message
Response 500application/json
1 fields
Internal server error
Field
Type
Description
message
string
Error message.
POST/products/train_data_extraction/invocations
Extract data from document
InvokeSpecificProductFlow
Invoke TrainDataExtraction
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
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, 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.
Send a callback, when the flow execution will be finished if callback_url was specified with an input data for the invocation.
The callback request body is a JSON with the following schema:
{
"message": "{'data': ['Missing data for required field.']}"
}
application/json
403 invalid error
{
"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"
}
text/html
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
application/json
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"
}
Parameters
1
Parameter
Type
Example
Description
x-api-keyrequired
stringheader
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
The environment API key.
Request bodyapplication/json
7 fields
Field
Type
Description
callback_url
string (uri)
Callback URL.
product_flow_name
string
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.
request_collection_id
string
Request Collection ID.
request_data
object
Request JSON body.
response_collection_id
string
Response Collection ID.
transaction_id
string
Transaction ID used for invocation.
vendor_name
string
Vendor name. Cannot be specified together with product_flow_name.
{
"message": "{'data': ['Missing data for required field.']}"
}
application/json
403 invalid error
{
"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"
}
text/html
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
application/json
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"
}
Parameters
2
Parameter
Type
Example
Description
x-api-keyrequired
stringheader
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
The environment API key.
invocation_idrequired
string (ulid)path
01F0KHKADN0HRFXMCQQXPA6AFZ
Product flow invocation identifier
Response 200application/json
9 fields
Successfully returned status of the Product flow Invocation.
Field
Type
Description
callback_url
string
URL that was specified in flow invocation and will be used to send the callback when flow invocation will be finished.
{
"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"
}
application/json
Resource not found
{
"message": "Unable to get collection. Please check the given ids"
}
application/json
Resource not found
{
"message": "Unable to get collections of given transaction. Please check the transaction id"
}
application/json
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"
}
Successfully returned list of supported document types and partners.
Retrieves the list of currently supported documents and partners per document. Best partner for each document type is provided. Customers can use it when invoking product flow as tag in order to extract with this particular partner.
Response
application/json
Successfully returned list of supported document types and partners.
{
"url": "https://staircase.stoplight.io/docs/api-reference/customer-account-manager-service.yml/paths/~1products~1refresh/post",
"message": "This key is not valid for this service."
}