Skip to content
Staircase

Health

Per-transaction metrics, cost metrics, and a per-partner performance report carrying vendor success rate and cost.

Every invocation reports timing, outcome and cost. The surface serves that back as transaction metrics, cost metrics, custom report templates, and the public status view.

The per-partner report carries success rate and cost per vendor, which is the measurement a waterfall ordering is retuned from — the ordering is only as good as the evidence that a vendor is answering.

How it works

Vendor performance was reported from the beginning rather than added once someone asked. That is the difference between a waterfall as an idea and a waterfall that can be tuned: without per-vendor success and cost, the order is a guess that nobody can correct.

Operations

Status

POST /

Update status

updateHealthStatus

Update product status

Request
application/json
{
  "product_id": "test_product",
  "product_api_id": "test_api",
  "environment_fqdn": "test_env.example.com",
  "available": true
}
Response
application/json

Successfully updated product status

{
  "product_id": "test_product",
  "status": "operational"
}
Request bodyapplication/json
2 fields
FieldTypeDescription
product_idrequiredstringProduct ID
statusrequiredstringStatus
Response 200application/json
2 fields

Successfully updated product status

FieldTypeDescription
product_idrequiredstringCategory
statusrequiredstringStatusmajor_outageoperationalpartial_outage
Response 400application/json
1 fields

Request data invalid

FieldTypeDescription
messagestringError message
Response 403application/json
1 fields

Missing API key

FieldTypeDescription
messagestringMessage
GET /{product_id}

Retrieve status

getHealthStatus

Get product status

Get product availability status

Response
application/json

Successfully fetched product status

{
  "product_id": "test_product",
  "status": "operational"
}
Parameters
1
ParameterTypeExampleDescription
product_id required string path 01GYWNA8PJX5A41WA48PZNV5Y4 Product ID
Response 200application/json
2 fields

Successfully fetched product status

FieldTypeDescription
product_idrequiredstringCategory
statusrequiredstringStatusmajor_outageoperationalpartial_outage
Response 400application/json
1 fields

Request data invalid

FieldTypeDescription
messagestringError message
Response 403application/json
1 fields

Missing API key

FieldTypeDescription
messagestringMessage
Response 404application/json
1 fields

Requested resource not found

FieldTypeDescription
messagestringMessage

Metric Alarm Events

GET /alarms/events

List Metric Alarm Events

list_metric_alarm_events

This service returns a list of occurred alarm events. NOTE: Alarm events have one week retention period. Events that passed the retention period will be deleted.

Response
application/json

Ok.

{
  "events": [
    {
      "expire_at": 1663939815,
      "event_id": "2f9e3499-8e5d-4003-b524-ed23aca2ac38",
      "metric_data": {
        "transaction_id": "01GD37M86FM1AZ2QXQ243NDKHE",
        "product_identifier": "c72b3b7c-dc30-41d0-81d3-3d3889370ef2",
        "product_api_identifier": "77958f4b-7158-42d0-adbd-22e2b74fe0c9",
        "invocation_code": "2000",
        "elapsed_time": 147.4666051864624,
        "created_at": "2022-09-16 09:30:13",
        "response_collection_id": "d4f48c0f-6560-4da9-8c8d-a54d10d22d7e",
        "id": "37e9b907-ef5b-4e54-b782-de1e64259a80",
        "configuration_id": "e1b96c6d-d24e-459c-ae8a-ec460df3de8f",
        "product_build_hash": "f144ef21958ba7cde95a9bbd5372ec99605af106",
        "host_environment": "health.staircaseapi.com",
        "status": "SUCCEEDED"
      },
      "created_at": "2022-09-16T09:30:13",
      "alarm_id": "alarm_id_1"
    }
  ],
  "next_token": null
}
Parameters
7
ParameterTypeExampleDescription
x-sc-trace-id required string header 01GYYMHV78DVPV5TSHPQTJ31X9 Trace ID
x-api-key required string header <redacted> API key
alarm_id required string query product_identifier_1 Alarm ID
start_date required string query 2022-01-01T00:00:00 Start date in ISO format
end_date required string query 2022-01-01T01:01:01 End date in ISO format
next_token string query eyJwcm9kdWN0X25hbWUiOiAiQnVpbGQiLCAiY3JlYXRlZF9hdCI6ICIyMDIxLTA2LTA0VDE0OjU5OjE5LjU3MTg3OSJ9 The token for the next set of items to return.
limit string query 150 The number of results to return in this request
Response 200application/json
1 fields

Ok.

FieldTypeDescription
eventsobject[]List of events
alarm_idstringAlarm IDExample alarm_id_1
event_idstringEvent IDExample event_id_1
created_atstringEvent creation date.Example 2022-09-16T09:30:13
expire_atintegerEvent item expiration timestamp.Example 1663939815
metric_dataobjectMetric payload
idstringMetric IDExample 37e9b907-ef5b-4e54-b782-de1e64259a80
host_environmentstringMetric host environmentExample health.staircaseapi.com
product_identifierstringProduct IdentifierExample c72b3b7c-dc30-41d0-81d3-3d3889370ef2
product_api_identifierstringProduct API identifierExample 77958f4b-7158-42d0-adbd-22e2b74fe0c9
transaction_idstringTransaction IDExample 01GD37M86FM1AZ2QXQ243NDKHE
response_collection_idstringResponse collection IDExample d4f48c0f-6560-4da9-8c8d-a54d10d22d7e
elapsed_timenumberElapsed timeExample 147.46
statusstringStatusExample SUCCEEDED
invocation_codestringInvocation codeExample 2000
configuration_idstringProduct configuration IDExample e1b96c6d-d24e-459c-ae8a-ec460df3de8f
product_build_hashstringProduct build hashExample f144ef21958ba7cde95a9bbd5372ec99605af106
Response 400application/json
1 fields

Error response example

FieldTypeDescription
ErrorstringError
Response 403application/json
1 fields

Forbidden

FieldTypeDescription
messagestringError message
Response 404application/json
1 fields

Not found.

FieldTypeDescription
errorstringError message.
Response 422application/json
2 fields

Unprocessable Entity

FieldTypeDescription
messagestringError message
errorstringError
Response 504application/json
1 fields

504 Timeout response.

FieldTypeDescription
messagestringEndpoint request timed out

Metric Alarms

POST /alarms/metric

Create Metric Alarm

create_metric_alarms

Metric Alarm

Health alarms provide real-time alerts based on a given condition. If you want to be notified when an alert event has occurred, you can select a destination option. You are able to select one or more destination channels from the available options.

Condition

Health alarms are generated based on given conditions.

Destinations

Notification can be delivered after the alert event has occurred. Destinations are notification channels for alert delivery. One or more notification channels can be selected ex: Slack, and Webhook.

  • Slack: Slack integration requires a slack token that belongs to Slack apps. Please create a new application by using Slack API. After application creation, go to channel configuration and add created Slack app as an integration using "Apps" section in the "Integrations" tab.
Request
application/json
{
  "alarm_id": "alarm_id_1",
  "condition": {
    "product_identifier": "product_identifier_1",
    "product_api_identifiers": [
      "product_api_identifier_1"
    ]
  },
  "destinations": [
    {
      "type": "SLACK",
      "slack_channel": "slack_channel_1",
      "slack_token": "slack_token_1",
      "slack_usergroup_id": "S03TW2A7A3U"
    },
    {
      "type": "WEBHOOK",
      "url": "https://webhook.com"
    }
  ]
}
Response
application/json

Success response.

{
  "message": "migration configuration created"
}
Parameters
2
ParameterTypeExampleDescription
x-sc-trace-id required string header 01GYYMHV78DVPV5TSHPQTJ31X9 Trace ID
x-api-key required string header <redacted> API key
Request bodyapplication/json
3 fields
FieldTypeDescription
alarm_idrequiredstringUnique alarm ID
conditionrequiredobjectAlarm filter configuration
host_environmentstringHost environment
product_identifierrequiredstringProduct identifier
product_api_identifiersstring[]List of product api identifiers
configuration_idsstring[]List of product configuration ID
statusesstring[]List of status
invocation_codesstring[]List of invocation codes
product_build_hashstringProduct build hash
elapsed_time_abovenumberFilters metrics which has elapsed time above
elapsed_time_belownumberFilters metrics which has elapsed time below
required_propertiesstring[]List of required properties
destinationsrequiredarrayList of alarm destinations
Response 201application/json
1 fields

Success response.

FieldTypeDescription
messagestringMessage response
Response 400application/json
1 fields

Error Response.

FieldTypeDescription
messagestringError message
Response 403application/json
1 fields

Forbidden

FieldTypeDescription
messagestringError message
Response 404application/json
1 fields

Not found.

FieldTypeDescription
errorstringError message.
Response 422application/json
2 fields

Unprocessable Entity

FieldTypeDescription
messagestringError message
errorstringError
Response 504application/json
1 fields

504 Timeout response.

FieldTypeDescription
messagestringEndpoint request timed out
PUT /alarms/metric/{alarm_id}

Update Metric Alarm

update_metric_alarm

This service updates metric alarm.

Request
application/json
{
  "condition": {
    "product_identifier": "product_identifier_1",
    "product_api_identifiers": [
      "product_api_identifier_1"
    ]
  },
  "destinations": [
    {
      "type": "SLACK",
      "slack_channel": "slack_channel_1",
      "slack_token": "slack_token_1"
    },
    {
      "type": "WEBHOOK",
      "url": "https://webhook.com"
    }
  ]
}
Response
application/json

Success response.

{
  "message": "migration configuration updated"
}
Parameters
4
ParameterTypeExampleDescription
x-sc-trace-id required string header 01GYYMHV78DVPV5TSHPQTJ31X9 Trace ID
x-api-key required string header <redacted> API key
x-api-key required string header <redacted> API key
alarm_id required string path alarm_id_1 Unique alarm ID
Request bodyapplication/json
2 fields
FieldTypeDescription
conditionrequiredobjectAlarm filter configuration
host_environmentstringHost environment
product_identifierrequiredstringProduct identifier
product_api_identifiersstring[]List of product api identifiers
statusesstring[]List of status
invocation_codesstring[]List of invocation codes
configuration_idsstring[]List of product configuration ID
product_build_hashstringProduct build hash
elapsed_time_abovenumberFilters metrics which has elapsed time above
elapsed_time_belownumberFilters metrics which has elapsed time below
slack_usergroup_idstringSlack usergroup id. Use this to tag your team group in the slack message. This ID ALWAYS starts with S and is followed by 9 characters.Example slack_usergroup_id_1
required_propertiesstring[]List of required properties
destinationsrequiredarrayList of alarm destinations
Response 201application/json
1 fields

Success response.

FieldTypeDescription
messagestringMessage response
Response 400application/json
1 fields

Error Response.

FieldTypeDescription
messagestringError message
Response 403application/json
1 fields

Forbidden

FieldTypeDescription
messagestringError message
Response 404application/json
1 fields

Not found.

FieldTypeDescription
errorstringError message.
Response 422application/json
2 fields

Unprocessable Entity

FieldTypeDescription
messagestringError message
errorstringError
Response 504application/json
1 fields

504 Timeout response.

FieldTypeDescription
messagestringEndpoint request timed out
GET /alarms/metric

List Metric Alarms

list_metric_alarms

This service returns list of metric alarms.

Response
application/json

Ok.

{
  "alarms": [
    {
      "destinations": [
        {
          "type": "SLACK",
          "slack_channel": "slack_channel_1",
          "slack_token": "slack_token_1"
        }
      ],
      "alarm_id": "alarm_id_1",
      "condition": {
        "product_api_identifiers": [
          "product_api_identifier_1"
        ],
        "product_identifier": "product_identifier_1"
      }
    }
  ]
}
Parameters
3
ParameterTypeExampleDescription
x-sc-trace-id required string header 01GYYMHV78DVPV5TSHPQTJ31X9 Trace ID
x-api-key required string header <redacted> API key
product_identifier string query product_identifier_1 Filters by product identifier
Response 200application/json
1 fields

Ok.

FieldTypeDescription
alarmsobject[]Configurations
alarm_idstringUnique configuration name. Value can be alphanumeric and underscore characters only.Example test_configuration
conditionobjectTarget environment API key
host_environmentstringHost environmentExample health.staircaseapi.com
product_identifierstringProduct identifierExample ccd6b8dd-02a7-4c64-a983-7e0c108cd666
product_api_identifiersarrayList of api identifiers
statusesarrayList of status
invocation_codesarrayList of invocation codes
configuration_idsarrayList of configuration ID
product_build_hashstringProduct build hash
elapsed_time_abovenumberElapsed time above filterExample 5
elapsed_time_belownumberElapsed time below filterExample 10
destinationsarrayList of alarm destinations
Response 400application/json
1 fields

Error response example

FieldTypeDescription
ErrorstringError
Response 403application/json
1 fields

Forbidden

FieldTypeDescription
messagestringError message
Response 404application/json
1 fields

Not found.

FieldTypeDescription
errorstringError message.
Response 422application/json
2 fields

Unprocessable Entity

FieldTypeDescription
messagestringError message
errorstringError
Response 504application/json
1 fields

504 Timeout response.

FieldTypeDescription
messagestringEndpoint request timed out
GET /alarms/metric/{alarm_id}

Get Metric Alarm

get_metric_alarms

This service returns metric alarms.

Response
application/json

Ok.

{
  "destinations": [
    {
      "type": "SLACK",
      "slack_channel": "slack_channel_1",
      "slack_token": "slack_token_1"
    }
  ],
  "alarm_id": "alarm_id_1",
  "condition": {
    "product_api_identifiers": [
      "product_api_identifier_1"
    ],
    "product_identifier": "product_identifier_1"
  }
}
Parameters
4
ParameterTypeExampleDescription
x-sc-trace-id required string header 01GYYMHV78DVPV5TSHPQTJ31X9 Trace ID
x-api-key required string header <redacted> API key
x-api-key required string header <redacted> API key
alarm_id required string path alarm_id_1 Unique alarm ID
Response 200application/json
3 fields

Ok.

FieldTypeDescription
alarm_idstringUnique configuration name. Value can be alphanumeric and underscore characters only.Example test_configuration
conditionobjectTarget environment API key
host_environmentstringHost environmentExample health.staircaseapi.com
product_identifierstringProduct identifierExample ccd6b8dd-02a7-4c64-a983-7e0c108cd666
product_api_identifiersarrayList of api identifiers
statusesarrayList of status
invocation_codesarrayList of invocation codes
configuration_idsarrayList of configuration ID
product_build_hashstringProduct build hash
elapsed_time_abovenumberElapsed time above filterExample 5
elapsed_time_belownumberElapsed time below filterExample 10
destinationsarrayList of alarm destinations
Response 400application/json
1 fields

Error response example

FieldTypeDescription
ErrorstringError
Response 403application/json
1 fields

Forbidden

FieldTypeDescription
messagestringError message
Response 404application/json
1 fields

Not found.

FieldTypeDescription
errorstringError message.
Response 422application/json
2 fields

Unprocessable Entity

FieldTypeDescription
messagestringError message
errorstringError
Response 504application/json
1 fields

504 Timeout response.

FieldTypeDescription
messagestringEndpoint request timed out
DELETE /alarms/metric/{alarm_id}

Delete Metric Alarm

delete_metric_alarm

This service deletes metric alarm.

Response
application/json

Ok.

{
  "message": "migration configuration deleted"
}
Parameters
4
ParameterTypeExampleDescription
x-sc-trace-id required string header 01GYYMHV78DVPV5TSHPQTJ31X9 Trace ID
x-api-key required string header <redacted> API key
x-api-key required string header <redacted> API key
alarm_id required string path alarm_id_1 Unique alarm ID
Response 200application/json
1 fields

Ok.

FieldTypeDescription
messagestringUnique configuration nameExample test_configuration
Response 400application/json
1 fields

Error response example

FieldTypeDescription
ErrorstringError
Response 403application/json
1 fields

Forbidden

FieldTypeDescription
messagestringError message
Response 404application/json
1 fields

Not found.

FieldTypeDescription
errorstringError message.
Response 422application/json
2 fields

Unprocessable Entity

FieldTypeDescription
messagestringError message
errorstringError
Response 504application/json
1 fields

504 Timeout response.

FieldTypeDescription
messagestringEndpoint request timed out

Custom Reports

POST /build-report

Create Custom Report

create_custom_report

Build a custom report using the metrics posted for any product or custom-created metric types.

Build a custom report using the metrics posted for any product or custom-created metric types. Define the fields to retrieve, the filters to apply, and the aggregation if needed.

The report data to retrieve can be defined in two ways:

  • Aggregated:Providing the aggregation function, aggregation_fields and group_by will allow to bring the results aggregated.

  • Detailed:Specify the fields and filters to retrieve detailed metrics data.

Request
application/json
{
  "get": [
    "product_name",
    "status",
    "transaction_id",
    "request_collection_id",
    "response_collection_id",
    "operation_status",
    "partner_name",
    "severity",
    "service_endpoint"
  ],
  "filters": {
    "product_name": [
      "Health",
      "Account"
    ],
    "status": [
      "succeeded"
    ],
    "host_env": [
      "health.staircaseapi.com"
    ]
  },
  "report_name": "report_to_create_name",
  "metric_type": "performance"
}
Response
application/json

Success Response

{
  "message": "the custom report was successfully created"
}
Parameters
1
ParameterTypeExampleDescription
x-api-key required string header xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx Key
Request bodyapplication/json
7 fields
FieldTypeDescription
getstring[]Items which will be retrieved (product_name, status, transaction_id,request_collection_id,response_collection_id,operation_status,partner_name,severity,service_endpoint,created_at)
metric_typestringThe name of the metric type created or use "performance" for transaction and logging metrics posted in the Health.
aggregationstringFor aggregated reports, it will calculate the given function (count, avg, sum)
aggregation_fieldstringFor aggregated reports, it will calculate the aggregation function with this field. Example(transaction_id, response_collection_id)
group_byarrayFor aggregated reports, it will group the data by these fields. Example(product_name, service_endpoint)
filtersobjectFilters applied for the report
environmentstring[]Environment example
product_namestring[]Product Name Example
statusstring[]Status Example
report_namestringName of the Report.
Response 201application/json
1 fields

Success Response

FieldTypeDescription
messagestringMessage
Response 400application/json
1 fields

Bad request error

FieldTypeDescription
messagestringMessage
Response 403application/json
2 fields

403 response

FieldTypeDescription
urlstringURL
messagestringMessage
Response 502application/json
1 fields

Error.

FieldTypeDescription
messagestringMessage error
GET /get-report

Retrieve Custom Report

get_custom_report

This service runs a custom report and allows to retrieve the results for the given report structure.

This service runs a custom report and allows to retrieve the results for the given report structure. The start and end date defines the report data timeframe, also the filters are applied.

See the service Update custom report to change the structure of the report.

Response
application/json

Success

{
  "Items": [
    {
      "product_name": "Assess",
      "status": "succeeded",
      "transaction_id": "1ce37c58-12aa-400f-a7b6-97f5d63b0e50",
      "host_env": "health.staircaseapi.com",
      "created_at": "2021-06-25 14:03:03.504"
    }
  ]
}
Parameters
4
ParameterTypeExampleDescription
report_name required string query simples221 The name of the Report
start_date required string query 2021-01-01 Start date
end_date required string query 2021-06-30 End date
x-api-key required string header xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx Key
Response 200application/json
1 fields

Success

FieldTypeDescription
Itemsobject[]Items
transaction_idstringField name
created_atstringField name
host_envstringField name
product_namestringField name
statusstringField name
Response 400application/json
1 fields

Error Response

FieldTypeDescription
messagestringMessage
Response 403application/json
2 fields

403 response

FieldTypeDescription
urlstringURL
messagestringMessage
PUT /update-build-report

Update Custom Report

update_custom_report

This service allows updating a custom report structure.

This service allows updating a custom report structure.

Request
application/json
{
  "get": [
    "product_name",
    "status",
    "transaction_id",
    "request_collection_id",
    "response_collection_id",
    "operation_status",
    "partner_name",
    "severity",
    "service_endpoint"
  ],
  "filters": {
    "product_name": [
      "Health",
      "Account"
    ],
    "status": [
      "succeeded"
    ],
    "environment": [
      "health.staircaseapi.com"
    ]
  },
  "report_name": "report_to_create_name",
  "metric_type": "performance"
}
Response
application/json

Success Response

{
  "message": "the custom report was successfully updated"
}
Parameters
1
ParameterTypeExampleDescription
x-api-key required string header xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx Key
Request bodyapplication/json
4 fields
FieldTypeDescription
getstring[]Items which will be retrieved (product_name, status, transaction_id,request_collection_id,response_collection_id,operation_status,partner_name,severity,service_endpoint,created_at)
metric_typestringThe name of the metric type created or use "performance" for transaction and logging metrics posted in the Health.
filtersobjectFilters applied for the report
environmentstring[]Environment example
product_namestring[]Product Name Example
statusstring[]Status Example
report_namestringName of the Report.
Response 200application/json
1 fields

Success Response

FieldTypeDescription
messagestringMessage
Response 400application/json
1 fields

400 Bad Request

FieldTypeDescription
errorstringError message
Response 403application/json
2 fields

403 response

FieldTypeDescription
urlstringURL
messagestringMessage
Response 502application/json
1 fields

Error.

FieldTypeDescription
messagestringMessage error
GET /get-report-id

Retrieve Custom Report Id

get_custom_report_id

This service runs a custom report and allows to retrieve the results for the given report structure.

This service runs a custom report and allows to retrieve the results for the given report structure. The start and end date defines the report data timeframe, also the filters are applied.

The response will be a report id which could be used to retrieve the report using the service /get-report-result

See the service Update custom report to change the structure of the report.

Response
application/json

Success

{
  "report_id": "4e6a5826-9a18-4656-b527-03dd7ad1b258",
  "Items": []
}
Parameters
4
ParameterTypeExampleDescription
report_name required string query simples221 The name of the Report
start_date required string query 2021-01-01 Start date
end_date required string query 2021-06-30 End date
x-api-key required string header xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx Key
Response 200application/json
2 fields

Success

FieldTypeDescription
report_idstringField name
ItemsarrayItems
Response 400application/json
1 fields

Error Response

FieldTypeDescription
messagestringMessage
Response 403application/json
2 fields

403 response

FieldTypeDescription
urlstringURL
messagestringMessage
GET /get-report-result

Retrieve Custom Report CSV

get_custom_report_results_csv

This service runs a custom report and allows to retrieve the results as a pre signed URL which contains a CSV file with the report results.

This service runs a custom report and allows to retrieve the results for the given report structure. The start and end date defines the report data timeframe, also the filters are applied.

See the service Update custom report to change the structure of the report.

Response
application/json

Success

{
  "Items": [
    {
      "product_name": "Assess",
      "status": "succeeded",
      "transaction_id": "1ce37c58-12aa-400f-a7b6-97f5d63b0e50",
      "host_env": "health.staircaseapi.com",
      "created_at": "2021-06-25 14:03:03.504"
    }
  ]
}
Parameters
3
ParameterTypeExampleDescription
report_id required string query simples221 The id of the report
next_token string query 000000000000 The token for the next set of items to return. (You received this token from a previous call. If you have reached the end of the stream, the returned token is null.)
x-api-key required string header xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx Key
Response 200application/json
1 fields

Success

FieldTypeDescription
Itemsobject[]Items
transaction_idstringField name
created_atstringField name
host_envstringField name
product_namestringField name
statusstringField name
Response 400application/json
1 fields

Error Response

FieldTypeDescription
messagestringMessage
Response 403application/json
2 fields

403 response

FieldTypeDescription
urlstringURL
messagestringMessage

Cost Metrics

POST /cost-metric

Create a Cost Metric

create_cost_metric

Create a cost metric. These metrics are used to track customer costs.

Request
application/json
{
  "product_name": "Health",
  "transaction_id": "3041fe98-4005-438d-9e14-5849ed8d6cc6",
  "cost_in_cents": 95,
  "cost_category": "customer"
}
Response
application/json

Success response.

{
  "message": "cost metric created"
}
Parameters
1
ParameterTypeExampleDescription
x-api-key required string header <redacted> Key
Request bodyapplication/json
9 fields
FieldTypeDescription
transaction_idrequiredstringTransactions 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. A transaction_id, when used properly, gives you a holistic view of the data related to the transaction you’ve assembled.
cost_in_centsrequirednumberThe Cost in cents. It must be an integer number.
pagesstringThe number of pages of a document used for data extraction.
partnerstringPartner
product_namerequiredstringThe system that is exposed externally to customers and performs the action. Examples Assess, Build, Employment.
document_typestringThe type of document in the data extraction. Example: W2cost: the cost price.
cost_categoryrequiredstringThere are only two types of cost_category allowed (partner and customer)Example customer
request_collection_idstring (string)A request collection in Staircase is a container for the elements that a product needs to execute. For example, an AUS collection is a digital representation of a loan application, while a Data Extraction collection is a digital representation of a document.Example 01F2MHXNNNVK02YEY63Q5EQ59T
response_collection_idstring (string)A response collection in Staircase is a container for the elements that a product has as an output for its execution.Example 01F2MHXNNNVK02YEY63Q5EQ59T
Response 201application/json
1 fields

Success response.

FieldTypeDescription
messagestringMessage response
Response 400application/json
1 fields

Error Response.

FieldTypeDescription
messagestringError message
Response 403application/json
2 fields

403 response

FieldTypeDescription
urlstringURL
messagestringMessage
GET /cost-metric

Retrieve a Cost Metric

get_cost_metric

Retrieve a list of cost metric. These metrics are used to track customer costs.

Response
application/json

Ok.

{
  "cost_metrics": [
    {
      "product_name": "Health",
      "transaction_id": "2345678a",
      "cost_in_cents": "123",
      "partner": "test-partner",
      "document_type": "test-1",
      "pages": "223",
      "created_at": "2021-10-04 15:06:06.720"
    },
    {
      "product_name": "Health",
      "transaction_id": "2345678a",
      "cost_in_cents": "162",
      "partner": "test-partner",
      "document_type": "test-1",
      "pages": "223",
      "created_at": "2021-10-04 15:06:13.462"
    }
  ]
}
Parameters
11
ParameterTypeExampleDescription
transaction_id string query 2345678a 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. A transaction_id, when used properly, gives you a holistic view of the data related to the transaction you’ve assembled.
product_name string query Health The system that is exposed externally to customers and performs the action. Examples Assess, Build, Employment.
partner string query softworks Partner
cost_in_cents string query 95 Cost
pages string query 110 The number of pages of a document used for data extraction.
cost_category string query partner Cost category the metric belongs to.
document_type string query test-1 The type of document in the data extraction.
start_date string query 2021-04-13 If provided, filters by start_date it must be used together with the end_date. Date must be in ISO8601 format: YYYY-MM-DD
end_date string query 2021-04-16 If provided, filters by end_date it must be used together with the start_date. Date must be in ISO8601 format: YYYY-MM-DD
date string query 2021-04-16 If provided, filters by date Date must be in ISO8601 format: YYYY-MM-DD
x-api-key required string header <redacted> API key
Response 200application/json
1 fields

Ok.

FieldTypeDescription
Itemsobject[]Items
transaction_idstringTransaction Identifier
cost_in_centsstringcost
pagesstringpages
partnerstringpartner
created_atstringCreation date in timestamp format
product_namestringName of the Product
document_typestringType of the document
Response 400application/json
1 fields

Error response example

FieldTypeDescription
ErrorstringError
Response 403application/json
2 fields

403 response

FieldTypeDescription
urlstringURL
messagestringMessage

Development

POST /development-products

Mark as development env for specific product

register_env

Mark this environment as development env for specific product, so failures for this product on this env will not affect Staircase status page.

Request
application/json
{
  "product_id": "ccd6b8dd-02a7-4c64-a983-7e0c108cd666",
  "is_disabled": true
}
Response
text/html

400 response.

<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
Parameters
2
ParameterTypeExampleDescription
x-sc-trace-id required string header 01GYYMHV78DVPV5TSHPQTJ31X9 Trace ID
x-api-key required string header <redacted> API key
Request bodyapplication/json
2 fields
FieldTypeDescription
product_idrequiredstringThe product id that we want to mark as development env.Example ccd6b8dd-02a7-4c64-a983-7e0c108cd666
is_disabledrequiredbooleanIf true, disable sending alerts for this product_id on this env.Example true
Response 201application/json
1 fields

Ok.

FieldTypeDescription
messagestringThe environment was configured successfully
Response 400application/json
1 fields

400 response.

FieldTypeDescription
messagestringError in storing the environment invalid host
Response 403application/json
1 fields

Forbidden

FieldTypeDescription
messagestringError message
Response 504application/json
1 fields

504 Timeout response.

FieldTypeDescription
messagestringEndpoint request timed out

Performance Metrics

POST /metric/{transaction_id}

Create New Metric

create_metric

Create New Metric.

Registers a metric identified by a transaction_id or a unique identifier to track product performance, If multiple services in a product perform processing for the same transaction, the services should send their results to Create New Metric, enabling customers to see the result for one transaction between all products.

Create New Metric tracks the following metric types:

  • Transaction: For every service endpoint invocation, a metric of this type is posted to Health providing information about the service, error, or relevant data to track.

    Show the rest
  • Logging: For every service endpoint invocation the logging metrics are posted to follow up the execution process in the source code and including relevant information to track an issue.

  • Health Metrics stores additional fields depending on the product family that allows tracking product KPIs.

    Single Health Metric payload has 256 KB size limit.

    Creating a new metric programmatically example:

    import requests
    from uuid import uuid4
    import json
    import boto3
    client = boto3.client('dynamodb')
    def create_metric(event, **kwargs):
    transaction_id = str(uuid4)
    request_host = event["headers"]["Host"]
    service_url = request_host + event['path']
    x_api_key = event['headers']['x-api-key']
    logging_message = kwargs["logging_message"] if "logging_message" in kwargs else None
    if "error" in kwargs and isinstance(kwargs['error'], dict):
    payload = {
    "host_environment": request_host,
    "product_name": kwargs['product_name'],
    "metric_type": kwargs['metric_type'],
    "logging_message": logging_message, 
    "method": kwargs['method'],
    "service_endpoint": service_url,
    "error": kwargs['error'], 
    "data":
    { "status": kwargs['status_response']}
    }
    else:
    payload = {
    "host_environment": request_host,
    "product_name": kwargs['product_name'],
    "metric_type": kwargs['metric_type'],
    "logging_message": logging_message, 
    "method": kwargs['method'],
    "service_endpoint": service_url,
    "data":
    { "status": kwargs['status_response']}
    }
    requests.post(
    f"",
    headers={"x-api-key": x_api_key},
    json=payload
    )
    @cors_headers
    def lambda_handler(event, context):
    try:
    # Example doing something 
    create_metric(event, product_name="test_example", metric_type="logging", "logging_message"="start handler" method="POST", status_response=200 )
    item_example = {
    "Enterprise": "Staircase",
    "Phone":"1-347-563-5689",
    }
    response = client.put_item(
    TableName='string',
    Item=item_example
    )
    # Example create a successfully metric 
    create_metric(event, product_name="test_example", metric_type="transaction", method="POST", status_response=200 )
    # return function example 
    return {
    'statusCode': 200,
    'body': json.dumps({'response': response })
    }
    except Exception as e:
    # create metric error 
    create_metric(event, product_name="test_example", error={
    "status": 400,
    "message": 'error',
    "code": 42042}, metric_type="transaction", method="POST", status_response=200 )
    # return function example 
    return {
    'statusCode': 400,
    'body': json.dumps({'response': e })
    }
    
    Request
    application/json

    Use HealthMetricInputV3 schema - An example of error report.

    {
      "host_environment": "documentation.staircaseapi.com",
      "product_name": "employment",
      "service_endpoint": "/employment",
      "method": "POST",
      "metric_type": "transaction",
      "partner_name": "truework",
      "operation_status": "STARTED",
      "request_collection_id": "01F2Q6WJXF5DK3ERTZ1E9NDNE8",
      "response_collection_id": "01F2Q6WJXF5DK3ERTZ1E9NDNE8",
      "elapsed_time": 200.27
    }
    Response
    application/json

    Ok.

    {
      "message": "metrics created."
    }
    Parameters
    2
    ParameterTypeExampleDescription
    x-api-key required string header xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx API key
    transaction_id required string path 3cd0ffab-6e87-40a8-bc84-697155131f4c 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. A transaction_id, when used properly, gives you a holistic view of the data related to the transaction you’ve assembled.
    Request bodyapplication/json
    14 fields
    FieldTypeDescription
    product_namerequiredstringThe system that is exposed externally to customers and performs the action. Examples Assess, Build, Employment.Example employment
    host_environmentstringEnvironment host where the product is deployed.Example documentation.staircaseapi.com
    service_endpointrequiredstringThe service endpoint URL that executed an operation, process, or function in the product. Endpoints with path parameters cannot be sent with real values, it must be sent as variables. Example /metric/%7Btransaction_id%7D and /metric are service endpoints of the Health product.Example /metric/%7Btransaction_id%7D
    methodstringHTTP's method or verb that indicates the service endpoint operation type.DELETE GET PATCH POST PUTExample POST
    metric_typestring (string)The type of metric to create, valid options: logging | transactionloggingtransactionExample logging
    logging_messagestring (string)This field is only available for logging metric_type. It is used for logging purpose.Example Get collection translation
    dataobjectReceives a valid JSON with data fields the product wants to log to track issues faster.
    request_collection_idstring (string)A request collection in Staircase is a container for the elements that a product needs to execute. For example, an AUS collection is a digital representation of a loan application, while a Data Extraction collection is a digital representation of a document.Example 01F2MHXNNNVK02YEY63Q5EQ59T
    response_collection_idstring (string)A response collection in Staircase is a container for the elements that a product has as an output for its execution.Example 01F2MHXNNNVK02YEY63Q5EQ59T
    partner_namestringThe name of the data partner you will receive a product response from. Products that interact with partner integrations in the service endpoint operation should send this field.Example Atomic
    severitystringThe type of the severity to create metric.CRITICALDEBUGERRORHIGHINFOLOWMEDIUMWARNING
    operation_statusstringEvery single Staircase service endpoint (such as POST /persistence/transactions or POST /aus/underwrite) is required to provide operation status updates to denote the progress of a transaction in its execution. For more information see the Health overview page with examples.ABORTEDCANCELLEDCOMPLETEDCREATEDEMAIL_CONFIRMEDERRORFAILEDIN PROGRESSIN_PROGRESSNOT_FOUNDREQUEST_MADERUNNINGSTARTEDSUCCEEDEDSUCCEEDED_WITH_WARNINGTIMED_OUTTIMEOUTUNAUTHORIZEDWAITING_FOR_RESPONSEExample COMPLETED
    elapsed_timenumberThe measured duration of an event. The time is expressed in seconds.Example 120.27
    errorobjectReceives a valid JSON with the fields to store the error or exception details that occurred during the operation execution. The metric is considered as failed when the error details are provided
    statusrequiredintegerStatus or error code that will be returned by the serviceExample 401
    codeintegerInternal error codes.Example 42042
    messagerequiredstringMessage of Status Code.Example Unauthorized
    more_infostringAdditional Information on ErrorExample https://api.staircase.co/docs/errors/42042
    Response 201application/json
    1 fields

    Ok.

    FieldTypeDescription
    messagestringMessage the metric was successfully created
    Response 400application/json
    1 fields

    Failed Creation.

    FieldTypeDescription
    messagestringMessage reason why the creation has failed
    Response 403application/json
    2 fields

    403 response

    FieldTypeDescription
    urlstringURL
    messagestringMessage
    Response 500application/json
    1 fields

    Failed Creation.

    FieldTypeDescription
    messagestringMessage error
    GET /metric

    Retrieve Metrics

    transactions_list

    The service retrieves a list of metrics given one or multiple filters. To retrieve all results, send the request with the same query parameters and next_token provided on the previous call until next_token does not appear in the response.

    The parameters must use URL Encoding for Special Characters ``` e.g. Left Curly Brace (“{”) = “%7B”, Right Curly Brace (“}”) = “%7D” ``` service_endpoint=%7Btransaction_id%7D

    Example: service_endpoint=/metric/%7Btransaction_id%7D, for the service "/metric/%7Btransaction_id%7D"

    Response
    application/json

    Ok.

    {
      "Success response": {
        "value": {
          "next_token": "eyJwcm9kdWN0X25hbWUiOiAiQnVpbGQiLCAiY3JlYXRlZF9hdCI6ICIyMDIxLTA2LTA0VDE0OjU5OjE5LjU3MTg3OSJ9",
          "metrics": [
            {
              "created_at": "2021-07-07T14:17:28.991666-04:00",
              "product_name": "a",
              "status": "succeeded",
              "customer_api_key": "f5c4fec5-2159-4ca4-a061-ab8938ceb70d",
              "transaction_id": "11111111111111",
              "service_endpoint": "/bulg",
              "elapsed_time": "120.0",
              "service_name": "a"
            },
            {
              "request_collection_id": "a",
              "created_at": "2021-05-13T14:07:36.598931-04:00",
              "product_name": "aa",
              "status": "succeeded",
              "transaction_id": "KLKLKLKLKLKLKLKLKLKLKLKL",
              "service_endpoint": "",
              "service_name": "aa"
            }
          ]
        }
      }
    }
    Parameters
    15
    ParameterTypeExampleDescription
    x-api-key required string header xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx API key
    service_name string query /employment It will be consider as product_name, If provided, filters by concrete product name.
    product_name string query employment If provided, filters by concrete product name.
    criterion string query succeeded It will be consider status. Available values: failed, succeeded
    status string query succeeded status. Available values: failed, succeeded
    partner_name string query Atomic If provided, filters by partner_name
    operation_status string query STARTED If provided, filters by operation_status
    metric_type string query logging If provided, filters by metric_type
    severity string query LOW If provided, filters by severity
    start_date string query 2021-04-13 If provided, filters by start_date it must be used together with the end_date. Date must be in ISO8601 format: YYYY-MM-DD
    end_date string query 2021-04-16 If provided, filters by end_date it must be used together with the start_date. Date must be in ISO8601 format: YYYY-MM-DD
    date string query 2021-04-16 If provided, filters by date Date must be in ISO8601 format: YYYY-MM-DD
    next_token string query 000000000000 The token for the next set of items to return. (You received this token from a previous call. If you have reached the end of the stream, the returned token is null.)
    customer_api_key string query 954913e2-db71-4f22-b71c-ef803915eb2b It is the key required in order to use the API. Filters by customer_api_key.
    elapsed_time string query 120.27 The measured duration of an event. The time is expressed in seconds.
    Response 200application/json
    2 fields

    Ok.

    FieldTypeDescription
    next_tokenstringPagination Token
    metricsobject[]Metrics
    host_environmentstringEnvironment host where the product is deployed.
    service_endpointstringThe service endpoint URL that executed an operation, process, or function in the product. Endpoints with path parameters cannot be sent with real values, it must be sent as variables. Example /metric/%7Btransaction_id%7D and /metric are service endpoints of the Health product.
    product_namestringThe system that is exposed externally to customers and performs the action. Examples Assess, Build, Employment.
    created_atstringA collection in Staircase is a container for the elements that a product needs to execute. For example, an AUS collection is a digital representation of a loan application, while a Data Extraction collection is a digital representation of a document.
    operation_statusstringThe status of an operation given the nature of the actions performed by the service and the transaction result. The service endpoint operation could be successful but the transaction_id could have different status given certain conditions and other operations performed.
    metric_typestringThe type of metric options allowed logging | transaction
    logging_messagestringThis field is only available for metric_type equals logging. It is used for logging purpose.
    transaction_idstringTransactions 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. A transaction_id, when used properly, gives you a holistic view of the data related to the transaction you’ve assembled.
    severitystringSeverity e.g. (HIGH, MEDIUM, LOW)CRITICALDEBUGERRORHIGHINFOLOWMEDIUMWARNING
    customer_api_keystringIt is the key required in order to use the API. Filters by customer_api_key.
    partner_namestringThe name of the data partner you will receive a product response from. Products that interact with partner integrations in the service endpoint operation should send this field.
    elapsed_timestringThe measured duration of an event. The time is expressed in seconds.
    Response 400application/json
    1 fields

    Error Response.

    FieldTypeDescription
    messagestringError message
    Response 403application/json
    2 fields

    403 response

    FieldTypeDescription
    urlstringURL
    messagestringMessage
    Response 504application/json
    1 fields

    504 Timeout response.

    FieldTypeDescription
    messagestringEndpoint request timed out
    GET /metric/{transaction_id}

    Retrieve Metrics by Transaction ID

    get_metrics

    Retrieve Metrics by transaction_id

    Retrieve all health reports for specified transaction_id

    Response
    application/json

    Ok.

    {
      "Success Response": {
        "metrics": [
          {
            "host_environment": "health.staircaseapi.com",
            "created_at": "2021-07-02T14:52:18.657665-04:00",
            "product_name": "Health",
            "data": {
              "request_data": "9384b4ac-9ea5-4926-824c-eefe37d9689c"
            },
            "status": "succeeded",
            "customer_api_key": "954913e2-db71-4f22-b71c-ef803915eb2b",
            "transaction_id": "9384b4ac-9ea5-4926-824c-eefe37d9689c",
            "metric_type": "transaction",
            "method": "GET",
            "service_endpoint": "/metric"
          }
        ]
      }
    }
    Parameters
    8
    ParameterTypeExampleDescription
    x-api-key required string header xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx API key
    transaction_id required string (uuid) path 3cd0ffab-6e87-40a8-bc84-697155131f4c An Identifier for a Transaction in Staircase.
    next_token string query 000000000000 The token for the next set of items to return. (You received this token from a previous call. If you have reached the end of the stream, the returned token is null.)
    product_name string query Code filters by concrete product name.
    host_environment string query health.staircaseapi.com filters by host environment.
    status string query succeeded filters by status. Available values: failed, succeeded
    service_endpoint string query /transactions filters by service endpoint
    method string query GET filters by Http Methods. Available values DELETE GET PATCH POST PUT
    Response 200application/json
    1 fields

    Ok.

    FieldTypeDescription
    metricsobject[]Response Body
    host_environmentstringEnvironment host where the product is deployed.
    service_endpointstringThe service endpoint URL that executed an operation, process, or function in the product. Endpoints with path parameters cannot be sent with real values, it must be sent as variables. Example /metric/%7Btransaction_id%7D and /metric are service endpoints of the Health product.
    product_namestringThe system that is exposed externally to customers and performs the action. Examples Assess, Build, Employment.
    metric_typestringThe type of metric options allowed logging | transaction
    logging_messagestringThis field is only available for metric_type logging. It is used for logging purpose.
    created_atstringA collection in Staircase is a container for the elements that a product needs to execute. For example, an AUS collection is a digital representation of a loan application, while a Data Extraction collection is a digital representation of a document.
    operation_statusstringThe status of an operation given the nature of the actions performed by the service and the transaction result. The service endpoint operation could be successful but the transaction_id could have different status given certain conditions and other operations performed.
    transaction_idstringTransactions 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. A transaction_id, when used properly, gives you a holistic view of the data related to the transaction you’ve assembled.
    severitystringSeverity e.g. (HIGH, MEDIUM, LOW)CRITICALDEBUGERRORHIGHINFOLOWMEDIUMWARNING
    customer_api_keystringIt is the key required in order to use the API. Filters by customer_api_key.
    partner_namestringThe name of the data partner you will receive a product response from. Products that interact with partner integrations in the service endpoint operation should send this field.
    Response 400application/json
    1 fields

    Error Response.

    FieldTypeDescription
    messagestringError message
    Response 403application/json
    2 fields

    403 response

    FieldTypeDescription
    urlstringURL
    messagestringMessage
    Response 500application/json
    1 fields

    Error while retrieving metrics.

    FieldTypeDescription
    messagestringResponse Body
    Response 504application/json
    1 fields

    504 Timeout response.

    FieldTypeDescription
    messagestringEndpoint request timed out

    Health Metrics

    POST /metrics

    Create Health Metric

    create_health_metric

    Create New Health Metric.

    Health Metric

    Product Identifier

    A product is an entity in the ontology. Product identifiers can be retrieved from Marketplace after product registration. Please visit Marketplace for product registration.

    Product Api Identifier

    API can be referenced by unique ID under products. Please visit Marketplace for API registration.

    Transaction ID

    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. A transaction_id, when used properly, gives you a holistic view of the data related to the transaction you’ve assembled.

    Show the rest
    Response Collection ID

    A response collection in Staircase is a container for the elements that a product has as an output for its execution. Combination of transaction ID and response collection ID uniquely identifies an execution.

    Status
    Status Description
    REQUEST_MADE Request received successful by API.
    IN_PROGRESS Invocation has not reached a final state.
    SUCCEEDED Invocation finished successfully.
    FAILED Invocation was not successful.
    Elapsed Time

    Amount of time that passes between the beginning of the request and the end of the invocation.

    Invocation Code

    The invocation code provides information for the invocation response. Codes and descriptions are given below. Please raise CR if needed invocation code is not listed here.

    Invocation Code Description
    2000 OK. Invocation is successful
    4000 BAD_REQUEST. The server cannot or will not process the request due to something that is perceived to be a client error.
    4001 UNAUTHORIZED. The client is not authenticated to get the requested response.
    4003 FORBIDDEN. The client is known but has no access rights to the content.
    4004 NOT_FOUND. The server can not find the requested resource.
    4009 CONFLICT. The request could not be completed due to a conflict with the current state of the target resource.
    4013 PAYLOAD_TOO_LARGE. The request entity is larger than the limits defined by the server.
    4022 UNPROCESSABLE_ENTITY. The request was well-formed but was unable to be followed due to semantic errors.
    4029 TOO_MANY_REQUEST. The user has sent too many requests in a given amount of time.
    5000 INTERNAL_SERVER_ERROR. The server has encountered a situation it does not know how to handle.
    5004 TIMEOUT. This error response is given when the server cannot get a response in time.
    6000 PARTNER_CALL_SUCCESS. Partner invocation returns a successful response.
    6001 PARTNER_CALL_ERROR_INVALID_AUTH. Unauthorized partner call.
    6002 PARTNER_CALL_ERROR_TIMEOUT. The partner did give the response in the given time.
    6003 PARTNER_CALL_ERROR_TOO_MANY_REQUESTS. Partner called too many times in the amount of time that partner defined.
    6004 PARTNER_CALL_ERROR_INVALID_PAYLOAD. Provided payload to the partner is invalid.
    6005 PARTNER_CALL_ERROR_SERVICE_ERROR. Partner returns generic/unclassified service error.
    6006 PARTNER_CALL_ERROR_NOT_FOUND The server cannot find the requested resource.
    6007 PARTNER_CALL_ERROR_CONFLICT This response is sent when a request conflicts with the current state of the server.
    7000 COLD_START. The server received the request successfully but had an initialization process before working on the client request.
    7001 INTERNAL_OPERATION_THRESHOLD_EXCEEDED. The server could not finish the internal operation at the given threshold. The threshold can be duration, coverage, etc.
    7002 INTERNAL_OPERATION_FAILED. The server completed transaction but had failure in the internal operation.
    7003 OVERHEAD. Metric for measuring overhead on given service.
    8000 SITE_SESSION_INITIATED. Metric for measuring Site Sessions.
    8001 SITE_PAGE_CHANGED. Metric for measuring Site page changes.
    8002 CONSOLE_APP_LOADED. Metric for measuring Console App loads.
    8003 CONSOLE_APP_USED_DATA. Metric for calculating if Console App used prepopulated data.
    9001 EMAIL_SEND. Email send. The send request was successful and the email provider will attempt to deliver the message to the recipient’s mail server.
    9002 EMAIL_DELIVERY. Email delivery. The email provider successfully delivered the email to the recipient’s mail server.
    9003 EMAIL_OPEN. Email open. The recipient received the message and opened it in their email client.
    9004 EMAIL_CLICK. The recipient clicked one or more links in the email.
    9400 EMAIL_DELIVERY_DELAY. The email couldn’t be delivered to the recipient’s mail server because a temporary issue occurred.
    9401 EMAIL_UNSUBSCRIBE. The email was successfully delivered, but the recipient updated their subscription preferences by clicking on an unsubscribe link.
    9403 EMAIL_COMPLAINT. The email was successfully delivered to the recipient’s mail server, but the recipient marked it as spam.
    9500 EMAIL_REJECT. The email provider accepted the email but determined that it contained a virus and didn’t attempt to deliver it to the recipient’s mail server.
    9501 EMAIL_BOUNCE. The recipient’s mail server permanently rejected the email.
    9502 EMAIL_RENDERING_FAILURE. The email wasn’t sent because of a template rendering issue.
    Product Build Hash

    The builder generates a hash value after every product build. The hash value indicates which build version the metric comes from. Please check Builder documentation for details and how to get the build hash.

    Request
    application/json

    An example health metric.

    {
      "product_identifier": "ccd6b8dd-02a7-4c64-a983-7e0c108cd666",
      "product_api_identifier": "1236b8dd-02a7-4c64-a983-7e0c108cd666",
      "transaction_id": "01F2Q6WJXF5DK3ERTZ18JHSNE8",
      "response_collection_id": "01F2Q6WJXF5DK3ERTZ1E9NDNE8",
      "invocation_code": "6001",
      "status": "FAILED",
      "elapsed_time": 200.27
    }
    Response
    application/json

    Ok.

    {
      "id": "86a9ef39-5907-4fb6-bdc5-987017b6c999",
      "message": "metrics created."
    }
    Parameters
    3
    ParameterTypeExampleDescription
    x-sc-trace-id required string header 01GYYMHV78DVPV5TSHPQTJ31X9 Trace ID
    x-api-key required string header <redacted> API key
    x-sc-trace-id string header 041fe98-4005-438d-9e14-5849ed8d6cc6 Id to trace all transactions related. It will be generated automatically if not provided.
    Request bodyapplication/json
    20 fields
    FieldTypeDescription
    product_identifierrequiredstringUnique product identifier.Example ccd6b8dd-02a7-4c64-a983-7e0c108cd666
    product_api_identifierrequiredstringUnique product api identifierExample 548070b4-6ea7-459e-9746-5020446b3a73
    transaction_idrequiredstringTransactions 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. A transaction_id, when used properly, gives you a holistic view of the data related to the transaction you’ve assembled.Example 3cd0ffa-6e87-40a8-bc84-697155131f4c
    response_collection_idrequiredstring (string)A response collection in Staircase is a container for the elements that a product has as an output for its execution. Combination of transaction ID and response collection ID uniquely identifies a single execution.Example 01F2MHXNNNVK02YEY63Q5EQ59T
    statusrequiredstringIndicates status of the process.FAILEDIN_PROGRESSREQUEST_MADESUCCEEDEDExample SUCCEEDED
    elapsed_timerequirednumberThe measured duration of an event. The time is expressed in seconds.Example 120.27
    invocation_coderequiredstringProduct invocation response code. For more information please check invocation code mapping.Example 6001
    configuration_idstringProduct configuration ID.
    product_build_hashstringHash value that generated from builder.
    campaign_idstringCampaign ID
    user_agentstringOptional. Represents actor's user agent. This will not be derived from the request headers if omitted.Example Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3
    person_guidstringPerson GUID
    phone_call_callback_numberstringCallback number
    virtual_phone_numberstringTo phone number
    communication_identifierstringFrom phone number
    call_center_numberstringCall center number
    lead_identifierstringLead identifier
    voice_transcriptionstringThe text representation of the spoken audio, transcribed from voice input.
    sms_textstringThe SMS text that we received.
    x-sc-trace-idstringId to trace all transactions related. It will be generated automatically if not provided.
    Response 201application/json
    2 fields

    Ok.

    FieldTypeDescription
    idstringUnique metric id.
    messagestringMessage the metric was successfully created
    Response 400application/json
    1 fields

    Failed Creation.

    FieldTypeDescription
    messagestringMessage reason why the creation has failed
    Response 403application/json
    1 fields

    Forbidden

    FieldTypeDescription
    messagestringError message
    Response 422application/json
    2 fields

    Unprocessable Entity

    FieldTypeDescription
    messagestringError message
    errorstringError
    POST /metrics/query

    Create Asynchronous Health Metric Query

    create_async_health_query_execution

    Create Asynchronous Health Query Execution

    Query Execution

    Create Asynchronous Health Metric Query creates and executes the query immediately, for the query status and results invoke Get Asynchronous Health Metric Query Result. If you invoke multiple times Get Asynchronous Health Metric Query Result for the same query_id you will receive the same results set that was created during the (first) execution. Each execution of Create Asynchronous Health Metric Query creates a new query and result set.

    Limits

    Limit Value
    Concurrent Query Execution 20 query execution per second

    Timezone

    The Health product uses the timezone Eastern Standard Time (UTC-5). Please specify the include_timezone field in the query configuration to get time with timezone information included.

    Request
    application/json

    Create asynchronous query execution

    {
      "transaction_id": "01F2Q6WJXF5DK3ERTZ18JHSNE8",
      "start_date": "2022-04-11T00:00:00",
      "end_date": "2022-04-11T23:59:59"
    }
    Response
    application/json

    Ok.

    {
      "query_id": "c62a1228-fae7-44c8-aebe-8706ecfb9fc4",
      "status": "PENDING"
    }
    Parameters
    2
    ParameterTypeExampleDescription
    x-sc-trace-id required string header 01GYYMHV78DVPV5TSHPQTJ31X9 Trace ID
    x-api-key required string header <redacted> API key
    Request bodyapplication/json
    22 fields
    FieldTypeDescription
    product_identifierone ofProduct identifier
    product_api_identifierone ofProduct api identifier
    transaction_idone ofTransactions 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. A transaction_id, when used properly, gives you a holistic view of the data related to the transaction you’ve assembled.
    response_collection_idone ofA response collection in Staircase is a container for the elements that a product has as an output for its execution. Combination of transaction ID and response collection ID uniquely identifies a single execution.
    invocation_codeone ofCode that indicates invocation response
    statusone ofIndicates status of the process.
    configuration_idone ofProduct configuration ID.
    product_build_hashone ofHash value that generated from builder.
    campaign_idone ofcampaign_id from metric body.
    user_agentone ofuser_agent from metric body.
    person_guidone ofperson_guid from metric body.
    phone_call_callback_numberone ofcallback number from metric body.
    virtual_phone_numberone ofvirtual_phone_number number from metric body.
    call_center_numberone ofcall_center_number number from metric body.
    lead_identifierone oflead_identifier from metric body.
    communication_identifierone ofphone number from metric body.
    voice_transcriptionone ofThe text representation of the spoken audio, transcribed from voice input.
    query_configurationobjectQuery configuration
    include_timezonebooleanIncludes timezone info and update date format to ISO8601.
    include_host_environmentbooleanIncludes environment domain info to result set.
    callback_urlstring (uri)When query execution is done, this url will be called with resultExample https://webhook.com/callback
    start_daterequiredstringDatetime must be in ISO8601 format.Example 2021-08-13T00:00:00
    end_daterequiredstringDatetime must be in ISO8601 format. Should be later than `start_date`Example 2021-08-13T23:59:59
    x-sc-trace-idstringId to trace all transactions related.Example 041fe98-4005-438d-9e14-5849ed8d6cc6
    Response 201application/json
    2 fields

    Ok.

    FieldTypeDescription
    query_idstringUnique identifier for running query execution
    statusstringStatus of the query execution
    Response 400application/json
    1 fields

    Failed Creation.

    FieldTypeDescription
    messagestringMessage reason why the creation has failed
    Response 403application/json
    1 fields

    Forbidden

    FieldTypeDescription
    messagestringError message
    Response 422application/json
    2 fields

    Unprocessable Entity

    FieldTypeDescription
    messagestringError message
    errorstringError
    GET /metrics/query/{query_id}

    Get Asynchronous Health Metric Query Result

    get_async_health_query_result

    The service retrieves a list of metrics by given query id. To retrieve all results, send the next_token provided on the previous call until next_token does not appear in the response.

    Response
    application/json

    Ok.

    {
      "status": "SUCCEEDED",
      "result_csv_file": "https://athena-query-results-293107503335.s3.amazonaws.com/1cf6527c-95cc-4998-b273-d3f4b9dd8014.csv&Expires=1661502173",
      "next_token": "QVdzd01lM0VwNUNSUjNjakRRMllkNDBEdi92ZWZ6ODJXNFBGZnAxMmk4QjhlcTUrQ2tVaTFIZGpOSXRyYThUYU9YRHVHRzlzN3cxMXEwZTUzY3ZETGxOVHZQOWkwSFYzTUE9PQ==",
      "metrics": [
        {
          "created_at": "2022-08-26 02:34:46",
          "host_environment": "health.staircaseapi.com",
          "product_identifier": "product_identifier_1",
          "product_api_identifier": "product_api_identifier_1",
          "transaction_id": "test-1",
          "response_collection_id": "01F2Q6WJXF5DK3ERTZ1E9NDNE8",
          "elapsed_time": 200.27,
          "status": "IN_PROGRESS",
          "invocation_code": "2000"
        },
        {
          "created_at": "2022-08-26 02:34:49",
          "host_environment": "health.staircaseapi.com",
          "product_identifier": "product_identifier_1",
          "product_api_identifier": "product_api_identifier_1",
          "transaction_id": "test-2",
          "response_collection_id": "01F2Q6WJXF5DK3ERTZ1E9NDNE8",
          "elapsed_time": 200.27,
          "status": "IN_PROGRESS",
          "invocation_code": "2000"
        },
        {
          "created_at": "2022-08-26 02:34:52",
          "host_environment": "health.staircaseapi.com",
          "product_identifier": "product_identifier_1",
          "product_api_identifier": "product_api_identifier_1",
          "transaction_id": "test-3",
          "response_collection_id": "01F2Q6WJXF5DK3ERTZ1E9NDNE8",
          "elapsed_time": 200.27,
          "status": "IN_PROGRESS",
          "invocation_code": "2000"
        },
        {
          "created_at": "2022-08-26 02:34:55",
          "host_environment": "health.staircaseapi.com",
          "product_identifier": "product_identifier_1",
          "product_api_identifier": "product_api_identifier_1",
          "transaction_id": "test-4",
          "response_collection_id": "01F2Q6WJXF5DK3ERTZ1E9NDNE8",
          "elapsed_time": 200.27,
          "status": "IN_PROGRESS",
          "invocation_code": "2000"
        },
        {
          "created_at": "2022-08-26 02:34:58",
          "host_environment": "health.staircaseapi.com",
          "product_identifier": "product_identifier_1",
          "product_api_identifier": "product_api_identifier_1",
          "transaction_id": "test-5",
          "response_collection_id": "01F2Q6WJXF5DK3ERTZ1E9NDNE8",
          "elapsed_time": 200.27,
          "status": "IN_PROGRESS",
          "invocation_code": "2000"
        },
        {
          "created_at": "2022-08-26 02:35:02",
          "host_environment": "health.staircaseapi.com",
          "product_identifier": "product_identifier_1",
          "product_api_identifier": "product_api_identifier_1",
          "transaction_id": "test-6",
          "response_collection_id": "01F2Q6WJXF5DK3ERTZ1E9NDNE8",
          "elapsed_time": 200.27,
          "status": "IN_PROGRESS",
          "invocation_code": "2000"
        },
        {
          "created_at": "2022-08-26 02:35:05",
          "host_environment": "health.staircaseapi.com",
          "product_identifier": "product_identifier_1",
          "product_api_identifier": "product_api_identifier_1",
          "transaction_id": "test-7",
          "response_collection_id": "01F2Q6WJXF5DK3ERTZ1E9NDNE8",
          "elapsed_time": 200.27,
          "status": "IN_PROGRESS",
          "invocation_code": "2000"
        },
        {
          "created_at": "2022-08-26 02:35:08",
          "host_environment": "health.staircaseapi.com",
          "product_identifier": "product_identifier_1",
          "product_api_identifier": "product_api_identifier_1",
          "transaction_id": "test-8",
          "response_collection_id": "01F2Q6WJXF5DK3ERTZ1E9NDNE8",
          "elapsed_time": 200.27,
          "status": "IN_PROGRESS",
          "invocation_code": "2000"
        },
        {
          "created_at": "2022-08-26 02:35:12",
          "host_environment": "health.staircaseapi.com",
          "product_identifier": "product_identifier_1",
          "product_api_identifier": "product_api_identifier_1",
          "transaction_id": "test-9",
          "response_collection_id": "01F2Q6WJXF5DK3ERTZ1E9NDNE8",
          "elapsed_time": 200.27,
          "status": "IN_PROGRESS",
          "invocation_code": "2000"
        }
      ]
    }
    Parameters
    6
    ParameterTypeExampleDescription
    x-sc-trace-id required string header 01GYYMHV78DVPV5TSHPQTJ31X9 Trace ID
    query_id required string path 1fc23e2-b13e-405a-a3de-a5228950e3b8 Unique query execution id
    x-api-key required string header <redacted> API key
    limit integer query 150 The number of results to return in this request.
    next_token string query 000000000000 The token for the next set of items to return. (You received this token from a previous call. If you have reached the end of the stream, the returned token is null.)
    query_id required string path query_id_1 Query ID received previously with asynchronous query creation
    Response 200application/json
    4 fields

    Ok.

    FieldTypeDescription
    statusstringStatus of the query executionFAILEDIN_PROGRESSSUCCEEDEDExample SUCCEEDED
    result_csv_filestringUrl for query result in CSV formatExample https://athena-query-results-293107503335.s3.amazonaws.com/1cf6527c-95cc-4998-b273-d3f4b9dd8014.csv?%2Fol&Expires=1661502173
    next_tokenstringIndicates next page exist. Using this token next page can retrieve.Example QVdMejZQT0gzY1I5ZmZCOXF2V1NlQW1Za2xITTNRYWtiVFViRUswYUVScWk2ZFJ3Q0xRRFFaQkx0QXVNVlU3K0JvZU8yTDIzc0RCSGNlcGg0TE5ZdExIeWJNeDlidDBSNkE9PQ==
    metricsobject[]Metrics
    idstringMetric unique identifierExample babb5fb4-b587-4914-a84c-c52c431b7905
    created_atstringMetric creation date.Example 2022-08-26 02:34:46
    host_environmentstringEnvironment host where the product is deployed.Example health.staircaseapi.com
    product_identifierstringUnique product identifier.Example ccd6b8dd-02a7-4c64-a983-7e0c108cd666
    product_api_identifierstringUnique product api identifier.Example 548070b4-6ea7-459e-9746-5020446b3a73
    transaction_idstringTransactions 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. A transaction_id, when used properly, gives you a holistic view of the data related to the transaction you’ve assembled.Example 3cd0ffa-6e87-40a8-bc84-697155131f4c
    response_collection_idstringA response collection in Staircase is a container for the elements that a product has as an output for its execution. Combination of transaction ID and response collection ID uniquely identifies a single execution.Example 01F2MHXNNNVK02YEY63Q5EQ59T
    elapsed_timenumberThe measured duration of an event. The time is expressed in seconds.Example 14.55
    statusstringIndicates status of the process.Example IN_PROGRESS
    invocation_codestringProduct invocation response code.Example 2000
    configuration_idstringProduct configuration ID.Example e1b96c6d-d24e-459c-ae8a-ec460df3de8f
    product_build_hashstringProduct build hash.Example 46b5218a58aed835e63a3b7bf158742600dfbf10
    Response 400application/json
    1 fields

    Error Response.

    FieldTypeDescription
    messagestringError message
    Response 403application/json
    1 fields

    Forbidden

    FieldTypeDescription
    messagestringError message
    Response 404application/json
    1 fields

    Not found.

    FieldTypeDescription
    errorstringError message.
    Response 504application/json
    1 fields

    504 Timeout response.

    FieldTypeDescription
    messagestringEndpoint request timed out

    Aggregation[new]

    POST /metrics/aggregation/query

    Aggregate Health Metrics[new]

    aggregate_health_metrics

    Aggregate Health Metrics

    The service creates aggregated metric query execution for the given query parameters.

    Aggregation

    Date

    If specified, fillers data between the given start and end date and group them according to the given date interval.

    Interval

    Allowed interval types:

    • second
    • minute
    • hour
    • day
    Filters

    Multiple filters that applied before grouping metrics. Filter condition applied according to the given operator onto the given field.

    Show the rest
    Allowed Operator Allowed Field
    = product_identifier, product_api_identifier, transaction_id, response_collection_id , status, invocation_code, configuration_id, product_build_hash
    Group By

    Group values with a given field. Allowed field names:

    • product_identifier
    • product_api_identifier
    • transaction_id
    • response_collection_id
    • status
    • invocation_code
    • configuration_id
    • product_build_hash
    Methods

    Allows applying methods on filtered and grouped results. Methods are defined and applicable according to filed names. row is a special keyword for representing a single row in the result set.

    Allowed Method Allowed field
    COUNT row, product_identifier, product_api_identifier, transaction_id, response_collection_id , status, invocation_code, elapsed_time, configuration_id, product_build_hash
    SUM elapsed_time
    AVG elapsed_time
    P50, P90, P95, P99 elapsed_time
    Limits
    Limit Value
    Concurrent Aggregation Execution 20 query execution per second
    Request
    application/json

    Create asynchronous query execution

    {
      "date": {
        "start_date": "2022-10-03T00:00:00",
        "end_date": "2022-10-10T23:59:59",
        "interval": {
          "type": "hour",
          "value": "1"
        }
      },
      "filters": [
        {
          "field_name": "product_identifier",
          "field_value": "e53e749f-38ec-4435-943f-6d5c6d32bc12",
          "operator": "="
        }
      ],
      "group_by": [
        "product_identifier",
        "product_api_identifier",
        "status"
      ],
      "methods": [
        {
          "method_name": "COUNT",
          "field_name": "row"
        }
      ]
    }
    Response
    application/json

    Ok.

    {
      "query_id": "c62a1228-fae7-44c8-aebe-8706ecfb9fc4",
      "status": "IN_PROGRESS"
    }
    Parameters
    2
    ParameterTypeExampleDescription
    x-sc-trace-id required string header 01GYYMHV78DVPV5TSHPQTJ31X9 Trace ID
    x-api-key required string header <redacted> API key
    Request bodyapplication/json
    6 fields
    FieldTypeDescription
    daterequiredobjectDate filter and interval specification
    start_daterequiredstringIf provided, filters by start_date it must be used together with the end_date. Date must be in ISO8601 format.Example 2021-08-13T00:00:00
    end_daterequiredstringIf provided, filters by end_date it must be used together with the start_date. Date must be in ISO8601 format.Example 2021-08-13T23:59:59
    intervalobjectDate interval
    typerequiredstringInterval typedayhourminutesecondExample minute
    valuerequiredintegerInterval valueExample 1
    filtersobject[]List of filters
    field_namerequiredstringFilter field nameconfiguration_idinvocation_codeproduct_api_identifierproduct_build_hashproduct_identifierresponse_collection_idstatustransaction_idExample status
    field_valuerequiredstringFilter field valueExample FAILED
    operatorrequiredstringThe operator that will be used for comparison=
    group_byrequiredstring[]Field names that will be used for grouping
    methodsobject[]Methods that will be applied to grouped metrics
    method_namerequiredstringMethod nameAVGCOUNTSUMExample COUNT
    field_namerequiredstringField nameconfiguration_idelapsed_timeinvocation_codeproduct_api_identifierproduct_build_hashproduct_identifierresponse_collection_idrowstatustransaction_idExample row
    callback_urlstring (uri)When query execution is done, this url will be called with resultExample https://webhook.com/callback
    query_configurationobjectQuery configuration
    include_timezonebooleanIncludes timezone info and update date format to ISO8601.
    include_host_environmentbooleanIncludes environment domain info to result set.
    Response 201application/json
    2 fields

    Ok.

    FieldTypeDescription
    query_idstringUnique identifier for running query execution
    statusstringStatus of the query execution
    Response 400application/json
    1 fields

    Failed Creation.

    FieldTypeDescription
    messagestringMessage reason why the creation has failed
    Response 403application/json
    1 fields

    Forbidden

    FieldTypeDescription
    messagestringError message
    Response 422application/json
    2 fields

    Unprocessable Entity

    FieldTypeDescription
    messagestringError message
    errorstringError
    GET /metrics/aggregation/query/{query_id}

    Get Health Aggregation Query Result[new]

    get_aggregated_health_query_result

    Get Health Aggregation Query Result

    The service retrieves aggregated metric query result. To retrieve all results, send the next_token provided on the previous call until next_token does not appear in the response.

    Response
    application/json

    Ok.

    {
      "status": "SUCCEEDED",
      "result_csv_file": "https://athena-query-results-1111111111.s3.amazonaws.com/2ff0bc1e-c48e-438a-b82b-418d2d844f0a.csv?&Expires=1665390635",
      "metrics": [
        {
          "time_interval": "2022-10-05 00:00:00",
          "product_identifier": "e53e749f-38ec-4435-943f-6d5c6d32bc12",
          "product_api_identifier": "087dc8c8-936c-4148-82f6-7f8fe112d48c",
          "elapsed_time_avg": 0.0018733719
        },
        {
          "time_interval": "2022-10-07 00:00:00",
          "product_identifier": "e53e749f-38ec-4435-943f-6d5c6d32bc12",
          "product_api_identifier": "087dc8c8-936c-4148-82f6-7f8fe112d48c",
          "elapsed_time_avg": 0.00072799996
        },
        {
          "time_interval": "2022-10-06 00:00:00",
          "product_identifier": "e53e749f-38ec-4435-943f-6d5c6d32bc12",
          "product_api_identifier": "087dc8c8-936c-4148-82f6-7f8fe112d48c",
          "elapsed_time_avg": 0.0010120743
        }
      ]
    }
    Parameters
    5
    ParameterTypeExampleDescription
    x-sc-trace-id required string header 01GYYMHV78DVPV5TSHPQTJ31X9 Trace ID
    x-api-key required string header <redacted> API key
    limit integer query 150 The number of results to return in this request.
    next_token string query 000000000000 The token for the next set of items to return. (You received this token from a previous call. If you have reached the end of the stream, the returned token is null.)
    query_id required string path query_id_1 Query ID received previously with asynchronous query creation
    Response 200application/json
    4 fields

    Ok.

    FieldTypeDescription
    statusstringStatus of the query executionFAILEDIN_PROGRESSSUCCEEDEDExample SUCCEEDED
    result_csv_filestringUrl for query result in CSV formatExample https://athena-query-results-293107503335.s3.amazonaws.com/1cf6527c-95cc-4998-b273-d3f4b9dd8014.csv?%2Fol&Expires=1661502173
    next_tokenstringIndicates next page exist. Using this token next page can retrieve.Example QVdMejZQT0gzY1I5ZmZCOXF2V1NlQW1Za2xITTNRYWtiVFViRUswYUVScWk2ZFJ3Q0xRRFFaQkx0QXVNVlU3K0JvZU8yTDIzc0RCSGNlcGg0TE5ZdExIeWJNeDlidDBSNkE9PQ==
    metricsobject[]Metrics
    Response 400application/json
    1 fields

    Error Response.

    FieldTypeDescription
    messagestringError message
    Response 403application/json
    1 fields

    Forbidden

    FieldTypeDescription
    messagestringError message
    Response 404application/json
    1 fields

    Not found.

    FieldTypeDescription
    errorstringError message.
    Response 504application/json
    1 fields

    504 Timeout response.

    FieldTypeDescription
    messagestringEndpoint request timed out

    Custom Metric Types

    POST /post-metric

    Create Custom Metrics

    post_custom_metric

    Create custom metric for a specific metric type.

    Create custom metric for a specific metric type

    Request
    application/json
    {
      "metric_type": "test_27",
      "name": "simnlol",
      "address": "formiga112",
      "product": {
        "place": "luzitania",
        "sin": "rep_24"
      },
      "techno": [
        69,
        21,
        12,
        24
      ]
    }
    Response
    application/json

    Created Response

    {
      "resp": "metric sent"
    }
    Parameters
    1
    ParameterTypeExampleDescription
    x-api-key required string header xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx API key
    Request bodyapplication/json
    5 fields
    FieldTypeDescription
    productobjectMetric object
    sinstringMetric field example
    placestringMetric field example
    addressstringMetric field example
    technointeger[]Metric field example
    metric_typerequiredstringMetric field example
    namestringMetric field example
    Response 201application/json
    1 fields

    Created Response

    FieldTypeDescription
    respstringResponse
    Response 400application/json
    1 fields

    Error Response

    FieldTypeDescription
    errorstringError Response
    Response 403application/json
    2 fields

    403 response

    FieldTypeDescription
    urlstringURL
    messagestringMessage
    PUT /put-metric-type

    Update Metric Type

    update_metric_type

    This service update an existing metric type and its fields, allowing the customer to update their own metrics based on events when a metric is posted to the Health.

    This service update an existing metric type and its fields, allowing the customer to update their own metrics based on events when a metric is posted to the Health.

    This service update an existing metric type and its fields, allowing the customer to update their own metrics based on events when a metric is posted to the Health /post-metric service.

    The metric type name is the main reference. The field names can be reference to build a new report.

    Request
    application/json
    {
      "metric_type_name": "test_000",
      "schema": {
        "type": "object",
        "required": [],
        "properties": {
          "name": {
            "type": "string"
          },
          "address": {
            "type": "string"
          },
          "product": {
            "type": "object",
            "properties": {
              "place": {
                "type": "string"
              },
              "sin": {
                "type": "string"
              }
            }
          },
          "techno": {
            "type": "array",
            "items": {
              "type": "number"
            }
          }
        }
      }
    }
    Response
    application/json

    Metric type created response

    {
      "message": "the metric_type was successfully updated"
    }
    Parameters
    1
    ParameterTypeExampleDescription
    x-api-key required string header <redacted> Key
    Request bodyapplication/json
    2 fields
    FieldTypeDescription
    schemaobjectThe metric type schema
    typestringType declaration example
    requiredstring[]Required array. All the field which are required in the schema
    propertiesobjectExample fields
    productobjectExample fields
    typestringExample type
    propertiesobjectExample fields
    addressobjectExample fields
    typestringExample type
    technoobjectExample Array Field
    typestringExample type
    itemsobjectExample Field
    nameobjectExample Field
    typestringExample type
    metric_type_namestringUnique identifier of the metric type
    Response 201application/json
    1 fields

    Metric type created response

    FieldTypeDescription
    messagestringMessage
    Response 400application/json
    1 fields

    Error response

    FieldTypeDescription
    errorstringError
    Response 403application/json
    2 fields

    403 response

    FieldTypeDescription
    urlstringURL
    messagestringMessage
    Response 504application/json
    1 fields

    504 Timeout response.

    FieldTypeDescription
    messagestringEndpoint request timed out
    POST /create-metric-type

    Create Metric Type

    create_new_metric_type

    This service defines a metric type and its fields, allowing the customer to create their own metrics based on events when a metric is posted to the Health.

    This service defines a metric type and its fields, allowing the customer to create their own metrics based on events when a metric is posted to the Health /post-metric service.

    The metric type name is the main reference. The field names can be reference to build a new report.

    Request
    application/json
    {
      "metric_type_name": "test_000",
      "schema": {
        "type": "object",
        "required": [],
        "properties": {
          "name": {
            "type": "string"
          },
          "address": {
            "type": "string"
          },
          "product": {
            "type": "object",
            "properties": {
              "place": {
                "type": "string"
              },
              "sin": {
                "type": "string"
              }
            }
          },
          "techno": {
            "type": "array",
            "items": {
              "type": "number"
            }
          }
        }
      }
    }
    Response
    application/json

    Metric type created response

    {
      "message": "the new metric_type was successfully created"
    }
    Parameters
    1
    ParameterTypeExampleDescription
    x-api-key required string header <redacted> Key
    Request bodyapplication/json
    2 fields
    FieldTypeDescription
    schemaobjectThe metric type schema
    typestringType declaration example
    requiredstring[]Required array. All the field which are required in the schema
    propertiesobjectExample fields
    productobjectExample fields
    typestringExample type
    propertiesobjectExample fields
    addressobjectExample fields
    typestringExample type
    technoobjectExample Array Field
    typestringExample type
    itemsobjectExample Field
    nameobjectExample Field
    typestringExample type
    metric_type_namestringUnique identifier of the metric type
    Response 201application/json
    1 fields

    Metric type created response

    FieldTypeDescription
    messagestringMessage
    Response 400application/json
    1 fields

    Error response

    FieldTypeDescription
    errorstringError
    Response 403application/json
    2 fields

    403 response

    FieldTypeDescription
    urlstringURL
    messagestringMessage
    Response 504application/json
    1 fields

    504 Timeout response.

    FieldTypeDescription
    messagestringEndpoint request timed out

    Environments Data

    POST /register-env

    Register Environment and API Key

    store_new_environment_credentials

    Register the environment and api key the customer wants to get in reports.

    Register the environment and API key, this will allow Health to retrieve data from one environment to another. The data is migrated daily, the customer can retrieve reports from local and other registered environments.

    Request
    application/json

    .

    {
      "host": "test2.staircaseapi.com\"",
      "api-key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    }
    Response
    text/html

    400 response.

    <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
    Parameters
    1
    ParameterTypeExampleDescription
    x-api-key required string header xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx API key
    Request bodyapplication/json
    2 fields
    FieldTypeDescription
    hostrequiredstringThe environment hostExample health.staircaseapi.com
    api-keyrequiredstring (api-key)The api-key used in order to access APIs in the hostExample xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
    Response 201application/json
    1 fields

    Ok.

    FieldTypeDescription
    messagestringThe environment was stored successfully
    Response 400application/json
    1 fields

    400 response.

    FieldTypeDescription
    messagestringError in storing the environment invalid host
    Response 403application/json
    2 fields

    403 response

    FieldTypeDescription
    urlstringURL
    messagestringMessage
    Response 500application/json
    1 fields

    500 response.

    FieldTypeDescription
    messagestringInternal server error
    Response 504application/json
    1 fields

    504 Timeout response.

    FieldTypeDescription
    messagestringEndpoint request timed out

    Report Subscription

    POST /report-subscription

    Create Report Subscription

    report-subscription

    Subscription to receive a report through Slack notification.

    Subscription to receive a report through Slack notification. Specify the period either by days, week, or month, and the filters to apply.

    You can subscribe to the following reports:

    • Partner Report: Subscribe to receive the Partner report. See this link for more information.

    • Products by operation status: Subscribe to receive the Product By Operation Status Report. See this link for more information.

    • Summary Reports: Subscribe to receive the Summary Report by Status. See this link for more information.

    • Products by unique transactions report: Subscribe to receive the Unique Transactions By Product Report. See this link for more information.

    • Custom reports created in the service /build-report

    The Slack media type is currently allowed. A token must be provided to send the notification. After the subscription, the user will receive the report through a post with the results in the configured period.

    Follow this link to choose or create new apps in Slack. Use the app token "Bot User OAuth Token"

    Request
    application/json
    {
      "subscription_name": "no5",
      "media": "slack",
      "send_to_id": "slack-channel-name",
      "period": "1d",
      "products": [
        "employment",
        "income",
        "Health"
      ],
      "environments": [
        "account.staircaseapi.com",
        "health.staircaseapi.com"
      ],
      "report_type": "summary_report",
      "token": "<redacted>"
    }
    Response
    application/json

    Subscription success response

    {
      "message": "Subscription successfully created"
    }
    Parameters
    1
    ParameterTypeExampleDescription
    x-api-key required string header xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx API key
    Request bodyapplication/json
    11 fields
    FieldTypeDescription
    subscription_namerequiredstringUnique Identifier of the Subscription
    group_bystringOption to retrieve unique transactions by field transaction_id, request_collection_id or response_collection_id. It is only used in report type product_by_operation_status or partner report
    periodrequiredstringThe period is sent using d for days, w for weeks and m for months, the number always goes first e.g. 3w
    cronrequiredstringThe scheduler definition is required for cumulative reports. Currently, supports only daily reports. Example of scheduler definition "0 9,16 * * *" → Get report between 00:00 - 09:00 and 00:00 - 16:00 for every day.
    environmentsstring[]Environments
    send_to_idrequiredstringSlack channel name or Member ID (For private DM)
    mediarequiredstringThe only type allowed at the moment is slack
    productsstring[]List of products used in the query to build the reports which will be sent
    partnersstring[]List of partners (only for report_type = partner_report) used in the query to build the reports which will be sent
    tokenstringIn order to use it to send reports through slack this Field is required, the app token must be authorized in the User Token Scopes with files:write
    report_typestringThe report name (partner_report, summary_report, product_by_operation_status and product_unique_transactions_report) or Custom report name
    Response 201application/json
    1 fields

    Subscription success response

    FieldTypeDescription
    messagestringMessage
    Response 400application/json
    1 fields

    Subscription error response

    FieldTypeDescription
    errorstringError
    Response 403application/json
    2 fields

    403 response

    FieldTypeDescription
    urlstringURL
    messagestringMessage
    POST /error-subscription

    Create Error Report Subscription

    create_error_subscription

    This service sends a notification when an error is posted for a product service endpoint in Health.

    Request
    application/json
    {
      "media": "slack",
      "subscription_name": "my-error-subscription",
      "send_to_id": "U04SR512392R",
      "products": [
        "Account",
        "employment"
      ],
      "token": "<redacted>"
    }
    Response
    application/json

    Success Response

    {
      "message": "Subscription successfully created"
    }
    Parameters
    1
    ParameterTypeExampleDescription
    x-api-key required string header <redacted> Key
    Request bodyapplication/json
    5 fields
    FieldTypeDescription
    subscription_namestringUnique Identifier of the Subscription
    send_to_idstringSlack channel name or Member ID (For private DM)
    mediastringThe only type allowed at the moment is slack
    productsstring[]List of products used in the query to build the reports which will be sent
    tokenstringIn order to use it to send reports through slack this Field is required, the app token must be authorized in the User Token Scopes with files:write
    Response 201application/json
    1 fields

    Success Response

    FieldTypeDescription
    messagestringMessage
    Response 400application/json
    1 fields

    Error Response

    FieldTypeDescription
    errorstringError
    Response 403application/json
    2 fields

    403 response

    FieldTypeDescription
    urlstringURL
    messagestringMessage
    DELETE /delete-subscription/{subscription_id}

    Delete Report Subscription

    delete_subscription_id

    This service allows removing a notification subscription.

    This service allows removing a notification subscription, the subscription name must be provided. After deleting the subscription, the notification will not be received through slack.

    Response
    application/json

    Auto generated using Swagger Inspector

    {
      "message": "subscription no2 successfully deleted"
    }
    Parameters
    2
    ParameterTypeExampleDescription
    x-api-key required string header xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx Key
    subscription_id required string path MNe Unique identifier of a subscription which will be deleted.
    Response 200application/json
    1 fields

    Auto generated using Swagger Inspector

    FieldTypeDescription
    messagestringMessage
    Response 400application/json
    1 fields

    Bad request.

    FieldTypeDescription
    errorstringError message.
    Response 403application/json
    2 fields

    403 response

    FieldTypeDescription
    urlstringURL
    messagestringMessage
    Response 404application/json
    1 fields

    Not found.

    FieldTypeDescription
    errorstringError message.
    Response 504application/json
    1 fields

    504 Timeout response.

    FieldTypeDescription
    messagestringEndpoint request timed out
    DELETE /delete-error-subscription/{subscription_id}

    Delete Report Error Subscription

    delete-error-subscription

    This service allows removing a notification subscription.

    This service allows removing a notification subscription, the subscription name must be provided. After deleting the subscription, the notification will not be received through Slack.

    Response
    application/json

    Auto generated using Swagger Inspector

    {
      "message": "subscription no2 successfully deleted"
    }
    Parameters
    2
    ParameterTypeExampleDescription
    x-api-key required string header xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx Key
    subscription_id required string path MNe Unique identifier of a subscription which will be deleted.
    Response 200application/json
    1 fields

    Auto generated using Swagger Inspector

    FieldTypeDescription
    messagestringMessage
    Response 400application/json
    1 fields

    Bad request.

    FieldTypeDescription
    errorstringError message.
    Response 403application/json
    2 fields

    403 response

    FieldTypeDescription
    urlstringURL
    messagestringMessage
    Response 404application/json
    1 fields

    Not found.

    FieldTypeDescription
    errorstringError message.
    GET /get-subscriptions

    Retrieve All Report Subscriptions

    get_all_subscription

    It retrieves a list of subscriptions registered, all subscriptions send a notification with the report type selected, the method, and the send_to_id.

    Response
    application/json

    Subscription data.

    {
      "subscriptions": [
        {
          "subscription_name": "ass",
          "media": "slack",
          "send_to_id": "test",
          "period": "15d",
          "cron": null,
          "report_type": "summary_report",
          "query_info": {
            "customer_x_api_key": "iaia-222-4ca4-a061-xxxaoaoao",
            "environments": [
              "account.staircaseapi.com",
              "health.staircaseapi.com"
            ],
            "products": [
              "employment",
              "income",
              "Health"
            ]
          }
        }
      ],
      "error_subscriptions": [
        {
          "subscription_name": "11",
          "media": "slack",
          "query_info": {
            "products": [
              "Health"
            ]
          }
        }
      ]
    }
    Parameters
    1
    ParameterTypeExampleDescription
    x-api-key required string header xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx Key
    Response 200application/json
    2 fields

    Subscription data.

    FieldTypeDescription
    subscriptionsobject[]Subscription data.
    periodstringPeriod.
    cronstringPeriod.
    send_to_idstringID where it will be sent.
    subscription_namestringUnique identifier of the subscription.
    mediastringSlack the only value allowed at the moment.
    report_typestringType of the report.
    query_infoobjectFilters detail
    customer_x_api_keystringIt is the key required in order to use the API. Filters by customer_api_key.
    environmentsstring[]Environments
    productsstring[]List of products used in the query to build the reports which will be sent
    error_subscriptionsobject[]Error Subscriptions
    subscription_namestringUnique identifier of the subscription.
    send_to_idstringID where it will be sent.
    query_infoobjectFilters detail
    productsstring[]List of products for error metrics.
    mediastringSlack the only value allowed at the moment.
    Response 400application/json
    1 fields

    400 Bad Request

    FieldTypeDescription
    errorstringError message
    Response 403application/json
    2 fields

    403 response

    FieldTypeDescription
    urlstringURL
    messagestringMessage

    Reports

    GET /summary_report_by_status

    Retrieve Summary Report by Status

    get_report_summary_report_by_status

    This report brings the total number of metrics by status.

    This report brings the total number of metrics by status. You can get the following information about your products by using this report:

    • The metrics posted for per product

    • The metrics that succeeded per product.

    • The metrics that failed, this means that an error or exception occurred in the product while processing one of the services.

    Response
    application/json

    Example Success Response

    {
      "report": {
        "Items": [
          {
            "product_name": "service-decision-api-dev",
            "host_env": "account.staircaseapi.com",
            "succeeded": "2",
            "total": 2
          },
          {
            "product_name": "income-dev",
            "host_env": "account.staircaseapi.com",
            "succeeded": "2",
            "total": 2
          },
          {
            "product_name": "assessments",
            "host_env": "health.staircaseapi.com",
            "succeeded": "9",
            "total": 9
          },
          {
            "product_name": "employment",
            "host_env": "health.staircaseapi.com",
            "succeeded": "21",
            "failed": "5",
            "total": 26
          }
        ],
        "Next_token": " "
      }
    }
    Parameters
    6
    ParameterTypeExampleDescription
    start_date required string query 2021-04-01 Filters by start_date it must be used together with the end_date. Date must be in ISO8601 format: YYYY-MM-DD
    end_date required string query 2021-05-30 Filters by end_date. Date must be in ISO8601 format: YYYY-MM-DD
    environments string query account.staircaseapi.com,health.staircaseapi.com List of host environment to filter, the report will bring all environments if this input is not available. Only configured environments will be included in the reports.
    products string query employment,income List of product names to filter, the report will bring all product names if this input is not available.
    next_token string query 000000000000 The token for the next set of items to return. (You received this token from a previous call. If you have reached the end of the stream, the returned token is null.)
    x-api-key required string header xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx API key
    Response 200application/json
    1 fields

    Example Success Response

    FieldTypeDescription
    reportobjectreport
    Itemsobject[]Items
    totalintegerTotal
    host_envstringEnvironment
    product_namestringProduct name
    succeededstringSucceeded
    failedstringFailed
    Next_tokenstringNext token pagination purpose
    Response 400application/json
    1 fields

    Error response

    FieldTypeDescription
    messagestringError Message
    Response 403application/json
    2 fields

    403 response

    FieldTypeDescription
    urlstringURL
    messagestringMessage
    Response 500application/json
    1 fields

    500 response.

    FieldTypeDescription
    messagestringInternal server error
    GET /partner_report

    Retrieve Partner Report

    get_report_partner_report

    This report retrieves the number of transactions and the last operation status by partner in the given timeframe period.

    The Mortgage products operations with a data partner are registered from the beginning of the transaction until it is completed. This report retrieves the number of transactions and the last operation status by partner in the given timeframe period.

    The data will be aggregated between all environments registered. See this link for more information.

    Response
    application/json

    Success Response

    {
      "report": {
        "Items": [
          {
            "product_name": "employment",
            "partner": "atomic",
            "total_by_status": {
              "STARTED": 1,
              "IN_PROGRESS": 3,
              "COMPLETED": 1
            },
            "total": 5
          },
          {
            "product_name": "income",
            "partner": "truework",
            "total_by_status": {
              "STARTED": 1,
              "COMPLETED": 2,
              "CANCELLED": 1
            },
            "total": 4
          },
          {
            "product_name": "employment",
            "partner": "truework",
            "total_by_status": {
              "STARTED": 2,
              "COMPLETED": 3,
              "CANCELLED": 6
            },
            "total": 11
          },
          {
            "product_name": "employment",
            "partner": "citadel",
            "total_by_status": {
              "STARTED": 1,
              "IN_PROGRESS": 4
            },
            "total": 5
          },
          {
            "product_name": "employment",
            "partner": "argyle",
            "total_by_status": {
              "IN_PROGRESS": 5
            },
            "total": 5
          },
          {
            "product_name": "employment",
            "partner": "verix",
            "total_by_status": {
              "COMPLETED": 6
            },
            "total": 6
          }
        ]
      }
    }
    Parameters
    7
    ParameterTypeExampleDescription
    start_date required string query 2021-05-01 Filters the data by a range of dates starting with this date. Date must be in ISO8601 format: YYYY-MM-DD
    end_date required string query 2021-05-31 Filters the data until this date. Date must be in ISO8601 format: YYYY-MM-DD
    environments string query documentation.staircaseapi.com List of host environment to filter, the report will bring all environments if this input is not available. Only configured environments will be included in the reports.
    products string query employment,income List of product names to filter, the report will bring all product names if this input is not available.
    group_by string query request_collection_id Option to retrieve unique transactions by field transaction_id, request_collection_id or response_collection_id.
    partners string query atomic,citadel The name of the data partners in Mortgage products.
    x-api-key string header xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx Key
    Response 200application/json
    1 fields

    Success Response

    FieldTypeDescription
    reportobjectReport
    Itemsobject[]Items
    totalintegerTotal
    partnerstringPartner
    product_namestringProduct name
    total_by_statusobjectTotal
    COMPLETEDintegerOperation status
    Response 400application/json
    1 fields

    Auto generated using Swagger Inspector

    FieldTypeDescription
    messagestringMessage
    Response 403application/json
    2 fields

    403 response

    FieldTypeDescription
    urlstringURL
    messagestringMessage
    Response 504application/json
    1 fields

    504 Timeout response.

    FieldTypeDescription
    messagestringEndpoint request timed out
    GET /product_by_operation_status

    Retrieve Product by Operation Status Report

    get_report_product_by_operation_status

    This report retrieves the number of transactions and the last operation's status for the given timeframe period.

    Every single Staircase service endpoint (such as POST /persistence/transactions or POST /aus/underwrite) is required to provide operation status updates to denote the progress of a transaction in its execution. For more information and examples see this link

    This report retrieves the number of transactions and the last operation's status for the given timeframe period.

    Response
    application/json

    Example Success Response

    {
      "report": {
        "Items": [
          {
            "product_name": "get-code-clone",
            "host_env": "health.staircaseapi.com",
            "total_by_status": {
              "STARTED": 11,
              "IN PROGRESS": 21
            },
            "total": 32
          }
        ]
      },
      "next_token": "eyJOZXh0VG9rZW4iOiAiQVJ0Zkl4L2QvOVdnRUpBTFJidWNQU0c0MVhrS3lTVURJU3JobCt3dHEvaUZxM3NNa0R2S3NSS0pVdmh4RVZQME5CRzBtS2lGTnF0ZGZlMTBpS3RsM09EZTBSZ0I0OS8rbXc9PSIsICJRdWVyeUV4ZWN1dGlvbklkIjogIjFhYzgwMDUyLTgwNzktNDA4YS04OWU3LTlmM2Q4NWEzZWVjMSJ9"
    }
    Parameters
    7
    ParameterTypeExampleDescription
    start_date required string query 2021-04-01 Filters by start_date it must be used together with the end_date. Date must be in ISO8601 format: YYYY-MM-DD
    end_date required string query 2021-05-30 Filters by end_date. Date must be in ISO8601 format: YYYY-MM-DD
    environments string query account.staircaseapi.com,health.staircaseapi.com List of host environment to filter, the report will bring all environments if this input is not available. Only configured environments will be included in the reports.
    products string query employment,income List of product names to filter, the report will bring all product names if this input is not available.
    group_by string query request_collection_id Option to retrieve unique transactions by field transaction_id, request_collection_id or response_collection_id.
    next_token string query 000000000000 The token for the next set of items to return. (You received this token from a previous call. If you have reached the end of the stream, the returned token is null.)
    x-api-key required string header xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx API key
    Response 200application/json
    1 fields

    Example Success Response

    FieldTypeDescription
    reportobjectReport
    Itemsobject[]Items
    totalintegerTotal
    host_envstringEnvironment
    product_namestringProduct Name
    IN PROGRESSstringOperation Status
    STARTEDstringOperation Status
    Next_tokenstringNext token pagination
    Response 400application/json
    1 fields

    Error response

    FieldTypeDescription
    messagestringMessage
    Response 403application/json
    2 fields

    403 response

    FieldTypeDescription
    urlstringURL
    messagestringMessage
    Response 500application/json
    1 fields

    500 response.

    FieldTypeDescription
    messagestringInternal server error
    GET /product_unique_transactions_report

    Retrieve Unique Transactions By Product Report

    get_report_product_unique_transactions_report

    This report brings the total number of unique transactions by status and a breakdown per day.

    This report brings the total number of unique transactions by status and a breakdown per day. We can have multiple metrics registered for the same transaction, this report will bring unique transaction id count.

    You can get the following information about your products by using this report:

    • The transactions processed per product.

    • The transactions that were processed by a service endpoint and succeeded.

    • The transactions that were processed by a service endpoint and reported an exception or error.

    Response
    application/json

    Example Success Response

    {
      "report": {
        "Items": [
          {
            "product_name": "Health",
            "host_env": "account.staircaseapi.com",
            "total_unique_transactions": 71,
            "failed": 0,
            "succeeded": 71,
            "per_day": [
              {
                "day": "2021-05-24",
                "succeeded": 7,
                "unique_transactions": 7
              },
              {
                "day": "2021-05-25",
                "succeeded": 31,
                "unique_transactions": 31
              },
              {
                "day": "2021-05-26",
                "succeeded": 12,
                "unique_transactions": 12
              },
              {
                "day": "2021-05-27",
                "succeeded": 8,
                "unique_transactions": 8
              },
              {
                "day": "2021-05-28",
                "unique_transactions": 0
              },
              {
                "day": "2021-05-29",
                "unique_transactions": 0
              },
              {
                "day": "2021-05-30",
                "unique_transactions": 0
              },
              {
                "day": "2021-05-31",
                "unique_transactions": 0
              },
              {
                "day": "2021-06-01",
                "succeeded": 6,
                "unique_transactions": 6
              },
              {
                "day": "2021-06-02",
                "succeeded": 7,
                "unique_transactions": 7
              }
            ]
          }
        ]
      },
      "next_token": "DUyLTgwNzktNDA4YS04OWU3LTlmM2Q4NWEzZWVjMSJ9"
    }
    Parameters
    6
    ParameterTypeExampleDescription
    start_date required string query 2021-04-01 Filters by start_date it must be used together with the end_date. Date must be in ISO8601 format: YYYY-MM-DD
    end_date required string query 2021-05-30 Filters by end_date. Date must be in ISO8601 format: YYYY-MM-DD
    environments string query account.staircaseapi.com,health.staircaseapi.com List of host environment to filter, the report will bring all environments if this input is not available. Only configured environments will be included in the reports.
    products string query employment,income List of product names to filter, the report will bring all product names if this input is not available.
    next_token string query 000000000000 The token for the next set of items to return. (You received this token from a previous call. If you have reached the end of the stream, the returned token is null.)
    x-api-key required string header xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx API key
    Response 200application/json
    1 fields

    Example Success Response

    FieldTypeDescription
    reportobjectReport
    Itemsobject[]Item
    total_unique_transactionsintegerTotal
    host_envstringEnvironment
    per_dayobject[]Total per day
    daystringDate
    unique_transactionsintegerTotal per day
    succeededintegerTotal Succeeded per day
    product_namestringProduct name
    Next_tokenstringNext token pagination
    Response 400application/json
    1 fields

    Error response

    FieldTypeDescription
    messagestringMessage
    Response 403application/json
    2 fields

    403 response

    FieldTypeDescription
    urlstringURL
    messagestringMessage
    Response 500application/json
    1 fields

    500 response.

    FieldTypeDescription
    messagestringInternal server error
    GET /cost-report-day

    Retrieve Cost Report Grouped by day

    get_cost_report_by_day

    Retrieve Cost Report Grouped by day.

    Response
    application/json

    Example Success Response

    {
      "report": {
        "data": {
          "cost_category": "customer",
          "total_cost": 10958155,
          "total_transaction_count": 115349,
          "dates": [
            {
              "date": "2021-12-04",
              "total_cost": 151240,
              "total_transaction_count": 1592,
              "environments": [
                {
                  "environment_name": "health.staircaseapi.com",
                  "total_cost": 151240,
                  "total_transaction_count": 1592,
                  "products": [
                    {
                      "product_name": "Health",
                      "cost_in_cents": 95,
                      "total_cost": 151240,
                      "total_transaction_count": 1592
                    }
                  ]
                }
              ]
            },
            {
              "date": "2021-12-05",
              "total_cost": 303810,
              "total_transaction_count": 3198,
              "environments": [
                {
                  "environment_name": "health.staircaseapi.com",
                  "total_cost": 303810,
                  "total_transaction_count": 3198,
                  "products": [
                    {
                      "product_name": "Health",
                      "cost_in_cents": 95,
                      "total_cost": 303810,
                      "total_transaction_count": 3198
                    }
                  ]
                }
              ]
            },
            {
              "date": "2021-12-06",
              "total_cost": 534375,
              "total_transaction_count": 5625,
              "environments": [
                {
                  "environment_name": "health.staircaseapi.com",
                  "total_cost": 534375,
                  "total_transaction_count": 5625,
                  "products": [
                    {
                      "product_name": "Health",
                      "cost_in_cents": 95,
                      "total_cost": 534375,
                      "total_transaction_count": 5625
                    }
                  ]
                }
              ]
            }
          ]
        }
      }
    }
    Parameters
    6
    ParameterTypeExampleDescription
    end_date required string query 2021-10-18 end_date
    products string query employment,income List of product names to filter
    cost_category required string query customer Cost Category (customer, partner)
    start_date required string query 2021-10-12 start_date
    environments string query account.staircaseapi.com,health.staircaseapi.com List of host environment to filter, the report will bring all environments if this input is not available. Only configured environments will be included in the reports.
    x-api-key required string header xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx API key
    Response 200application/json
    1 fields

    Example Success Response

    FieldTypeDescription
    reportobjectResponse object
    Itemsobject[]Array of Items
    cost_in_centsstringCost in USD cents.
    daystringThe date.
    product_namestringProduct_name
    cost_categorystringCost Category
    Response 400application/json
    1 fields

    Error response

    FieldTypeDescription
    messagestringMessage
    Response 403application/json
    2 fields

    403 response

    FieldTypeDescription
    urlstringURL
    messagestringMessage
    Response 500application/json
    1 fields

    500 response.

    FieldTypeDescription
    messagestringInternal server error
    GET /cost-report-month

    Retrieve Cost Report of a given month

    get_cost_report_month

    Retrieve Cost Report of a given month.

    Response
    application/json

    Example Success Response

    {
      "report": {
        "data": {
          "cost_category": "customer",
          "total_cost": 11133050,
          "total_transaction_count": 117190,
          "dates": [
            {
              "date": "2021-12",
              "total_cost": 11133050,
              "total_transaction_count": 117190,
              "environments": [
                {
                  "environment_name": "health.staircaseapi.com",
                  "total_cost": 11133050,
                  "total_transaction_count": 117190,
                  "products": [
                    {
                      "product_name": "Health",
                      "cost_in_cents": 95,
                      "total_cost": 11133050,
                      "total_transaction_count": 117190
                    }
                  ]
                }
              ]
            }
          ]
        }
      }
    }
    Parameters
    4
    ParameterTypeExampleDescription
    month required string query 10 Month
    products string query employment,income List of product names to filter
    cost_category required string query customer Cost Category (customer, partner)
    x-api-key required string header xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx API key
    Response 200application/json
    1 fields

    Example Success Response

    FieldTypeDescription
    reportobjectResponse object
    Itemsobject[]Array of Items
    cost_in_centsstringCost in USD cents.
    daystringThe date.
    product_namestringProduct_name
    cost_categorystringCost Category
    Response 400application/json
    1 fields

    Error response

    FieldTypeDescription
    messagestringMessage
    Response 403application/json
    2 fields

    403 response

    FieldTypeDescription
    urlstringURL
    messagestringMessage
    Response 500application/json
    1 fields

    500 response.

    FieldTypeDescription
    messagestringInternal server error
    GET /cost-report

    Retrieve Cost Report of a given interval

    get_cost_report

    Retrieve Cost Report of a given interval.

    Response
    application/json

    Example Success Response

    {
      "report": {
        "data": {
          "cost_category": "customer",
          "total_cost": 2081260,
          "total_transaction_count": 21908,
          "dates": [
            {
              "date": "2021-12-24",
              "total_cost": 913235,
              "total_transaction_count": 9613,
              "environments": [
                {
                  "environment_name": "health.staircaseapi.com",
                  "total_cost": 913235,
                  "total_transaction_count": 9613,
                  "products": [
                    {
                      "product_name": "Health",
                      "cost_in_cents": 95,
                      "total_cost": 913235,
                      "total_transaction_count": 9613
                    }
                  ]
                }
              ]
            },
            {
              "date": "2021-12-25",
              "total_cost": 783940,
              "total_transaction_count": 8252,
              "environments": [
                {
                  "environment_name": "health.staircaseapi.com",
                  "total_cost": 783940,
                  "total_transaction_count": 8252,
                  "products": [
                    {
                      "product_name": "Health",
                      "cost_in_cents": 95,
                      "total_cost": 783940,
                      "total_transaction_count": 8252
                    }
                  ]
                }
              ]
            },
            {
              "date": "2021-12-26",
              "total_cost": 384085,
              "total_transaction_count": 4043,
              "environments": [
                {
                  "environment_name": "health.staircaseapi.com",
                  "total_cost": 384085,
                  "total_transaction_count": 4043,
                  "products": [
                    {
                      "product_name": "Health",
                      "cost_in_cents": 95,
                      "total_cost": 384085,
                      "total_transaction_count": 4043
                    }
                  ]
                }
              ]
            }
          ]
        }
      }
    }
    Parameters
    7
    ParameterTypeExampleDescription
    end_date required string query 2021-10-18 end_date
    products string query employment,income List of product names to filter
    cost_category required string query customer Cost Category (customer, partner)
    start_date required string query 2021-10-12 start_date
    date_range_type string query daily Allows grouping costs by selected date type.
    environments string query account.staircaseapi.com,health.staircaseapi.com List of host environment to filter, the report will bring all environments if this input is not available. Only configured environments will be included in the reports.
    x-api-key required string header xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx API key
    Response 200application/json
    1 fields

    Example Success Response

    FieldTypeDescription
    reportobjectResponse object
    Itemsobject[]Array of Items
    cost_in_centsstringCost in USD cents.
    daystringThe date.
    product_namestringProduct_name
    cost_categorystringCost Category
    Response 400application/json
    1 fields

    Error response

    FieldTypeDescription
    messagestringMessage

    Canonical model

    Property data it reads

    Errors

    400403404422500502504

    Type to search.