The registry that defines other products: their APIs, their flows, and the uniform endpoint surface every vertical inherits.
A product is created, deployed and documented through this registry. It holds the API definitions, the flow bindings, and the generated interface description each product publishes.
The uniform surface every mortgage vertical carries — request and response schema, the vendor ordering, invocation history, partner list, report templates — is defined once here rather than re-implemented per vertical.
How it works
Two products from different categories expose the same shape, so a caller that has integrated one has most of the work done for the next.
The registry that creates an API is the registry that can list them, so the catalogue is readable as data rather than only as a document.
Operations
APIs
POST/apis
Create API
create_api
Creates API with provided product ID and base path. Next steps are: create resources, create method, deploy the API
{
"message": "{'data': ['Missing data for required field.']}"
}
Request bodyapplication/json
5 fields
Field
Type
Description
product_identifier
string (uuid)
Product ID.
base_path
string
Base path
product_category
string
Product category from Staircase Ontology
product_family
string
Product family from Staircase Ontology
product_name
string
Product name from Staircase ontology
Response 201application/json
3 fields
OK Response
Field
Type
Description
api_id
string (uuid)
API ID
product_identifier
string (uuid)
Product ID
base_path
string
Base path
Response 400application/json
1 fields
Request data failed validation
Field
Type
Description
message
one of
Message
Response 403application/json
1 fields
Missing API key
Field
Type
Description
message
string
Message
Response 409application/json
1 fields
Resource already exists.
Field
Type
Description
message
string
Error Message.
Response 422application/json
1 fields
Resource already exists.
Field
Type
Description
message
string
Error Message.
POST/apis/{product_identifier}/endpoints
Create Endpoint
create_endpoint
Create endpoint.
Create endpoint for API, that was created with specified product identifier.
Endpoint contains two parts: it's public definition, that will be available and will be presented
in OpenAPI file and integration with any Staircase API. When your endpoint will be invoked request parameters
and body will be mapped according to your definition and request will be sent to specified Staircase API,
same will happen with the response.
To create valid integration you need to specify HTTP method that will be used for request in integration.http_method,
url without domain name, f.e. /persistence/transactions in integration.url, request schema, if needed,
in request_schema in JSON Schema format. Incoming requests will be validated against that schema and in case of
invalid request your customer will receive response with status code 400 and error message in body.
To map request parameters you need to fill integration.request_parameters parameter with an object, where keys
are location where to put them for request to Staircase service in format {location}.{name} where location
is querystring , path , or header and name is a valid and unique parameter name and values are static value or, if
you want to map them from the request, value should match patter request.{location}.{name}
where location is querystring , path , or header and name must be a valid and unique method request parameter name.
To map request body you need to specify integration.request_template in format of VTL template. VTL is simple template
language, you can find information about all possibilities here.
Basic examples can be found in request examples for this endpoint.
Inside template, you will be to access two variables: $input and $util.
The $input variable represents the method request payload and parameters to be processed by a mapping template. It provides four functions:
Show the rest
Variable and function
Description
$input.body
Returns the raw request payload as a string.
$input.json(x)
This function evaluates a JSONPath expression and returns the results as a JSON string. For example, $input.json('$.pets') returns a JSON string representing the pets structure. For more information about JSONPath, see JSONPath
$input.params
Returns a map of all the request parameters. We recommend that you use $util.escapeJavaScript to sanitize the result to avoid a potential injection attack. For full control of request sanitization, use a proxy integration without a template and handle request sanitization in your integration.
$input.params(x)
Returns the value of a method request parameter from the path, query string, or header value (searched in that order), given a parameter name string x. We recommend that you use $util.escapeJavaScript to sanitize the parameter to avoid a potential injection attack. For full control of parameter sanitization, use a proxy integration without a template and handle request sanitization in your integration.
$input.path(x)
Takes a JSONPath expression string (x) and returns a JSON object representation of the result. This allows you to access and manipulate elements of the payload natively in Apache Velocity Template Language (VTL).
$input Variable template examples
Parameter mapping template example
The following parameter-mapping example passes all parameters, including path, querystring, and header, through to the integration endpoint via a JSON payload:
If the JSON input contains unescaped characters that cannot be parsed by JavaScript, a 400 response may be returned. Applying $util.escapeJavaScript($input.json('$')) above will ensure that the JSON input can be parsed properly.
Example mapping template using $input
The following example shows how to pass a JSONPath expression to the json method. You could also read a specific property of your request body object by using a period (.), followed by your property name:
If a method request payload contains unescaped characters that cannot be parsed by JavaScript, you may get 400 response. In this case, you need to call $util.escapeJavaScript function in the mapping template, as shown as follows:
Escapes the characters in a string using JavaScript string rules. Note: This function will turn any regular single quotes (') into escaped ones ('). However, the escaped single quotes are not valid in JSON. Thus, when the output from this function is used in a JSON property, you must turn any escaped single quotes (') back to regular single quotes ('). This is shown in the following example: $util.escapeJavaScript(data).replaceAll("\\'","'")
$util.parseJson
Takes "stringified" JSON and returns an object representation of the result. You can use the result from this function to access and manipulate elements of the payload natively in Apache Velocity Template Language (VTL). For example, if you have the following payload: {"errorMessage":"{\"key1\":\"var1\",\"key2\":{\"arr\":[1,2,3]}}"} and use the following mapping template #set ($errorMessageObj = $util.parseJson($input.path('$.errorMessage'))) { "errorMessageObjKey2ArrVal" : $errorMessageObj.key2.arr[0] } You will get the following output: {"errorMessageObjKey2ArrVal": 1}
$util.urlEncode
Converts a string into "application/x-www-form-urlencoded" format.
$util.urlDecode
Decodes an "application/x-www-form-urlencoded" string.
{
"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
Connector configuration not found
{
"message": "Unable to retrieve configurations for given product."
}
Parameters
1
Parameter
Type
Description
productrequired
stringpath
Staircase product name
Response 200application/json
2 fields
Connector Configurations Found
Field
Type
Description
configuration
string
Name of the configuration. Can be passed into the /setups endpoint.
partners
object[]
An array of vendors associated with the configuration
Set up a connector configuration by passing product and configuration name. You can check the type of configurations by using the GET /connector-configurations endpoint.
Response
application/json
Configuration set up successfully
{
"message": "Configuration is set up successfully."
}
application/json
Invalid key for service
{
"message": "Please check the key you used to call this service",
"url": "https://staircase.stoplight.io/docs/api-reference/customer-account-manager-service.yml/paths/~1products~1refresh/post"
}
application/json
Resource not found
{
"message": "Unable to retrieve configurations for given product."
}
Parameters
2
Parameter
Type
Description
productrequired
stringpath
Staircase product name
configurationrequired
stringpath
Product configuration name
Response 200application/json
1 fields
Configuration set up successfully
Field
Type
Description
message
string
Message
Response 403application/json
2 fields
Invalid key for service
Field
Type
Description
message
string
—
url
string
—
Response 404application/json
1 fields
Resource not found
Field
Type
Description
message
string
Message
Other responses
400
POST/build
Build payload
Build a payload for collections, where the pathes can be taken from appropriate endpoint. Values, that are passed is validated against the JSON schema.
Retrieve part of staircase json schema by json path
returns the schema for specified JSON path, that it is used for payload validation
Response
application/json
200 response
{
"type": "string",
"description": "An identifier for the current instance of VIEW. The party assigning the identifier should be provided using the IdentifierOwnerURI."
}
Parameters
1
Parameter
Type
Example
Description
json_pathrequired
stringquery
$.deal_sets[0].parties[0].individual.first_name
—
Other responses
200
POST/sdks
Generate SDK for the specific service
Using input link to swagger and request details generate SDK for the service
Request bodyapplication/json
4 fields
Field
Type
Description
service_name
string
Name of service for which sdk need to be generated
swagger_link
string
Link to swagger (OpenAPI) json file which need to be used for SDK generation
programming_language
string
Programming language for which we need to generate SDK
service_version
string
Version of service
Response 201application/json
3 fields
SDK generated successfully
Field
Type
Description
message
string
Status message of SDK generation process
success
boolean
Does operation generate SDK
generated_sdk_url
string
URL to generated SDK on s3 bucket
Response 400application/json
2 fields
Bad request body
Field
Type
Description
error_message
string
Short error reason message
error_description
string
Long description of error cause
Response 409application/json
3 fields
SDK with provided parameters already exist
Field
Type
Description
message
string
Status message of SDK generation process
success
boolean
Does operation generate SDK
generated_sdk_url
string
URL to generated SDK on s3 bucket
DELETE/sdks/{programming_language}/{service_name}
Delete existing SDK with service_version bucket
Delete SDK inside service_version bucket and this bucket itself
Parameters
3
Parameter
Type
Description
programming_languagerequired
stringpath
SDK client language
service_namerequired
stringpath
Name of service
service_versionrequired
stringquery
The version of service for which we need delete SDK
Response 200application/json
2 fields
SDK and service_version bucket was deleted successfully
Field
Type
Description
success
boolean
Show the success status of deletion process
description
string
Short description message of success status
Response 404application/json
2 fields
Not found any SDK's related to requested parameters
Field
Type
Description
success
boolean
Show the success status of deletion process
description
string
Short description message of success status
Other responses
400
GET/sdks/{programming_language}/{service_name}
Get S3 bucket url's to SDK's for reuqested parameters
Get all existing S3 bucket url's to SDK's for the requested programming language , service name and version
Parameters
3
Parameter
Type
Description
programming_languagerequired
stringpath
Name of programming language for which we need to download SDK