<!-- https://staircase.co/platform/integration/product -->
# Product

# Product

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

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

### APIs
<!--/source-->

`POST` `/apis`

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

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

`create_api`

<!--source:api-specifications-->
Creates API with provided product ID and base path. Next steps are: create resources, create method, deploy the API

<!--/source-->

##### Request

<!--source:api-specifications-->
application/json Copy
```
{
 "product_identifier": "ed011136-4199-4efe-8ba1-71b6eb302744",
 "base_path": "product-product",
 "product_category": "Integration",
 "product_family": "Platform",
 "product_name": "Product"
}
```

<!--/source-->

##### Response

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

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

```
{
 "api_id": "3f6eb765-459d-4a84-a985-620628e7a2cf",
 "product_identifier": "ed011136-4199-4efe-8ba1-71b6eb302744",
 "base_path": "credit"
}
```

<!--/source-->

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

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

<!--/source-->

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

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

| Field | Type | Description |
| --- | --- | --- |
| `product_identifier` | `string (uuid)` | <!--source:api-specifications-->Product ID.<!--/source--> |
| `base_path` | `string` | <!--source:api-specifications-->Base path<!--/source--> |
| `product_category` | `string` | <!--source:api-specifications-->Product category from Staircase Ontology<!--/source--> |
| `product_family` | `string` | <!--source:api-specifications-->Product family from Staircase Ontology<!--/source--> |
| `product_name` | `string` | <!--source:api-specifications-->Product name from Staircase ontology<!--/source--> |

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

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

| Field | Type | Description |
| --- | --- | --- |
| `api_id` | `string (uuid)` | <!--source:api-specifications-->API ID<!--/source--> |
| `product_identifier` | `string (uuid)` | <!--source:api-specifications-->Product ID<!--/source--> |
| `base_path` | `string` | <!--source:api-specifications-->Base path<!--/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 `409``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Resource already exists.
<!--/source-->

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

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

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Resource already exists.
<!--/source-->

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

`POST` `/apis/{product_identifier}/endpoints`

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

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

`create_endpoint`

<!--source:api-specifications-->
Create endpoint.
<!--/source-->

<!--source:api-specifications-->
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:

```
#set($allParams = $input.params)
{
 "params" : {
 #foreach($type in $allParams.keySet)
 #set($params = $allParams.get($type))
 "$type" : {
 #foreach($paramName in $params.keySet)
 "$paramName" : "$util.escapeJavaScript($params.get($paramName))"
 #if($foreach.hasNext),#end
 #end
 }
 #if($foreach.hasNext),#end
 #end
 }
}
```

In effect, this mapping template outputs all the request parameters in the payload as outlined as follows:

```
{
 "params" : {
 "path" : { 
 "path_name" : "path_value", 
 ...
 }
 "header" : { 
 "header_name" : "header_value",
 ...
 }
 "querystring" : {
 "querystring_name" : "querystring_value",
 ...
 }
 }
}
```

##### Example JSON mapping template using `$input`

The following example shows how to use a mapping to read a name from the query string and then include the entire POST body in an element:

```
{
 "name" : "$input.params('name')",
 "body" : $input.json('$') 
}
```

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:

```
{
 "name" : "$input.params('name')",
 "body" : $input.json('$.mykey') 
}
```

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:

```
{
 "name" : "$input.params('name')",
 "body" : $util.escapeJavaScript($input.json('$.mykey')) 
}
```

##### Example request and response using `$input`

Request template

```
Resource: /things/{id}

With input template:
{
 "id" : "$input.params('id')",
 "count" : "$input.path('$.things').size",
 "things" : $util.escapeJavaScript($input.json('$.things'))
}

POST /things/abc
{
 "things" : {
 "1" : {},
 "2" : {},
 "3" : {}
 }
}
```

Response:

```
{
 "id": "abc",
 "count": "3",
 "things": {
 "1": {},
 "2": {},
 "3": {}
 }
}
```

#### $util Variables

| Function | Description |
| --- | --- |
| $util.escapeJavaScript | 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. |
| $util.base64Encode | $util.base64Encode |
| $util.base64Decode | Decodes the data from a base64-encoded string. |

<!--/source-->

##### Request

<!--source:api-specifications-->
POST request with request bodyGET request with path parameters mapping
<!--/source-->

<!--source:api-specifications-->
application/json Copy POST request with request body

```
{
 "path": "/loans",
 "http_method": "POST",
 "product_api_identifiers": [
 "5b3b5eb4-f32f-487f-9969-2a9b0ddef89e",
 "e37b044f-b992-4c23-b588-1c34dbb3008b"
 ],
 "product_component": "Loans",
 "product_endpoint": "Create loan",
 "product_sequence": 1,
 "operation_id": "create_loan",
 "description": "Create Loan",
 "example": {
 "loan_label": "foo"
 },
 "request_schema": {
 "type": "object",
 "properties": {
 "loan_label": {
 "type": "string"
 }
 },
 "required": [
 "loan_label"
 ],
 "additionalProperties": false
 },
 "integration": {
 "http_method": "POST",
 "url": "/persistence/transactions",
 "request_template": "{\"label\": \"$input.path('$.loan_label')\"}",
 "responses": {
 "201": {
 "documentation": {
 "description": "Loan created.",
 "example": {
 "loan_label": "foo",
 "loan_id": "01GKF9A4QZ79RSCMJ041HEZSMK"
 }
 },
 "schema": {
 "type": "object",
 "properties": {
 "loan_label": {
 "type": "string"
 },
 "loan_id": {
 "type": "string"
 }
 }
 },
 "response_template": "#set($inputRoot = $input.path('$'))\n{\n \"loan_label\": \"$inputRoot.label\",\n \"loan_id\": \"$inputRoot.transaction_id\"\n}\n"
 }
 }
 }
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy GET request with path parameters mapping

```
{
 "path": "/loans/{loan_id}",
 "http_method": "GET",
 "product_api_identifiers": [
 "fec297a3-973d-4b68-be48-d7a4aedcb07f"
 ],
 "product_component": "Loans",
 "product_endpoint": "Retrieve Loan",
 "product_sequence": 2,
 "operation_id": "retrieve_loan",
 "parameters": [
 {
 "in": "path",
 "name": "loan_id",
 "required": true,
 "schema": {
 "type": "string"
 },
 "example": "01GKKGSG9NHCTP1XM8W4W833QD"
 }
 ],
 "integration": {
 "http_method": "GET",
 "url": "/persistence/transactions/{transaction_id}",
 "request_parameters": {
 "path.transaction_id": "request.path.loan_id"
 },
 "responses": {
 "200": {
 "response_template": "#set($inputRoot = $input.path('$')){ \"loan_label\": \"$inputRoot.label\", \"loan_id\": \"$inputRoot.transaction_id\", \"created_at\": \"$inputRoot.created_at\"}",
 "schema": {
 "type": "object",
 "properties": {
 "loan_label": {
 "type": "string",
 "description": "Loan label."
 },
 "loan_id": {
 "type": "string",
 "description": "Loan ID."
 },
 "created_at": {
 "type": "string",
 "format": "datetime",
 "description": "Loan created at."
 }
 }
 },
 "documentation": {
 "description": "Loan",
 "example": {
 "loan_label": "foo",
 "loan_id": "01GKF9A4QZ79RSCMJ041HEZSMK",
 "created_at": "2022-12-04T21:23:54"
 }
 }
 },
 "404": {
 "response_template": "$input.json('$')",
 "documentation": {
 "description": "Not found",
 "example": {
 "message": "Loan not found."
 }
 },
 "schema": {
 "type": "object",
 "properties": {
 "message": {
 "type": "string",
 "description": "Error message."
 }
 }
 }
 }
 }
 }
}
```

<!--/source-->

##### Response

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

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

```
{
 "product_identifier": "ed011136-4199-4efe-8ba1-71b6eb302744",
 "path": "/loans",
 "http_method": "POST"
}
```

<!--/source-->

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

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

<!--/source-->

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

```
{
 "message": "Resource is not found"
}
```

<!--/source-->

##### Parameters

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

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `product_identifier` required | `string (uuid)` path | `foo` | <!--source:api-specifications-->Product ID<!--/source--> |

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

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

| Field | Type | Description |
| --- | --- | --- |
| `path`required | `string` | <!--source:api-specifications-->Path of your endpoint. Have to start with '/'<!--/source--> |
| `http_method`required | `string` | <!--source:api-specifications-->HTTP method of your endpoint.<!--/source-->`DELETE``GET``PATCH``POST``PUT` |
| `operation_id`required | `string` | <!--source:api-specifications-->Operation id of your endpoint. Used for OpenAPI generation.<!--/source--> |
| `request_schema` | `object` | <!--source:api-specifications-->Request schema<!--/source--> |
| `product_api_identifiers`required | `string[]` | <!--source:api-specifications-->Product API identifiers<!--/source--> |
| `product_component`required | `string` | <!--source:api-specifications-->Product component<!--/source--> |
| `product_endpoint`required | `string` | <!--source:api-specifications-->Product endpoint<!--/source--> |
| `product_sequence`required | `integer` | <!--source:api-specifications-->Product sequence for Site product<!--/source--> |
| `description` | `string` | <!--source:api-specifications-->Description<!--/source--> |
| `example` | `object` | <!--source:api-specifications-->Request body example<!--/source--> |
| `parameters` | `object[]` | <!--source:api-specifications-->Description and examples for path/query/headers parameters<!--/source--> |
| `in`required | `string` | <!--source:api-specifications-->Location, where your parameters is presented.<!--/source-->`header``path``query` |
| `name`required | `string` | <!--source:api-specifications-->Name of your parameter<!--/source--> |
| `schema`required | `object` | <!--source:api-specifications-->JSON schema of your parameter<!--/source--> |
| `type`required | `string` | <!--source:api-specifications-->Data type of your parameter<!--/source-->`boolean``integer``number``string` |
| `example`required | `string` | <!--source:api-specifications-->Example of your parameter<!--/source--> |
| `integration`required | `object` | <!--source:api-specifications-->Your integration information<!--/source--> |
| `http_method` | `string` | <!--source:api-specifications-->HTTP method of request your API will make to Staircase API<!--/source--> |
| `url` | `string` | <!--source:api-specifications-->URL part without domain name of request your API will make to Staircase API<!--/source--> |
| `request_template` | `string` | <!--source:api-specifications-->VTL request template that defines request body of request your API will make to Staircase API<!--/source--> |
| `request_parameters` | `string` | <!--source:api-specifications-->Mapping between path/query/header parameters from request that your API receives to the Staircase API<!--/source--> |
| `responses` | `object` | <!--source:api-specifications-->Information about processing responses from Staircase API, that you call. Key has to be status code, that will process.<!--/source--> |

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

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

| Field | Type | Description |
| --- | --- | --- |
| `product_identifier` | `string (uuid)` | <!--source:api-specifications-->Product ID<!--/source--> |
| `path` | `string (string)` | <!--source:api-specifications-->path<!--/source--> |
| `http_method` | `string` | <!--source:api-specifications-->method<!--/source--> |

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

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

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

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

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

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

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

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

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

`GET` `/apis`

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

#### List APIs [new]
<!--/source-->

`list_apis`

<!--source:api-specifications-->
List APIs
<!--/source-->

<!--source:api-specifications-->
List APIs. Response may not have APIs but contains `next_token`. That means that there are results on next pages

<!--/source-->

##### Response

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

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

```
{
 "next_token": "7b22504b223a2022666f6f222c2022534b223a2022626172227d",
 "apis": [
 {
 "product_identifier": "ed011136-4199-4efe-8ba1-71b6eb302744",
 "base_path": "product-product",
 "is_deployed": true
 },
 {
 "product_identifier": "0206ce61-ed46-492d-98be-9d7f5f166e7d",
 "base_path": "foo/bar",
 "is_deployed": false
 }
 ]
}
```

<!--/source-->

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

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

<!--/source-->

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

```
{
 "message": "Resource is not found"
}
```

<!--/source-->

##### Parameters

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

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `next_token` | `string` query | `31132629274945519779805322857203735586714454643391594505` | <!--source:api-specifications-->Next token for pagination<!--/source--> |
| `limit` | `integer` query | `5` | <!--source:api-specifications-->Items limit<!--/source--> |

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

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

| Field | Type | Description |
| --- | --- | --- |
| `next_token` | `string` | <!--source:api-specifications-->Pagination token<!--/source--> |
| `apis` | `object[]` | <!--source:api-specifications-->APIs<!--/source--> |
| `product_identifier` | `string (uuid)` | <!--source:api-specifications-->Product ID<!--/source--> |
| `base_path` | `string` | <!--source:api-specifications-->Base path<!--/source--> |
| `is_deployed` | `boolean` | <!--source:api-specifications-->Indicator if API was deployed at least once<!--/source--> |

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

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

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

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

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

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

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

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

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

`POST` `/apis/{product_identifier}/deploy`

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

#### Deploy API
<!--/source-->

`deploy_api`

<!--source:api-specifications-->
Deploys your API with specified product identifier. Deployed changes will be available in few minutes after deployment

<!--/source-->

##### Response

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

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

```
{
 "product_identifier": "ed011136-4199-4efe-8ba1-71b6eb302744",
 "status": "DEPLOY_IN_PROGRESS"
}
```

<!--/source-->

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

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

<!--/source-->

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

```
{
 "message": "Resource is not found"
}
```

<!--/source-->

##### Parameters

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

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `product_identifier` required | `string (uuid)` path | `foo` | <!--source:api-specifications-->Product ID<!--/source--> |

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

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

| Field | Type | Description |
| --- | --- | --- |
| `product_identifier` | `string (uuid)` | <!--source:api-specifications-->Product ID<!--/source--> |
| `status` | `string` | <!--source:api-specifications-->Status<!--/source--> |

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

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

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

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

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

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

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

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

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

##### Response `429``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Too many requests.
<!--/source-->

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

`GET` `/apis/{product_identifier}/openapi`

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

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

`get_openapi`

<!--source:api-specifications-->
Retrieve OpenAPI of deployment API. Changes that are not deployed will not be presented in the OpenAPI.

<!--/source-->

##### Response

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

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

```
{}
```

<!--/source-->

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

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

<!--/source-->

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

```
{
 "message": "Resource is not found"
}
```

<!--/source-->

##### Parameters

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

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `product_identifier` required | `string (uuid)` path | `foo` | <!--source:api-specifications-->Product ID<!--/source--> |

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

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

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

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

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

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

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

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

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

##### Other responses

`200`

`GET` `/apis/{product_identifier}/logs`

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

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

`get_logs`

<!--source:api-specifications-->
Retrieve list of API invocations logs.

<!--/source-->

##### Response

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

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

```
{
 "logs": [
 {
 "log_id": "05a50ea791fe0795d12a6745d010946f",
 "last_event_datetime": "2022-12-16T12:53:15.686298"
 }
 ]
}
```

<!--/source-->

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

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

<!--/source-->

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

```
{
 "message": "Resource is not found"
}
```

<!--/source-->

##### Parameters

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

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `product_identifier` required | `string (uuid)` path | `foo` | <!--source:api-specifications-->Product ID<!--/source--> |
| `next_token` | `string` query | `31132629274945519779805322857203735586714454643391594505` | <!--source:api-specifications-->Next token for pagination<!--/source--> |
| `limit` | `integer` query | `5` | <!--source:api-specifications-->Items limit<!--/source--> |

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

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

| Field | Type | Description |
| --- | --- | --- |
| `next_token` | `string` | <!--source:api-specifications-->Pagination token<!--/source--> |
| `logs` | `object[]` | <!--source:api-specifications-->Logs<!--/source--> |
| `log_id` | `string` | <!--source:api-specifications-->Log ID<!--/source--> |
| `last_event_datetime` | `string (date-time)` | <!--source:api-specifications-->Last event date time<!--/source--> |

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

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

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

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

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

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

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

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

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

`GET` `/apis/{product_identifier}/logs/{log_id}`

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

#### Retrieve Log Events
<!--/source-->

`get_log`

<!--source:api-specifications-->
Retrieve Logs
<!--/source-->

<!--source:api-specifications-->
Retrieve log events.

<!--/source-->

##### Response

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

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

```
{
 "events": [
 {
 "timestamp": "2022-12-16T10:33:29.067",
 "message": "(8f575720-12c8-46e3-93dd-315bca0e4d42) Extended Request Id: dOwF8HWWoAMF4BQ="
 },
 {
 "timestamp": "2022-12-16T10:33:29.068",
 "message": "(8f575720-12c8-46e3-93dd-315bca0e4d42) Verifying Usage Plan for request: 8f575720-12c8-46e3-93dd-315bca0e4d42. API Key: ******************************0300c8 API Stage: 4g92h4obi0/api"
 },
 {
 "timestamp": "2022-12-16T10:33:29.070",
 "message": "(8f575720-12c8-46e3-93dd-315bca0e4d42) Usage Plan check succeeded for API Key ******************************0300c8 and API Stage 4g92h4obi0/api"
 },
 {
 "timestamp": "2022-12-16T10:33:29.070",
 "message": "(8f575720-12c8-46e3-93dd-315bca0e4d42) Starting execution for request: 8f575720-12c8-46e3-93dd-315bca0e4d42"
 },
 {
 "timestamp": "2022-12-16T10:33:29.070",
 "message": "(8f575720-12c8-46e3-93dd-315bca0e4d42) HTTP Method: POST, Resource Path: /c757967a-c988-4119-b857-1f4691508d02/loans"
 },
 {
 "timestamp": "2022-12-16T10:33:29.070",
 "message": "(8f575720-12c8-46e3-93dd-315bca0e4d42) API Key: ******************************0300c8"
 },
 {
 "timestamp": "2022-12-16T10:33:29.070",
 "message": "(8f575720-12c8-46e3-93dd-315bca0e4d42) API Key ID: 2i75ejp0oa"
 },
 {
 "timestamp": "2022-12-16T10:33:29.070",
 "message": "(8f575720-12c8-46e3-93dd-315bca0e4d42) Method request path: {}"
 },
 {
 "timestamp": "2022-12-16T10:33:29.070",
 "message": "(8f575720-12c8-46e3-93dd-315bca0e4d42) Method request query string: {}"
 },
 {
 "timestamp": "2022-12-16T10:33:29.070",
 "message": "(8f575720-12c8-46e3-93dd-315bca0e4d42) Method request headers: {x-api-key=******************************0300c8, User-Agent=python-requests/2.28.1, X-Forwarded-Proto=https, X-Amz-Cf-Id=KbOkVNYF-kYDISmt1P2Np-Wlp6qIpxzKN5xbB0hk6CTWGZbFRrvuXw==, X-Forwarded-For=74.91.0.55, 15.158.35.43, content-type=application/json, Host=persistence.staircaseapi.com, X-Forwarded-Port=443, accept-encoding=gzip, deflate, X-Amzn-Trace-Id=Root=1-639c2d59-2293811d029398d96147cf54, accept=*/*, via=1.1 008cd6752eb718142dfefe2f7e847982.cloudfront.net (CloudFront)}"
 },
 {
 "timestamp": "2022-12-16T10:33:29.070",
 "message": "(8f575720-12c8-46e3-93dd-315bca0e4d42) Method request body before transformations: {\"loan_label\": \"foo\"}"
 },
 {
 "timestamp": "2022-12-16T10:33:29.070",
 "message": "(8f575720-12c8-46e3-93dd-315bca0e4d42) Request validation succeeded for content type application/json"
 },
 {
 "timestamp": "2022-12-16T10:33:29.074",
 "message": "(8f575720-12c8-46e3-93dd-315bca0e4d42) Endpoint request URI: https://persistence.staircaseapi.com/persistence/transactions"
 },
 {
 "timestamp": "2022-12-16T10:33:29.074",
 "message": "(8f575720-12c8-46e3-93dd-315bca0e4d42) Endpoint request headers: {x-amzn-apigateway-api-id=4g92h4obi0, Accept=application/json, x-api-key=******************************0300c8, User-Agent=AmazonAPIGateway_4g92h4obi0, X-Amzn-Trace-Id=Root=1-639c2d59-2293811d029398d96147cf54, Content-Type=application/json}"
 },
 {
 "timestamp": "2022-12-16T10:33:29.074",
 "message": "(8f575720-12c8-46e3-93dd-315bca0e4d42) Endpoint request body after transformations: {\"label\": \"foo\"}"
 },
 {
 "timestamp": "2022-12-16T10:33:29.074",
 "message": "(8f575720-12c8-46e3-93dd-315bca0e4d42) Sending request to https://persistence.staircaseapi.com/persistence/transactions"
 },
 {
 "timestamp": "2022-12-16T10:33:32.561",
 "message": "(8f575720-12c8-46e3-93dd-315bca0e4d42) Received response. Status: 201, Integration latency: 3487 ms"
 },
 {
 "timestamp": "2022-12-16T10:33:32.561",
 "message": "(8f575720-12c8-46e3-93dd-315bca0e4d42) Endpoint response headers: {Content-Type=application/json, Content-Length=245, Connection=keep-alive, Date=Fri, 16 Dec 2022 08:33:32 GMT, x-amzn-RequestId=4eb2676a-9f6d-4a71-abd3-8d51ab2075fd, access-control-allow-origin=*, strict-transport-security=max-age=31536000; includeSubDomains; preload, access-control-allow-headers=Authorization,Content-Type,X-Amz-Date,X-Amz-Security-Token,X-Api-Key, x-amz-apigw-id=dOwF9ELkIAMFUtw=, X-Amzn-Trace-Id=Root=1-639c2d59-2293811d029398d96147cf54;Sampled=1, X-Cache=Miss from cloudfront, Via=1.1 640e1fde1214554c9f15c8cb85df826a.cloudfront.net (CloudFront), X-Amz-Cf-Pop=IAD55-P2, X-Amz-Cf-Id=ybYqTc-fhx_uPoQPcRLyd0VofrIirq_NFEEAWNjOmrOPpusYN4HNsw==}"
 },
 {
 "timestamp": "2022-12-16T10:33:32.561",
 "message": "(8f575720-12c8-46e3-93dd-315bca0e4d42) Endpoint response body before transformations: {\"label\": \"foo\",\"created_at\": \"2022-12-16T03:33:32.498711-05:00\",\"transaction_id\": \"01GMD12CAJ5FCV4SW837WCJZ2Y\",\"_links\": {\"collections\": \"https://persistence.staircaseapi.com/persistence/transactions/01GMD12CAJ5FCV4SW837WCJZ2Y/collections\"}}"
 },
 {
 "timestamp": "2022-12-16T10:33:32.561",
 "message": "(8f575720-12c8-46e3-93dd-315bca0e4d42) Method response body after transformations: {\"loan_label\": \"foo\",\"loan_id\": \"01GMD12CAJ5FCV4SW837WCJZ2Y\"}"
 },
 {
 "timestamp": "2022-12-16T10:33:32.562",
 "message": "(8f575720-12c8-46e3-93dd-315bca0e4d42) Method response headers: {X-Amzn-Trace-Id=Root=1-639c2d59-2293811d029398d96147cf54;Sampled=1, Access-Control-Allow-Headers=Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,X-Amz-User-Agent, Access-Control-Allow-Origin=*, Access-Control-Allow-Methods=GET,DELETE,OPTIONS,PATCH,POST,PUT, Strict-Transport-Security=max-age=31536000; includeSubDomains; preload, Content-Type=application/json}"
 },
 {
 "timestamp": "2022-12-16T10:33:32.562",
 "message": "(8f575720-12c8-46e3-93dd-315bca0e4d42) Successfully completed execution"
 },
 {
 "timestamp": "2022-12-16T10:33:32.562",
 "message": "(8f575720-12c8-46e3-93dd-315bca0e4d42) Method completed with status: 201"
 }
 ]
}
```

<!--/source-->

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

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

<!--/source-->

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

```
{
 "message": "Resource is not found"
}
```

<!--/source-->

##### Parameters

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

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `product_identifier` required | `string (uuid)` path | `foo` | <!--source:api-specifications-->Product ID<!--/source--> |
| `log_id` required | `string` path | `05a50ea791fe0795d12a6745d010946f` | <!--source:api-specifications-->Log ID<!--/source--> |
| `next_token` | `string` query | `31132629274945519779805322857203735586714454643391594505` | <!--source:api-specifications-->Next token for pagination<!--/source--> |
| `limit` | `integer` query | `5` | <!--source:api-specifications-->Items limit<!--/source--> |

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

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

| Field | Type | Description |
| --- | --- | --- |
| `next_token` | `string` | <!--source:api-specifications-->Pagination token<!--/source--> |
| `events` | `—` | <!--source:api-specifications-->Events<!--/source--> |

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

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

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

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

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

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

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

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

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

`DELETE` `/apis/{product_identifier}`

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

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

`delete_api`

<!--source:api-specifications-->
Delete API.
<!--/source-->

<!--source:api-specifications-->
Service deletes the API and all the endpoints of this API.

<!--/source-->

##### Response

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

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

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

<!--/source-->

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

```
{
 "message": "Resource is not found"
}
```

<!--/source-->

##### Parameters

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

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `product_identifier` required | `string (uuid)` path | `b1e98e0e-adnf-4cdd-b065-16feb5493049` | <!--source:api-specifications-->Product ID<!--/source--> |

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

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

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

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

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

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

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

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

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

##### Response `429``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Too many requests.
<!--/source-->

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

##### Other responses

`204`

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

### Api Examples
<!--/source-->

`POST` `/apis-examples/subsets`

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

#### Generate Subset
<!--/source-->

`generate_subset`

<!--source:api-specifications-->
Extract the part of the JSON data by the provided api schema definition in `Lexicon` format.

<!--/source-->

##### Request

<!--source:api-specifications-->
application/json Copy
```
{
 "api_data_example": {
 "foo": [
 {
 "bar1": "baz1"
 },
 {
 "bar2": "baz2"
 }
 ],
 "bar": {
 "biz": "baz",
 "booz": "baz"
 }
 },
 "root_schema_fields": [
 "foo_schema_id",
 "bar_schema_id"
 ],
 "all_schema_fields": [
 {
 "@id": "foo_schema_id",
 "@type": "api_schema",
 "name": "foo",
 "requirement_indicator": true,
 "has_graph_entity": "01H28AB7BRQ066FJCHXEN1SW7T",
 "has_api_schema_field": [
 "bar1_schema_id"
 ]
 },
 {
 "@id": "bar1_schema_id",
 "@type": "api_schema",
 "name": "bar1",
 "requirement_indicator": false,
 "has_graph_entity": "01H28AB7BRGBRJDC3CD7Y3S0C7"
 },
 {
 "@id": "bar_schema_id",
 "@type": "api_schema",
 "name": "bar",
 "requirement_indicator": true,
 "has_graph_entity": "01H28AB7BRQ066FJCHXEN1SW7O",
 "has_api_schema_field": [
 "booz_schema_id"
 ]
 },
 {
 "@id": "booz_schema_id",
 "@type": "api_schema",
 "name": "booz",
 "requirement_indicator": false,
 "has_graph_entity": "01H28AB7BRGBRJDC3CD7Y3S0C7"
 }
 ]
}
```

<!--/source-->

##### Response

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

<!--source:api-specifications-->
application/json Copy Created item successfully

```
{
 "example_data_subset": {
 "foo": [
 {
 "bar1": "baz1"
 }
 ],
 "bar": {
 "booz": "baz"
 }
 }
}
```

<!--/source-->

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

```
{
 "detailedMessage": "Bad request exception"
}
```

<!--/source-->

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

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

| Field | Type | Description |
| --- | --- | --- |
| `api_data_example`required | `one of` | <!--source:api-specifications-->The complete JSON data to be processed.<!--/source--> |
| `root_schema_fields`required | `string[]` | <!--source:api-specifications-->The @id-s of the root data children datapoints.<!--/source--> |
| `all_schema_fields`required | `object[]` | <!--source:api-specifications-->The api schema definition in `Lexicon` format.<!--/source--> |
| `name`required | `string` | <!--source:api-specifications-->Data property name.<!--/source--> |
| `has_api_schema_fields` | `string[]` | <!--source:api-specifications-->JSON-LD @id-s of the schema definitions for the child data points.<!--/source--> |

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

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Created item successfully
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `example_data_subset` | `one of` | <!--source:api-specifications-->Generated subset of the API example data.<!--/source--> |

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

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

| Field | Type | Description |
| --- | --- | --- |
| `detailedMessage` | `string` | <!--source:api-specifications-->Message<!--/source--> |
| `code` | `string` | <!--source:api-specifications-->Code<!--/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--> |

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

### Loans
<!--/source-->

`POST` `/loans`

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

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

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

<!--/source-->

##### Request

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

<!--/source-->

##### Response

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

```
{
 "loan_label": "foo",
 "loan_id": "01GKF9A4QZ79RSCMJ041HEZSMK"
}
```

<!--/source-->

##### Parameters

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

| Parameter | Type | Description |
| --- | --- | --- |
| `x-api-key` required | `string` header | — |

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

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

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

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

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Loan created.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `loan_label` | `string` | — |
| `loan_id` | `string` | — |

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

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

`GET` `/{product}/connector-configurations`

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

#### Retrieve Connector Configurations
<!--/source-->

`retrieve-connector-configurations`

<!--source:api-specifications-->
Retrieve the all connector configurations for the given product. The `configuration` field can be passed as a path parameter the `/setups` endpoint.

<!--/source-->

##### Response

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

<!--source:api-specifications-->
application/json Copy Connector Configurations Found

```
[
 {
 "configuration": "test",
 "partners": [
 {
 "partner": "plaid"
 },
 {
 "partner": "finicity"
 }
 ]
 },
 {
 "configuration": "production",
 "partners": [
 {
 "partner": "plaid"
 },
 {
 "partner": "finicity"
 }
 ]
 }
]
```

<!--/source-->

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

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

<!--/source-->

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

```
{
 "message": "Unable to retrieve configurations for given product."
}
```

<!--/source-->

##### Parameters

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

| Parameter | Type | Description |
| --- | --- | --- |
| `product` required | `string` path | <!--source:api-specifications-->Staircase product name<!--/source--> |

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

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Connector Configurations Found
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `configuration` | `string` | <!--source:api-specifications-->Name of the configuration. Can be passed into the /setups endpoint.<!--/source--> |
| `partners` | `object[]` | <!--source:api-specifications-->An array of vendors associated with the configuration<!--/source--> |
| `partner` | `string` | <!--source:api-specifications-->Name of the vendor<!--/source--> |

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

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

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

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

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

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

##### Other responses

`400`

`POST` `/{product}/connector-configurations/{configuration}/setups`

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

#### Set up Connector Configuration
<!--/source-->

`setup-connector-configuration`

<!--source:api-specifications-->
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.

<!--/source-->

##### Response

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

<!--source:api-specifications-->
application/json Copy Configuration set up successfully

```
{
 "message": "Configuration is set up successfully."
}
```

<!--/source-->

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

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

<!--/source-->

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

```
{
 "message": "Unable to retrieve configurations for given product."
}
```

<!--/source-->

##### Parameters

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

| Parameter | Type | Description |
| --- | --- | --- |
| `product` required | `string` path | <!--source:api-specifications-->Staircase product name<!--/source--> |
| `configuration` required | `string` path | <!--source:api-specifications-->Product configuration name<!--/source--> |

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

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Configuration set up successfully
<!--/source-->

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

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

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

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

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

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

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

##### Other responses

`400`

`POST` `/build`

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

#### Build payload
<!--/source-->

<!--source:api-specifications-->
Build a payload for collections, where the pathes can be taken from appropriate endpoint. Values, that are passed is validated against the JSON schema.

<!--/source-->

##### Request

<!--source:api-specifications-->
application/json Copy
```
{
 "$.deal_sets[0].parties[0].individual.first_name": "Mykyta",
 "$.deal_sets[0].parties[0].roles[0].party_type": "Borrower",
 "$.deal_sets[0].parties[0].roles[0].employers[0].legal_entity_name": "Truework Inc",
 "$.deal_sets[0].parties[0].taxpayer_identifiers[0].value": "999-00-0000"
}
```

<!--/source-->

##### Response

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

```
{
 "deal_sets": {
 "deal_set": [
 {
 "deals": {
 "deal": [
 {
 "parties": {
 "party": [
 {
 "individual": {
 "name": "Mykyta"
 },
 "roles": {
 "role": [
 {
 "role_detail": {
 "party_type": "Borrower"
 },
 "borrower": {
 "employers": {
 "employer": [
 {
 "legal_entity": {
 "legal_entity_detail": {
 "full_name": "Truework Inc"
 }
 }
 }
 ]
 }
 }
 }
 ]
 },
 "taxpayer_identifiers": {
 "taxpayer_identifier": [
 {
 "type": "EmployerIdentificationNumber",
 "value": "999-00-0000"
 }
 ]
 }
 }
 ]
 }
 }
 ]
 }
 }
 ]
 }
}
```

<!--/source-->

##### Other responses

`200`

`POST` `/hello-world`

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

#### Hello World
<!--/source-->

<!--source:api-specifications-->
Dummy hello world endpoint

<!--/source-->

##### Other responses

`200`

`GET` `/loans/{loan_id}`

##### Response

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

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

```
{
 "loan_label": "foo",
 "loan_id": "01GKF9A4QZ79RSCMJ041HEZSMK",
 "created_at": "2022-12-04T21:23:54"
}
```

<!--/source-->

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

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

<!--/source-->

##### Parameters

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

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | — | — |
| `loan_id` required | `string` path | `01GKKGSG9NHCTP1XM8W4W833QD` | — |

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

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

| Field | Type | Description |
| --- | --- | --- |
| `loan_label` | `string` | <!--source:api-specifications-->Loan label.<!--/source--> |
| `loan_id` | `string` | <!--source:api-specifications-->Loan ID.<!--/source--> |
| `created_at` | `string (datetime)` | <!--source:api-specifications-->Loan created at.<!--/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-->Error message.<!--/source--> |

`GET` `/schema`

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

#### Retrieve part of staircase json schema by json path
<!--/source-->

<!--source:api-specifications-->
returns the schema for specified JSON path, that it is used for payload validation

<!--/source-->

##### Response

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

```
{
 "type": "string",
 "description": "An identifier for the current instance of VIEW. The party assigning the identifier should be provided using the IdentifierOwnerURI."
}
```

<!--/source-->

##### Parameters

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

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `json_path` required | `string` query | `$.deal_sets[0].parties[0].individual.first_name` | — |

##### Other responses

`200`

`POST` `/sdks`

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

#### Generate SDK for the specific service
<!--/source-->

<!--source:api-specifications-->
Using input link to swagger and request details generate SDK for the service

<!--/source-->

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

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

| Field | Type | Description |
| --- | --- | --- |
| `service_name` | `string` | <!--source:api-specifications-->Name of service for which sdk need to be generated<!--/source--> |
| `swagger_link` | `string` | <!--source:api-specifications-->Link to swagger (OpenAPI) json file which need to be used for SDK generation<!--/source--> |
| `programming_language` | `string` | <!--source:api-specifications-->Programming language for which we need to generate SDK<!--/source--> |
| `service_version` | `string` | <!--source:api-specifications-->Version of service<!--/source--> |

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

<!--source:api-specifications-->
3 fields
<!--/source-->
<!--source:api-specifications-->
SDK generated successfully
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Status message of SDK generation process<!--/source--> |
| `success` | `boolean` | <!--source:api-specifications-->Does operation generate SDK<!--/source--> |
| `generated_sdk_url` | `string` | <!--source:api-specifications-->URL to generated SDK on s3 bucket<!--/source--> |

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

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Bad request body
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error_message` | `string` | <!--source:api-specifications-->Short error reason message<!--/source--> |
| `error_description` | `string` | <!--source:api-specifications-->Long description of error cause<!--/source--> |

##### Response `409``application/json`

<!--source:api-specifications-->
3 fields
<!--/source-->
<!--source:api-specifications-->
SDK with provided parameters already exist
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Status message of SDK generation process<!--/source--> |
| `success` | `boolean` | <!--source:api-specifications-->Does operation generate SDK<!--/source--> |
| `generated_sdk_url` | `string` | <!--source:api-specifications-->URL to generated SDK on s3 bucket<!--/source--> |

`DELETE` `/sdks/{programming_language}/{service_name}`

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

#### Delete existing SDK with service_version bucket
<!--/source-->

<!--source:api-specifications-->
Delete SDK inside service_version bucket and this bucket itself

<!--/source-->

##### Parameters

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

| Parameter | Type | Description |
| --- | --- | --- |
| `programming_language` required | `string` path | <!--source:api-specifications-->SDK client language<!--/source--> |
| `service_name` required | `string` path | <!--source:api-specifications-->Name of service<!--/source--> |
| `service_version` required | `string` query | <!--source:api-specifications-->The version of service for which we need delete SDK<!--/source--> |

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

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
SDK and service_version bucket was deleted successfully
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `success` | `boolean` | <!--source:api-specifications-->Show the success status of deletion process<!--/source--> |
| `description` | `string` | <!--source:api-specifications-->Short description message of success status<!--/source--> |

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

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Not found any SDK's related to requested parameters
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `success` | `boolean` | <!--source:api-specifications-->Show the success status of deletion process<!--/source--> |
| `description` | `string` | <!--source:api-specifications-->Short description message of success status<!--/source--> |

##### Other responses

`400`

`GET` `/sdks/{programming_language}/{service_name}`

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

#### Get S3 bucket url's to SDK's for reuqested parameters
<!--/source-->

<!--source:api-specifications-->
Get all existing S3 bucket url's to SDK's for the requested programming language , service name and version

<!--/source-->

##### Parameters

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

| Parameter | Type | Description |
| --- | --- | --- |
| `programming_language` required | `string` path | <!--source:api-specifications-->Name of programming language for which we need to download SDK<!--/source--> |
| `service_name` required | `string` path | <!--source:api-specifications-->Name of service for the requested SDK<!--/source--> |
| `service_version` | `string` query | <!--source:api-specifications-->Version of service<!--/source--> |

##### Response `200``multipart/form-data`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Found SDK's for the requested parameters
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `sdk_version` | `string` | <!--source:api-specifications-->Version of service SDK<!--/source--> |
| `generated_sdk_url` | `string` | <!--source:api-specifications-->URL of generated SDK to S3 bucket<!--/source--> |

##### Other responses

`404`

`POST` `/validate`

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

#### Validate OpenAPI file
<!--/source-->

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

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

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

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

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Validator found some errors
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `errors` | `object[]` | — |
| `error_type` | `string` | — |
| `message` | `string` | — |

##### Other responses

`200`

`POST` `/validate/{language}`

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

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

`validate_element`

##### Parameters

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

| Parameter | Type | Description |
| --- | --- | --- |
| `x-api-key` required | `string` header | <!--source:api-specifications-->API key<!--/source--> |
| `language` required | `string` path | <!--source:api-specifications-->Language name<!--/source--> |

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

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

| Field | Type | Description |
| --- | --- | --- |
| `values` | `object` | — |
| `element_type` | `string` | — |

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

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Element is valid
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `values` | `object` | — |
| `element_type` | `string` | — |

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

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

| Field | Type | Description |
| --- | --- | --- |
| `errors` | `object[]` | — |
| `error_type` | `string` | — |
| `message` | `string` | — |

## Errors

`400``403``404``409``422``429`

## More in Integration

- Previous product: Job
- Next product: Workflow
